Friday, July 27, 2007

Weekly Review - "Next"

I am late by a year. Sorry about that. Apparently, I was wrong when I said this. "Next", the recent Michael Crichton's book, was a complete waste of my time. For one thing, I just dint get what was Crichton's point. OK, so, the chimp talks. OK, so, the parrot talks. OK, so, something weird has happened to some turtles. OK, so, ah, wait a minute. What? Are you just repeating stuff or, ah, FUCK IT. It was really not worth reading it. I hope Micheal Crichton starts writing in his usual self, or else it will be about time I stopped reading his new books.

Current Work Pattern

Finally! I got the much longed for time when one can ramble on the net for random people to see. I mean you people. So, lets get on with it.

These days I have been working a lot. By that I don't mean I am working like Abhi, where you just work for the heck of it and are always bitching about it. I am enjoying a lot at work these days. I reach by about 10.30 in the morning. Break for lunch for about 25 minutes. Then work till 7. Play Unreal Tournament till 8. Then leave and come back by 9. For me, those are long hours.

Thing is, I am amidst some really kick ass people with loads of experience and exposure. My team has only 5 people, 3 other developers and a QA. All with at least 6 years experience. I am working with him, him and him, all developers. Some of the more geeky-cool people at work and incidentally in my project. Especially, Hakan is one funny person and is a very and I mean very pragmatic person. I just love all the discussions, technical or otherwise I have with these people. All the vehement talking in TGIF is not to be forgotten. Good for me.

On an other note, one of the things I was thinking about lately was, "Is technology a means to an end or is it an end in itself?" A very philosophical question indeed. And I am sure a lot of people at my work have a ready answer, An end in itself. But some of the more introspective ones may say, "Hmmm, depends." That is exactly the answer I get from a lot of people. They just don't want to commit to a side. Only a few people know why they shouldn't be taking a side. This is indeed something that can potentially lead to a long discussion. Can't wait.

Discussions till now: Why should Earth be Flat, Why Shouldn't Earth be flat(Discussed after about 45 minutes of rigorous drawings of flat earth on our story wall!), Is it sensible to have a fear of Aliens, Education vs. Creativity, Intelligence - Fucked if I know what it meant, Genomes and People are stupid.

Monday, June 4, 2007

Code Poetry

When you listen to good music, anything that you perceive is soothing or whatever qualifies music as good to you, you will feel a sense of satisfaction. Even though the music itself is not yours, you can always enjoy it. Ever read a piece of article which is crisp, to the point and yet drives the point in such an affirmative way that you are just happy that there are people who write without bull-shitting? Then there are the sculptures, the paintings and a whole lot of other arts which require an artist to create them but even more, people who appreciate the art itself. I am going to write about a form of art which is lost among a lot of people. The art of writing code, the cosmetics of it rather. Some of the key things to keep in mind if you want to write code that appears like poetry:

* One thing I think is the key to art is that there should be nothing redundant in the your work. It kills the genius behind the art itself. In the same way, there is no place for something which has no purpose in your code. Get rid of those variables and fields which you have because you think they may be useful in the future. Get rid of private/helper methods which are not used anymore. They are like random noise in a symphony.

* Claustrophobia is not something that only humans suffer from. You can't expect to write "The Prey" by Michael Crichton in 3 pages and expect people to read the whole thing. At the same time, I won't read a 10,000 page version of "The Prey" either. I enjoyed reading the 400-odd paged version thoroughly. The content mattered only after the spacing was properly. So, keep in mind to leave spaces as required by the conventions of the language that you are using. Like a space after an "if" and before the start of the parenthesis of the condition in Java, etc. When you write code, don't be prodigal in leaving white spaces and empty lines. They don't add value. They are a distraction. More often than not, people wonder as to why there is a new line and if they missed some logical separation marked by the demarcation. Follow the conventions all the time and be bold only when the situation calls for "dire" measures, and even that only when it comes to leaving a new line.

* Don't initialize local variables on one line and use it in the next line alone and nowhere else. You don't need such variables. For example:

int length = someList.size();
doSomething(length);

Here, there is no need for you to use 'length'. In fact, I would argue that the intent is much clearer when you write something like:

doSomething(someList.size());

