Wednesday, December 05, 2012

NYC You make me sad

I still remember the cold April night I came to visit This Account as I relocated from US to India. I was returning to India after four years in the US. My next assignment in India was to manage this account. Everyone I spoke to or heard about this assignment and who had any background of the customer told me to back off. Any account but this they said. Anyhow, I had little choice and hence despite its challenges and against all well meaning advise I decided to take it up.

The manager who was managing it on site was my ex manager in the west coast and so I felt a little assured. The Client managers I met were largely indifferent and I felt a strain between them and us.

I returned to India and took charge. I went straight into fire with one of the large programs on the boil. There were daily calls and shouting screaming going on. Right then our management forced a change and brought in new management. The new management was given a free hand to fix the problem and we brought the project back on track.

Yet that did not mend things between us and the client. We would discuss everyday after the bloody calls finish, what would it take for them to trust us. The single biggest problem between us was trust. Despite delivering to agreed milestones and timelines they would not trust us. And thus we laboured through to production release. The next day of going live they ramped down the team. That's when we knew this relationship is not going to last.

Earlier this year these fears were confirmed. They floated an RFP and that was that. Ironically they did that at a time when our delivery was at its best. We did some spectacular work this year and it went completely unnoticed.

I had come to NYC seeking continuity for our resources and what I got was cold shoulder. And so we reach end of the road. 2.5 years is all it lasted. There is a lot to it but then what's the point. It's gone...

Friday, November 30, 2012

Traveling to NY

Its finally come to this. I've been avoiding traveling to the US. Its a particular client I need to visit and I do not welcome it. There are some people who you can never win over. They find faults in success, make good look bad and are generally distrustful of everyone. My client is one such customer.

I've been managing this account for 2.5 years now. I'm the longest serving manager for this customer in my company. The client is a reputation destroyer.Several managers came and then left. Their reputations soiled, their dignity destroyed. I've survived till date but now I think my time is up too.

This is not how I wanted to visit NYC. But then that's how things stand today.

I'm losing sleep over it. Had a bad week. Another one stares me in my face.

Wednesday, November 21, 2012

2 Hr Half Marathon

Its not Yipee Ye Ye yet, but its close. A month ago I ran 22 kms on treadmill in less than 2 hours and last Sunday, I ran 20.4 kms in 1hr 55min on the road. That leaves 700 mts in the last 5 min and per my calculations I could do that in 4 min. So, by extrapolation I've made it to doing the half marathon in less than 2 hrs.

I know its not official timing and I was 700mts short, but yes, it gives me hope that if things go right on 20-Jan, I can do it.

The gear has had an impact. I can say that. I did not get blisters I used to get earlier. Thanks to shoes that are 1 size bigger and socks that breath more air, get less soggy. Dry Fit Nike socks.

Another good thing is that I did not hurt my knees. I've been hitting the road, every week for the last 3 weeks and my knees have held up.

Hope they carry me across the finish line within 2 hrs when it matters.

Monday, November 05, 2012

Post#17 Live!

It's 12:08 am at night and I'm live and alive! 3 days of struggle to set up env etc. came to fruition today. I'm off to sleep now.

Thursday, November 01, 2012

End of the Road for Gold Gym

My 2.5 year membership with Gold Gym came to an end yesterday. Its still a great place to work out but then I had my reasons. Gold Gym works on Franchise model. Different gyms at various locations have different price points. Mine was Rs.14,000 for a year.

About a month back, a colleague of mine got himself enrolled in Andheri East Gold Gym, for Rs. 8,500 for the first year. Now while I understand there might be differences in price, I could not reconcile to a 60-70% premium.

My community gym is well equipped. It has 2 treadmills, an elliptical and host of other equipment good enough for an amatuer like me. The only constraint is that it gets too hot and stuffy. No AC. For a while now, I've been using my community gym for weight training, while preferring to go to Gold Gym for running. With the onset of winter, it will get cooler and running on community gym's treadmills might just turn out okay.

Still I wanted to hold on to Gold Gym membership. So, I went back and tried negotiating for Rs.10K renewal. Alas! they did not agree and finally my membership ended yesterday.

My last day, I ran 8 kms in 42 min or less. That should count as my best 8Km run so far. I ran at 11.5 kmph for about 6 kms and at 12kmph for 2.

The only way to stay motivated is to keep improving, you need to beat yourself and pushing just a little ahead every time. As years take their toll on me, I'm not sure how long I'll have the motivation to run. I think, I may still have another couple of years remaining in me.

I know that once I've past the best I can be, my motivation will plummet and I'll give it up in no time.

Get better or Die.Death is certain. Its about  how long is the chase...

Monday, October 29, 2012

Post#16 Done With Budget Set Up

I've completed the basic Budget Set Up and reviewing the performance against budgets. Currently, its completed with Reports, it still needs to be integrated with Dashboard Graphs. But I've decided to keep it aside for the time being.

I'm preparing myself for hosting. For that, I need to make some general pages, such as hmmm.... Home Page!

I'm really bad at visual design. I admit it. Hence, my attempts at creating a home page came a cropper. None the less I soldier on. There is no expert help available here. Its a one man show. So, it will embody all my shortcomings... That's just the way it is.

Once I'm done with these generic pages, I still have to work a little on consolidation, commenting the code and clean up before I go live.

The biggest nuisance will be making it compatible with IE8. Currently, IE8 breaks the application on most pages... This is going to be a headache.

I expect a bunch of defects to roll in as and when anyone other than myself tries to use it. Also, a flood of feedback. To track all that I think I need some system. I think I need to write a small usecase to track these.

