3 ms·
Yes! Well-written code can be a joy to read, but it represents a subset of the total amount of useful information about what's going on in a program or system.
by dbrueck 3y ago
Yes! Well-written code can be a joy to read, but it represents a subset of the total amount of useful information about what's going on in a program or system. Obviously code can be overly and unhelpfully commented, but poorly commented code is usually a very strong indicator of a mediocre programmer.
Why does this function exist? Why was it implemented this way and not that way? Sometimes these are really important bits of info. Here's where this approach breaks down. Here's a sharp edge that we hope to remove someday. This part here incurs some technical debt but this is why we did it.
In order to really maintain a codebase (meaning: safely fix bugs and add new features), you need to have an understanding that at least approaches that of the person who wrote the code originally, and good comments (e.g. level of intent comments) can help you do that. This is true even for your own code that you're returning to after some amount of time.