← Back to Difficulty Selection

Code Review (Warmup): Magic Numbers / Magic Strings

Story

Why is this 86400 here?

What does "admin" mean?

Why exactly 0.15?

Magic numbers and strings make readers guess the rules of the code instead of understanding them.

When values change (and they always do), you're stuck hunting through the codebase, hoping you didn't miss one.

Rule of thumb:

If a number looks magical, give it a name.

Next Topic: Dead Code (Zombie Code)

Cookies help us track your progress - nothing extra.