Ideas from books, articles & podcasts.
TDD should simplify code, not make it more complicated. If your code becomes harder to read or maintain when you make it testable, you're doing TDD wrong.
You can learn two things:
More complex code often means more cluttered code. Cluttered code is a convenient place for bugs to hide. It's also easier to find things when there's less clutter.
MORE IDEAS FROM THE SAME ARTICLE
All software development is about the process of breaking a big problem down into smaller independent parts, combining the solutions to form an application that solves the big problem.
Mocking is necessary when the decomposition strategy failed. When decomposition succeeds, a generic compo...
Unit tests test individual units (modules, functions, classes) in isolation from the rest of the program.
Code coverage is the amount of code covered by a test. Increasing coverage beyond 90% seems to have little continued correlation with lower bug density.
There are two kinds of coverage:
A code smell is a surface indication that points to a deeper problem in the system.
Different types of code need different levels (and different kinds) of mocks. Some code exists primarily to facilitate I/O, in which case, there is little to do other than test I/O. Reducing...
Less coupling makes code easier to extend and maintain. Tight coupling makes code more rigid and brittle and more likely to break when changes are needed.
Coupling takes different forms:
Tight coupling has many causes:
MORE LIKE THIS
As your codebase expands, small errors and edge cases you don’t expect can cascade into larger failures. Bugs lead to bad user experience and ultimately, business losses. One way to prevent fragile programming is to test your code before releasing it into the wild.
There is more value in te...
“People, Process, Product”
published 11 ideas
❤️ Brainstash Inc.