Stop waving the wand of magic numbers
Published in
5 min readFeb 25, 2019
37
. You have no idea what that number is, do you? A number without context nor a label is a random value. It doesn’t tell us anything. Imagine walking by a billboard, with a picture of a person on a boat, and the text is a giant number 89
. I’d be intrigued, but utterly confused. We rightfully reject meaningless numbers…
…so why then do they appear so often in source code? Any time a constant…