Defenestration

Defenestration : the act of throwing someone or something out of a window.

I have learned this word from this article where the author talks about the bane of the copy-and-paste facility in programming. Errors are copied from one code to another code, from one product to another product. Old codes and even whole libraries are copied from one place to another, retaining old errors and introducing new ones. Debugging thus becomes an impossible task. No wonder he’s inclined to throw someone or something out of the window to vent his frustrations.

Though I am guilty of such a crime at times, I am also less forgiving to people making this same mistake as I do. Defenestration is something I had always contemplating doing but knowing fully well the consequences of the act, I simply cursed and sweared at the codes facing me. Hopefully I won’t get to maintain someone else’s code again. Having to struggle with my own code now is stressful enough.

But why do we write and copy such dirty codes in the first place? My guess will be the reason of the lack of proper comments, documentation, and clear definitions of the API. Though we are programming in the OO way, how can we find the code to reuse if we do not know of the objects available? So in the light of this argument, I forgive everyone, including myself :p

You learn a new word today and something new everyday…

This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.