3 ms·
By that reasoning, it is "better software engineering" to give variables, methods, etc. the shortest names possible.
by baddox 14y ago
By that reasoning, it is "better software engineering" to give variables, methods, etc. the shortest names possible.
- ilaksh 14y agoI took out the line about the number of characters. Number of SLOC corresponding to defect count is not something you dispute is it?
- thebigshane 14y agoI'll dispute it. If I cram more code into a single line it will not lower my defect count. In fact there is a chance that the concision may turn into clutter and become harder to read/maintain and that may increase defect count. Is there a measurement term for number of symbols (in the lisp sense) in a given program? Example: '+', 'add', 'defn' would all be individual symbols. I could see a loose correlation between symbol count and defect count... maybe. Or to go even more abstract: number of concepts per program is probably the ultimate measurement we are looking for: https://en.wikipedia.org/wiki/Concept https://en.wikipedia.org/wiki/Concept
- pooriaazimi 14y agoTrue. But CS doesn't encourage cramming more code in a single line, like veteran C++ers do. It just give you nice shortcuts for what you have to manually write in vanilla JS (like maps, array comprehensions, ...)