O'Reilly logo

The Developer's Code by Ka Wai Cheung

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Essay 31 Know When to Refactor

Another smell of complexity arises when we think too far ahead in our code. There’s a price to pay for being too cute or too cerebral about the actual thing we’re trying to build. A classic case is implementing a design pattern too early.

Don’t get me wrong, design patterns are wonderful things. When a common programming approach happens over and over again, we get excited. We’ve all experienced that sense that our code could be doing something greater than just solving the concrete task at hand.

When we’ve had this feeling a few times and successfully refactored our code into more abstract patterns, it’s easy to feel invincible. We work like a crime dog, sniffing out any small sign or clue, any hint, that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required