Wednesday, December 31, 2008

Memories ..

The guys from my school days, Don Bosco High School Irinjalakuda Thrissur, had a small get together on the 26th of December 2008. I could not go because of the work here and most of my leaves are taken. I generally take 5 leaves at a go as travelling from Noida to Kerala with lesser number of leaves would be foolish. But after seeing the pics from the party bash they had, I wished I were there. To see all those faces, old ones but changed ones, were great. Some of them are here posted by Nikhil. Some of them are also in Jibi's/Jerils's Orkut Albums.

Tuesday, December 23, 2008

One hell of a day

This one I have to say was one of the worst days ever.

Gitesh gave me him iPod to format yesterday night. I was trying to get the thing done in iTunes, but the option never came up. The word format literally confused me and I started thining about formatting the whole drive. I did format the drive yesterday and today morning Gitesh told me that the iPod stoped working. He then later went on to an Apple iStore where he was told that nothing could be done. This meant that I had lost 16 k !

I went on to do my work not thinking of the iPod much, before I had got the call at about 3ish. I got stuck with some javascript that had to be done in the project. It took me 5 damn hours to figure out that XHTML does not allow element.innerHTML to be assigned. This meant that prototype and Yahoo tree will not work. This pissed me off.

Then came the shuttle matches. I generally go and play some for relief. And I get pretty mad when I play bad. Well I played very bad today. NO shots went right and I was furious.

Well that makes today a screwy day.

Thursday, December 18, 2008

Body Art

I always wanted a tattoo on my body. Not necessarily in a place which is viewable, but still on my body. I thought long and hard on what to have temporarily drawn. Long idealistic sentences, figures of angels and devils, or even some ones name. Then it struck me to have some thing techi. A barcode was the first thing that came into mind. Now I was searching for a suitable image. Some thing which also had a message. This image, I thought, was awesome.



We (I, KD, Srinath and Gitesh) went to GIP one saturday to check out this place where tattoos were done. They turned out to be temporary ones but the properitor also did permanent ones. So on sunday we went to sector 44 were he lived and got it made after two and a half hours of constant suffering. The pain was bearable but to sit on a chair with no shirt on while he tattooed it on my back (lower neck) in the cold weather was tough. It pained even after it was done and now it has started peeling. The layer starts to peel but the skin will still have the drawn picture.

It is awesome now.

Thursday, December 4, 2008

Tech Talks with a Geek

It was a long weekend for me this around. It was due to a meeting with a partner of ours. I thought it would be one of those guys who just know the stuff that he wants but is not willing to understand the complexities involved in the development of the project. This was just the second time the TEAM had asked something of this magnitude of me. What came up was something I had not expected. The person, I was told, was a very technical person. The first thing that struck my mind was that I could have a same language thing going on here and that could be beneficial.

The person was meant to be Luke Hohmann. An agile enthusiast, a pro developer and an excellent orator. I was lucky to have an opportunity to meet and talk 'techi' stuff with him. I was also interested knowing that he had Martin Fowler as a close friend, a person whom I admire. It is very rare that you will find people who have a passion for technology, any technology, and have experimented with almost all the stuff out there. He is now venturing on a territory which os very interesting but fruitful called Innovation Games in Enthiosys.

The technique that Luke uses to convey a message is also very striking. He puts forward the questions 'why, when, where, how and who' and tries to answer them. These being the only types of questions, it makes it very logical to ascertain the validity of a message. His knowledge of human psychology and statistics is an added gain. I also liked the statement that he passes quite frequently 'Its a bitch !'.

I dont think I would be able to meet a mind like his.

Sunday, November 30, 2008

Level of endurance

These past days I have been doubtful of my contribution towards the nation. Questions like 'Why do I make profit for some other country?', 'What can I do to contribute to the well being of Indians?' sprang up my mind. All because of the tragedy that happened in Mumbai. A bunch of armed a**holes entered places where people resided and engaged in acts of violence and brutality. It took 48+ hours to finish them off. The scenes shown in the television were shocking and I could not even imagine the situation of the hostages who were inside the Taj, Oberoi or the Nariman House.

'Patriotism' is a feeling that came to me very scarcely. But the retaliation that was shown by the armed forces, the army, the NSG and the ATS made me proud of my country. The brave martyrs showed their true colors by not succumbing to the tremendous pressure and fighting each of the f**ked up bastards with courage and valour. It was also great to see the people of Mumbai rushing towards the commandos, shaking hands and congratulating them and applauding them after the operation success. The sound of slogans 'Jai Hind' and 'Vande Mataram' sent a chill through my spine as it did for many Indians.

There were people who tried to take the situation to their advantage, like the politician who gave out a dramatic speech during the terror. But the people became smart enough to understand this and intelligent enough to express their discontent and anger towards such petty publicity stunts. They wanted results. They were paying their taxes and trying to make ends meet. The least the government could do is to provide them with a terror free atmosphere to live.

It is a fact that the forces arrived too late. It is a fact that even after getting sufficient hints of the attack, the forces were unable to avoid the situation. But every mistake is a lesson learned. Its by time we took the security measures up a notch. How would a bunch of people come via the sea route with a s**t load of ammunition to a place closely guarded by the patrol ? Corruption may be your answer. Inefficiency might be one. Inefficiency can be treated but corruption must be eradicated.

It also made me think about the countries where military service is compulsory. A year or two. It is a good idea to equip most of the citizens with self defense techniques so that a terror situation could be handled with a cool and calm head. The forces could also use all the help they can.

I was watching the movie 'Letters from Iwo Jima' yesterday and was deeply moved by the portrayal of Japanese soldiers who were willing to give their life for their country and emperor even though they had no ammunition and no eatables. Would writing or talking about it make a difference ?


Nov 2008 - Remember Mumbai

Monday, November 17, 2008

Nostalgia Creeps

This weekend was supposed to be a quiet and boring one but ended up being a one which had a nostalgic value. On Saturday Gitesh wanted to get his Admittance Form for the CAT and he had to go to a school to get it. I joined him as I had nothing to do. He went on and stood in a queue and it reminded me of the first time I stepped into the National Institute of Technology campus in Calicut. I never gave attention to attire generally. The day i went to give the test (thanks to Franki I came to know about the test) I went pretty much with an old pair of pants, a T-shirt, a pair of slippers and an umbrella that I got when I was doing my 8th.

Those menacing, but wonderful, seniors where all around trying to sniff the young blood that came to the campus. There were many guys and gals for the exam including Franki, Shanker, Linto, Teddy, Sony, Riji, Rakhy, Shiji and Ranjna. I went into the room for the test and attempted only questions I knew as there were negative points involved. After the test I got a glimpse of a paper of a guy who was extremely well dressed and seems very organized. He had attempted the whole paper. That's when I thought about the chances I had with the institute. I had no hope that I was going to get through. Even thought I had wasted the money in applying.

Ranjna then called me up after the results came and told me I had go through with a 12th rank. I did not believe her the first time but was astonished when I saw the results myself. To tell the truth, I was proud of myself and happy that I made my parents proud. Hey I even overtook Franki who I believe is the best in technology and learning.

Friday, November 14, 2008

A different step

Its been about a week since I have been helping the guys out with some PHP. I thought to do so so that I could also get a hang of the language and the usages. But I'll say it came natural to me. The project was one which was partly developed and was currently being extended. The code written was awesome. Complex but Awesome.

The previous time I did PHP was in the college and I feel pity at what I did. No MVC at all. Just write all the crap in one php and render it. Pretty Lame and Bad. The code here was carefully split into Model-View-Controller and all the URL rewrites were also written. WAMP is the server and all the rewrites written into the .htaccess file. PEAR classes were used for database interaction and the Models were created using written code which generates the php.ini file. The view was programmed to render after the controller had done its job of initializing and assigning variables.