Another disheartening thing struck me while I was writing the "How it works" section. It sounded like a lot of work to upload a statement. I always thought of it as a challenge but writing about it made me feel like it was a huge mountain to climb and most people will give up halfway. The value comes only if we get over the hump, and it sounded like crossing the Alps...  Sigh!

In the long term, I think I'll be the only one using it. But I'll use it anyway... I built it for myself, right?

Friday, October 19, 2012

Post#15 Managing Rules

When I tried uploading my actual statements, I realised I needed a way to edit the rules. You create rules based on your immediate needs and you try to make them generic. Unfortunately over time a different type of transaction comes along but gets caught in generic rule. One needs a way to analyse and correct this. Hence rules review is like a cleanup activity one needs to perform from time to time.

Interestingly, given the size and complexity involved it was completed surprisingly fast. Reuse and experience can improve productivity by a big factor.

Now for the big one. Creating custom reports. It's the same as creating your budget goals and tracking them over time. This is the one I've been moving towards all this while. It's now time.

Sunday, October 14, 2012

Running On...

I've decided to give up my Gold Gym membership. Not just because its expensive, which it is. Its because, a friend of mine got annual membership for Rs. 8500 at Andheri. I'm Rs14K. The difference is too huge. These days, I've stopped going there for weight training. I only use the tread mill. My Community Gym is well equipped. I do not do heavy weight training and hence no need for extra sophistication . I told this to the service guy, when he called up for renewal. I asked him for Rs.10K. I thought it was a fair offer, he reduced to 13K, I decided to give it up.

I'll miss the running sessions. I liked the treadmills there. Not because they have TVs. I never watch TV while running(even at home I don't)... But they are very stable and sturdy. They are broad and have nice cadence.

My gym has treadmills too. But they are a little unstable. Also, there is no AC. It gets a little stuffy...

My membership will end this month. From now and end of the month, I'll use it to the hilt... Even today, I did   the entire half marathon. In fact 21.3Kms and did it in my personal best time on treadmill :) 115 min. If only I could keep it up, I sorely want to finish this time in less than 2 hours.

From Nov, I'm hitting the road. Lets see how that. My biggest concern is my knees. Even today they hurt a bit...

Post# 14 Wrapping Up Reports / Dashboard

I'm on a High... I've used Mint.com and I'm a subscriber to ICICI Money Manager. Mint.com has a gorgeous interface and some awe inspiring graphics. I give it to them, it fetches all the transactions and categorizes them for you.

But then they fall short. Lets take a couple of situations...
- I made some big ticket purchase in March. I want to consider it for my annual expenses, but do not want to to screw up my monthly averages.
- I went out with friends. We split the bill. I paid using cc but my friend reimbursed me his share.
- There are some annual purchases I make. I want to Tag them. Not just categorize them per category.
- I withdrew cash and made some cash payments. Especially in India 40% of the payments are in cash. I want them squared off against my cash withdrawals.
- I have some recurring cash payments every month. I don't want to enter it every month
- My FD matured, I want to split that into principal and interest. Principal should be ignored from calculations, while the interest should be counted towards income

All of this is now possible in my site. And it has Google Visualization Graphics. Though not as stunning, they are pretty nifty..

The best part was the client side script I wrote. I get grouped amounts to the client side and then render the data in various views at client side itself. The graphics take time to load from Google along with the data. Once loaded the views are created in a jiffy... I love it.

Now to take it live...
I'm gunning for Diwali. Need some major clean up activities before that. Hope to close it out before that.
Mind you, even with all I've achieved, its only 20% of what I want. This will keep my busy into 2013...

Thursday, October 11, 2012

Post#13 Dashboard and Graphs

Having done the reports I've moved to the dashboard. Conceptually these are similar but the dashboard will eventually have a lot more features. Especially when I implement goal setting etc.

For graphs I'm using google visualisation API. It's a great tool to use and I'm only beginning to learn it. I will not use much of its muscle power. I'll use bar chart and pie charts mostly.
Hope to use dashboard tools too to reflect trending.
I've already completed the barchart and working on the pie chart. I plan to host it once this piece is done. Probably close to Diwali.

Wednesday, October 03, 2012

Post#12 Incremental Continued...

Incremental has an amazingly long tail... While in Bhopal, I did make some progress, but nothing new to show. Just a bit of stuff here and there. Here is what I did
- Discovered spring API to handle exceptions. Much better than the interceptor I wrote. The problem was, the exceptions did not bubble upto the interceptor if I just let them keep going up... So here comes a little help from Spring org.springframework.web.servlet.handler.SimpleMappingExceptionResolver. Nifty little helper. All I did was to extend it and it did exactly what I wanted from my exception handler, which is if its a runtime exception, don't catch it till it reaches the top. I tied this up with AfterThrowing advice, which collated all the important information about method arguments and logged it all together in one place. It worked. I then went around removing try-catch from all the DAOs. At the end of it, I now have a custom 404 and error page along with some useful logging.

- Improving on jqgrid. Though I did get most of the information to look okay, there were some pieces, that did not look okay. So spent some time cleaning up JQ grid. For example, put the navbar on top as well as bottom. Putting "View x of y" etc.

- Changed the Tag Transaction Page to show actions only when you check on any of the loaded transactions.This proved tricky. It's true. If you have a page that does a lot of stuff, you will go crazy untangling the permutations. It seems to have stabilized for now. But I'm sure, it'll change again.

- I also introduced modal for loading. I used jqueryui dialog for the purpose. For the loading icon, I found a very useful site http://ajaxload.info/. Truely useful. My need is simpler than what dialog offers. Let me see how I can strip it down.

Bhopal and its irresistible charm

