What to do... Life's like that...

Sunday, June 04, 2006

Copy-Paste: A dichotomy in 21st century programming

A programmer in the 21st century is equipped with lots of tools and commands to expedite the process of software development. We even have good patterns for componentization and code reuse. But the one that stands out is the "physical" reuse of existing code using the Copy and the Paste commands. It comes in various forms like ctrl+c/ctrl+v, yy/p or ctrl+insert/shift+insert (for the purists) and is the most widely used tool I believe.

A question goes out to all the software programmers out there. When was the last time you sat down and wrote n (n > 10) lines of code thinking about each line you write, figuring out each and every parameter that goes into your API call, referring to documentation to make a judgement between the different types you can use based on their implementation and making full use of all the features your modern programming language provides? The answer could date back to your school days, probably when you wrote your first "hello world" program (hmm... I visually copied it from K&R :)). With hard deadlines and high pressure work environments meticulous programmers could be an endangered species. But is this good or bad?

The good part is that it saves a lot of time and effort, an otherwise monotonous job for the programmer. Also, there could be reduction in the errors as the source for most of this code would be either well written samples or code that has already been reviewed and tested for quality (assuming samples are well written and written code is tested properly, could be disastrous otherwise :)). Unless the applications are super-critical, a certain degree of slack doesn't cause any harm especially if they are bound to save time.

The bad part however is the lack of depth. We take things for granted without understanding the details, which could be very detrimental. We forget the specifics and could lose out in the long term. What is specific today could become fundamental tomorrow. We may even ignore some of the facilities provided by a programming language thus bringing down the utility of the language. I've run into a lot of examples and also have heard a lot about this problem from my colleagues and friends.

A good practice would be to reuse code but to understand thoroughly what it is supposed to do and why it is coded in that way. Let the 2 finger exercise continue, but the content on the clipboard must never be ignored. Ignorance may not be blissful always :-).
share this: facebook

Saturday, June 03, 2006

Cirque Du Soleil - Varekai

Recently I got to see a performance by "Cirque Du Soleil", a musical circus troupe who perform across North America and Europe. It was long standing in my todo list, but I couldn't see their show at Vancouver B.C. in 2004 when they were performing there. But since May this year they've been performing here and I thought I should not miss this opportunity.

"Cirque Du Soleil" ("Circus of the sun"), is an entertainment company based in the French speaking province of Quebec in Canada. Started by 2 street performers in Montreal in 1984, the company has a variety of shows they perform at different places including the Bellagio (Las Vegas, NV) and the Walt Disney World Resort (FL). I happen to see the Varekai show here.

Varekai means "wherever" in Romany and is based on the mythical character Icarus. Icarus falls from the sky after overriding his father's words to keep away from the sun, as the wax keeping his wings together would melt if he went closer to the sun. The show doesn't have many trapeze acts, but the juggling and the pots act (by the Chinese kids) are out of the ordinary. The music and sound effects are great and is performed live, which makes the performance a notch higher. The fireflies simulation give you a tingly feeling and is done well. The comedy is ok and a little bit of French would help you enjoy the show a bit more. The supple bodies of the main artistes are a treat to watch as they gyrate and flaunt their flexibility.

The show is around a couple of hours excluding a 25 minute intermission. A must see show, though it could be perceived as expensive. But the justification is that a good seat would cost you just 4 dinners at a restaurant :-).

Until next time.....
share this: facebook