PatternsPractices

Don't Repeat Yourself Can Be Harmful

Oct 6, 2017

Don’t Repeat Yourself (DRY) is a software design principle aimed at reducing duplication. This is a popular principle and easy to understand: if you have the same code in 2 different places you need to extract this into a single location, avoiding the duplication. The thinking behind this principle is also obvious: when you inevitably change this code you now need to remember to update it more than one place. If you don’t, you introduced a bug. Simply removing the duplication avoids this. Violations of the DRY principle is sometimes referred to as WET - which can mean ‘Write Everything Twice’, ‘We Enjoy Typing’ or ‘Waste Everyone’s Time’.

Read More →

Patterns for Data Migrations in Rails

Jul 7, 2014

In my experience with developing Rails applications I have found migrations to be one of the most error-prone areas. As I result I have come up with a few loose patterns on what to do (and what not to do) when doing migrations.

Read More →

Are Daily Stand-ups Necessary?

Aug 9, 2013

Daily stand-ups are a pretty common practice in the Agile world. If you’re not familiar with this practice, basically the entire team will get together once a day (usually in the morning) and have a quick meeting. Everyone usually remains standing for the meeting to emphasize that this meeting should be kept short.

Read More →

How much duplication should we tolerate in tests?

Nov 16, 2012

As a developer I’m used to avoiding duplication in code. Avoiding duplication is even listed as one of the 4 rules of the TDD cycle:

Read More →

User Login done right

Jan 11, 2012

Today I was involved in an estimation session when the issue of user login came up. I was reminded of how such a straightforward piece of functionality can actually be rather tricky to implement correctly. (An estimation session is where we look at a list of features and try to assign a relative complexity to each)

Read More →

Sharing code with Pastebin and jsFiddle

Jan 27, 2011

As a software developer you will quite often have the need to share your code with others.  While this sounds straightforward, the details are the issue.  Ever tried to share code with Skype

Read More →

Dependency Injection in MVC 3

Jan 26, 2011

This post is part of the series I’m doing on the newly released ASP.NET MVC 3.

Read More →

Web Passwords 101

Dec 23, 2010

Web authentication seems to be a bit of a hot topic at the moment.  In the last couple of weeks I have seen quite a few articles regarding authentication and the storing of passwords, culminating in the uproar following the Gawker network being compromised.

Read More →

Using log4net for logging and monitoring

Nov 24, 2010

I was recently involved in a discussion around logging and the best way of implementing it in an application.  I was once again reminded of how many applications choose to implement their own logging solutions rather than use a logging framework.  It’s the most common occurrence of ‘not-invented-here’ syndrome that I’ve come across.

Read More →

Code Ownership – who owns what?

Dec 8, 2009

I was involved in an interesting debate on Twitter last week.  Someone complained about having to fix bugs in another developer’s code (unfortunately I can’t find the original mention) and I made the following response.

Read More →