Hacker News new | past | comments | ask | show | jobs | submit login

Magic numbers are a horrible pattern (and I don't mean elf/obj IDs).

*ANY* time you use a non-obvious constant (like start of a loop that isn't 0), good practice to comment immediately at the source, or pull it into a well-named variable/macro.

Don't agree? Spend 35 years programming and you'll see this pop up again and again and again and again... SO much time wasted figuring out magic #s.




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

Search: