Refactoring a Loop That Was Trying Too Hard
I fixed bug last night.
The bug was difficult to fix because the code was so complex. I wasn’t really able to fix it until I simplified the code. Once the code was simplified the bug was easy to fix. While doing this I found an anti-pattern that I now call “One loop trying too hard”.read more
An open letter to Uncle Bob about "Defund The Police"
You’ve tweeted that you feel “defund the police” is a terrible policy. I hope to change your mind.
Ignore the name. It is imperfect. In software engineering terms, “defund the police” is similar to the strangler pattern.
For the non-engineers reading this, TSP is a reasonable, pragmatic, and down-to-earth way to slowly replacement an old system with a new system. The name is terrible… I would have called it the warm hug of gradual change.read more
Go has eliminated most of my off-by-one errors except 0... I mean 1.
for x = range foo) has eliminated the most common trap where I make off-by-one errors. The next largest category of off-by-one errors would be eliminated if there was a way to specify the last item in an array. It would also improve a developer’s ability to convey intent.
All I Do Is Play With Strings
A poem I wrote earlier this year.read more