

The driver who tried to run the pedestrian over?


The driver who tried to run the pedestrian over?


I wrote code for FDA Class III medical devices. Dozens of engineers, plus a controls team, plus a design verification team, plus a regulatory team. At a real company, not some hopeful startup.
Real engineers don’t look at comments, they look at code.
And unit tests.
And SITL tests.
And requirements, which are called-out in the tests.
And FMEAs.
Keep your comments. They do more harm than good.


Why do you need more code? This has comments. It’s perfectly clear.
The other comment I constantly see is the function header that’s obviously copy-pasted from another function and literally nothing changed to reflect the function it’s meant to document. Not the return type, not the parameters, not even the function name.
Or the “helpful” ones that were once true but no longer are due to subsequent changes, which waste more of your time than if they never existed.
Comments are a smell.


int a; // integer a
Was no one driving the vehicle? Why the passive voice?