What Are Blocker Bugs?
Blocker bugs are the enemy of coders:
- We may have the prettiest code in the world, but one blocker bug can make our code unusable
- In the software field, unusable code causes delays and headaches
- In coursework, unusable code results in scores of zero -- in fact, it is better to submit code 25% done with zero blocker bugs than code 99% done with one blocker bug
Examples
A few examples of common blocker bugs:
- Classes have compile errors
- Incorrect class headers
- Incorrect constructor method headers
- Bugs in constructors
- Classes in the wrong packages/sub-directories
- Incorrect filenames
- Incorrect sub-directory names
- Incorrectly designating a class or method as non-public
Patterns
These nasty blocker bugs follow a couple patterns:
- Prevent code from running
- Prevent objects from being constructed
Avoiding Blocker Bugs 😊
The happy news is we can easily avoid blocker bugs.
We just need to to do things:
- Check and recheck that housekeeping items match what is expected -- e.g., required package/sub-directory names, class names, class headers, method headers, constructor headers
- Run smoke tests
Navigation
Coding Fundamentals
(Chapter 203 - Unit Testing)