The stuff that attracted me was the Cookie usage. The stuff like filtering results and sorting was stored in Cookies with respect to each page. This had the advantage (disadvantage to some) that the page seems to maintain its state through out the life of the application (so long as the cookie is not deleted). Classes were written for each Cookie kind (say a cookie for search had a class Search) and initializers were set so that the value could be accessed via PHP. Great Idea !!!

I would probably do something of this kind if I get a chance in Ruby On Rails. Let me see if I could get something of this kind !!!

Sunday, October 19, 2008

Extreme Entertainment

We wander for distraction, but we travel for fulfillment. ~Hilaire Belloc

We started on friday at 1 in the night. Off to Shivpuri in Rishikesh. We were late by an hour and half but me and Ankur made the better out of it y eating some Egg Burji and plain Parathas. 17 in total we got into the bus and started our onward journey. The bus was great and the group was awesome. Pure entertainment from Don, Pappi and all the others. Puke fest was on from me and an 'unknown' personality. Then a grand sleep only to be hindered by the steer of the bus when it went through those hair pin turns uphill.

The place was serene and the camp side was breath taking. Tents were setup by our co-coordinator Vinod and 2 other helpers. They were adjacent to a narrow stream which lead to the main Ganges flow. They advised us not to go to the main stream but goto the adjacent one. The water was cold and the first thing we did was to go in an refresh ourselves. Breakfast followed and then started the volley ball matches. The sun was intense but we still managed to hang on. After the matches I was dragged by Abhilash and Ankur to have a quick bath which I thought I would have after the sweat had dried. Lunch followed and then we were told that we would be starting the rafting at 3.

All the guys were worn out. Rohan's eyes were bright red and some of them even had a quick nap. But all were ready at 3 to set off for the extreme rafting. We put our life jackets, wore our helmets and took a paddle each and went onwards towards the raft. The raft weighed 80 kgs approx. It was specially built so that water never stayed inside the boat for long. The 'rapids' were for amateurs and we were given strict instructions what to do. Vinod and his team excelled in training us for the rapids. There were 6 rapids and the 3rd one was the most fierce. I managed to secure a position on the 3rd row and sat on the right. Water flushed in but we did not budge. We stood strong and fended the fierce waters until reached our destination. We were allowed to jump into the water after a certain point as the water was harmless and we had our life protectors. The water was pretty cold and Aditya and Srinath who were in the water for a long time shivered all the way after they got of the river.

There was also a place were people were allowed to jump off a high cliff. It must have been about 50 meters high. I did not take the jump and Shveta kept on teasing me after she had made hers. I give no reasons for not doing the jump. I felt it better to stand and watch rather that do it myself. People may call me a scary cat but I never felt the need to jump. Dont know why. But it was awesome seeing all those splashes going wrong. Ankur displacing atleast 10 buckets of water after his jump, Shveta doing a titanic and getting a rescuer to jump into the water, Surbhi falling chest first which definitely must have hurt her, Saumitri being pushed off guard by the instructor, Aditya taking a running plunge into the water.

By the time we reached the camp we were all tired. I was finding it tough to keep my eyes open. After having a tea we are all up again. The camp fire was lit and we started having drinks and food. Many of them retreated into their tents and by 12 all were dead asleep.

The next day Abhilash and Amit woke me up by carrying me and dropping me on the sand. After that episode we started playing Volley Ball. Puneet wished to go for trekking but had only very little supporters. I tried to convince everyone but failed miserably. I now understand that I am just a follower and not a leader. I have always felt that a trip is always as good as the company you are in. Having to go trekking with just 5-6 people did not excite me.

After a dip in the water and beer we started off to Rishikesh. We saw Laxman Jhula and ate from Choti Walah. Then Surbhi left with her cousin and we onward home. Don entertained us with his wits and stories and many of us laughed our brains out. We reached Noida by 12 in the night and after taking the remains of the colas, namkeens, pulpy oranges Srinath and I went to the flat.

Wednesday, October 15, 2008

All time LOW

I am no expert in finance. But the condition as I understand is threatening. People are being laid off and companies are not ready to invest or acquire. My sister also says that she had also seen people getting laid off in here firm. The rupee is at an all time low. Jet yesterday announced that it would sack 1100 of its employees including pilots. The only thing that is being printed in the papers is how bad the financial situation is and how Mr Chitambaram is trying to cope up with the pressure. The US market is affected and therefore our market. The dependency is what concerns common man.

Its like if they are down, we are dead.

Thursday, October 2, 2008

Post Production Stress

Two weeks before we went live with one of our products. A product where I worked personally for 4 months. I still do not feel I did justice to the product as the actual problems still glare at me when I see the application. It was a whole lot of work within 4 months and a more work when it went live. As the product was the first one to go live from us, we where a little tense. Some glitches here and there and I was all stressed out.

Its a whole big deal making an application live or into production. Especially if the application is not owned completely by you. The task of closely monitoring it, making sure that nothing breaks, maintaining the backups, ensuring that binding is done quickly and effectively if something breaks is completely done by the team. This is very tense. And I deeply appreciate all those managers who sympathize and stay beside their team during those stressful times. If you are answerable then you better have pretty good answers.

The build technique that was made is my main area of concentration this time around. Indraneel was the person in charge and I sat with him one time to deploy the code live. The scripts written via capistrano were excellent. The deployment can be to the test server or the live server. This requires issuing of different commands and writing separate tasks. The commands issued are remote commands and they usually are stop and start commands for mongrel. This application had also ap4r in it for asynchronous processing and therefore required a restart for that as well.

Monit has also been installed in this server and ap4r and mongrel has been configured to restart once stopped. The mod proxy balancer has been put along with apache so that mongrel clustering can be implemented. The balancer member written inside the proxy tags has an ip associated to it. This is where the actual transition in case of updates for the live application comes into picture. Using apache we could have something called a graceful restart using the 'apachectl graceful' command. Normally when a new code is deployed with all those changes and upgrades the server (mongrel in this case) must be restarted. But with graceful restart Indraneel just has to do minimal stuff. He first deploys the new code onto a server started with a different port, say mirror. Now what he does is change the balancer member port number to the mirror port and does a graceful restart. And wallah .. a work well done. This could also be automated if there were 2 virtual host files and according to the live/mirror deployment, the file is overwritten by the specific files.

Great work !!

Sunday, September 14, 2008

Violence .. is it worth it ?

I still do not know whether I am the radical kind, those impatient groups of people who want the reforms to happen in just a wink of the eye, or those persistent groups of people who take the risk of waiting for the reforms to come their way to react. The recent bombings in Delhi, near Noida where I work and a movie made me write an entry in this blog. I normally am not a politics fan / fanatic and am least interested in some thing which depresses anyone who is outside ITS boundaries.

The movie I saw during my 1 week visit in Kerala was a movie named 'Thalappavu' (something which conceals the head). To talk about the movie as a critic I felt that the plot was pretty good. But the way it was told was not so digestive for a normal viewer. The movie frequently has flashbacks and further flashbacks which I think was a deliberate attempt by the director to be flashy. The story closely follows the life of a policeman who meets a extremist who works for the Wayanad farmers. The policeman is forced to kill this extremist by a higher official and that ultimately ruins his personal life. The point I liked about the movie is that the background music has been used very carefully. The characters are great and their portrayal has been immaculate. The torture by the landlords during those times and the corrupt police officials were factors which provoked these people to be extremists.

What I was think of was the cause here. Is the extremism justified any how and if yes are the blasts in Delhi justified by any chance.

'An eye for an eye makes the whole world blind' - Mahtma Gandhi

Friday, September 5, 2008

What a week !

This week was a long one. Lots of work to be done, or atleast was asked from us. Amit and Abhilash had to put in extra hours to get it done and the work still continues as I write this post. My work is some what done so I am calmly sitting at a corner so that no one notices me.

The bugs that I got were all bugs which arose as a result of some miscommunication. Sometimes I understood it wrong, otherwise they interpreted it differently. 'They' are obviously NOT wrong. The major bug that took most my time was the one related to the Sortable list not working in IE7. I tried juggling with those classes but reached no where. At last a simple ' ' solved my problem :). The next major one was that the auto-completer in scriptaculous kept on disappearing when the container div's scroll was clicked. This was obviously because all the browsers except Firefox interpreted this as a valid auto-complete text field blur. The work around done was to entirely take off the onBlur event and be entirely dependent on the keypress(ESC key) and the selection of the element inside the autocomplete list.

Coding for the browser was also something we learned here. Amit had lots of problems uploading flv files via Safari. As I understand Safari gives a String Object instead of a StringIO object and therefore checking the content type becomes impossible. The attachment_fu plug-in therefore bombs and gives errors. Kudos to Amit for solving this bug.

To top it all up, I was to travel home today and my flight got canceled. Can't still believe it. This guy calls me up early in the morning to say that the flight has been canceled. He asks me the mode of refund and pleasantly says thanks. I had to spend a thousand rupees more to get a ticket home and am 'supposed' to go tomorrow. Let's hope that works out.

Saturday, August 30, 2008

Travel On !

Its been some time since I have posted. I had some work to do, never leave the stuff that feeds you, and we had also a petty good trip to Jaipur. Sam, Jacob, Amit, Vivek, Abhilash and his two brothers also with some cousins of his started the onward journey to Jaipur on friday night. Amit drove his car where as Abhilash too his Santro. The ride was a mind boggling 300 odd kilometers but Amit chose to drive his Honda City all the way. I would have preferred the bike ride as it would have been adventurous like the Mukteshwar trip we had.

The Pink City was awesome ! The old buildings, the palaces were awesome. Chokhi Dhani was also great. To see all those ethnic craftsmanship, the delightful Rajasthani Food, especially Dal Bhatti, were excellent. We took a hell lot of pics, had lots of liquids as it was very humid. We managed to find a great hotel near Chokhi Dhani and stayed there for 2 days in whole. We managed to see Amer, Jaipur forts. We went through the straightest and best road ever while going to Ajmer. We visited the Ajmer Sharif and Pushkar as well. These religious places did not seem to be religious or pious to me in any way as the people there were more concerned about the money they got from the tourists rather than the sanctity of the place. This was disgraceful and discerning according to me.

I am due to travel home and spend some quality time with family starting the 5th of September and I am thrilled about that. Its been some time since I went home and I intend to have nice fish dishes this time around. Lets see how that goes.

Saturday, August 9, 2008

Asynchronous access via Ruby On Rails

Over the last month we have been pondering upon a major problem that needed to be implemented in a Ruby On Rails application. The statement of the problem is simple. I have a procedure/algorithm which takes two input sets, gets each element in the set and using a combination of the elements in the sets calculates a rating. As the problem it self suggests, this is a tedious process. Database access is evident and the procedure is also lengthy. I decided to write the algorithm implementation in the lib folder, so that it is accessible inside the application, and then call it inside the controllers.

If the algorithm was called inside the controller, the response would stall until the whole algorithm was completed. This is NOT what I wanted. The user should not be affected by the time the algorithm took to complete. The requirement here was to run this process as another thread/process at another place. To replicate the application environment in another server dedicated to this did not seem to be a great idea.

Thats when background process was suggested. Running the algorithm as another thread was another option. As the algorithm only required the sets, it could be run as a different thread. But the environment that the server provides must still be loaded. Ap4r came to the rescue here. Asynchronous Processing For Ruby could be used by any rails application to route all those tedious and time consuming accesses. This I thought was a smart way of doing a background process, although it is NOT a background process. It is just another url access. The Gem must be installed along with the plugin and the server must be started and wallah !! You are in ! Simple as that.

Next comes the trigger, ie the part where you actually need to start the background process. I had two places which acted as triggers. One was in the controller part and the other was from a model. Triggering from the controller part was easy as the plug-in's init file actually added the ap4r method with the Action Controller. Triggering from the model was tricky. As far as I know there is no way to actually call a url/controller method from a model. Theoretically this is wrong as the controller is supposed to be the base and the model does not need to know the controller which is accessing it, if it is accessing it.

I took the easy way out of this by firing a system command which did a wget to the url. This method (corresponding to the url) written in the controller does an asynchronous access thus returning immediately. Thus the system command does not stall the execution of the model method when it is called. The ap4r server is still called and the algorithm is run asynchronously thus serving our need.

The algorithm had many stages of executions/ filters along with database accesses. I managed to use message passing by calling the send method for the objects and lots of array operations. I thought I did a pretty good job in writing the algorithm. The vast thought that has been gone in developing a language like ruby must be praised here. Kudos to Yukihiro “matz” Matsumoto.

Monday, August 4, 2008

Lots of Action

The previous month was full of action. From conducting Interviews to taking training sessions. I always thought of myself as a person who could find answers and gives them. NOT a person whom you would come to and who would give prompt answers (I admire people like that). Chetan is one of them by the way. The training sessions gave me an opportunity to analyze myself. These days I don't browse and explore as I did when I joined this company. That has certainly deteriorated my skills I suppose (anything that was there I should say). I made mistakes here and there and even though I knew the concepts, they just confused me. Lack of preparation really showed and for a brief period I was down. But overall I thought I did a pretty good job. The guys were awesome. Great dynamism is what I saw along with debating.

I have always thought that to learn effectively, a healthy debate is essential. The debate will only get better if the conductor is really talented to avert the unnecessary questions and give prominence to the worthy questions. I was trying to play that role by making the guys involved fully and their co-operation was praise worthy. I could not do justice to the topic fully (could not complete the required stuff), but I brushed through all what I knew.

The interviews were not that great. I was yet to find a great communicator (I do not claim that I am one). Someone who would gives answers to the questions. Think and then act. I came across some simple and calm ones, but no one with absolute skills. I still do not understand how these recruiters evaluate a person if he does not perform. The body language ? The speed of answers ? Yet to find !!

With regard to the development, work is still haunting me. Lots of work to do and so less time to do it (and look at what I am doing now !!! ). But God helps me tremendously in these matters by striking a balance and fixing issues. Its in Him that I trust.

Its ciao for now !!!

Dinesh Vasudevan's Blog

Blog discussions.

read more | digg story

Wednesday, July 30, 2008

A small note

Its been 28 days since I had last posted. I DO NOT have anything to share through words but through a video.



All credits to Cyberthing for this video. Please do not sue me !! :)

Tuesday, July 8, 2008

'Open' ness

'Openness is a philosophy that is being used as the basis of how various groups and organizations operate. It is a relatively new term to describe this general way of doing things. It is typified by communal management, and open access to the information or material resources needed for projects; openness to contributions from a diverse range of users/producers/contributors, flat hierarchies and a fluid organisational structure.' - Wikipedia

I was quite taken aback when the IT department here asked me to uninstall a trial version of Adobe Flex Builder which had about 60 days more of evaluation time. My intension was to learn Flex and try to build an AIR application using this great IDE. I don't quite understand why the trial version, which by the way expires itself, was causing a problem. It will expire anyway!

This brings us to the thought I have always had. Why is software made for the public, not publically made free !? Even if 'free' does not mean 'free' in FSF ways, it could at least mean 'free to use'. I understand that the code written has expenses and they have to be funded from somewhere. The Limewire style of have a 'pro' product along with the free version is a great way to go. Adverstise, minimally, in the product and that seems perfectly fine to me. But locking it up and opening it up to an elite set of people seems absurd and preposterous to me.

I as a developer find it great to share knowledge. I believe that sharing increases visibility and gives a two way development. When you bottle it up it is bound to burst some day. Open the code up and see how good your program is. How better you could get by people criticizing it. Could you handle criticism? Could you handle better programmers viewing your code ?
Food for thought.

Friday, June 27, 2008

Second Anniversary

Today I am 2 years old in my company, GlobalLogic. It has been a ride which had its ups and downs. Some factors are great and some stuff I just hate. I remember the first time I came to Noida, not knowing how I would even come into terms with the culture, weather, food and all the other oddities. I had my primary education from Kerala all my life after returning from Dubai and coming to North India was a unique experience.

The team here was excellent. Wonderful people with great insight and knowledge. The learning curve was certainly steep. I started out with some Ruby first. Playing with Watir and then learing a bit of Rails. Then came the Java part. Learning Java was the best thing that happened to me. After avoiding Java completely during the studies, I was forced to learn Java. Reading those great books about the Design Patterns and understanding the vastness of Java was great. I even dug into Spring, Hibernate, JSP and stuff !! :) . But all was good. I went on to doing some boring stuff after that, mainly concentrating on Jira. Some .NET also came by the way, but I was never a Microsoft Fan (I even bought a Mac avoiding the 'crappy' Windows).

Core Ruby On Rails came after that. Along with that came a great team. One which materialized the saying 'Work hard, Party Harder !'. I even gained the confidence to speak in Hindi !! Stuttle badminton, Carroms, Table Tennis, Alchohol .. You name it we did it.

The work was a little wayward. I guess that comes with the job. There is bound to be ups and downs and I try to cope up with them as much as I can. I have developed a sort of evaluating skill that I guess I did not have before. Even in estimating stuff, I think I do better now a days.

The trips that I have taken were awesome. We went to Mukhteshwar, Vaishov Devi, Kulu Manali etc. And they were all excellent. I got to meet and make a lot of friends. I never had these many Northie friends before.

It has been a very eventful ride and hope the ride gets faster.

Monday, June 23, 2008

Beard Day !!

I just got my beard added to the All About Beards website. They have approved it and have put it up in their site. This is great feeling considering the fact that it took me a long time to actually have one. I'm in the process of getting a bigger one right now as Kamal Hassan has. :)

Tuesday, June 17, 2008

A lot to do ..

I have started enjoying some of my free time so much that I now make free time to enjoy. Staring with playing badminton, I will get better at this, to learning how to play table tennis. The carom board has been taken over by some people from another project and we could not play because of this. I have started going to the gym as well. But work has to be finished within the time frame and I strive to finish all the important work. This post is all about Rails.

Before Rails I knew what an MVC was and how to implement it. But never got an entire framework bundled with all the features. I am a relative starter in this field but it took little time to understand how great is rails when considered as a rapid application development platform. The tests also was a pro as I never had written a single test when I was doing JAVA [:)].

The usage of helpers like link_to_remote and form_for has been great as it greatly reduced application development time. I also found it better to write all the configurations in a yml and load it via the environment file that to write static classes which returned all these. And the plug-ins that it gave. Just awesome. Think about not writing a single piece of code for the authentication and tagging features. It even has Lucene plug-ins. I have also used the paginating_find plug-in.

The stuff that I hear most from my friends is the problems that ActiveRecord has. As per Abhijat, it took 13 secs to execute a simple query with limit and 3-4 secs without limit. I also understand that loading with include is actually transformed into join statements which is bound to up the query time and object creation time. 1+N problem ! And their effort. I also liked wrting rake tasks as they are so ruby ! :)

I also see that even though twitter is having so much problems extending, a lot of rails sites have come. Slide Share is one of them. I also saw this site called Crazzyegg. They use nginx and mongrel servers. I have not seen a site use mod-rails as of now.

Wednesday, June 11, 2008

Reactions

The post has a peculiar title because I had a quite heart warming one when I went through the Workstreamer blog. Theres a post titled 'What Does Your Workspace Say About You?' and that just jots down a instance where a desktop uses the Workstreamer client. It feels so much refreshing when something that you have done goes out in the open. The whole stuff was created from scratch and I also had the help of the twitter client snitter (code). The Open APIs where also designed and with the help of my dear friends Abhilash, Rohan and Abhijat.

I also found that Workstreamer had a community in Facebook. There are pictures with me in it too. Extreme right here.

Nice to be part of a great team. KUDOS !!!

Wednesday, June 4, 2008

Iteration's Over

4 days of mayhem. Sleepless nights and total work. Now I understand what a 'working professional' feels like. Most of the problems where HTML based. We, me and Amit, did all we could, from fixing HTML to Functional and Unit testing. Even after having worked so hard, we got errors during the demo. These errors were quickly sorted out, but pressurized us. But all that is well, ends well (I am a pessimist by the way).

Ruby On Rails coding has been great up until now. Yesterday I had a party along with Vivek, Rohan, Abhilash, Abhijat and Amit, and then Vivek told me the problem he faced when a query fired via find_by_sql took 5 secs to execute. He tells that the query is a simple one with a where clause, no 'in' statements, but fetches 20000 odd records. The same query run via php-myadmin runs in .00x odd secs. Is the Active Record a bad ORM then? I also find many people stating that not using the Active Record in Rails will solve a whole lot of problems.

It was also interesting to find that the ':include' option in 'find' will return you the object to which it has Foreign Key - Primary Key relationship. But it doesnot work if there is a select clause. But why ? If i have a credit table and a user table, then I cant write a find statement, with :include, which gives me the credit amount and the user data? It is a join at the end of the day and the populated stuff, which I understand is bad, could be populated along with the user hash too. This is also the case if I iterate through an array with records which were fetched with along with a select statement. Could not decide if this were logical.

We also put some validations along with the code. Live Validation was introduced to me for the first time and I loved it. I also understand there is a RoR plug-in for this which directly hooks up to the model and then writes its own Javascript code according to the validations given at the model level. Thats just 'WOW' !

I out of ideas as it has been a long time now that I have written something.

But as Arnie says 'I'll Be Back !'

Tuesday, May 20, 2008

A Brief Breather

This whole month was a busy month. Work was there as usual. I also managed to go to Rajasthan and Kerala for short vacations. And now is the time that I find to write something. A breather after some amount of work to be finished has been done.

Gitesh had his hose warming ceremony two weeks before and thats why we went to Rajasthan. Bikaner to be specific. Man, was it hot there. Atleast 45-46 degree Celsius . We went on a sleeper bus and reached there after 8 hours of journey. The house was great and the ceremonies were very different from what I have seen. We tried giving a minor present, but they refused saying that they don't accept presents from younger people. The rituals lasted for about 4 hours and then the party started. There was music and lots of food. The food was excellent to tell the least. Gulab jamuns and roti curry. Mouth watering stuff. It was great to see those old houses / buildings on both the sides of the market we went. Kids were flying kites over the now bright blue skies. It was also wonderful to see the old fort where all those antiques were stacked for public viewing. I consider myself to be very fortunate that I get to see these places. Thanks Gitesh.

The previous week I took off. Went home and had a great time. The major thing I achieved is that I got to meet a lot of people. Contacted a lot of them. Prasanth, my Uncle's son, with whom I spent a lot of my childhood, was in town from Dubai. I got to spend a ot of time with him. I also went for Joy's wedding on a bike, riding from my place to Chalakudi which is like 40+ kilometers. I also got to meet Ettan and got to apologize for not being able to come for his forth coming wedding on the 22nd.

This time I managed to mature from a mere stubble to a full functional beard. It was a ong time ambition of mine to have a good beard and finally I managed to have one. I also managed to get those transition looks, beard -> spanish mustache -> mustache with raised ends -> clean shave with major whiskers. Pics are attached.




Tuesday, April 29, 2008

Promoted ..

This is a great day for me after the day I got my first job and my first salary. This is the day on which I have got my first promotion ( hope there is more to come !!). The Paid Interviews required some work to set up their demo. The HTML linking ( image mapping) was done using the Geohtml tool. The basic HTML for three of the pages was done by Rohit and was changed some what. I was talking to JoyDeep regarding the Workstreamr Client when I was called by Ravi. I was to go to Manish's cabin and was joined by Indraneel and Aparajita. This was when Manish told me that the meeting was for me. I was then told that all of them wanted me to be promoted. They told me that my work was seen as a critical one and I was recognized for the work I have been doing.

