Tag Archives: constants

More on Magic Constants

I’ve been thinking more on the issue of Magic Constants. Have you ever noticed that when some people first understand the idea of symbolic constants, they want to collect all of the constants they’ve defined together in one spot?

Magic Constants are bad

A truly bad code example in a book on Java Servlets got me thinking about the idea of Magic Constants. Of course, we are all aware of the problem of magic numbers or magic literals in code. That’s why we use symbolic constants instead to hide that implementation detail (and to simplify maintenance later). However,… Read More »