I was away for about 4 days. I had gone to my native place. And it never ceases to surprise me. 4 days of decadence. Landed on Friday evening. I was handed a bottle of beer just as I entered the car. One for the road... or to kick start an extended weekend... I usually prefer the train but Friday was my nephew's birthday and so I decided to fly instead.
At the birthday party, I was welcomed with a round of neat Whisky(Chivas), just to set the tone. And thus the party continued. After wrapping up the party @midnight, I drove to another friend's.  Back to beer. But let me confess. This place had the best view of the city. Absolutely awesome. Its a residential house converted into a Service Apt. I was just blown away by the view. At night, you could see the entire shoreline lit by streetlights the interconnect road. It contours the shore for good 5 kms. Here are a couple of shots.

Day time and a night time scenery for posterity...



Wednesday, September 26, 2012

Post#11 Reports

After spending a lot of time testing and fixing defects on the Transactions View and Tag page, I finally decided to move to Reports. Theoretically, its the last piece. You register, create accounts, upload statements, categorize transactions and then, finally you are supposed to see how you did over time.

This reports page, a basic one posted good challenges of moderate complexity. I prefer moderate complexity problems. They pick your neurons, and solving them gives you a sense of satisfaction.

Here is how I define the basic problem.

- The Report will always be 2 dimensional. The Columns represent time in months. As this is individuals we are dealing with, no quarterly or six-monthly. Each column represents a month.
- The Rows can be any of these
   - Categories
   - Accounts
   - Labels
   - Categories and Subcategories together

Personally I think my database design could be better. With reporting, I now need to convert rows to columns and columns to rows. For example, Months are columns (month1, month2 etc.). Another one, I have Labels in a row In query results I get transaction date in a single column. Now to accomplish this using sql query is cumbersome, to say the least. With passage of time and increasing number of records, such queries degrade fast.

To avoid this, I decided to do the entire transformation on the client side. Here is my philosophy. When I crank up my CPU, I pay for the cycles. I can decide to take up as much work as I want and then deliver only the final results to the customer. However, this costs me a lot. Why not leverage the browser power to do some work. Its distributed and its free. The laptop CPUs are fast and capable. js engines have really become quite efficient and its economical even from a bandwidth pov, to move minimum data and do much of the work at the client side.

So, I now send the query result over to the browser as json. From there on the JQgrid and javascript takes over. I render all the views with that data entirely on the client side, without making any round trip. The good thing is that I do not bring all the transaction data, I just get grouped data. The grouping is fine-grained. That allows me to create all 4 views on the client side.

Played a lot with JQgrid. Loved its features. It took me 4 days to reach where I am today. All these views are done. I have a big js function of 250 lines that does the work. Its neat. I like it. BTW javascript array.sort is one expensive feature. But then I need it...

Thursday, September 20, 2012

iOS6

I downloaded the latest upgrade to the iPhone about an hour after it was released by Apple. I was wondering what's new and how my experience will change magically. A whole new world will open up and it'll once again be like Alice in Wonderland.
But no, the incremental improvements are like ms office upgrade. You hardly notice them.
The user interface has changed a bit in a nice way. The crescent moon on the top bar was keeping me mystified. Now I know it's DND. But overall it's been boring. It might also be because the existing experience is so good.
The biggest let down is the maps. Google did a far better job of it. Apple app can't understand any place outside of USA. When I asked it to locate Hard Rock Cafe in Mumbai, it was stumped. Same for any other place in India.
Poor choice by Apple. I understand that it at war with Google, but that does not mean you screw your customers. Thank god, Google chrome takes care of some of the angst. But this is sheer poor execution.
iTunes browsing experience / dial keypad color / music app palate have changed. Can't say it's better than before. Just different.
Facebook app is integrated. I had liked its revamped performance. Now you get a listing of all the apps that use Facebook data.
Passbook may be a cool thing in the US, but in India, its not much help.
In the mails, if I have to mark anyone VIP, he needs to be on my contact list. Its interesting. Maybe I'll find a use for it.
Several features are not available for iPhone 4 users such as Siri, Panoramic view, fly view of the city.

All in all, it does not change my world. Maybe its time to upgrade the hardware :)

Saturday, September 15, 2012

Post#10 Txn Management and Error Handling

This was a tricky one. There are several ways of handling Transactions. I chose to use Annotation. It simplifies the coding a lot. With Spring Txn management is more about configuration. You could use a template and manage manually or you could manage through Txn: The challenge was largely how to setup transaction manager.
That led to revisiting the past and doing some cleanup. I decided on using Spring connection manager rather than jndi lookup. There was lot of duplication. I removed some of it as I cleaned the XML config files.

Then it was onto my favourite crib for about a decade. How to manage exceptions.
I had always wanted to manage the exceptions in a centralised fashion. Spring enabled me to do that beautifully. I wrote a Spring interceptor. It helps with instrumentation (basic) and also checks for error flag. If there is an error it would log useful info such as request params. The method arguments etc. all in one place. That way you do not have to write error handling code everywhere.
To centralise error handling I used AspectJ for Spring. Wrote an AOP @Throwafter annotation. It took a lot of time configuring it. But it was worth it.

I could suggest this to other program's too. I think it helps with debugging. I have wrapped up the initial implementation. It will of course evolve as we go along. To make it all work together I also leveraged ThreadLocal to store information.

Wednesday, September 12, 2012

Post#9 @Transactional

As mentioned in my last post, I've decided to take a break and do some clean up. There are 2 things I'm targeting for now.
- Transaction Management using Spring Annotation @Transactional.
- Exception Management. I'm thinking of doing exception management using Spring AOP.

