News for hackers. Stuff that matters.
Re:On Comments in Code by pydry on Wednesday June 16, 2021 @04:08AM (#27526100)
What about the day the Mars climate orbiter was lost because one piece of code wrongly assumed that the units of figures out of the other piece of code? :)

I find that you do sometimes need symbol names that long even though it's a code smell indicating something else is up - usually scopes that are too large or insufficiently expressive types.

I view excessively long variable names as a midpoint on a journey to improving code quality on really bad code bases.

Re:On Comments in Code by adrian_b on Wednesday June 16, 2021 @05:38AM (#27526616)
While what you say about long variable names can be right in certain circumstances, the example with the wrong units is inappropriate.

In my opinion any code that deals with physical quantities, but which does not use dedicated types for each kind of physical quantity, where the type definitions include the units used, is erroneous.

Any mistake like in the Mars orbiter must be detected at compile time.