4 ms·
Comments are great, but they should usually explain why, not what. Good, long variable and function names, along with breaking complex expressions into multipl
by spankalee 3y ago
Comments are great, but they should usually explain why, not what.
Good, long variable and function names, along with breaking complex expressions into multiple statements with those nice variables names can help the code itself describe the what of the process. And then static types help describe the what of the types of data even more.
That lets you save the comments for more useful things than an ad-hoc type system, like "// We need to do this because..."
- hparadiz 3y agoCode coverage reports with complexity score for every function is the best teacher for this. I particularly love how Scrutinizer CI does this.