TNL.net is designed for modern browsers but the content is still readable in older ones. If you want to ensure the best experience, please install a browser that was developed after 2009.

tnl.net

The Elegant Hack

Paul Gra­ham pub­lished a great essay on the par­al­lels between hack­ers and painters. I find it funny that this would come up on the net this week as I was pon­der­ing some of the same things in the past few weeks, since I vis­ited the amaz­ing Da Vinci show at the Met­ro­pol­i­tan Museum of Art this year.

I’d like to add a few points to Paul’s dis­cus­sion on this, how­ever. Unlike other great forms of art, great pro­gram­ming is more appre­ci­ated for its risk tak­ing at the time at which it hap­pens. For exam­ple, if you visit the Musee D’Orsay, which cov­ers the full range of 19th cen­tury art, you come to real­ize that the paint­ings that received the most prizes in art com­pe­ti­tions were not the ones that took the most risks. They were gen­er­ally more bland and the more dar­ing pieces were often the cause of much con­tro­versy and shunned by the “peo­ple who mat­tered”. In the same fash­ion, some of the great­est books in his­tory have had very rough begin­ning, often being rec­og­nized as mas­ter­pieces only years after their author’s death.

In the pro­gram­ming world, how­ever, a great piece of code is highly praised for its inge­nu­ity and its risk tak­ing. Large leaps have been made over the past decades by peo­ple who essen­tially fig­ured that work­ing within the sys­tem might only achieve incre­men­tal improve­ment but work­ing out­side of it could gen­er­ate some­thing much more inter­est­ing. If you look at the devel­op­ment of the com­mer­cial Inter­net (and of the open source move­ment), it is this “let’s try to do some­thing more” that has engen­dered some of the biggest leaps.

The 90s were an inter­est­ing time in that peo­ple looked at the Inter­net and essen­tially allowed for day jobs to be cre­ated so that peo­ple could explore pos­si­bil­i­ties. While much money was tossed at peo­ple try­ing to do things that wouldn’t work (pets.com, any­one), the truly inno­v­a­tive com­pa­nies (Ama­zon, Ebay, Pay­pal) took large leaps of faith and were rewarded for them.

While the leap of faith in terms of the idea is prized, some other parts are not. In my early days as a hacker (and by hacker, I mean some­one who toys around with code, not some­one try­ing to break into sys­tems), tight code was the norm. A large part of the rea­son for this was the lim­ited amount of space we have to play with. As a kid in the early 80s, I was play­ing with com­put­ers where RAM was cal­cu­lated in Kilo­bytes, not Megabytes or Giga­bytes and, as a result, my friends and I were always try­ing to get more out of each byte of code. As mem­ory avail­abil­ity increased, it seems that peo­ple became more care­less in their pro­gram­ming, often wast­ing use­ful resources in terms of CPU space and mem­ory space. This skill, nowa­days, does not seem as prized as it used to be. The same is hap­pen­ing in terms of web devel­op­ment, where sloppy usage of XHTML is forc­ing us down a path of more band­width for the bang. To me, the real beauty of a lot of code lies in the fact that more can be done with less. This, how­ever, seems to be a les­son that many have not learned.

Originally published on May 9, 2003 in Technology . You may find related thoughts pieces under the following terms: