Saturday, January 31, 2009

2 to 3!

I was reading this blog entry on AS 2 to AS 3 migration @ WarmForestFlash blog a little earlier today and the thought has been floating in my mind for a long time. I migrated to AS 3.0 when AS 3.0 came into the world. I fought my battles and won the wars and I think it is well worth it. I've aired my opinions about the migration on various occasions too. A few of my friends still stick to AS 2.0, not because of the small learning curve, but, they are held by strict project coding platform rules setup in their companies. As I have experienced too, most of these "Coding platforms" have been developed in circa "those triple digit years". Those who have some authority on questioning higher level people have found the common answer – "The code has been developed over a lot of experience and has been tested to zero-error the current stage. We don't have the time to work on a new platform for this. Just do your work as is." I have worked on projects that had really primitive levels of coding and technology. The truth is, we can't really blame anyone for stepping backward or remaining there.

Recently, I was developing this simple widget for a client. To me, the obvious choice was using Flex 3 and AIR. After some discussions, had to realign my thoughts and use Flash and a projector application. I have used mProjector, Screenweaver and Zinc before, but, the version I had access to was very old. I had to look back a bit and hit the "Use AS 2.0" button. I began the coding and then couldn't really make much progress. My mind was shifting me to AS 3.0 – EventListeners, XML DOM models etc. In short, Resistance was futile. One of my buds had Zinc 3.0 on his machine and I smiled and delivered. "Once you have enjoyed the power of being a king, you can't really give up".

I've always loved technology and coding. I sleep well when I have written atleast 10 lines of code, especially AS (Call me NUTS! ). When I migrated from AS 1.0 to AS 2.0, it was tough. The concept of OOP was a bit hard for me, since, I didn't come from a computing background. The learning curve was really steep! AS 2.0 to AS 3.0 is a lot easier. I have told this a lot of times during my discussions – its only when you do, you learn. When you learn, you enjoy it. AS 3.0 gave me the pleasure I sought. I hit some rough patches and still hit many, but I try and overcome them. You don't really need to migrate official work to the newer. Learn as a personal thing. To those who want to migrate, here are a few tips:

  1. Get to know the new Event model. Keep the onReleases(), onPress() etc in the locker.
  2. Remove the "_" from object properties. _apha will be alpha for the record.
  3. UI components are more thrilling. Get to know them
  4. XML is also easier to parse and consume.
  5. Get used to the new Packages. Know what lies in which package.
  6. Check this page out: http://livedocs.adobe.com/flex/3/langref/migration.html

Happy learning!

Monday, January 05, 2009

Small Concept, Big Movie! Yeah, it’s the movie review time!

Going a little off topic, I am going to review a movie that I saw. It was a good break from all the learning.

The Movie? Ghajini. If you haven't seen the movie, I am putting in a spoiler..hehehe. The movie starts off with a medical lecture. Jiah Khan gets introduced into the movie as a simple eager medical student. Well, later on, the "simple" will change to "pest". Jiah Khan wants to work on the "Aamir Khan Project" as she chances upon the criminal case file in a common medical library. Of course, now, the star is introduced in a WHAM! BAM manner. It was a great idea bringing in the shadow first and then the actor. The brain surgery seemed to have healed well on Aamir Khan's head! So, Aamir Khan has Short-term memory loss. He can remember things for 15 mins. So he has this room full of really big collection of clues which would lead him to his girlfriend's killer. All over the room, he has left these little post-its which tell him what he needs to do and stuff. It didn't stop with the post-its though, he needed to be given a chance to show the 1...2....3...4...5........8 packs, so, he had these things – phone numbers, messages written on his body. In big bold, he had "Kalpana was killed" around his collar bone. Kalpana? Anyone? Do I know her? Yeah I do..well..selective short memory loss?

Moving on in the story and cutting out on some action, there is this really short shirted muscular cop who traces through clues and finally comes to Aamir Khan's house to confront him, even if, he was to run with the city bus to catch up and get in. If the hero was caught, the movie wouldn't have taken 3 hrs almost to finish, so to give people their money's worth, the cop bashes up the hero and..and..looks around to find a diary. Am I getting a flashback here? Yup! We are taken backwards in time to get to know the man's life. So Aamir Khan is a really high-flying business man – Sanjay Singhania...only..no one really knows him. He can easily pass of as a boy next door in this armanis and rolex..and.. Superman had to wear you know what outside to keep his identity a secret! The whole affair is revealed. Asin (the heroin) is a small time actress and let us leave it at that.

The cop comes to the last page – 31st Dec 2005 with the echoing question – "Do u love me?" well, thats is the question Aamir asks Asin in the flashback and Asin is to give him the reply the next day. Aamir wakes up from all the bashing and bashes up the cop! Strike one! Do we have a surprise waiting? Yeah we do! Remember the medical student? She too comes to Aamir Khan's place. Now comes the strangest thing in the movie. The cop tells her that Aamir Khan is a killer and starts to run away leaving the girl and Aamir behind. Luckily, the cop is the bigger bait and Aamir decided to chase him. Coward cop is run over by city bus.

Aamir finds a programme invitation among some goons he beats up. It is an invitation to a college programme that is "chief guested" by..by.. TADADAAAAA.. the Villian..the one and only..Ghajiniiiiiiiii. The Polaroid cam comes to use again. Aamir takes a clean shot of the man. Oh yeah! The Polaroid cam. This is a tool he uses to take the pics of things (and people) he wants to remember. Jiah is once again brought in to throw some gas into the inferno. She vists the villain to tell him of Aamir Khan's intentions.

Are you still wondering what happened on the 1st January 2006? Did Asin say "yes"? Who is going to read the 2006 diary? Yeah, its Jiah once again. She had taken the diaries home to read as a bedtime story, putting it in a cupboard to read later. Now, that she remembered that, it was time to read. We get back into the flashback watching things that happened wayback...rhymes! Asin says "Yes"..no surprises there!

Cutting out a lot of things in between, we go to the part where Jiah is investigating what exactly happened to Asin and Aamir. The diary doesn't talk about that! So, on her trip to Goa for a shoot, Asin rescues a group of girls taken by the goons of Mr. Ghajini to be sold. Heroine's life! Hmm. There is this interesting character in a lady cop who calls Asin to come to the hospital where the kids are recovering. She says that 2 kids are missing and Asin has to come immediately to identify them and that there is a big person's hand in the crime. This raises the question – Cops are there to protect people and investigate things right? I scratch my head on that!

Goons angered they take revenge and Asin is killed. Aamir is also bashed on the head with an iron thingy and thats how he gets to this state. This leaves us with some questions:

  1. Big business man bashed up and messed up in the head. Strangely the police case isn't famous or heard of. Are our media so bad?
  2. Do sick people live alone? I mean you forget things in 15mins and you have no one to take care of you?
  3. "Revenge" is the most remembered word?

The storyline was kinda weak and doesn't really stand a chance to some logic. But, then again, movies aren't mathematic equations. It is the entertainment value that counts. Music is really good – typical AR Rahman stuff. Apart from Behka, Kaise tujhe and Ghuzarish, the rest of the songs aren't really catchy. Aamir Khan does the usual Khan thing. Good actor delivering his best! Asin was natural, but, the rest of them were kinda mediocre and didn't seem to support the main story.

This goes on to say - Buy the DVD and see it.