For me a mere pat on the back does wonders. It boosts the confidence level and energy. It was refreshing to understand that the people whom I work with understand what I am about, what I can do and what I am capable of. Having a set of people who trusts you is a great feeling. It helps me personally to do more. Squeeze more juice.

Thanks for all the help and support that you have given me. That meeting would stay in my heart for a long time.

Tuesday, April 22, 2008

AIR again

In a previous post of mine I had briefly jotted down what I liked about AIR and how it all came together for Workstreamr. This time around I would like to write about some of the problems I had to face when coding in HTML , Javascript, CSS (AIR application) and how I managed to find a way about those problems. I would especially like to thank Snitter for developing a great product in HTML/Javascript/CSS so that learners like me could evaluate and understand the product.

I initial idea was the same as any other Open API system. Access data using certain credentials via http, parse and interpret the data, format the data and then display the data. So my primary concern was to separate the modal/controller/view layers that come into picture. The javascript files were written using the prototype library and the effects (even though little) were done using scriptaculous. After defining the stuff that I wanted, I went on to make managers (like sound manager) and providers (like htmlcreator which gave me the html designed code when I gave a json). The main application was the launch pad for all the other Javascript classes.

The application required a modal window and an accordion. The Modal Window was created with Controls.Modal in mind but I simplified it a bit. The Accordion was inspired by accordion.js found in scriptaculous. The Modal window had problems loading the first time as AIR had issues attaching/running events after the window is opened. So what ever code you are going to write you better initialize it first. eg - The eval execution is limited in the Sandbox Application and Prototype uses evalScripts for all insert statements.

The posts that I displayed had links in them with hrefs. Now if I had left them as it were, as soon as a user clicked them, they would open in the same window as the application. To open links in you default browser window you will have to use
air.navigateToURL(new air.URLRequest('http://google.com'));
Sanctifying this was necessary as we did not want them to load in the same window. Adding an onclick event to the got post/message wont do any good here as the evalScripts will not be executed after the prototype insert statement. Snitter does a work around this by attaching an event listener for the whole area where the message displays. Checks whether its a link type, if yes issues this command. The problem that I faced still was even though I returned false from that method, the link open in the same window. The change that I did was that I took the href attribute value and put it in the alt attribute and cleaned up the href attribute value.

As the eval function accessibility is limited the passing of a string to settimeout/setinterval is also not allowed. The way around is to actually pass a function/function name to this
polling = setInterval(function(){alert('getting');},timeout);
There were also CSS based minor issues. As you see in most of the twitter clients, when the user hovers over the avatar, he sees a envelope which he uses to send a direct message. I thought of doing it the JS way but then some clever CSS caught my eye. If you consider the image to be in a div and the sub envelope image to be in a child div then the CSS would be like
.child {visibility:hidden;}
.parent:hover .child{ visibility:visible;}
which I think is brilliant.

I also juggled around naming divs in such a fashion that it becomes easy to get details in a certain fashion. Say I needed a user id when I clicked a checkbox. This generated checkbox could be given an id something like 'user_22_message_3242', so that parsing/splitting it and finding out the user id was a piece of cake. I cannot think of a better way than this. :)

Icon tray setting up was also a great feature that AIR offers. But be careful when you aim for the MAC as well. A specific check is required to see if there is dockicon support else when you minimize the window, the whole application may disappear.
nativeWindow.minimize();
if(!air.NativeApplication.nativeApplication.supportsDockIcon) { // Fix for Mac
nativeWindow.visible = false;
}
Always do an ordertofront after you restore the main window. This will make the application better and sane.

The other thing which gave me some problems was the notification system (Growl). Now AIR does not support this but we make the application have this by using certain actionscripts. I looked through the actionscripts that Twhirl and Snitter uses. You could write your own script if you want the customization. We will have to tell AIR to add this in the path as well by doing a script include
<script type="application/x-shockwave-flash" src="notification.swf">
</script>
I wanted a clean interface without those Adobe AIR based controls so I went for the transparent -true, chrome- none and visible -true configuration in the main file. This also requires that you have the close control (as in a image which calls the close routine).

The theme manager was another thing that I loved doing. As of now the theme manager loads a predefined xml file with all the theme details in them and on changing the selected item in the list displayed, it changes the CSS file which dynamically loads the theme. The images are also maintained in this theme folder so that a uniformity is obtained. The sound implementation was pretty easy. It only plays mp3 files(as I understand) but thats ok.

The development time required for an AIR application with HTML, Javascript and CSS is quite rapid. This client was developed within 1.5 months (I had other work as well). It has a great platform support (even linux now!!) and I expect a lot of verified AIR Applications to come up pretty rapidly.

Monday, April 14, 2008

Sam's Suffering

This past Sunday was our day out. Shilpi sent a mail asking everyone their consent for a bowling night on Sunday and pretty much all of them agreed. We were a bit late and we started off with half an hour of pool and then bowling in Shopprix. I failed even to reach a fifty whilst Sam won the game with 98 points. Little did he know what followed.

I payed for the bowling stuff and Sam agreed to pay for the food. Everyone wanted to have pizza and we went to Pizza Hut for the treat. After ordering 4 medium pizzas, 2 Veg and 2 Non Veg, Swati had an idea. She asked the attendant to celebrate Sam's birthday which was incidently 1 month before. They called Sam up and made him stand on top of a chair, made him lean and eat ice cream without using his hand and even sang a song for him. Sam's expression was hilarious. Srinath even had some tricks of his own for which Swati could not stop laughing !!! Attached are the videos.




Friday, April 11, 2008

Mixed Ideas

The Workstreamr team had a party yesterday. Geoffreys was the venue. Ben was the host and we reached a bit late after the delayed travel. The party had already started when we had reached there and we started out with a Corona each. Abhijat was fasting and did not have any alcohol. Amol joined us later when we ordered a Long Island Ice Tea. Little did I know that this one was going to be one nasty drink. As I understand from Abhilash, it was a mix of Gin, Vodka and White Rum. One nasty combination. I was half way through the drink when I asked Amol about the complexities that were involved in getting into the Product Usability and Design Group.

I consider that every individual involved in a project/class bring a unique set of ideas to the table. Some give more and are able to imagine a situation fast. I consider myself to be artistically efficient. I like to work on Photoshop and Gimp is my favorite. The Workstreamr Client which is in Adobe AIR uses Html, CSS and javascript, was done with some sense of what a typical client would look like. The available clients were also taken into consideration along with great IM clients such as Gtalk and Open Source Gaim ( I am not that into Yahoo! coz it cramps my system sometimes). And I think I did a pretty good job at it.

The point here that I express is how much effectiveness can I as an individual can provide if I were to be in a position designing the usability. programming concepts come into picture here and as per Amol, Web 2.0 applications design often requires this kind of a background. If you are able to visualize a product taking into consideration all its complexities, both technical and usability, then you could shine anywhere. That is what I try to communicate. To think like a normal user, a majorly dumb one, is a main ingredient. That lets you conceptualize more I believe. It is sure that I would not let go of programming. Ten years down the lane I still see myself as coding. But I also would like to explore the designing area, just to get a feel of it. Not taking in too much responsibilities but expressing my ideas so that the end product would gain.

To have an idea is normal but to struggle for the idea makes the thought worth while.

Wednesday, April 9, 2008

Wirefree Net

After a long struggle, We got the net up and running at our place. It all started with Srinath getting the broadband 7-8 months ago. I had always thought of buying a wireless router than would enable the both of us to connect to the internet. After the Apple Macbook came I was keen on getting this done. The Mac Leopard updates also had to be done. I got the updates done but the wireless thingy got delayed.

Finally we got the Linksys Wireless G Router and tried to set it up. Did some things that Chetan had told me to do. Did not work. This included making the DSL Router work in a Bridged Mode. I changed the IP of the wireless router, made to accept the PPPPoE settings .. All went in vain.