I spent whole day yesterday trying to set up Spring Transaction Management. And what a hair puller it turned out to be. I thought I've grown wiser and better with previous 3 months of experience, but no. I made the same mistakes (spelling mistakes), just like my daughter does.

It was not that easy either. Got a lot of learning on setting up spring too. Like, you can't @Autowired a class if you use @Transactional because spring creates its own proxies. I must credit myself to be able to get to that point. That's not the most obvious piece.

There were other contentious issues too. I've been using jndi based datasource. I really could not set that up for use, so I fell back to org.springframework.jdbc.datasource.DriverManagerDataSource instead. I also realized, I had set up beans in multiple contexts. A lot of clean up is needed. Perhaps between now and end of September, I'll get these things sorted out. Further development such as reports and budgets will have to wait till Oct.


Sunday, September 09, 2012

Post#8 Incorporating Feedback

Couple of weeks ago I hounded my wife to take the work in progress for a test drive. The idea was to see her reaction. She is not the most tech savvy person. But she knows enough to get by. She obliged and after spending good 5 min gave me some feedback. The task of uploading the statements was especially arduous. Once I have gone through the pain of uploading a statement for an account once the site should remember the column mappings and apply the same whenever I upload a statement for the same account. I have been working to incorporate the feedback which I finally finished today.

Other than that I corrected the issue with uploading the statement through signed in user URL. Uploadify was giving me problems integrating with Spring security. Every time I submitted the statement the Spring security would send me 302. It would redirect me to login.
Finally I worked around the problem by explicitly setting the upload URL at the time of upload button. This was fortuitous. I was trying to append the jsessionid to the URL but could not get to read the cookie using document.cookie. I still haven't resolved that issue but in trying that I resolved the upload problem so thats good.

Not sure what I should be doing next. I think I should do a clean up and some architecture related stuff before proceeding. The more I delay the bigger the cleanup.

Thursday, August 30, 2012

Post#7 Drop Down Menu

I've been thinking about what to take on next. Of the various options available I took on creating a Drop Down Menu. It took me a while. One of the things I'm really bad at is UI design. Not for the tags etc. but the colors. I truly appreciate the challenge of a great UI. Mint.com has a great. UI. It takes a lot of creativity to design a great Drop Down Menu. It might look deceptively simple, but it's not. And it's not the JavaScript. It's the interface.

I did not want a Hover drop down menu which a lot of sites sport. In fact many a sites have completely done away with it. They show simple Tabbed menu. You click and get to where you wish to go. But lately, in the last 3 years I've seen a lot of sites create monster menu. In fact I love it in some sites. Hence I decided to go with it.

It's tough to use that much real estate effectively. I soon realised. I tried to create a help on the features but it too small for effective help and too big for showing just a couple of links.

Also the color scheme is tough to nail. I spent 2 days just playing with the palate. Finally I came up with some hideous colors.

Another challenge is usability. The main hover menu may be on the right but the sub menu options are on the left. When I moved the cursor across the menu itself changed as soon as the mouse moved over the adjoining tab.

One of the options I tried is to leave some blank space at the top do that when you move the mouse you do not go over the neighbouring tab. It made the menu look so empty, it sucked.

I finally created a small timer function to circumvent the issue. Now the menu would change only if your mouse stays over the link for more than 500ms.

I liked the idea that implemented something that does not ruin the experience. No empty spaces needed.

I'm done with Drop Down stuff. So from tomorrow it's back to the transaction processing. I'll start with Label Creation and then move to user registration

Sunday, August 26, 2012

Post#6 Completing Rules and Split

Finally I finished the first cut implementation of the Rules, Split Section. Its basic development. Lots of alternate scenarios and validations are missing. But its largely done. Now you could
- Create a new rule based on a given transaction. Currently its based on "contains".
- You could classify individual transactions(single or multiple). Ignore them from calculation, Assign Labels and or apply Categories.
- You could Split a Transaction into multiple ones.
- You Could create new Labels
All of this using JQgrid. It was fun and a lot of learning.

At times I was surprised at how I was able to diagnose a problem. This is veteran me. For example, realizing that the reason the function is not called is because I create these tags dynamically and these are not registered with jQuery. There were a few others, I'm forgetting now. But essentially, these were things that were not obvious. Good job me!

This probably brings me to completing about 10% of the overall functionality. I'm not sure what I should take up next. Probably, reporting. Thats an important piece. Let me look around for any charting tools I could use. Learn a new thing again :)