Here you know, without an extra level on indirection that you are "doing something" with the size of the list. Traditionally, having a lot of variables was advised because function calls were very costly. But there is such an advancement in processors and compilers that there is virtually no difference between using a variable and a getter method of the variable. Given this, I would write something like this:

foreach(String name : getNames()) {
//whatever
}

This is a nice way to write "for each" statements without using local variables for the lists/arrays and you will appreciate it once you start using it.

* If you are programming, say in Java, make sure you choose an order in which you want to import stuff, so that it is consistent over the whole of your project. This keeps things neatly. For example, I would have all the bundled java classes be imported first. Then other stuff which are, say, javax stuff. Then I would import stuff which are from my project. This way when I, say, create a patch between my older version of a file and a newer version, I can be sure that if there is a change in the import, its because of a change in the code that affected it and not the order in which stuff are imported. In fact, I think this is a really important code cosmetic if you are using code versioning.

* Try avoiding the use of comments for private methods and variables and instead use a name which suggests what it does. The use of a good name is something that is emphasized the most by almost everyone but is something which is either not leveraged or abused beyond any use. Don't keep a constraint on how long the name should be. At the same time avoid using articles like 'a' and 'the' and try making the method sound like a sentence when it is read with the argument that is sent to it.

Most of the stuff here are in fact built into IDEs for the language you use. The options to do these may be obscure or obvious, based on the quality of the IDE itself. Its important to use them to write clean code.

These are some of the things that I think which makes a code appear clean and pure, like an art. I have seen some seasoned OO programmers who use these rules and many others and just to see them spew the code out is like watching someone paint. And the code itself reads like poetry.

Friday, June 1, 2007

Hacking

I know the media has hyped up the word "Hack" and "Hacker" so much and so bad that the true meaning of the words are lost among the masses. But what really ticks me off is that even a lot of people in the industry think I "broke" into a website or some network where I am not supposed to go and got my work done when I say, "I hacked my way around this stubborn problem". Illegally. Yeah, right, if I were a "Black Hat" I wouldn't dare write stuff with my identity so blatantly given away!

So, here's what Hacking means - HACK
And here's what Hacker means - HACKER
And the actual word which stands for "hacking" as people conceive is - CRACKER

I hope this makes a difference. Thank You.

Tuesday, May 29, 2007

On the Lot!

This new reality show on Star World, is just amazing. It has everything that a movie buff would want to watch. This show is about selecting the best director for the $1 million contract with DreamWorks. It somewhat resembles The Apprentice but it's nothing like it.

The show started off its first episode with 50 wannabe directors selected of the 12000 lot. These are selected from all over the world, not just US. They were asked to pitch a story based on the logline given to them. Some pitches were so good that the audience actually lived through them. Each episode tests for the directing skills in different areas like comedy, horror etc.

Steven Speilberg and Mark Brunett (Survivor, The Apprentice) have produced it. Distinguished directors Brett Ratner (X-Men), Carie Fisher (Star Wars) and Garry Marshall (Pretty Woman) are the judges. They give brilliant reviews unlike The Apprentice trio who just focus on blasting and searching a scape goat. Moreover, you don't have to see the contestants fighting with each other selling a Donald Duck sticker'd water bottle. There are no made up fights or fake emotions either. I mean, on Apprentice, a guy irritates his team mates by sleeping all the time, while on a particular task and don't get eliminated. In the next episode, he is an amazing leader and the previous manager will be acting dumb and eventually does a lousy job. Finally, one of these would end up being the winner and the judge in the next season.

None of those crap are there on this show. You can watch it at 10pm Tuesday on Star World in India.

Thursday, May 24, 2007

Me and ThoughtWorks.

Yesterday, I had been to ThoughtWorks (You might want to click on this link! I don't think that it's their official website.) That place was just incredible. It was a fusion of say, a design firm and a lot of geeks workin in a software company. Right from ambience to crowd, everything was good. They have everything in their pantry that my current office lacks. Literally everything! The lunch out there wasn't all that great but then again, at least they have free food, unlike some places, where you have no food at all!

So, why did I go there? I had an interview. As I said, I loved everything about that place but my interview. It was disastrous. I stammered, fumbled and was not confident while answering, I went blank, like the whole time. All in all, I blew it.