Then today the airtel guy comes. Sets up the DSL router to work with an IP (192.168.0.1), sets up the wireless router to have a DHCP setting, resets the router and wallah it starts working. This makes me feel that to have some things done you will need to spend more time and effort in it as well as get advice from someone who knows what he is doing.

Thanks Airtel guy .. Didn't get your name though !!!

Monday, April 7, 2008

The XCode IDE

The first demo of the Workstreamr app was given on Friday and Monday. Just before the Friday demo, Manish had a small announcement to make. To try to build a client, as the client we currently are building, that would run on an Apple iPhone. The reward would be an iPhone itself (so ha says) ! I, along with others were definitely interested. The browsed through the latest SDK that Apple had released for the iPhone and came to understand that the SDK needed a Mac for the development. That clearly justified my buying a Mac !!

I downloaded the SDK. A 1.3 Gb dmg file ! When installed, I found my XCode IDE overwritten with the new XCode version IDE which supported the iPhone development. I even downloaded podcasts with the Apple Evangelists giving excellent tips and tricks on iPhone based development. As I have only done development for the desktop, it was necessary to understand that it was not the same thing. Development in a phone which has memory and power constraints in tricky. The consistency and accuracy to be followed is extremely important.

I also came to know that the development language for independent apps in the iPhone was Objective C, a ANSI C based superset. The constructs are different and sometimes confusing. I like the part where messages are passed for method calls, it reminded me of Ruby. I am still trying to get in grips with this language for further development.

I was mesmerized by the development platform that Apple provided. XCode for app development, DashCode for web based development, Instruments for performance analysis. The iPhone development does not has the Interface Builder support yet but once it comes there no beating the toolkit.

Looking forward to some excellent programming on Objective C now !!!

Tuesday, April 1, 2008

Feed Aggregator

The world is going for such an era where information about a person, his resume could all be found in the Internet. Search for someone, his/her blog comes up with references and stuff he/she has done and then evaluate. My firm also have started believing in this and Manish took the initiative of aggregating feeds from various employees and showing them in the corporate website as blog entries.

The Idea is simple.
  1. Have a simple file maintained which has the username, his blog rss feed url, picture image file name and the tags he needs to filter. This file would be a wiki for my sake.
  2. Have an application take this file as an input, get the entries, access the feeds and put it in user buckets.
  3. Get all the entries, order them by the descending order of the updated date (created date) and fill in in another bucket.
  4. Create the html after going through each entry. This Html would have pagination and more/less links for each blog entry and long with the image
My initial idea was to go for Ruby. But the libraries that I found was unsuitable to accommodate the rss and atom feeds. I tried my best but at the end of the day Java was there to help.

The base html was a static page which accessed the created blog.html file by Ajax. I use dprototype for this as well as the more/less feature for each entry and pagination. Simple String Tokenizer for tokenizing the data from the file, Rome and Jdom for the feed accessing functionality, some nifty code for the htmlcreation, log4j for the logging part and user/useraccessor classes.

It looks good !!! It will be up in the corporate website pretty soon !!

Thursday, March 27, 2008

AIR for the mind

These days its a steep learning curve of me. I have been fiddling around with Adobe AIR for some time now and I'll say every second of it has been great. Manish has been insisting that I document the things I have done. But I find it better to do than to document. Of course in that case what you know is bottled and not useful to others. I'll try to jot down the stuff (though very little) that I understand after 3 weeks of AIR.

The reason why I looked at Adobe AIR was for Workstreamr. The first thing that I found was documentation provided by Adobe. These livedocs were extremely helpful. I installed the runtime environment from Adobe and then the sdk. Before looking at the sdk I saw an Eclipse based IDE called Flex Builder provided by Adobe. I downloaded this and started my work on this.

There are 3 ways you could make an Adobe AIR app. Using HTML/Javascript, Flex or Flash. I was always interested in Actionscript and thats why I tried out Flex Developer. Here it is required that you write xml file which will be converted into Actionscripts (swf files at last) and will be run by AIR. The xml file creation for this was greatly simplified by Flex builder but I had to learn some Actionscript within a short frame of time. I fiddled wit hthis for some time after which I decided to go and check out the HTML/Javascript based approach. Aptana was used here as it had a great support for building AIR apps.

It took me less time to get used to all the nifty stuff that AIR had provided to make the HTML based approach work. The base is just an Html file which includes a main Javascript file called AIRAliases. It contains all the aliases that you need to access the Runtime Environment. The AIRIntrospector Javascript file is another thing that is required for debugging purposes. When the app is running press F11 and you will see the Introspector pop up.

Now comes the UI based stuff. I loved what Snitter, Twhirl, Spaz and Pownce had done with their AIR applications. The shadows and stuff. In Flex this was easy. Just create a shadow object and give that to the main window. For the Html part this was done making use of a semi transparent image ( dot fading out ) being repeated through out a div with a large border. I had done most of my work using the prototype and scriptaculous libraries, so I chose them as the main Javascript libraries for the AIR app too. The other options include EXT, Jquery, Spry, MochiKit etc.

The documentation for the various methods that AIR has was taken as a reference. Some of the stuff like Effect queuing did not work for me using Scriptaculous. I am also told that JQuery is the most used library for the HTML based development. I'll probably shift to JQuery once I get a feel of it. [:)] .

The notifications is another thing that I was trying to do. Those small notifications that come up on the right bottom of your screen when ever someone messages you. It took me sometime to find out that this 'purr' was indeed an Actionscript that is included with the main Html file in snitter as well as Spaz. I decompiled this swf file ( sorry but I had to) and looked inside the code, managed to find the notifier, the notifier queue and the actual 'purr'. The color theme must be changed, so Ill have to hack the whole code (I think).

The Javascript that is made has been done with Object Orientation in mind. The Html / Javascript and CSS are decoupled. Another aspect I like about doing this in Html is that a single change of CSS changed the UI completely. Talk of decoupled UI and Functionality.

Still working on this and hope it will end good. I would like to thank all these apps made in Adobe AIR which I took as reference (both the Html ones and the Swf ones I managed to hack).

Tuesday, March 25, 2008

Workstreamflow

This one is all about the perspective changing project that I am currently a part of. Workstreamr .The work done in this application has been tremendous. Though I am not in the development team for this project, I have done tit bits for it and I feel I have accomplished more than I ever thought of accomplishing.

The project is an entire shift of the thought process that a normal person undergoes. The original idea conceivers, Stowe, Ben and Sam, had a great thought in mind. To give the users the power to manage , maintain and view data. A truly Open Source oriented concept with Web 2.0 backup. The data has been categorized into groups so that the users could distinguish and relate. The data flows as streams of information and the user has the power to choose to view, respond or ignore.

The feature that I find very intriguing is 'the handing over the power to the user'. Many applications that is web oriented don' do that. They have a fixed way of doing things and the users are happy with it. This lets the users be dumb (like those early days of internet). A wiki based structure with collaboration and information passing is the core 'funda' of this application.

Time based. This is a great shift in perception. The information you see is time based. It shows up taking into consideration the time factor.. It does not have a state maintained. 'Backtracking becomes tricky here and tedious' is a statement that would come into ones mind after this. Versioning is a great system that is used by many Web2.0 based systems to handle this. The change triggers a version which could be backtracked and changes reviewed. The Configuration Management Systems work in this fashion and they work perfectly fine.

Extensibility is another thing I like. How could you be happy with a product which you can't play around with ? (emm ... Windows ? ) . And all platforms are not like the OS-X anyway ! This application lets you fool around with it. I guess the users will love that.

Grouping of data has been a core factor of all databases. Think of a world where you cant correlate or group data. You can't bundle stuff together. That makes a very unrelated series of events which is useless and odd. This grouping is another characteristic that makes this application stand apart from any other one.

