I like refactoring and I can not lie
[Intro]

Oh my goodness. Paul, look at that code.
It’s so big. *scoff* It looks like
one of those Fortran guys wrote it
But, y’know, who understands those Fortran guys? *scoff*
They only write that stuff because
it looks like job security, ‘kay?
I mean, that method, it’s just so big. *scoff*
I can’t believe it’s so complex, it’s just out there
I mean, it’s gross. Look!
It’s just so…legacy
[Sir Refactor-a-Lot]
I like refactoring and I can not lie
You other coders can’t deny
That when a method uses too much space
And its complexity is staring you in the face
You get stung

Wanna extract that stuff
Cuz you know testin’s gonna be tough
Deep in the logic it’s glaring
I’m hooked and I can’t stop staring
Oh, man I wanna get fixn’
And make that logic smaller
My metrics tried to warn me
But that mess its got
Exploited that code’s frailty
Ooh, extract method isolates that logic
and makes testin’ easy
And refactoring is so groovy

Many thanks to Sir Mix-A-Lot for such an amusing song (and Sir Trevor Raps-A-Lot for additional rhymes)– don’t forget to read the original lyrics.

January 19th, 2007 at 3:50 pm
[…] I like refactoring and I can not lie- This ain’t no disco, baby! […]
January 20th, 2007 at 9:38 pm
[…] Ruby refactor city Because I like refactoring and I can not lie, I was quite excited to see that a group of disco Ruby stars have begun writing a Ruby edition of Martin Fowler’s seminal work “Refactoring: Improving the Design of Existing Code“– thus far they’ve published chapter 1, which is much like the original, just with Ruby code instead of Java. […]
January 25th, 2007 at 5:09 pm
[…] Sir Mix-a-lot redux: I like Refactoring and I cannot lie […]