Initially, they started asking questions about the concepts that I had used in my final year project. Later on, as the interview progressed, they tested my knowledge in basic Computer Science concepts. In the end, they probably would have asked me about my hobbies etc etc, but I dint make it to the end. It was one of the best interview's that I have attended. The fatal mistake I did was that I lead the interview exactly towards the concepts I barely knew.

In the end, HR spoke to me well, helping me figure out what went wrong. I had this sentence going on, in my mind, which a classmate of mine had said seriously in college. "Given the opportunity, time and resources, I'll prove myself!".

I was overwhelmed with my yesterday's experience. If you care about your code, you should try it too. Btw Abhishek and Chethan have got calls from ThoughtWorks. Hope they get through and give us DIFFERENT treats :)

"I learnt something yesterday!" (Like kayle from Southpark) You should always pick your company based on work and not pay. (Yea Yea! I know that you already know it). Anyways, so I decided not to apply for any other company but (thoughtworks and few more!)

Tuesday, May 22, 2007

Weekly Review - The State of Fear

I know I am late by about 2 years to write this, but what the hell?

If you have read Crichton's Congo, Sphere or Timeline you will definitely be disappointed of this book. Micheal Crichton's novel the State of Fear is, well, almost there. It is not exactly your kick-ass-sci-fi-action-and-what-not Michael Crichton novel, not completely. It is somewhat there. For example, the novel is too much of a science journal than a novel, which is fine if there was just as much action too. At the end of the day, if I wanted to know about Global Warming, or the lack of it, I would go read the journals myself online. Apart from that, the book is an OK read. There is no Levine or Malcolm or Marek or Harry in this book, as in no character that is worth remembering. A very seemingly annoying pedantic government agent who always speaks politically correct is the only striking character. Apart from that, the characters are mundane.

If you are a hardcore Crichton fan, you wouldn't mind reading this book. Otherwise, don't judge the author just from this one book. I am sure this is just an "one off" book that he wrote!

Thursday, May 17, 2007

LIG Musings

I somehow found more free time than I usually get at office yesterday and today. So, I was surfing for some blogs and reading stuff about LIG. Then I realized that of lot of people write for an audience and try to be "politically correct" and a few others are offensive for the sake of it. I, for one, write whatever I think is right, without trying to be generously obscene, at the same time not trying to censor myself when I think using a fuck here and an asshole there whenever I think its appropriate. Now, coming to what I want to say here, is it a necessity for you to be diplomatic in your opinions and liberal in your thinking if you want to be heard? This made me write this.

For one, I am more conservative than liberal and oriented towards the right.

And it is true that news channels, especially NDTV and the likes are laureling pseudo-liberalism, for that is what it is, so much that people actually hesitate to express their opinions any more, for the fear of being considered intolerant. At least the ones I have seen speaking are. And of course, everything is a "national catastrophe" these days. And the things that are actually one are a political taboo to be mentioned. Idiots. Hippocrates.

On a different note, do you like nude paintings? Would you gift one to your girl friend/boy friend's mother?

Thursday, May 10, 2007

Another Number On The Wall

I used to work for a CMM level 5 company. That is to say I have been through hell and more. A lot of people I talk to believe that the off shore model of development survives on the number of people/resources that is at a company's disposal. Though, it is absolutely true when it comes to a lot of big shot service providers in India, I don't think services/consulting software companies are just that, a herding shepherd collecting sheep. It is much more than that. And people have a tough time comprehending why I say "Fuck CMM" because they are made to believe that you get your ISO certification, your CMM & PCMM certification and a business model following the Infosys and you are all game for a software company. Hell, just working at one of these places will make parents of girls virtually drool and ask you to marry their daughters. I don't have a problem with that, however.

By being a CMM level 5 company, a company follows a set of processes. Everything is process-driven and person independent. So, for a big shot IT company in India, more often than not, each person joining in is more of a head count increase rather than a value add. They aren't looking at heroes who can do a lot things on their own, rather people who do what they are told and do it well. So, your ability to do same things repeatedly without thinking is what counts and not, say, your ability to use diophantine equations to make your computer work in parallel universes to solve the Traveling Salesman Problem.

My point is as long as you don't mind the fact that you are just a number in a SAP software, another brick in the wall, just someone who is, by definition, "replaceable" by someone, anyone, else then you can continue what you are doing. Otherwise, its high time you had a good contemplative look at your job and say, "Fuck CMM" and move on.

Wednesday, May 9, 2007

Abhi in Yelahanka!

