Code Gardening is the practice of making small improvements as you see them while you are working, even if they are not directly connected to the feature or defect you’re currently addressing.

Tidying things up as you go is never wrong - just ask any gardener or that friend of yours with the immaculate house.

Tidy esthetic code is provably easier to read, easier to understand and easier to reason about.

Most importantly, you should be gardening because code can be beautiful … and it should be.

Method Archetypes

Tuesday, November 15 2016 code-gardening

Follow method archetypes to constrain your method design to avoid surprises and simplify your design. This is another in my series of posts on Code Gardening - the practice of making small improvements as you see them while you are working.

Read more »

What is it with Booleans?

Saturday, October 08 2016 code-gardening

Given some of my recent blog posts, such as “Boolean Parameters are Evil” and “Multiple Boolean Parameters are Really Evil, it might seem that I have some kind of personal vendetta against booleans.

Read more »

Are Boolean Return values Evil?

Sunday, September 11 2016 code-gardening

If you’re tempted to write a method with a boolean return type, consider whether another design might be more appropriate. This is another in my series of posts on Code Gardening - the practice of making small improvements as you see them while you are working.

Read more »

Null arguments are evil

Sunday, August 14 2016 code-gardening

Don’t pass null as an explicit argument into a method. This is another in my series of posts on Code Gardening - the practice of making small improvements as you see them while you are working.

Read more »

Don't work too hard

Saturday, July 30 2016 code-gardening

Don’t write more code than is necessary to get the job done. This is another in my series of posts on Code Gardening - the practice of making small improvements as you see them while you are working.

Read more »