ArtLung: Joe Crawford's personal website. 2024.

Comment like you’re going to read it in 5 years.

April Wensel wrote, in her latest newsletter from Compassionate Coding:

Before you add an obscure cultural reference or quirky inside joke to code, though, I implore you to think of the poor developer who may be wading through your code a decade (or a few months) later.

I’m a fan of April‘s work. Her newsletter is worth a subscription.

For me, I try to write a comments so that I’ll understand it when coming to it fresh, five years away. Here’s a terse comment to myself for a function that seems like it’s overkill, but I left myself this message so I don’t footgun myself.

// this is also used in some content. remove at your own risk

Even when I don’t expect anyone else to work on a chunk of code, me in the future is a valuable team member I want to make sure is clued in.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This post accepts webmentions. If you link to and write about this on your website, enter the web address of your post below: