Keep it Simple and Sloppy
I just caught this term out of an article by Adam Bosworth, out of Joel Spolsky‘s Best Software Writing 1. Everyone heard the KISS acronym: Keep it Simple and Stupid
, or the less friendly Keep it Simple, Stupid
. The article discusses abusive complexity and why sloppy things succeed.
At some point, he compares PHP to some hammer that can be suited to any task, simply because it allows developers to be sloppy. Doesn’t this make sense? This is basically the way I always saw PHP: a quick way to do the job. Scalability is a weird concept. Java people will build a huge architecture to support their application. In the end, they will be able to instantiate objects from an XML configuration based on a DTD or schema. Everything is so scalable, because all you have to do is modify a configuration file. The part they will never tell you is that understanding that configuration file requires skills similar to those used in calculating quantum physics.
PHP uses an approach where you can do anything the way you want it. Shoot yourself in the foot a couple of times. You will end up not making mistakes. PHP can be scaled to simple scripts that will only be used once because it’s used to import data to business critical applications. In the end, PHP is not really scaling, the developer behind it is. Going back to the hammer analogy. If the final goal is to nail two pieces of wood together, it’s the final result that counts, not that you used a hammer to do it. Hammers are dangerous tools. When you are as manually skilled as I am, you have as much chance of hitting the nail than anything else, including fingers (which does hurt, but I’m lucky enough to have skills bad enough to actually hit away from my entire hand). You could use nail holders to prevent any damage and make sure it’s nailed straight. This is mostly what frameworks do, they are supposed to prevent damage by providing extra tools to keep you away from danger. Have you ever seen a construction worker using nail holders? I have never seen any. It’s simply a waste of time, and with experience, you can learn to keep fingers undamaged.
In the end, what really makes the difference of the people working on the software. Discipline is what makes secure and robust applications. Use any tool or language you want, if your goal is to cut corners to go a little faster, you will end up with a problematic application. What if changing the tool could be replaced with re-orienting the efforts based on the requirements?
Being sloppy in development gives you the flexibility to adapt the efforts based on the changing environment. If you lock yourself into a framework, chances are that you will end up having to change the framework, and all that code written for it, as the project evolves. I’ve seen application frameworks build for a specific situation way to often. At some point, the reality it was developed for simply no longer exists, and the core is adapted to new needs, causing terrible bloat. A framework to suit all needs is probably what computer scientist would refer to as utopia. If that’s what you’re looking for, you might as well replace your development crew by a thinking machine and solve all those world peace and equality problems.
Webservices tried to solve all problems at once, and this is an other major topic discussed by Bosworth. Why is RSS succeeding while RDF barely picks up? Why is REST so popular while SOAP/WSDL is only used by very large corporations? It’s very simple, they allow people to be sloppy and to get things working without having to bother about piles of specifications. For every REST web service, you need to implement the format that’s going to be used. There is no way around it as REST does not define any format. Using SOAP is easy, but by the time you understood how to write a WSDL file, you could have written dozens of REST services. RDF is one of those specifications that attempted to be catch-all. Instead of writing tag names, you defer the singularity to namespaces, which makes the file unreadable by human beings (this is only the way I see it, after all those attempts to understanding).
When you add up all the elements defined in the WS_ stack of standards, you end up with a multi-layered monster communicating with XML to oblivion. The only people who could ever come up with such a solution is either a large corporation willing to build and dominate a market by defining and implementing standards no other independent vendor could ever reach, a government subcontractor trying to raise the final bill by adding buzz words and complex schematics or a hardware vendor trying to demonstrate you need more processing power.
Keeping things simple and sloppy prevents from getting buried under technological overhead and focus on the real problem.
By the way, if you don’t know exactly what to read, I highly reccommand Best Software Writing. It’s only a gathering of articles you can find on the web, but they are cherry-picked. All of them are good. Some are hilarious. I didn’t know exactly what to expect when I bought it. The title was interesting, it’s well rated on Amazon, and the author is reputed, even thought very little is written by him. I got a copy anyway, and I don’t regret it at all so far. It’s a great book to read in public transits as it’s composed of multiple short articles on varied topics.