3 ms·
Something that's important to me is code that is commented. Well-commented code (documentation for each function, explanations behind complex if statements and
by dmuth 9y ago
Something that's important to me is code that is commented. Well-commented code (documentation for each function, explanations behind complex if statements and loops, etc.) earns bonus points. Conversely, when I see screens and screens of code without a single comment that sets off red flags.
Due to the nature of my current role, writing documentation is necessary so that other team members can pick up where you left off if something happens to you (or you just go on vacation).
- segmondy 9y agoThere's a difference from writing code for yourself and writing code for other's. If I'm writing code for myself in a domain that I'm very familiar with, comment get's in the way and clutters up things. I've looked at code I wrote 10-15yrs ago and understood everything because of strong familiarity with the domain. Based on the domain, I might have naming convention that is specific to that domain and I'm not going to name in Enterprise fashion. It's a strong assumption to think that code some people publish are for consumption of other's. Most of my after work hour code is for my own and the computer's consumption.
- rinchik 9y agoInterviewers like yourself are great red-flags everyone need to look for in a company during the interview as well as during initial screening. If a company relies on (outdated, in most cases) comments and not the code itself its an immediate signal for an interviewee to re-evaluate this company and decide whether or not its the place he or she actually wants to be a part of. Very important to mention that it goes both ways: if I need to read your comment in order to understand your code, there is something wrong with your code.
- jogjayr 9y agoI hardly ever write comments for code I write. My philosophy, which I took from Uncle Bob, is if code is so complex it needs commenting at a statement or method level then it's too complex. Simplify the logic, put complex clauses or statements into meaningfully-named functions (which you can test too, so win-win). But don't rely on comments to explain your code. Your code should explain your code. Only "overview" comment blocks for entire files, which describe the overall purpose of the class or module, are useful to me and my team.[1] 1. https://softwareengineering.stackexchange.com/questions/285787/clean-code-comments-vs-class-documentation https://softwareengineering.stackexchange.com/questions/2857...