I tried accessing the site from one of my other home. It worked fine. I tried viewing it on my iPhone, Ah it sucks :(. Its slow. I think I'll need to remodel it so that it can be viewed properly on a smartphone.
That of-course will take till end of 2013.

One more thing I wish to do. I wish to do a Function Point Analysis of the app to size it. I have my company standards to estimate. Lets see what its worth.

Wednesday, August 22, 2012

There Goes My Back Again

Is it age or is it some kind of weakness in my back. This is the second time this year my back has given up on me. It happened in April and now again. It's the exact same location as before.

The first time it happened in 2007 My doctor told me to reduce weight and exercise. I did both and yet. Still planning to go to office. Hope it does not worsen. Last time I was laid up for 2 days.

Thursday, August 16, 2012

IPhone revival

So after living with a paralysed iPhone for about a month I finally got it fixed. What a relief!
Essentially it's the sweat from my weekends running that brought about the disaster.
First the home button went. Then came the silent killer. The speakerphone died. No ringing and no speaker.

Then came the eerie voice control app. The phone automatically went into the voice control mode randomly arbitrarily anytime of the day or night. It would pick up ambient sounds and decide who to call. A couple of times, once at around 10:00pm it decided to call one of my women office colleague. It was embarrassing.

I read up the net and found out that putting the phone in a rice sack can help. It would dry up the moisture. I did that and it helped. The home button started working but only for sometime. In a few hours it went bad to bad old habits.

Finally I decided it was time to visit the doctors. I took the phone to Maple the authorised apple store. They said they don't open the phone. They simply replace a faulty one with a new one. Essentially for Rs13,500 they would swap my phone for a brand new iPhone 4. The offer was tempting but then I decided to visit a local repair shop. The guy immediately caught on and confirmed it was water damage. In fact he said it looks more like sweat than water. The charging plate had corroded. He changed the home button, speakerphone circuit and the charging plate all for Rs 1500. Ain't that something!
So finally after a wait of about 1 hr I for my phone back. All like new.
I'm writing this post on my all rejuvenated iPhone. Yooohooo!

Tuesday, August 14, 2012

Post#5 Managing Transactions through JQGrid etc

The JQGrid integration was tough, but I could get most of it. There are still some niggles but largely the data is coming up fine.
The big challenge is around usability. Once the user lands on the transactions page and views the transactions / some classified based on prior rules, some not, it becomes cumbersome.
There are so many things he can do with this data. For example,
- He could filter on Unclassified Transactions
- He could then multiple actions
  • Ignore Txn
  • Assign one or multiple labels to the transactions
  • Classify Txns
  • Create new rules and Labels and then apply them on transactions.
  • Split any transaction
The transaction page is the gateway. How do I get all of these on a single page or weave them into navigation without confusing the user or pissing him off.
I'm working on the actions bar at the top, but its not coming out nicely.

I've learned about mouseover menus, buttons with images. All great stuff. Now, how to make it stick together....

I plan to finish this usecase by the end of this week. I'm taking couple of days off and that should certainly help.

After that its reports. That will be interesting too, I'm sure...

In terms of consistency of design and implementation, I think I need to make 2-3 passes before I can make this production ready. Hope I'm good with year end tgt.

Thursday, August 02, 2012

Post#4 Completing Transactions Upload

Just about done. Great Experience. Learnt about jquery, uploadify and a few finer points in spring. I still need to establish spring observation i.e. if in the middle of a navigation, you switch urls from restricted access to open and back, you may lose some variables you put in session. Not sure, but I think that's happening. I'll check that out. Also, could not post to restricted access url from uploadify. Will have to check on that too.

The trouble is when I'm are up against a timetable, I do not have time to validate learnings. Thats bad. This is as much a product as a learning opportunity. I've to learn to balance the two.

So now I move into the terrain of jqgrid. From what I've seen, its a great product. I'll have to learn to use it effectively. Another month or so...

On a side note, my iPhone miseries continue. Its constantly going to voice control and dialing out to various people. Its embarrassing. I've put in a passcode. That's taking care of dialing out part for now. But its also coming in the way of working. Yesterday, I was on a skype call and it kept dropping due to voice activation. Bad iPhone...

Friday, July 20, 2012

Post#3 Making Incremental Progress

I could finally achieve closure on Accounts Set Up use case last week. It was grueling. For a long time jqueryui combobox did not work on ie 8. I tried various ways moving things around but it would not. Finally I gave up.

There was a lot of development that happened on that page. I split it up into common code vs use case specific. After moving them into their respective files, I tested again, to double check everything was okay, and lo! it worked in ie8. Don't ask me how but it did.

I've since moved on to the next use case. Upload Transactions. This was the most fun when I implemented it the first time. There is a free utility called uploadify. An awesome piece of work. They help you with uploading files. In the past my biggest challenge has been identifying the size of the file being uploaded beforehand. HTML does not allow for it. Hence you end up uploading a 1 mb document, and then the server reports that the size is too big.That's dumb and it also a wasteful use of server resources. Uploadify uses flash to read the size of the file and warns you if the file is bigger than allowed limit.


I did struggle a bit with configuring Uploadify but the documentation is good. The product is still evolving. I had 2.4 version from last December which I upgraded to the current 3.1 version and it solved my problem. 5 stars to Uploadify. They have made a real contribution to the user experience. I'd like to donate money to them. If I ever go live with this, I'll pay up.


Late nights have been hurting my exercise routine. For the last 2 days, I've been sleeping late and getting up all groggy in the morning. Yesterday night, Tomcat crashed. Its the second time. Fortunately, this time before reinstalling it, I took back up of web.xml, server.xml and context.xml. Saved me the effort of re-configuring the data source. 


Weekend looks busy. I have a late night birthday party to attend. Tomorrow, I have to take my daughter and her friends to their weekly class. On Sunday, I'll try running 18 kms. That will screw up the rest of the day for sure. So going slow. But making progress....

Sunday, July 08, 2012

iPhone Disaster

When I run I sweat.... A lot!. I have an arm band to hold my iPhone and I wear it during my weekly long runs. Today however, was a bad day. Somehow the sweat leaked in and my iphone conked off.  Whatever I did it would not come up. I felt horrible. I had damaged the phone. I had bought it last year in may, and since have absolutely loved it. This was a disaster. I was not prepared. This was not happening to me.

I frantically searched for a solution. I read up on the net. There were some really useful tips. Based on a few of these, I wrapped up the phone in paper napkin and put it inside the rice jar. The article said it sucks out the moisture. And it did. After 4 hours when I pressed the power button, it sprang back to life. I was relieved ecstatic only to find out that the home button did not work. Ouch!

Some more frantic searching. After a while I found the solution. I went to settings->general->accessibility->assistive touch and turned on the feature. Its amazing how it saved the day for me. The home button is gone for good, but the phone still works. Its a little inconvenient to get to home, but its bearable. Hope I can keep it safe for another year before I upgrade. Hope iPhone 5 will be out by then. I have the perfect excuse to upgrade. I just need to keep this going till then.

Running Adjustments

Since last Jan's debacle when I missed the 2hr mark by 30 seconds, I've been working on things.
The Gear
- I bought a pair of new shoes one size bigger than my natural size.
- On my visit to Amsterdam, I came across an ACSICS store and bought myself a Hydration Backpack.
I had seen someone running with similar product back in my Thane Marathon. When you are trying to shave 30 secs off the clock, you tend to go overboard. I'm thinking, if I did not stop to hydrate myself during the run, I might have saved about 4 minutes. But then to carry 1 liter water along may slow me down. I do not know how it will finally pan out but then I'm making all efforts :).
- Yesterday I bought 3 pack Dri-Fit socks from the Nike showroom. My run was ruined by blisters on both my feet. I could not walk properly for 2 days after the event. I read up on the net. Cotton socks are the worst offenders when it comes to long runs. They absorb the sweat and become soggy. At the same time your feet swell up after running for an hour or so. Add the two and you have a perfect concoction for blisters.
I typically start feeling the friction after 8-9 kms of running. Thats about 45 mins into the run. Today, I ran wearing the new pair of dri-fit socks and honestly I did not feel any discomfort for the whole 16 kms. When I removed the socks, I saw that the blisters were there but then at least they did not hurt.


