February 25, 2005

Balancing Simplicity and Complexity

I recently wasted a large amount of time designing a very complex algorithm when a simple one would have done the job. Learning when to simplify and when to complexify is key to making good simulations. Too simple, and the resulting simulation is useless. Too complex, and it's incomprehensible and irreproducible.

The same sense of balance is required when you're trying to write efficient code. Efficient code isn't necessarily more complex than inefficient code, but writing it is usually more complex and takes more time. Where some programmers prefer to quickly create inefficient code, others never finish creating efficient code.

Balance points, by their very nature, make it difficult for balanced objects to stay upright. The best we can do is attempt to recognize which side of the dividing line we're on and move in the right direction.

However, in this case, I think it's quite a bit more difficult to realize when you're making things too efficient or too complex than the reverse. This has big implications. Think about it.
A designer knows when he has acheived perfection not when there is nothing left to add, but when there is nothing left to take away.

- Antoine de Saint-Exup'ery

0 Comments:

Post a Comment

<< Home