Scroll of Tragedy

25 / 141

Chapter XXV

XXV

I rewrote the ugly code that worked.

It offended me. It had four nested conditions and a variable named tmp2 and a comment that lied. So I made it beautiful — flat, named, documented — and in the flattening I dropped the branch that handled the case from three years ago that only fires in production, in February, for the customer nobody wants to lose.

The comment lied because the code had been patched by someone who understood something I did not. I removed the patch and kept the beauty.

Share this chapter

Copy this link and send it to someone who would enjoy the reading.