When a number becomes a hidden assumption
Suppose a program calculates shipping costs using a rate typed directly into its code. The rate works today, but when the carrier changes its pricing, the program keeps charging according to the old number. Nothing in the code tells it to look up the current rate; the value has become a hidden assumption about the world.
A value written directly into a program is called a hardcoded value. It might be a price, a folder path, a time limit, or the maximum number of items a screen can display. The problem is not that the value is fixed. It is that changing it may require finding and editing code wherever it appears, then rebuilding, testing, and releasing the software.
How a small change spreads
If the same rate is copied into several parts of an application, updating just one can leave the others out of sync. A checkout page might show the new charge while an invoice still uses the old one. Even when there is only one copy, the value may sit far from the code that explains why it was chosen, making it easy to overlook during a change.
Developers often put changeable values in a configuration file, database, or central setting instead. That gives the software a place to read the current value without altering its underlying logic. For example, an administrator could update a shipping rate in a settings screen, and the checkout and invoice systems could use the same setting.
Fixed is not always fragile
Some values are genuinely stable, and keeping them in code can make a program simpler and clearer. The useful question is whether a value is likely to vary by customer, location, environment, or over time—and whether someone should be able to change it without changing the program itself.
That distinction matters most when conditions shift: a policy changes, a service moves to a new address, or a product expands into another region. If those assumptions are buried in code, each change can become a hunt. If they are separated deliberately, the software can adapt while its core behavior stays intact.