Sheikh Hasina is in UK.
.....
.....
After Many Many Days.....
.....
.....
Sheikh Hasina Back to Dhaka.
Abhi is in Yelahanka.

Software Delivered and Open Source??

After delaying by 2 months, I finally "delivered" the software I had promised to Rollwell. They will be running the Inventory Management System (IMS) soon. It was awesome being a BA (Business Analyst). I got to act all doophusy and make bimbo comments such as "Second combo box gets populated based on first combo box?? Radical" and the like. However, after fire fighting till 3 am and then doing UAT during breaks in the office, I delivered a very stable and "does-what-it-is-supposed-to" IMS. The customer was really happy. He was blown away by the simple yet clean UI, which Swaroop had a little and my brother had a lot to do with.

While I was explaining how we have used all open source tools which are all legal and have free licenses, the customer was shocked. He asked, "But Pavan, if you have used Open Source, anyone from the Internet can access my data!" Apparently the concept of Open Source is quiet well known these days. I am sure people think, "We have 2 words, "Open" and "Source". I mean, how difficult is it?" Go figure!

All in all, it was a job well done. Next time around, I plan to be the "short tempered cynical dev". Wish me luck.

Saturday, April 28, 2007

Education for the Real World, Really

I haven't been able to write any blogs these days, because I've been busy studying for Certification exams from Sun microsystems. And I plan to write many many more of these, from vendors like Oracle, SeeBeyond, IBM, LOMA (domain certifications) and finally Microsoft. The motivation for writing them is to get such a huge stack of vendor certifications to go with my resume, no one should be able to see the engineering degree. Things went really wrong for four years with that type of (irrelevant) education.

This is the kind of education that I really enjoy. It's directly relevant to the real world, unlike most of what they taught in engineering. It's mostly multiple choice questions, or actual programming assignments. Plus, no one has to go through the horrendous ordeal of reading my handwriting.

I'm enjoying this a lot, it feels just like the good part of college life. Waking up on the day of the exam, thinking "damn, I got up four hours late. Stupid alarm clock...", realizing that I haven't completed even half of the original "preparation plan", riding to the exam center thinking "I'm surely going to fail", waiting for your turn with nervous anticipation and actually passing in the end.

I strongly feel that the whole of education should be restructured this way, starting with the engineering courses. What do you say?

Tuesday, April 24, 2007

What do you think of the outcome of this World Cup?

Who do you think will win 2007 Cricket World Cup?
Australia, of course
New Zealand
Sri Lanka
South Africa
India
Pakistan
Bangaladesh
  
pollcode.com free polls


Wo do you think, will play the best in the finals?
Shane Bond
Fleming
Styris
Jayasurya
Murali
Sangakkara
Ponting
Hayden
Gilchrist
Smith
Gibbs
de Villiers
  
pollcode.com free polls

Tuesday, April 10, 2007

Object Bootcamp - Place where I learnt things

Since we talk about our work place and all here, here goes nothing.

I switched jobs and now work for a Software Consultancy. It is a kick ass place to be. The culture, the people, the technology. O! I am love with the place. Since I joined newly and I barely have any experience, I had to under go a training called an "Object bootcamp". It is the best thing. EVER! Here's how it works.

The objective of the bootcamp is to teach freshers how to do Object Oriented Design - the agile way. It started off with a brief 20 min discussion on what is OO, what are the concepts in it and the language which we were to use, Java. In my previous company I had a 30 days training on the same! Pfft. What followed for the next 4 days was pure bliss.

We followed Test Driven Ping Pong Pair Program. Pair Programming means 2 people work on the same computer, one person types or drives and the other person reviews, thinks, suggests etc. Test driven programming means, even before we write actual production code, we write a unit test for it and then write production code which makes the test pass. Ping Pong programming means one person writes a test and the other person makes it pass. Then he writes a test and the first person makes it pass and the cycle continues.

We were given different problems which were almost like actual customer problems. Each problem is split up into a number of stories. Each story represents a requirement. We follow 5+15 minute cycles or iterations - 5 minutes for deciding on the necessary classes, their jobs and the first test that we would write and the 15 minutes are for implementing the same in the TDD ping pong way. Oh, and we have to switch pairs every third story. So, we cannot pair with the same person for more than 2 stories. Meaning your code base keeps changing every now and then. (This is where having tests help because if you make a change you can just run all the tests and be sure you dint break anything which the other person already had running.)