Training
Last year this time I was off the track. I was nursing a knee injury. The doctor said I should stop running. Instead
- I gave myself a 4 month break and started training only around September. That helped.
- I did not run on the road except a couple of runs in December.
- I did not attempt to run fast. I realized I get the pain if I tried to run @12 kmph.
- I also trained on elliptical for stamina.
This year has been a little better so far. No knee injury yet. Though I must say I did feel the discomfort  today when I ran 16 km for the first time this season.
In terms of running @12kmph(5 min /km) the best I did was 5 kms in 25 min back in 2010. Last year was a washout due to knee injury. This season I've been trying to ramp up. Earlier this week, I went up to 6 kms in 30 min. Now that's the benchmark I set for myself. I had a similar run way back in April. But right after, I had one of the worst flu infections. Since then, I've been trying to get there but could not. Last week, I tried eating a couple of bananas before the run and that did the trick. Bananas are a great source of instant energy. I believe I'm going to carry one on my run this time.


I've started clocking 20 kms a week for the last 2 weeks. I think I'll keep that on till October and then increase to 25km or so till end of Dec. Jan will be more about building up the reserves. Hence low on mileage. 

Tuesday, July 03, 2012

Post#2 Working Through Basics

And I thought that I could just walk over to business use case and crack it. Typical developer mindset. Every developer novice or retired thinks that he can develop the functionality in super fast time. Some really great developers do deliver faster than eye can blink, but a vase majority of them just set themselves up for failure. 


I know this lesson as a manager. I learnt it several years ago. Well its time to revisit that. The developer in me stands chastened by the manager in me. Developer me Hates the Manager and the Manager feels exasperated by simplistic life view of the developer.


Step 1 of getting to Accounts Set Up is to fetch the Master Data. That's about 2% of the use case. Of that getting bank data is 20%. Ha! But just implementing that 20% of 2% is such an education. 


Traversing that path took me through so much learning. I learned about getting multiple rows through Spring NamedParameterJdbcTemplate and RowMapper. The RowMapper gets just 1 row. But used in conjunction with List NamedParameterJdbcTemplate.query(dbCon,Map,RowMapper) it can fetch multiple rows.


While developing the code I researched the net several times. The top 3 sites I've constantly found useful are
StackOverFlow.com trouble shooting and quick ref
CodeRanch.com for trouble shooting and quick ref
mkyong.com For good hands on learning
viralpatel.net Spring MVC concepts  Desis contribute to the world too :)
krams915.blogspot.com Great Learning Experience on spring MVC security
roseindia.net 101 for beginners


In the ancient web development world of servlet and jsps (back when I last coded). This would be a 2 step process. 
Step 1 - You have a controller servlet which works as the traffic cop (authentication and authorization) and then sends it over to the jsp.
Step -2 The jsp would invoke all the pojo's needed and you'd use jsp tags to render the page. All reusable jsp was stitched together using jsp:include. You had to take care of closing the db connections (you could write util classes that addressed the connection leakage issues). And you'd be done.

In this new world everything is encapsulated. The frameworks are Robust but the learning curve is steep.
So 
- I created a controller using @Controller. Added @RequestMapping
- I set up Spring MVC Security and created authorization levels (Took a lot of time)
- I configured the web.xml and server.xml for db connection.
- Updated  dispatcher-servlet with pojo wirings
- Wrote the jsp

Midway I changed some packages and used application refactoring to update references. Well its not foolproof because somehow it forgot to update spring-security.xml and the server refused to start up. Some head banging got it resolved.

So now finally I can see the masterlist of banks! Hurrah! 



Sunday, July 01, 2012

Post#1 Sunday Blues

I have been working on Spring and learning Spring MVC to build the site on. I've created the Master Page Template. Choosing the colors is fun and also time consuming. Its like my daughter choosing colors for her coloring app on her ipod Touch. Anything goes. You keep choosing colors and changing them trying to make things better.

I finally settled on Green. Chatak Green :) Ha Ha! White, Green and Gray. With a little sprinkling of Yellow, Red and Orange. No Blue! eh!

