The Code I Used to Write

by Frank Riccobono

Code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live, especially if that future maintainer is you.

I’ve stubbed a thousand methods
I’ve scoped a hundred objects
But not until this test run
Has everything been green.

But fleeting as a stack trace
This bug goes by unnoticed
I open the debugger
I look and I am face to face with…

The code I used to write
Bad patterns left behind
A junior dev
Naivete supreme
Mistakes I should have easily caught
Have brought new problems

The code I used to write
Cannot be removed
Dependencies remain
Impossible to prove
They’re not used somewhere out of sight
The code that I used to write

And all abstractions melt away
New bugs appear, much swifter now

For bad decisions made
Tech debt must be paid
Refactor this pain
To keep my call stack sane
As elegant as it is simple

Once foolish, now I’m wise
Verbose, now concise
Give me a guide
To learn to override
This inexperienced oversight
The code that I used to write

Like what you read? There's more!