“The existence of if statements in this code signals duplication, because the caller already knows which path it wants the callee to follow. In a misguided attempt to remove duplication, the programmer had brought together functionality that didn’t belong together, and in so doing had created more duplication.”

This is from a blog post I wrote almost seven years ago, called if…. At the time, and in the context of the projects I was working on then, it contains some radical ideas. It’s nice to see that they still apply today.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s