Code Simplified

Best practices on how to simplify code.
Nov
17
Proper Use of Verify in Unit Tests

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.
3 min read
Nov
10
How to Write Simple Unit Tests

How to Write Simple Unit Tests

A unit test should follow the same flow, no matter what the test is and test one thing.
2 min read
Oct
20
Horizontal and Vertical Code Formatting

Horizontal and Vertical Code Formatting

Code formatting is important for both code readability and your source control system.
2 min read
Oct
13
How do You Know if Code is Duplicated or Not

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.
2 min read
Oct
06
Document the Why, not the What

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.
2 min read
Sep
29
Simplifying Your DAO Layer

Simplifying Your DAO Layer

DAO complexities come from doing the wrong thing in the wrong place.
2 min read
Sep
22
How Many Return Statements Should a Function Have?

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.
1 min read
Sep
15
Simplifying Unit Tests with Loops

Simplifying Unit Tests with Loops

Loops are the forgotten tool in your toolbox when writing unit tests.
3 min read
Sep
08
Handling Null at Compile Time

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?
3 min read
Sep
01
The Worst Thing to Do When Writing Tests

The Worst Thing to Do When Writing Tests

Know your data so your tests only have one pathway of execution.
3 min read