Filters. Again a database oriented concept but a general computer science one. Why would I see unwanted information again ? I would rather see filtered information than see all information, even irrelevant ones. If I have a filter already , it is very likely that I will use it again. So I'll store the filter and share them (Web 2.0 comes in again) so that other people with similar tastes could use it.

User management is a main ingredient in any project management system. Assigning, Owning, Tracking Progress are all factors that a Manager would like to do in his Project Management Tool. Versioning also comes into picture here as the application is intended to be stateless.

The Open API is the last thing I would like to write about. In the modern world, a high end graphically excellent functionally proficient web application is doomed if it does not expose a public api for the users to fiddle with. This a part of passing the power on to the user. Workstreamr has this factor in mind and exposes an API which is simple to use. A client will also be created in Adobe AIR ( and that where I come in ) which will let the users request and respond to their data which comes as streams of information.

The first cut will be out in some time but until then it all wait and watch.

Sunday, March 23, 2008

The Motorcycle Diaries

'Before he changed the world the world changed him' - The Motorcycle Diaries

Before the last Friday, I thought this week was going wasted. But a sudden impulse to explore and enjoy changed it all. I was planning on doing some work on my MAC when Sam came home after his church visit. If was Friday afternoon and was hot. He asked me whether I wanted to come for a short trip. There were a set of guys and they were going to travel on bikes. This first seemed to me like a bad idea but something made me go. There were 9 guys including me. We had not decided where to go up until 11 pm after a couple of beers. 'Mukteshwar' said Shyam and we conceded. Shyam knew the place and we believed that he would deliver.

We started at about 12:30 am, Saturday (midnight). I had a 3 hour sleep prior to it so was in a good shape to drive. The distance we had to travel was a tall 360 odd kilometers. It was not easy task. The roads were supposedly dirty, rough and BAD. Sam and MC had pulsars, I brought Gitesh's Victor, Shyam had an Apache and we got a CT 100 from Moi's friend. The first 150 kms were daunting. None of us had traveled this must at one stretch. We stopped at 2 dhabas after 50 kilometers each at first. Had tea and some rest. The road was work in progress and we had to take it easy for a while. But after reaching Moradabad, it felt like heaven. The straightest stretch of road I have seen, decorated with luscious trees and crops on both sides. With the exception of a sugar factory which dumped waste materials into a small puddle, the place was awesome. We were constantly maintaining a 80-90 km/hour rate during those rides.

I started out with the Victor but after hundred kms, Roshith wanted to try his hand with the Victor. I then was the passenger for Shyam on his Apache. Roshi developed a liking for the bike after that ride. It was Saturday morning when we were traveling through Moradabad. It was also Holi and there people were scarce to see on the roads and sides. This was to change pretty fast though.

We reached the notorious place called Rampur after that. We saw a mob carrying colors in their hands and tin cans of some kind. MC went first and was scarcely attacked. Sam followed MC followed by Shyam and Shiju. Sam stopped before the mob and then Moi stepped down the vehicle. Shyam also stopped on seeing a Toyota Innova being sprayed on and I was quick to get down and follow Moi. Sam was surrounded by the mob who literally bathed him with colors. Moi and I were spared as the mob seemed to be into cars and bikes. Shyam was the next to get ploughed. Shiju did the right thing by just accelerated and breaking through the crowd. It seems that there were religious tensions surrounding that place and the mob was retaliating to that. The victims were the poor drivers and their vehicles anyway.

After this we reached a place called Haldwani. MC had to have some petrol filled up. It was Holi and not bunks were open. He had a stroll on his bike for a bunk only to return with a flat tire. We saw a small mob forming who were constantly watched us 'Clean People'. The search for a mechanic was going in vain untol we got hold of someone who fixed the puncture. Even after the warning from the police about the mob, we decided to start our ascent. We came across drunken people who even tried to stand in front of the bikes.

The 70+ kms of treacherous twists and turns where awesome. As a person, to see something conserved with all its might and to explore such a thing is a great feat. After a 14 hour journey through bad/ good roads, mob attacks, cold winds, twists and turns we reached our destination. A mesmirising 7513 feet above the sea level. Calm and serene. The resort was excellent. The hospitality was great, the owners were courteous. The guy was a Merchant Navy Ex. The mountains covered the vast horizon. We were unable to see the 180 degree view of the Himalayas because of the dense mist that engulfed it. The rooms resembled the artistics of a small French cabin.

It was 2:30 and food was served. Had a good vegetarian meal and went to bad almost immediately. The night was filled with stories. We had whiskey but most of us were too ploughed to even drink. We slept at about 12 after the riot of laughter caused by the stories deteriorated. We woke up at about 8 in the morning, had our breakfast and started our descent at about 10.

We decided to take a detour and goto Nainital and spend some time there. A small lake was past when we came up called BheemTal by our diversion stopped us from spending some time there. The route that we followed on the way down had a great road. The traffic was a bit more, as it was a standard route, but the way we co-ordinated, one guy going in the front with the passenger giving signal about oncoming vehicles to the followers, was great. We reached Nainital, took some photos, looked at the babes and headed off. The way onwards was through the Corbett Park. The scenic beauty just takes the breath away. Forest on your left and right and a straight road piercing the jungle was a treat to the eyes. We then reached Moradabad again and took up speeds at about 90 km/hour. Even Roshi with the Victor managed to keep up with the Pulsars and Apaches.

We had to face a violent mob once again in Rampur, but this time we took a side route to avoid them. We took the Delhi - Lucknow bypass and tested the bikes once again by flaunting with speeds in the range of 90 -100 km/hour. It was dim when we reached the bad raods enroute to Delhi. After after a heavy dinner from a Dhabha , we reached Noida. This is where I stayed allowing the rest of the gang to continue to Delhi. I dropped 'X' off his home, came back to teh flat had a bath, slept and came back to the office.

My eyes are swollen and red as I write this. But it was worth it. The only thing I regret is the fact that I did not take my Camera. The pics and Videos below are from my Nokia. Many more pics are available here.















Friday, March 14, 2008

Hectic Schedule

The last 2 days just took the juice from me. After the Workstreamr 0.1 iteration, the focus was towards getting the initial page in html just right. I am a great believer in doing things accurately the first time around so that even if there are changes we would have to do a lot of them. The usage of only divs as the components were one of them. And Joydeep found it very hard to design the html in that way. We fixed a lot of issues, including the floating divs, the problems with the 'IE' engine. And the result looks great. It has all the ingredients which makes a great web application.

The developers in Workstreamr have also done a great job. To look at a working product, even though it has not finished, is a great sight. The processes followed, which by the way I never followed before, is great. Its a little tedious, but worth the time. I still have to get used to logging my work !! Javascript is the core area in this project and I feel the Object Oriented aspects of Javascript should be implemented more consistently.

But the new role, even if the 'official role' does not change works great for me. I like to visualize stuff and thats what I am doing here. Suggesting ideas, listening to new stuff and trying to implement them. For me it doesn't matter if I log work because I develop anyway and the people I talk to know what I am about.

We had a pizza party today and reflected on the great things that happened. Appreciated all the team members, from HR to me. I consider that this is a very important thing to do. This boosts the morale of the team members. More over it generates the feeling of oneness.

The next week would also be pretty hectic as the html has to go in for integration along with other stuff. The rest of the html must be implemented. Javascript must be written. I dont know how Abhijat, Abhilash and Rohan do it !! Kudos to them.

Monday, March 10, 2008

Reflection

'I' is the most used word. This is all about 'I'.

Its all about knowing who you are and what you are capable of doing. Thats what one must understand when one works in a place that demands results with in a short duration of time. Some times one gets away with a bad decision but not to go unnoticed.

I consider to be very bad with decisions. I like guidance, to be the follower rather than the leader. I give views but don't try to force them (or rather I have stopped forcing). I think to give the other a taste of what I feel is more important. A pessimist by nature, I like to expect the worst, therefore success is very heart warming and enjoyable for me. Thats my nature, I cant change it. And I stick with it (For hopefully the worst !!).

