Search

Cocoa Got Blocks

Tasha Schroeder

4 min read

Jun 13, 2013

Mac

Cocoa Got Blocks

Nerd extraordinaire Steve Sparks wrote a new take on a classic that we know you’re going to love. Check it out on Vimeo or on YouTube.

Cocoa Got Blocks

Oh. My. God. Becky…
Look at this code. It is so big.
It looks like something like C code but with carets.
But you know, who understands C code?
They only use it because it’s a total Pascal substitute, ‘kay?
I mean, the code, it’s just so big.
All the parentheses and curly braces.. Gross! Blegh! It’s just so… block!

I like code blocks and I cannot lie
you other coders can’t deny
that when a job walks in and you look at it and ask can I make this a background task?
you get sprung, wanna pull out the book and give the threading page a look
first thing that I’m thinking
-lpthread when we’re linking
oh baby, there’s gotta be a better way
all that code make me cray-cray
my homeboys tried to warn me
that dispatch stuff is so so boring! Oooh! don’t know what to do
should you throw it on a background queue?
Well if you queue three, and then then twenty, you won’t know what they’re doing.
The queue could be rockin’
or could be lockin’
your mac sweats, jets,
fans are goin like a turbo ‘Vette.
I’m tired of magazines
saying callbacks are the thing
ask the badass coder about that crock, he’d rather code a block.

so fellas (yeah) fellas (yeah)
has your software got the block? (hell yeah)
dispatch (dispatch) dispatch (dispatch) dispatch_once that block
Cocoa Got Blocks
(download Xcode twice fortnightly)
Cocoa Got Blocks

I like my load average down, and when it’s goin’ to town
I just can’t help myself, I’m a proc killin’ animal
now here’s my scandal
I wanna find that pid
and KILL double up DASH NINE
I ain’t talking about meatspace
‘cuz silicone parts’ll win that race
I send my code to the compiler
and then the file size doubles
my SSD’s in trouble
purging that disk on the double
watchin WWDC videos…

knock-kneed coders going real slow
you can have that C code
in my head I’m convertin’ to machine code!
A word to the hot new hardware,
I wanna get Applecare
won’t cuss or Crash-scare,
but I gotta be straight when I say I wanna CODE till the break of dawn!
Lappy got it goin’ on…
some scripter kids won’t like this song
cuz those punks like to hit it and quit it
and I’d rather stay and play
my code’s long and strong
and I’m dyin’ to get the App Store on
So lappies (yeah) lappies (yeah)
Does your Bootcamp time feel crappy? (hell yeah) clean it up, print it out,
even Stallman’s gotta shout
Cocoa Got Blocks
Cocoa Got Blocks

yeah baby when it comes to coding,
C sharp aint got nothin to do with my selection. Source has errors and warnings?
Huh. Only if it’s five MB.

So your intern’s got a Kindle, reading code books by Dalrymple
Well markd ain’t got an SSD in his MBP
my fusion drive don’t want none
unless you got gigs hon

you can still use NSRunLoops
but please don’t lose those blocks.
Some coders wanna play that ‘hard’ role
and tell you that the block ain’t gold
so they select it and delete it
well I hit Github and retrieve it
So you got a bad iostat?
Well I ain’t down with that!
‘cause your code is small and your chips are kickin and the inner variables, stickin’
To the one thread code in the magazines,
you ain’t it, Miss Thing!
give me a caret then those brackets
starts to feel like my code’s got jackets
An iPad tried to diss
My profile’s not on his list
He had game but I used the tether,
for once Xcode had it together
So coders, if the task is right
and you wanna run it out of sight,
Open up the GCD ref’rence book
And read it with delight,
Cocoa Got Blocks!
Cocoa Got Blocks!

I lipo’d up the binary, and it’s got blocks! (4x)

Steve Sparks

Reviewer Big Nerd Ranch

Steve Sparks has been a Nerd since 2011 and an electronics geek since age five. His primary focus is on iOS, watchOS, and tvOS development. He plays guitar and makes strange and terrifying contraptions. He lives in Atlanta with his family.

Speak with a Nerd

Schedule a call today! Our team of Nerds are ready to help

Let's Talk

Related Posts

We are ready to discuss your needs.

Not applicable? Click here to schedule a call.

Stay in Touch WITH Big Nerd Ranch News