The next challenge was to reuse the template across pages. Only the central content will change. How do you achieve this? I wondered off on the web. The age old technique is to use jsp: include. It works. I used it a lot about 10 years ago. But its outdated now. One of the programs I run in office uses Wicket(I just sign team leaves and look at weekly reports) and so I tried reading up a bit. I then meandered to Velocity, Tapestry and finally settled on Apache Tiles. For the simple work I'm doing Tiles is just fine. Its a little old. Wicket is popular and good but then I want to use Spring MVC. So Tiles it is. 

Started on Tiles and set it up on Friday. Worked on it yesterday. Finally I'm done. Its working to my satisfaction. Hurrah! Learnt a new thing and used it.

Then came the crash. Today morning when I left for the gym, I had left the laptop on. The cleaning lady came and switched off the power. After I returned from gym, I had my bath and then breakfast. It was time now to get cracking on Login Use Case. I settled down at my desk only to find out the battery had drained and the Laptop had switched off. I cursed the maid silently and fired up the laptop only to find an error. Spring was unable to load from the application. Aaagh! I tried refreshing the project, copied spring-mvc in the lib again but nothing. Out of frustration, I uninstalled Tomcat and reinstalled it. That worked. My app came back up.

I worked a bit on the login page and when I tried testing it, the datasource will not be found. When uninstalling Tomcat, the server config files were deleted. Of course I had no backup. Aaagh Again!

I had forgotten how to set up datasource, as I did it way back in december. Anyhow, I spent a good 3 excruciating hours setting up the datasource. Whatever  I did the error won't go. After tearing out a few hair, I finally figured out the in the new datasource name I had one alphabet in Caps while JNDI name I was using in my util class it was not!

A throwback to my developer days. Anyhow its solved now. The login usecase main flow is half done. I'll close it before I move on to business use case Accounts Set up.

Daily Diary

I've been struggling to put together my site for some time now. I made great progress last year in December. I got the conceptual part done. But for the last 6 months, I've struggled and my efforts have sputtered poorly.

The challenge for me is that I'm outdated. I even admit it in my profile :). I've been out of touch with technology for a very long time. The last I worked hands on on Web Technologies for about 6 years ago, that too was a brief stint of about 2 months. It was perhaps 10 years ago I last did anything substantial. And you know what, the world has changed a lot since then.

The last 6 months have been a challenge. I did put together something using, basic jsp just so that I could get the concept tested but that was that. I could cover a lot of business use cases in just 10 days (Xmas Holidays). But since then its been an uphill task. But then its been a great learning journey.

Lets look at the stuff  I'll have to learn to deliver my dream.
- IDE Eclipse.
- css 3
- jQuery
- Ajax
- Spring
- Annotations
- Spring MVC
- My SQL Database
- Apache Tiles (I thought of using Wicket but Tiles is enough for my app)
- json

This weekend I again got some traction. But I'm afraid I'll lose the momentum soon. How do I keep myself motivated? Its easy to lose the way in the daily humdrum. The work sucks! It also sucks life out of me. Long hours and constant pressure leave little time to spare. And yet I've been able to keep up with the gym schedule for 2.5 years now.

It became possible because I refused to take calls in the morning hours. I refused to take my phone to the gym. While one hour of gym is just dandy, working on a project of this scale is different.

Its not like anyone is helping me with either learning or development. I've got to learn and build everything on my own. Ah! Its a pipe dream. But I'll get a working model out by the end of the year. At least thats the plan.


So back to the question, how do I keep myself going? By keeping a daily diary to keep track of this voyage.
I'll write as often as I work on the project. I'll rant about by frustrations, learning, disasters and recoveries progress or the lack of it.

Lets see how it goes... It all begins today 1-July-2012...



Friday, June 29, 2012

An Idea Whose Time Has Come

Google just launched its own Tablet. Microsoft did the same couple of weeks ago. That triggered a thought on how things have changed over the last 3 decades.

In the Seventies and Eighties, Apple had a closed ecosystem and Microsoft had an Open System. Look at these as battle of Ideologies. And we know who won the first round. Microsoft made money selling OS and allowing developers to write and sell applications for the OS. Those were the PC days.

Fast forward to 2008. Apple launched iPhone. Google launched Android. MSFT was a late starter and I think they really kicked it off with Mango.

Apple continued with its philosophy of a closed ecosystem. Just that it made its ecosystem self sustaining. With iTunes, AppStore and its array of products, iPhone, MacBook, iPods, iPad and other products it seamlessly integrated the ecosystem.

Google gave away its OS for free. That led to rapid absorption of the OS but very little revenue for google and fragmentation of the OS and offerings. The OS on the phones can't be upgraded like iPhone. There is no unified / well managed market place which validates the application up for sale. In a nutshell Android ecosystem is a mess and Google is not making any money or atleast not as much as it could.

MSFT, the less said the better. No takers, No Revenue, little prospect.

Form 1980s to date Apple has stuck to its ideology. It didn't click then, but today its made Apple the most valued company in the world, a title MSFT held in the 90s.

No one can stop an idea whose time has come. Thank You Steve Jobs for sticking with what you believed in. This world is a better place because of you.

Thursday, June 28, 2012

IRCTC Then and Now

I read an article on the bottlenecks IRCTC faces during peak time, 8:00 am everyday, on ET. They have always struggled to keep up with the demand. They have always played catch up. Today they are struggling to meet 13,000 requests per minute. But if you look back, they have come a really long way.

I was hooked on to IRCTC early. I became a member in 2002. During the lat 10 years I have struggled with reservations countless times and have cursed them over and over. I believe when you are constantly playing catch-up you never get any recognition. That's the curse you must live with till you break free and get ahead. Only someone who has an old reference point and is tracking the trajectory can appreciate the challenges.

Here is a mail I got from irctc way back in 2004.

