# What to Do When Your Constants Are Someone Else's Law

DevFeed: [What to Do When Your Constants Are Someone Else's Law](<https://devfeed.tech/articles/what-to-do-when-your-constants-are-someone-else-s-law-85019.md>)

Original publisher: [Read original article](<https://www.freecodecamp.org/news/what-to-do-when-your-constants-are-someone-else-s-law/>)

Author: Javeed Shaik

Published: 2026-10-11T14:05:40Z

Content type: tutorial

Language: en

Sources: [Free Code Camp](<https://devfeed.tech/sources/freecodecamp-programming-tutorials-python-javascript-git-more.md>)

Topics: [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [builds](<https://devfeed.tech/topics/builds.md>)

Tags: [app](<https://devfeed.tech/tags/app.md>), [bug](<https://devfeed.tech/tags/bug.md>), [code](<https://devfeed.tech/tags/code.md>), [code-quality](<https://devfeed.tech/tags/code-quality.md>), [fintech](<https://devfeed.tech/tags/fintech.md>), [go-language](<https://devfeed.tech/tags/go-language.md>), [law](<https://devfeed.tech/tags/law.md>), [regulatory-compliance](<https://devfeed.tech/tags/regulatory-compliance.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>)

## AI overview

A tutorial on writing software that encodes external rules, using finance and tax calculators as examples. It recommends documenting the governing authority and meaning of inputs, exposing changeable statutory values as configurable defaults, and moving validation into library functions so callers cannot trigger unbounded work.

## Source excerpt

A colleague once asked me why a number in my code had a comment three lines long. The number was 18. The comment said which rule it came from, which section notified it, and that it could change witho