browse/
7 results
software-design/refactoring-how-to-tidy-working-code-without-breaking-it.md
Refactoring: how to tidy working code without breaking it
Refactoring means changing how code is built on the inside without changing what it does. It sounds risky, but there is a simple routine…
software-design/unit-tests-why-four-passing-tests-don-t-prove-a-function-works.md
Unit tests: why four passing tests don't prove a function works
Your function gave the right answer four times. Is it correct? Not necessarily: passing tests only show the bug isn't where you looked…
software-design/dependency-injection-why-a-test-passes-at-9am-and-fails-at-3pm.md
Dependency injection: why a test passes at 9am and fails at 3pm
A test that passes in the morning and fails in the afternoon, with no change to the code, is a puzzle many beginners meet. The cause is…
software-design/pure-functions-why-the-same-call-can-give-two-different-answers.md
Pure functions: why the same call can give two different answers
Call a function twice with the same input and get two different answers? Python isn't broken. The function is doing something extra, called…
software-design/refactoring-tidy-messy-code-without-breaking-it-using-tests-as-a-net.md
Refactoring: tidy messy code without breaking it, using tests as a net
Refactoring means changing how code is written without changing what it does, so the next person (often you) can read it. It sounds risky…
software-design/your-first-unit-test-catch-the-leap-year-bug-a-quick-check-misses.md
Your first unit test: catch the leap-year bug a quick check misses
A unit test is a tiny piece of code that checks another piece of code: you pick an input, write down the answer you expect, and let the…
infrastructure/what-is-ci-the-robot-that-tests-your-code-every-time-you-push.md
What is CI? The robot that tests your code every time you push
You change one line, it looks fine, and two days later something far away breaks. Continuous integration (CI) is a robot that prevents…