Saturday, August 31, 2013

Post #25 Sencha! Sencha!

When I decided to go with Sencha, I knew the learning curve will be steep. Learning vs reward is high. The documentation is adequate to get you started. To lure you in. But once you get in, you can get into a quagmire of intricacies that can ruin your schedule.

Since 5 in the evening I've been working on changing the title of the chart. It was harrowing... Things I learnt
- Unless you set the title in the config, setTitle won't work
- Real time waste was changing the Title of Charts. I have a TabPanel. Within that I have a list. On Tap, I bring up the Charts. This is an overlay on the list. There are 3 Charts in a Carousel. Each with a different title.As I browse through the carousel, the title wouldn't change. When setting the first title, I could do so easily. But changing... No Sir! After a lot of going round in circles, I finally read a line in one of the forums. Reference the navigation bar. Though it was under a different context, I thought it worth while to try that out. Afterall, I was't going forward at all.
It worked. So, to change the title after the carousel starts is to go up to the navifationBar and change the title.

There was similar agony, when I tried updating BadgeText. Simply updating the TabPanel's BadgeText, would not do. I had to put a .tab. in the middle to get there. Again I spent a lot of time and a one liner in some forum rescued me.

There was another one related to JsonP. Not so much Sencha, but as I was using Sencha learning tutorial, I'll put it on Sencha. When dealing with JsonP, one needs to wrap the Json response in a callback function. I did not know it. I would if I had worked on it earlier or tried to learn it. But the lesson was on Sencha. It took me good amount of time to get around it.

All in all, there are landmines in there. Be careful. Learning curve is steep.

Nonetheless, I'm moving fwd.

Wednesday, August 28, 2013

Post #24 AWS gzip Basic Stuff

Another small step. But it made a significant difference. As a developer, I'm always looking at performance and responsiveness of pages. A throwback to my developer days when 11kbps was the pipe size through modem. I kind of pride myself for thinking  and designing fast and responsive (not to be confused with css responsive) web pages.
As the number of transactions grow, the page performance degrades. Today, I have 2000+ transactions over the last 2.5 years. To load them all at once is becoming time consuming (50 sec from my home connection) so here is what I did.
- Tweaked DB Index. As the data size is still small there wan't  much I got out of it
I then turned my attention to gzip. The compression commonly used across to minimize the payload.
I was looking to apply it on tomcat when I figured out that AWS by default provides Apache as part of Beanstalk. I didn't know that(Ignorance?). It then made sense to apply these to Apache to cover the static data too( I'm now thinking of moving css / .js to Apache directly).

I researched and found out how to do within AWS by creating .ebextension folder and config file in the ROOT directory and package them in the .war file. But then it did not work for me. The deployment failed. I then dived into the unix world Telnet into EC2, check out the root. Change to super. Make directory etc.Change permissions etc. The command in myapp.config was to copy the Apache config file over to apache server directory and then restart Apache.

So finally it turned out, all that was required was to put a config file in Apache dir to enable compression and then restart Apache.

Did that and bingo!!!

The page that was taking 50 secs came down to 7 secs. Slept well!

Monday, August 26, 2013

Real Estate Rally

Real Estate Rally in India is in its last leg. One could tell by the kind of freebies doled out. Recently, my builder, with whom I had booked a house 3 years ago and the project still under construction, came out with 25:75 scheme. Pay 25% now and the rest on possession. The fact is he is not able to sell his inventory even after 3 years of launching the project. I'm sure a sizable inventory is left unsold or else he wouldn't have done this.
Across Mumbai you see an epidemic of 20:80, 15:85, 25:75, 30:70. Its a symptom? The rally has lost steam and is on life support. People are just not buying houses. They are waiting for the fall. And the fall is inevitable. Its just being delayed. When these projects of 20:80 come up for possession and investors start defaulting, the entire real estate will have a meltdown.
Its just 3 years away. May be even less. 

Friday, August 23, 2013

Post #23

So finally I got around to spend time on the mobile part. With Sencha et al. Took some time out last weekend. It was a long one and we went to Khandala to take some time off. It helps to take a small break from time to time.

Kept it simple. Just 2.5 pages. Record cash expenses and view them.It looks acceptable and my wife has started using it to record cash expenses on her Samsung. For starters, we recorded 30 something expenses for the month of Aug so far. Its working. We are getting a hang of the cash expenses.

Working on Sencha was a mixed experience. The documentation is good when it comes to learning. But not so great when we have coding issues and want to fix them. The community is active but not very strong. I got stuck in a couple of items. Spent hours figuring out BadgeText updates and another issue I can't remember. Also, the auto update on AWS had issues and took away a lot of my time.

So now I have MVP on the mobile too which was the biggest out standing issue. I still happen to be the only user and am resigned to the fact that it will be that way.

May take on some house cleaning chores next.

Thursday, August 15, 2013

Month 118

Another month. First Quarter. Well, I've survived 1 of the 40 quarters and how.

A new fear has gripped me. Its a matter of heart. Literally. Since April, I've been having discomfort in my chest. Particularly the left side. I got my ECG done and it so happened that I found I have an anomaly. Namely, my T wave is inverted in the third. Well I tell you, the internet is a dangerous place to research symptoms and inferences. My pain wasn't going and some article on the internet was predicting unstable angina and therefore a heat attack within a year. Holy crap! I'm not ready for it yet. I panicked. My pain wasn't getting any better either. It wasn't like it pains only when I work out(which I have stopped for more than a month now). Its there, right from the moment I wake up. It comes and goes as the day goes by.

So I bit the bullet and got a stress test done. As the doctor was putting together the result, I asked him about the T wave inversion. He waived his hand dismissively and said," its a normal deviation, even I have it. Nothing to worry about. I've seen your stress test. Its okay."

That was in May. In July, my stress levels were up on both the job and the home fronts and the pain wasn't getting any better. On a couple of occasions, I had a sharp pain shooting through my chest for about half a second and almost knocking me off. There was getting worse. I had issues with arm positions too. This time I decided to visit a cardiologist. He reviewed the stress test results and my lipid profile. His suggestion, my stress test reports are good and the kind of pain I'm having is not heart related. But, to be on the safer side, he suggests I get echo test done. Also, he recommends moving to statins to control my LDL cholesterol.

I panic again.Anyhow I go and get my echo done. The stress test comes normal. Again. But then there is a finding in my echo. MVP. Its mild, the doctor says. There are no regurgitation, but its there. The rest of the report spells out several parameters and they seem okay. Now I'm worried about this MVP. It does not look good. In the mean time, my wife has spoken to everyone in her family about this. I'm getting calls from everyone and I'm freaking out...

So, what do I do? I've taken a small break and am in Khandala for 2 days enjoying the weather and the view. Its a nice break. But damn! The discomfort in the chest continues...