Simplicity is Hard
Developers, in my experience, tend to be creative people and creative people can sometimes over complicate stuff. When a developer is struck by the lightning of inspiration the first thing that they usually want to do is start hammering the keyboard, spewing out the lines of code like it was going out of fashion. Now we all know you should plan you code and that there are methodologies for doing that, but that is a post for another day!
But even if you have a plan the code can still end up pretty damn complicated. And we all know that complexity means more bugs.
The answer to complexity? Refactoring. Even if you plan, it can still be very difficult to see which path leads out of the forest and which leads to the ginger bread house, and none of us want to end up there. It is not until we have the code in front of us that we can see where we can refactor and simplify.
This is why I think simplicity is hard. Most devs can knock out a code module or two. But it is the ones that go back and check their work and refactor through a number of cycles that make clean, elegant code which is simple.
Do you try and make your code simple? I would love to know so please leave a comment.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)