I have complexes. Major ones. Not a looking guy is one of them. I find it important to have a open face when sharing an idea. This is one complex I cant do away with.

I love the movies. I love to direct. I have made some short movies during my college days and I love them all. The art of cinema intrigues me. The art of making people listen, laugh, think, cry using a medium as strong as cinema is mind blowing. I also like stories which are told from different angles (perspectives). How does the character come to become who he is ? Why does he act to the situation like this ? I agree to Tarantino's quote 'I make movies I like' because if one is good enough, he would make movies thats universally liked. My IMDB account and stuff are shown in the sidebar.

I like to spend time with friends. I think of myself as a listener and dislike being ignored. I let it go like all the others but theres a limit to my endurance. A short tempered guy by nature, I like to left alone when in desperation. I get very gloomy at those times and feel not worth it.

I constantly get the feeling that I am being disliked. Acknowledgment is not a necessity for me but once a while that help to boost the confidence ( the very little amount). I love my working atmosphere and thrive for isolation once a while (esp. at work). I don't like to be bugged when doing important things ( generally everyone cames at the apt time).

I love music and A.R Rehman. I like english classics too but I am more into my lingo. Mallu songs really rule. I consider Yesudas and Chitra to be the best singers in the world.
I consider Mammootty to be one of the best actors of all time.

And remember, no matter where you go, there you are. ~Confucius

Tuesday, March 4, 2008

Alternate Comet Ruby On Rails

I happened to have a talk about the previous post to Raja. The implementation had its own problems and changes.

Firstly : The Service Layer of the app, the part which communicates with the queue, must be separated from the controller. We don't want the controller to have a heavy load. The service layer will not know the part of the application that communicates with it and the controller will not know who its contacts. This ensures that even if the service layer has implementation changes, it will not affect the controller thus making it entirely a different entity. I guess this kind of distinction will only come with age and experience. The Facade Pattern is the base.

Secondly: The application is better off with cache implementations. Mainly because the queues are designed to serve a purpose. Communication between apps. The Cache will also be maintained by a service layer and the access via the controller will either be fetched from the cache or if expired from the database. To have a uniformity between the kind of platforms accessing the application (say Adobe AIR and the browser accessing the Mongrel server), we could have an identifying parameter parameter passed along with the url which tells the controller the type of client and the resultant format of output (say XML/ JSON/RHTML).

I feel I have lifted myself a step now !! Thanks Raja .

Monday, March 3, 2008

Comet Ruby On Rails

The stuff that we do in the company is quite cool. It lets me, personally, to go through many technologies and implement many ideas. Concepts in theory is not great unless you start to implement those. A new thing that we are trying to accomplish is the functionality that a Comet Server gives, an HTTP push. This must be implemented in Ruby On Rails. Now the point here is that as HTTP is a connectionless protocol, we cannot pass stuff from the server to the client (unless the client requests). To have this functionality, we must either do a polling technique, where in the client constantly accesses the server for information or a live connection (may be a flash connection). Now another techniques which goes against this HTTP connectionless concept is the one that Comet deals with. A long lasting HTTP connection, either streaming or long.

Juggernaut is a Ruby On Rails plug-in which has this kind of functionality. It uses a flash open socket connection to get this server side push. Now this is great but the main problem that I felt is the firewall problem. Most of the firewalls do allows connections from other ports to go through them. Juggernaut also say that we could connect through the 443 port (http ssl) and that would solve the firewall issue. For a general need this is great.

My requirement was a little specific and I needed more stuff to get this stuff working. That was when I got to see the Active Messaging plug-in that Ruby On Rails had. A plug-in which could take in data from an Event Driven Architecture based product (say Queue / Messaging) and consume results in a Provider/ Subscriber model. The application also needed a lot of database optimization ( it will have to survive a lot of select statements). So an intermediated queue is perfect.

This is what it might look like.






















The only problem that I am facing is that by default the Active MQ is supposed to be a first Come First Serve queue. Now this does not serve my purpose as there might be many clients subscribing to the out queue. What I need is durable subscribers and that problem has been addressed in their thread.

This is a great way of accessing data (messages) as it is inherently the publisher/subscriber pattern (which I need) and the interoperability between different application could also be possible (a flex app accessing not HTTP information ?). Load balancing could also be done on queues !!

Wednesday, February 27, 2008

No More Advices

I thought having an open mind is the most important thing a professional needs in this business. But the essence is avoiding questions and answers and caring about nothing at all. Even when you are asked for an opinion, you just avoid it. Don't hurt anyone with what your conversation, even if you have a point. You don't have to prove yourself to anyone other that you. And thats the secret behind every major developer's career. Why impose when you could suggest and then let the other person decide ?

Friday, February 22, 2008

MVC for HTML ?

Today I Stumbled Upon a great piece of lecture given by Jason Seifer from the Rails Envy group about Unobtrusive Javascript. The piece of video was a great insight on how to write apps which are purely MVC. Now the question is how does this have MVC ?

The terminologies according to Wikipedia
  • Modal - The domain-specific representation of the information on which the application operates
  • View - Renders the model into a form suitable for interaction, typically a user interface element.
  • Controller - Processes and responds to events, typically user actions, and may invoke changes on the model.
Writing HTML is a piece of cake. Its not a problem for most of the developers ( they even refrain from it accusing it to be trivial). But writing HTML which is flexible is the tough part. There are 3 parts to a web page as Jason points out.
  • Content
  • Presentation
  • Behavior
The Content is the HTML stuff (stuff you write ) which is orderly (may be a tree fashion ie parent/child). The Presentation is the styling stuff acting on those HTML stuff. The Behavior where HTML tags (parts) are assigned stuff to do on certain actions. For a page to be consistent, these components must be as separable as possible (as it is with MVC).

The comparison with Model/View/Controller is kind of wayward here. I would have it called Media/View/Controller for the better. The Media being the Cascading Style Sheets which hold the Presentation, the View being the HTML which acts as the Content and the Controller being the Javascripts which acts as the Behavior.

People have widely adopted the CSS style of coding ie. having the presentation separated and put into files that could be included in the HTML file. This accounts for better structure and traceability. If I were to change the font, I know the centralized and only place to change it. I won't want to change all the 'style' attributes of the tags in my HTML files. Of course the developer would have to understand how bad IE sucks when he tries to implement all those CSS hacks (necessary hacks) to make the page look the same in IE. But after the ACID test results (which Firefox WILL pass !!), I suppose developers will have a better time in the future.

Now I have not seen the same effort go into creating the Javascript files. Developers still write native Javascript using the attributes (events) and they end up in replicating code and making the HTML page obtrusive and ugly. Having all the code base in simple 'js' files allows the programmer re usability of code which results in what Jason states as 'Unobtrusive Javascript'. I personally have been using the excellent Prototype Javascript library for all my projects (including Workstreamr) and the results have been great.

A typical situation when the Javascript becomes obtrusive is when you add javascripts to events like click. Say we are content with the code being 'obtrusive'. With Firefox (the best browser in the world) it works fine. No memory leaks, nothing. But with IE this has the famous memory leak problem. If we were to have a site which has say one page and all the content being loaded in an Ajaxy way, then we will have problems with this. This code wont Garbage Collect unless you navigate away from the page (or refresh). Why use this primitive technique when prototype provides elegant event handling functionalities ?

What I would rather do is attach an id with the element ( say a span/div) and then use the event attaching functionality provided by Prototype. This may be implemented in a main js file accordingly (as per your requirements) and the call may happen from inside the page called (say an AJAX call ?). Using the OOP structure of Javascript is also a great add on. As a developer I felt so happy when I tried to use those concepts in my Javacript files. So the main Javascript file may have a Class which defines your application and routines inside the Object created will have the methods used in the application ( like a status update on the side of the app ?).

References :
Rails Envy
MVC
Ruby On Rails

This is the movie. I hope Jason won't mind this knowledge sharing !!