On Writing Good Code

by Justin Skycak (@justinskycak) on

It's kind of amusing how some (novice) devs will boast/revel at how many lines of code they wrote while simultaneously cramming each line full with as much complexity as they can hold in working memory.

Want to get notified about new posts? Join the mailing list and follow on X/Twitter.

It’s kind of amusing how some (novice) devs will boast/revel at how many lines of code they wrote while simultaneously cramming each line full with as much complexity as they can hold in working memory.

But to be fair, either everyone or most people (including myself) start out writing trash code, and it’s not until you have to build and maintain a large system that you really start to grok what it means to write decent code.

It’s not good enough for you to understand the code when you write it – you have to be able to refresh your memory quickly in the future after you’ve forgotten it and when you have lots of other things tugging at your working memory.

And it has to be easy to debug. You want to be able to just set a breakpoint and have all the important information right there in front of you.

Building a large system, being on call whenever it fails, spending some late nights bugfixing under pressure, having to continually build new features on top of all that, will hammer the right mindset into you real fast.


Want to get notified about new posts? Join the mailing list and follow on X/Twitter.