Life: A python perspective
[sourcecode]
from people import friends
while not dead:
try:
something_new()
except LifeIsToughError:
pass
[/sourcecode]
[sourcecode]
from people import friends
while not dead:
try:
something_new()
except LifeIsToughError:
pass
[/sourcecode]
A famous quote from The Cathedral and the Bazaar is "Plan to throw one away; you will, anyhow". This never hits a programmer with it's true meaning until they have to throw aways a large bit of code base that they invested time and effort in. Coders tend to build an emotional connection towards every letter of code they wrote (I know i sure do). On the other hand, needs arise where obstacles render current software "unfixable". This confronts with the painful fact that change must be done. Taking an objective stand point in that decision is a tough decision, but facts are fact in face of improvement. In the end of the day, breaking up is tough but a fresh start would most likely end up in more bulletproof code.
Recently, I stared reading one of the essential books for a computer scientists, namely Concrete Mathematics. After the first chapter, it really got me thinking "Oh My!! Recurrences could solve anything." This is of course not matched to the thrill of the challenge in funding recurring patterns in a structure.
Along my college years, colleges tend to step away from recurrences. In fact, many cases it is the easier approach to tackle. Furthermore, it could be in some cases the more efficient approach. This reminds me of many algorithm techniques that largely depend on finding substructures or small solutions that are used for generalizations. The most vivid example comes to me in the form of memoization in dynamic programming (DP). For me the corner stone of DP is finding the "magical" recurrence. Thus, from super slow, to super fast (lots of memory use though :D).
Other examples of how recursive thinking makes complex problems elegantly simple could be seen in graph theory. Just by examining some properties on nodes, arcs, degrees, huge complexities just boil down to some elegantly beautiful properties that are easily generalizable.
Such beauty could be easily seen when recurrences could end up in something that is visually breath taking. An example are Fractals, a stunning example of how simple math with recursion lead to amazing imagery.