Proper Use of Verify in Unit Tests
Mocking is a great thing but can cause a lot of headache if it isn't used correctly.
How to Write Simple Unit Tests
A unit test should follow the same flow, no matter what the test is and test one thing.
Horizontal and Vertical Code Formatting
Code formatting is important for both code readability and your source control system.
How do You Know if Code is Duplicated or Not
To detect code duplication, you need to think in terms of concepts instead of individual statements.
Document the Why, not the What
Don't clutter code by adding comments stating what the code is doing but why it is doing what it is doing.
Simplifying Your DAO Layer
DAO complexities come from doing the wrong thing in the wrong place.
How Many Return Statements Should a Function Have?
It isn't so much the total number of return statements as it is the complexity of the function.
Simplifying Unit Tests with Loops
Loops are the forgotten tool in your toolbox when writing unit tests.
Handling Null at Compile Time
The compiler is your best tool to make sure your code is correct. Why not use it for null as well?
The Worst Thing to Do When Writing Tests
Know your data so your tests only have one pathway of execution.