Showing posts with label Complexifiers. Show all posts

What kills great design?

The killer is complexity. Complexity kills design, projects, products, and companies. Many teams struggle to produce version 1.0 of a product. Other teams can produce version 1.0, but within a few versions, the product is stuck in a quagmire of complexity—unable to move the product in a strategic direction.

Managers and stakeholders see it in the form of rising issues and inability to do anything new. Meanwhile, more distance is created between what you are and what you want to be.

Complexity is the true enemy for companies, teams, and developers.

How can you fight it?

1. Don't hire complexifiers: On the surface, they seem smart because they point out every possible thing that could go wrong or that you might have to worry about someday; with it comes a load of conceptual weight; complexifiers are people that create over-abstracted designs and make everything too complicated. Like a tick, once they have dug-in, they are difficult to get rid of because they have produced a pile of code that is not understood or modified easily. One way to identify complexifiers is that they tend to write a lot of defensive and complex code with no test cases.

2. Use simple design and embrace change: Always strive for simply design and use automated test cases to embrace change. Do not overdesign. You can't predict the future so be ready to change when the future changes—seems inevitable. The idea is easy: to change a simple design should be simple and you will be able to have trust in the system because you have a suite of automated tests to validate change. Reduce conceptual weight.

Be agile not just in development but also operationally. Windows Azure provides the best operational agility that I have seen so far.

3. Be a champion for simplicity: Do not add stupid features and do not let others kill your product. Don’t listen to your lizard brain.

The best weapon against our common enemy, complexity, is simplicity. It is a powerful form of Kung Fu.

One last thing: complexity even kills people: http://www.amazon.com/Fatal-Defect-Chasing-Killer-Computer/

5 reasons that over defensive programming is not great design

#5: Too much time is spent making the code defensive
I have encountered some good developers that spend an inordinate amount of time putting defensive mechanisms into their code: hiding, sealing, protecting, checking, throwing, obscuring, and complicating. "I just need ten more hours to make this object inaccessible." And, "the solution is to make everything static."


#4: Too much complexity
All of this adds complexity. It adds surface, design and cyclomatic complexity. While there is a certain amount of essential complexity built into any problem space, each little bit of unnecessary complexity adds conceptual weight.

#3: Not as testable
The implication of sealing, protecting, obscuring, and complicating: code is less testable. One irony in all of this: these good but over defensive programmers never seem to write any tests.

#2: Inhibits change 
Defense driven development it is a different approach: one that does not embrace change albeit. You need simple, testable code to embrace change. This one could be #1. In some domains, the ability to adapt to change is the key to being #1 (and sometimes survival).

#1: It is hubris 
It is like saying, "I have thought of everything." You can't extend or modify this kind of code. Those that spend time sealing, protecting, obscuring, and hiding, are making it difficult for people to extend their code. There is no framework or open architecture. It is closed without being open. Realize: you can't think of everything.

Now, don't take this too far—in a way that is the point. A small amount of defensive programming is not only good, but necessary. But taking it too far creates too much distance.

At some point you have to score, so don't let your lizard brain get in the way.

Code is design. Over defensive programming is not great design.