junior dev: can you please give me an example of useful comments in my code?
Me: sure, good comments look like this ⤵️
junior dev: can you please give me an example of useful comments in my code?
Me: sure, good comments look like this ⤵️
nixcraft's point here is simple:
there's certain kinds of code that if you touch it it will kill you
// Dear maintainer:
//
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
//
// total_hours_wasted_here = 42