General Musing

blaze your trail

Design – Re-Inventing the Wheel #agile #scrum #xp

leave a comment »

Everybody tells you not to reinvent the wheel, and I am going to explain why everybody is wrong and you should start re-inventing. Programming paradigms and design patterns are the staple of all new programmers, and they enable everybody to communicate in a common language which can be easily understood when their rules are strictly adhered to. The issue is that beginner developers have cursory knowledge, expertise and familiarity with the design patterns they are required to implement.

A recent practical example a group of relatively inexperienced programmers with the Model-View-Controller paradigm found that the controller they were using didn’t make their life easier, so in some specific cases they deviated from this and implemented their own heuristics. This caused the underlying database to get more SQL queries that even Facebook reports it gets. At the point the website ground to a halt a simple investigation revealed that they bypassed the controller and model to access the database. Common heuristics would usually point to scaling vertically or horizontally.

If it looks like a duck, it walks like a duck, and it quacks like a duck, guess what? It’s a duck.

A Duck?

It is not always a duck. Current thinking is that common things are common, and common problems have common solutions. This isn’t always the case, Henry Ford summed it up best: “If I had asked people what they wanted,” he said, “they would have said a faster horse.” By living in the constraints of their knowledge when people hear hoofbeats, they think horses, not zebras. And “[w]hen faced with a result that doesn’t go according to plan, a series of perfectly effective short-term tactics are used until the desired outcome is achieved.”[2] Some developers believe that once this hurdle has been taken all will be well, I can tell you the light at the end of the tunnel is an oncoming train.[4]

When you are in a hole, stop digging! That is exactly how we got into the mess in the first place.

How do you stop digging?

You have become increasingly convinced of the truth of your misjudgment, developing a psychological commitment to it. You have become wedded to this distorted conclusion.[1] Realizing this is your first victory. “In the material world, the unknown is a place of uncertainty and potential risk … [b]ut we make a mistake when we attribute the same qualities to the world of our thinking.”[3] The second victory is having the courage to throw out everything you have done up to now, baby and bathwater.

“There is a wonderful story of a group of American car executives who went to Japan to see a Japanese assembly line. At the end of the line, the doors were put on the hinges, the same as in America. But something was missing. In the United States, a line worker would take a rubber mallet and tap the edges of the door to ensure that it fit perfectly. In Japan, that job didn’t seem to exist. Confused, the American auto executives asked at what point they made sure the door fit perfectly. Their Japanese guide looked at them and smiled sheepishly. “We make sure it fits when we design it.” In the Japanese auto plant, they didn’t examine the problem and accumulate data to figure out the best solution—they engineered the outcome they wanted from the beginning. If they didn’t achieve their desired outcome, they understood it was because of a decision they made at the start of the process.”[2]

Clean Slate

Read more articles on , or

Starting with a clean slate learn to question everything you know and are told, especially what I tell you. Learned heuristics can be good, but they are only as good as your teacher. You own experience is key to be able to implement anything. Having a prototype or an example can help you, and a prototype is only as good as the developer who wrote it. Don’t be afraid to start over rather than refactoring, there is little to lose and everything to gain by ignoring the old paradigm: “If it ain’t broke, don’t fix it.

  1. How Doctors Think – Jerome Groopman, MD
  2. Start with Why – Simon Sinek
  3. Effortless Evolution – Jamie Smart
  4. Wall Street proverb

Image source: Sebastian Fritzon

Written by Daniël W. Crompton (webhat)

January 6, 2012 at 4:21 pm

Posted in lifehacks, programming

Tagged with , ,

Please 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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: