Evan Hahn posted his programming beliefs at EvanHahn.com. I feel him on all of his beliefs, but these stood out to me as being beliefs I deeply identify with:

Do a “spike”. Sometimes, I try implementing a feature in the smallest possible amount of time, with awful code, horrible hacks, and lots of TODOs. Once I have something working, I clean it up. I’ve found this to be a useful way to see where the challenges lie, and a pretty good way to build things quickly. See “Throw away your first draft of your code”.

This is really important because it intentionally shortens the feedback cycle and can help inform future work, quickly.

Use the positive version of a variable. Variables like use_widget are better than skip_widget because they help avoid confusing double-negatives. (I’ve seen this confusion cause a significant security bug!)

As a software engineer, I spend way more time reading code. Badly named variables can really slow you down if you are reading for understanding or during a code review. Avoid this

var notEligible = ...

if (!notEligible) {
  ...
}

Making useless stuff can be a great way to learn new things. Not everything needs to be productive, but sometimes it can be anyway! For example, I spent a bunch of time writing a custom PNG encoder for a side project. I never thought it’d be useful. But then a few months later, I needed to write some code to detect animated PNG data for work, and it was trivial to write because I knew exactly how to do it.

I’ve learned so much doing side projects. I always keep one in the tuck. My latest side project, I’ve deepened my knowledge of Spring Boot, JPA / Hibernate, and learned a new front-end framework, NextJS.

One day, I’ll collect all of my thoughts and publish my programming beliefs.

🧇