i strive to write code that’s readable enough not to need code comments… but when you’re dealing with time and duration, it’s really difficult to keep things straight. i’ve been working with time a lot as i work on FireHydrant’s upcoming on-call product, and something i’ve been adding a lot to my code that deals with time is visual comments. for example, take this test about requesting coverage. the intended result is visible at a glance without having to juggle eight timestamps in your head!
Did you like this post, repost it, or respond to it? Let me know by sending a webmention!
💬 Replies (1)
@davidcelis i'm also big fan of visual comments + capturing context in test comments. i know i'd totally appreciate stumbling into something like this :)