News for hackers. Stuff that matters.
Re:How to deal with developers who lack standards? by jerry40 on Friday May 18, 2018 @07:28AM (#17100533)
Why do they remove comments? Do they delete commented code or textual comments?
Re:How to deal with developers who lack standards? by hotz on Friday May 18, 2018 @09:53AM (#17101427)
Your standard docblocks, even if the docblock explains what the function does if it's not clear. You'll basically have a function with zero comments. It's painful, I've never been given a reason as to why.
Re:How to deal with developers who lack standards? by chatmasta on Friday May 18, 2018 @07:03PM (#17105631)
Why can’t you just read the function itself?

Maybe the real problem is people writing code that is so hard to understand you need a comment to explain what it does.

Re:How to deal with developers who lack standards? by greenyoda on Saturday May 19, 2018 @01:25AM (#17106777)
- Even if some code doesn't need a comment to explain what it does, you may need a comment to understand why it does it, or why it does it in this particular way (which seems non-obvious but is the result of the obvious approach having previously failed).

- Some algorithms are inherently complex and difficult to understand, so they may actually need comments to explain how they work.

- If code deals with entities in the real world, like bank accounts or car engines, it may be subject to rules that are not obvious just from reading the code. Comments can explain the relationship between the code and the domain the code is operating in.

Re:How to deal with developers who lack standards? by ManlyBread on Monday May 21, 2018 @03:33AM (#17116766)
On my past job I was dealing with something like this and in my opinion source files aren't the best choice for a place to contain such information. To me having a quick reference to an internal documentation is the best: it's just a one line on the screen and when you need to update the information you have a centralized place to do so. If you have programmers that actually give a damn said programmers can learn ins and outs of the domain more easily this way, not to mention that this knowledge can serve non-programmers as well (for example help your support team in solving the issue without engaging the developers of giving your manager visibility into the internals of your work).
Re:How to deal with developers who lack standards? by gary__ on Saturday May 19, 2018 @10:33AM (#17108027)
I'll hazard a guess that it's because it's quicker to delete than update them.