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 !!