News for hackers. Stuff that matters.
Re:How Math Helped Me Write Less Code and Made Our App Faster by jheriko on Wednesday February 12, 2014 @06:35AM (#7223761)
> Any things like this will inevitably, sans comments, be difficult to make head or tail of.

perhaps true (maybe). but if the variables were named properly we would at least have a decent idea of what the expressions actually are - even if we can't then infer what they are for from that information.

imo that is precisely what a comment is for - explaining an algorithm or things that look unusual, not merely explaining what a variable is - which imo is precisely what a variable name is for.

Re:How Math Helped Me Write Less Code and Made Our App Faster by pessimizer on Wednesday February 12, 2014 @10:45AM (#7224879)
Sometimes what variables represent is too complicated to be expressed in a variable name. If you insist that all variables be semantically intelligible without reference to the part they play in the entire algorithm, you may be committing yourself to a less efficient algorithm that isn't any more flexible.

Is there something wrong with code that is too dense to be self-documenting, especially if you're willing to write and distribute a paper to explain it? Would you understand "pivot" in quicksort if you hadn't read a description of how quicksort works?

Re:How Math Helped Me Write Less Code and Made Our App Faster by anabis on Wednesday February 12, 2014 @07:12PM (#7228449)
I think the variable names are OK.

Single letter variables with subscript are standard in math, and using short names makes the equations easier to see.