My favorite code is my worst code

Most code is pretty terrible. Mine is particularly bad, but generally it's rare to see a project and think "wow that's good code". This is fine. Code isn't literature. Clarity is still important, but code is meant to solve a problem (or cause a problem).

I often see people point to some brilliant, clean, well-structured project as their favorite code. Some perfectly formed sculpture of numbers and text, chiseled to perfection over years of planning and refactoring. I'm at the other end, and tend to love my hacky ugly snippets.

They do what they are supposed to, and are a good chance to try new things.

By the time you get caught up in making your code clean and DRY, well-structured and performant, unit-testable and unit-tested, it may as well be a work project. Work projects are not the place for learning too many new things.

← Posts