Skip to main content

Blog Archive for daniel during December 2004

Avoid magic, hard-coded text in your programs. It's another "I never thought of that" moment for me. In today's Weblogs, John O'Conner blogs about Applying the lesson of magic numbers. You are taught early to eliminate magic numbers so that cost = time * rate + parts +25 becomes cost = time * rate + parts +SHOP_FEE. Now it is more clear what the 25 represented and the value can be changed...