Named numbers as variables [closed]

Naming numbers is terrible practice, one day something will need to change, and you’ll end up with unsigned five = 7.

If it has some meaning, give it a meaningful name. The ‘magic number’ five is no improvement over the magic number 5, it’s worse because it might not actually equal 5.

This kind of thing generally arises from some cargo-cult style programming style guidelines where someone heard that “magic numbers are bad” and forbade their use without fully understanding why.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)