Explore the World's Best Ideas
Join today and uncover 100+ curated journeys from 50+ topics. Unlock access to our mobile app with extensive features.
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.
3
1 read
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 mocks might mean your unit test coverage would be close to 0.
3
0 reads
Unit tests test individual units (modules, functions, classes) in isolation from the rest of the program.
3
0 reads
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:
Coverage reports identify code-coverage weaknesses, not case coverages weaknesses.
3
0 reads
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:
3
0 reads
Tight coupling has many causes:
Imperative and object-oriented code is more vulnerable to tight coupling than functional code.
3
0 reads
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 composition utility can be used to compose the pieces together.
3
0 reads
IDEAS CURATED BY
Learn more about technologyandthefuture with this collection
The differences between Web 2.0 and Web 3.0
The future of the internet
Understanding the potential of Web 3.0
Related collections
Similar ideas
Read & Learn
20x Faster
without
deepstash
with
deepstash
with
deepstash
Personalized microlearning
—
100+ Learning Journeys
—
Access to 200,000+ ideas
—
Access to the mobile app
—
Unlimited idea saving
—
—
Unlimited history
—
—
Unlimited listening to ideas
—
—
Downloading & offline access
—
—
Supercharge your mind with one idea per day
Enter your email and spend 1 minute every day to learn something new.
I agree to receive email updates