Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Remembering 10 single letter mappings vs clear variable names sounds onerous.a, b, c, d, e, f, g, h, i, and j vs price, discount, coupon, item_description, item_id, ...


> Remembering 10 single letter mappings vs clear variable names sounds onerous

Have you ever read an applied math book? They do not seem to have this problem.

My point is that

    int d;   // dimension_of_the_space
is much better than

    int dimension_of_the_space;
especially if the quantity appears inside many formulas.


> Have you ever read an applied math book? They do not seem to have this problem.

Working through an applied math book takes an entire semester with many, many hours of study, and you're expected to master the material inside out.

Programmers generally do not have anything like the luxury of that kind of time, nor are they expected to reach that level of mastery with the codebase -- they need to quickly identify where changes need to be made, make them, ensure test coverage continues to be complete and passes, and move on to the next thing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: