Salaam,
//Replying without reading all answers. In my personal experience, comments are useful in two cases:
- explain the code to the next programmer (if you leave)
- explain the code to yourself (when you are dealing with thousands of files and can't remember the logic behind them.
- explain the code to the next programmer (if you leave)
- explain the code to yourself (when you are dealing with thousands of files and can't remember the logic behind them).
The second point is most important and most negligiblemostly neglectable by some companies, thinking they need comments only in case 1, and if that case isn't in their plans then comments aren't as well..
Plus, isn't programming about making decisions all the time? howHow could you remember the motives behind a decision if you don't write it down?
I recommend writing comments /*even against company flow */, because your productivity is depending on it somehow. bestI recommend writing comments (even against the company flow), K because your productivity is somehow depending on it.