Pages: Welcome | Projects

Acquired Wisdom

2016/2/13
Tags: [ Ideas ]

As discussed with a very competent colleague of mine, a good software developer is the one who can produce a simple solution for a complex problem.

I like to imagine it as the comparison of items belonging to different worlds, but for which you have a notion of size. A bit too abstract, so let's say we have ants and elephants. You can say “this ant is big” or “this elephant is small”, since you compare ants with ants and elephants with elephants.

Solutions and problems are two different sets, so you can't really compare the complexity of a problem with the complexity of a solution. And I'm not talking about algorithmic complexity here: you can have a very simple solution which is naïve, an has exponential complexity.

So, it is OK to address a complex problem with a complex piece of software. A good developer is the one who is able to address the same problem with a simpler solution, while an inexperienced developer will do just the opposite.

Now, a common cliché for developers is: “premature optimization is the root of all evil”. I always forget who is the author of this truth, but fortunately Wikipedia tells me it was Donald Knuth. Thanks.

This is common wisdom, yet so difficult to really apply. And it's only after 2+ years of actual software development (although mixed with research), that I can finally perceive it for real. Or at least I think I can. For sure I still do it wrong. But I can finally say I notice it.

It's really like in Taiji. You can see the master moving in a very agile and delicate way. But if you, as novice, try to do the same, you will (maybe) notice how clumsy you are. The master does not apply strength, yet he can throw you on the ground like nothing.

So, the wisdom here may make you laugh. But the really important thing I understood with time is that… well… premature optimization is the root of all evil.

Oh, and caching is often premature optimization.