The first 2 days were about basic design concepts. Aggregation, Delegation and Inheritance. When to use what? How to decouple classes? How to get tests passing withing 15 minutes etc. The remaining 2 days were about design patterns - How to identify the need to use a pattern, some common patterns, refactoring into a design patter etc.

All in all, it was a great learning experience for me. Given the sort of teaching I was exposed to at my college and also at my previous employer, I always thought the faculty would be shady no matter where you. Boy, was I proved wrong.

On a finishing note: We came across an interesting situation where we had a method in a base class which was returning an instance of one of its derived classes. Is this a good thing? What do you think?

Monday, April 9, 2007

Yet Another Opinion Seeking Blog

Given a choice between money and power, what would you choose? Choose under the premise that they are mutually exclusive. Don't start off with how valid that assumption is etc.

Good Reads

Check out Goodreads. You can find good reviews on books there. You can also give ratings of your own and store the books that you would want to read later.

If you are signing up then make sure that you don't send invite to all your friends in your address book. You can (should) skip that step.

Friday, April 6, 2007

Movie Review: Namastey London


It's a must watch. I say, go watch it in PVR; you won't get that feeling if you just watch it on a DVD. Yes, that's the exact feeling that you get when you hear Sudhi sing. The director of this movie has been extremely diligent in picking up scenes to convey his confusion.

After watching the movie, I was compelled to read the reviews. I found this ,totally misleading review.
Well it's true that this movie is not like the usual romantic ones, but it is like the usual flop ones. It is very very prosaic till Akshay Kumar's entry, which is after 42min:54 sec and after that it continues to be so.

The film revolves around the story of a London bred girl of Indian origin. It's about how she wants to marry a man of British origin and how she ends up in India marrying an Indian groom. At the start of the movie, too many issues are presented and throughout the movie it's not clear as to what issue the director is addressing.

Watch out for Katrina's knee length short skirt scenes including the controversial one at Ajmer dargah. The funniest part of the movie is the acting of side actors, like Katrins's mother, Imran's parents etc. You can include even Katrina's acting to that list.

I'll give it 1, no not out of 5, out of 10. That 1 would be for Katrina Kaif. Again, not for her acting.

Wednesday, April 4, 2007

Blog Strings

I came across Blog Strings in Lifehack. People like me, generally spend most of their time browsing blogs at work place. The only way to do this was to visit a good Blog and then look for their reference blogs.

Now you can find many bloggers and their blogs at BlogStrings.

Idea

How about making an application for portable devices, on which the user should be able to install any sub-application of his choice, so that he can just plug-in the device and the sub-application starts running?

E.g. Say we make an application of our own called "Jobless". We should be able to install Firefox, Winamp etc... on it, so that the user can just plug-in the device on any computer and start using the softwares of his choice.

Monday, April 2, 2007

Weekly Review: Windows Vista

Good morning and welcome to the second edition of Weekly Review. This week, we're reviewing Microsoft's Windows Vista. I can tell you upfront that this is going to get very controversial: we have two Microsoft haters in this group. But only two people in the group have actually installed and used Microsoft Vista Ultimate, so here are the facts and opinions:

FACT: Vista editions (home basic, business, ultimate, etc. ) have VERY different features. We're talking about Ultimate edition.

FACT: Vista has sold more than 20 million licenses since launch. Very strong sales numbers.

FACT: Results don't just happen.

OPINIONS: [feel free to edit these]

Mine: Once again, Microsoft has gone beyond anything that anyone could expect. Vista looks great, sounds great and runs games much better than XP. It has a more efficient way of dealing with hardware drivers and manages to churn out better performance. The ultimate edition has so many features, it obviates the need for many previously essential software. Disappointed with DVD burning and Speech Recognition though.

Ketan's: Awesome. Couldn't be happier.

Chethan: Still convinced that we're using a transformation pack.

Sudhi, Looking up from manutd website: Vista? Who?

Nithin: "I have slightly less RAM than needed."

Chintu: "You have southpark?"

Pavan: I'm switching to Unix.

Abhi: Vista nodilla man. Thumba kelsa ide.

So there you have it: eight profound opinions. Stay tuned for similar nuggets of wisdom, right here on Together we drown.