Hacker News new | ask | show | jobs
by enriquto 2671 days ago
> I would appreciate better naming on the variables. Some of this is hard to read through with single letter names

Single letter variables are perfectly OK in a mathematical context such as this one. They are arguably better.

The code would be much clearer, however, with lots of comments on what each variable means.

Meaningful variable names that are used more than once break the "do not repeat yourself" rule.

1 comments

> break the "do not repeat yourself" rule.

the do not repeat yourself rule isn't about saving typing, its about reducing points of failure in code - i.e. one code path and one place to fix a bug instead of n.

variable naming has nothing to do with that.