Tag Archives: constants

OOMP: Constants

Some things are constant over time. Fundamentals Always Matter Many of the fundamental principles of problem solving and software development always matter at some level. Many of the hardest problems you will need to solve are related to fundamentals that you should already know. Some of the details change. When I started programming, amount of… Read More »

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 »