The last traces of a human company in my floor just vanished now. I just stood up to see that I was the sole occupant of an entire floor. Studying for certifications can be a boring task. Especially if you have a running nose the entire day. I still don't know why I should be studying something called ITIL, when there is a pressing need for me to learn Computational Linguistics. But what I have here is an incident that happened to me yesterday. I'd really like to share it with you folks. The great Larry Wall once wrote about the three qualities of a programmer. So why do I bring this up now?
Yesterday, I had to meet my Big Boss to clarify certain things. Well it was something entirely personal and nothing to do with the official work. He was immersed in his work and asked me to wait for a while. I Hung around** for a while. My eyes scanned the space emptied by the occupant there and so I had to trouble the the other team mates. This is the place where I realized, how important those prophetic words of Mr.Larry Wall were. One of the senior folks was actually working with a XML file. The XML file was generated with some blank spaces between tags. Her task was to remove these blank spaces and generate a clean XML. To illustrate the problem, her XML tags looked like
StartTag(loads of blanks)some_string EndTag
. Now all she had to do was to remove the loads of blanks. To folks well versed in notepad++ and TextEdit, this would have seemed trivial. A simple find and replace would have worked. TextEdit for some weird reason was not working. I looked at her and asked if she would consider writing a program to do it. She was not interested as ..it would take more time to write a program. So she was manually removing the spaces. I said I'll write a java program.(These days I am familiarizing myself with Cygwin and so I thought I'd as well try the powerful tools in the Unix shell). She was very apprehensive and inspite of her sweet denial I could figure out that she was really not so interested in the task.Well it would have required only two lines in java. Assuming there were only blanks or spaces. All she had to do was this :
String a = //The string from the XML file
String b = a.replaceAll("StartTag\\s+", "StartTag");
Probably that's not the best way to do it either. There might even exist a simpler way. Thankfully today I realize that there might be some traces of the laziness that Larry Wall spoke of. Oh! Btw you should have also thought about the immutability of Java strings if you viewed the above two lines of code.
This might be just me. Some folks would still love doing the manual way. I have no qualms about that. But, I wonder if the creative spark in me would die a slow death. Will I start imitating my seniors and shed the remnants of any creativity that I have? I get reminded of the movie Idiocracy where the protagonist lands in a future where the humans have become totally dependent on machines and cannot think for themselves. Hmm.. I really don't have an answer to the question now.
I just remembered a beautiful poem by P.B.Shelly called Ozymandias. It talks about the crumbling of mighty empires and the ultimate destruction of any civilization, however great it might be. Here is the poem:
I met a traveller from an antique land Who said:
Two vast and trunkless legs of stone Stand in the desert.
Near them, on the sand, Half sunk,a shattered visage lies,
whose frown And wrinkled lip, and sneer of cold command
Tell that its sculptor well those passions read
Which yet survive, stamped on these lifeless things,
The hand that mocked them and the heart that fed.
And on the pedestal these words appear:
"My name is Ozymandias, king of kings:
Look on my works, ye Mighty, and despair!"
Nothing beside remains.
Round the decay Of that colossal wreck, boundless and bare
The lone and level sands stretch far away
Yeah! I just hope the creative thinker in me doesn't have the fate that Shelley has put forth in fine verse. I hope that he lives on for at least 20 years from now.
(**Pardon me,I think the purists would not agree to such a usage. I'd rather use it for the descriptive purposes :D**)
**Goes back to listening songs from the evergreen movie Abhimaan and decides to call it a day**
No comments:
Post a Comment