So from 100,000 bookings a month to 350,000 a day. Its almost a 100 times gain over 7.5 years.  Not that bad Hmm!


Subject:Update for IRCTC Customers
From:irctcpromotions@irctc.co.in (irctcpromotions@irctc.co.in)
To:
Date:Friday, December 17, 2004 5:33 PM



Dear Registered User, 


I bring you warm greetings and best wishes for the New Year 2005 fromwww.irctc.co.in

During the past year your website www.irctc.co.in has crossed many exciting milestones like the One Million Registered Users mark, one lakh tickets per month (several times), and recorded some of the biggest ever turnovers in the history of e-commerce in India. We also received recognitions for our efforts from a number of organisactions including the PC Quest user's Choice Award for IT Application with Maxium social impact and Dataquest Award for the Pathbreaking IT Application of 2003-2004.

Also during the year we have launched Mobile Reservation Services and Mobile PNR alert services with major cellular operators. These include M/s Airtel , Hutch and Reliance while others like MTNL, IDEA, Tata Indicom and BSNL are in the process of making applications for these services including Speech recognition (Voice), GPRS & CDMA. We are shortly launching an SMS based booking application on our very own short code 7245.

We have integrated with American Express Credit Card payment gateway and Syndicate Bank, Union Bank of India, ABN Amro, Federal Bank etc. for payment options, so that now you have all the 3 credit card payment gateways and 14 banks for Internet Banking direct debit option. We have also integrated with ITZ Cash for a cash card option for those Customers who prefer cash cards.

We have been continuously trying to improve the user experience on our site. Over the year we have more than doubled our Internet bandwidth, streamlined and uncluttered the "Plan my travel", process, added useful options like 100 most popular stations, 100 most popular trains, preferred passenger lists etc. We have enhanced Customer support staff strength and telephone / e-mail handling processes to stick to our basic moto of answering every mail within 6 hours and every phone call query to the complete satisfaction of the Customer.
And now to take your convenience of booking to a new unprecedented level, from Jan 1st 2005, bookings will be available on the Internet from 4 AM to 11:30 PM on all days including Sundays.

As usual we have been continuously running a number of special promotions - our own, as well as with other major corporates. Currently these include :
1. IRCTC's weekly 'fare back' scheme
2. Special gifts / lucky draws from Baazee.comSBI Internet Banking
3. Discounted hotel rooms all over the country from Budgethotels.com and Kuoni group's Resnet
4. Special promos from ICICI PrudentialICICI Cards , Citibank Cards, SBI Cardsand
5. Easy monthly installments option from Citibank Payment Gateway.

As you know www.irctc.co.in offers unmatched opportunities for promotions / advertising which are currently extremely popular with several categories of products and services.
IRCTC is also lining up a number of new products and services for you in the new Year. As we go into Jan 2005 which promises to be even more exciting and fulfilling for you and therefore for us, we wish to reaffirm our total commitment to you and your satisfaction in the days to come.



With warm regards
J.Vinayan, Jt.GM(Opns)
www.irctc.co.in

PS : Please note that www.irctc.co.in has no agents, franchises or distributors anywhere. Our services are solely meant for personal use of individual customers and not for resale/agency work or commercial exploitiation in any manner.

Tuesday, June 12, 2012

Note from the past

About 4 years ago, as I was wondering over the recovery, I had concluded that the world will be a poorer place. Today I read an article in Economictimes that brought back the memories....

Saturday, May 05, 2012

Growing Indian Economy... or Shrinking??

Its a paradox. I was on Cnn Money website, looking at the world's largest economies and India did not figure in the top 10. I was wondering how is that possible where most of the top countries are going through a sluggish growth or recession (England, Spain).
Upon checking their timeline, I figured that India was 9th in the pecking order in 2010. I was thinking of a plausible reason for this when it struck me. Its due to Rupee Depreciation.
It may sound strange. We had around 10% inflation and 7%+ growth on top of that makes nominal growth add upto 17%+, and yet... Hmm. I checked out Wiki . Per IMF we shrunk by 6% between 2010 and 2011. The  Rupee depreciated around 17-18% between 2010 and 2011(against dollar). But if I go by above maths, it should have depreciated around 23% for the GDP to fall by 6% in dollar terms.
So these numbers are a bit misleading. However in the CIA world fact book India seems to be $1.8. Can 2 authentic data sources be 10-12% apart? Possible.

Saturday, April 14, 2012

Recovering from Flu

I get cough and cold every 3 months but it seldom gets in the way of my daily life. Ever since I've started green tea the frequency and severity of these bouts has reduced significantly. This time however it's hit me hard. It's the 4th day and fever has relentlessly beaten me down. I've finally decided to visit a local practitioner. Dr. Allan Costillo, a true gentleman and an effective doc. I'm sitting at his clinic with about a dozen other patients from all walks of life. Essentially he is a poor man's doctor. He has been around it seems for centuries. He has seen generations grow up in front of him. 6 years ago when I first visited him he used to charge Rs. 40 per visit. It's gone upto 60 now. He always embellishes his proscriptions with multi colored supplements. No one really knows what they really are. They go by their color. Blue one twice a day, orange one once at night and so on. He drives a canary yellow zen since I first visited him and still does. That's how you know that the doc is in. He has renovated his clinic and it looks quite nice. The old world charm has given way to modernity. God Bless him and his patients! Amin!

Tuesday, February 07, 2012

China Home Market

http://finance.fortune.cnn.com/2012/02/07/why-chinas-housing-market-will-slow-not-collapse/?iid=EL
CNN Money article. The same logic applies to India and thats why we may not have a hard landing in the home market.