Sunday, October 27, 2013

US Route66- Day 3, Sept 19, 2013 Thursday. Meramec caverns and Blue whale

I woke up around 7am. I had a good night sleep. I've noticed that my sleep doesn't get bothered by the location or type of bed. I've seen people who do not sleep comfortably when sleeping in their friends place, or motel beds or on the floor. Thankfully, I get a decent continuous 6-8hr sleep no matter where I'm sleeping. The only thing I can think of is the temperature. If its too cold and I'm not properly covered in blankets, I can't sleep. When I stay in hotels, I usually turn up the temperature a bit and keep the room warm and then tuck myself under the blankets. Ah, the peaceful sleep that I get.
Today's first attraction, Meramec caverns, was mere 10miles away from my motel. I left my motel around 9am. The cavern is inside Meramec state park so it was a very pleasant drive when I exited the highway. Flora and fauna on either side of the road and overcast weather. Perfect. The cavern was the hideout of robber Jesse James. I don't know much about him except I saw the movie "The assassination of Jesse James by the coward Robert Ford" and I liked it. Brad Pitt was amazing in it.
I went in there and got my tour ticket. I still had 10mins before the tour would begin. I saw only old people in there. I thought of taking a picture of mine in the cavern and asked an old lady who was also waiting for the tour to begin. Her body was shaking a bit all the time. I've seen this condition in old people. As soon as I saw it I knew I've done a mistake. But kind as she was, she obliged and took the phone from me, and tried to take a picture of mine. I checked the picture and it was hazy. I thanked her nonetheless. She didn't knew that she had butchered the pic.
In we go with the tour guy. The place was beautiful. Typical cavern with water streams here and there. They had done a good job with the lighting and stuff. It was pretty cold too. They say it remains at 65F round the year.







The cavern was alright. Lighting was good. Good location. Enjoyed my visit. There was a musical light show at the end which was good. 
My days attraction included the cavern and Blue whale and 4hr of driving between them. So I headed off to Catoosa, OK, for a visit to the blue whale.

The whale is a whale made out of tins and wood, in a pond. Its nothing special except that it has been there for a while alongside 66 hence became a famous stop for travellers. Something to cheer their kids while they take few minutes off from driving. The pond was dirty with some fish and few tortoises knocking about. The sign said its a catch and release pond. I don't think I'd like to fish in this dirty water. I don't think I'd like to take to dip in it either even though it had sliding boards into the water. The whale is painted blue which I don't know why. I've not seen a blue whale in real life or in tv and I don't know if they are this stark blue. I just had to swing by this place because it's like the Illinois Giants, something symbolic of 66. 




I then drove to Tulsa, OK. I decided to stay in Trade Winds Central Inn which was a bad idea. The room that I got didn't have a working TV so I switched rooms. The next room had the same problem and so I moved to another one. Thankfully this one had the TV working. TV wasn't a big thing for me. Its just for one night and I can definitely manage but I thought if I'm paying money for it, I should have the option. In case if I get bored, I'd like to turn it on and browse. The money included that. It took me an hour before I finally got to undress, and relax. Took a shower, setup my clothes and laptop, put my phone on charge and turned the tv on. It was already 9pm. I thought I should leave if I intend to have some dinner as most of the places would close in this small town. By the time I was out it was 9:30pm and I was driving around looking for a decent place to eat but everything was closed already. Just then Ritesh called me. He was out in Omaha for work that week and on his way return, his flight got cancelled due to bad weather so he took a rental and decided to drive. That was a bad idea because he had already started to feel sleepy. He called me up to chat a bit and get over his sleep. I kept him engaged for 15-20mins. I pulled over for a 'subway' sandwich and kept talking to him while I put my order. I then wanted to get into some bar and have a beer. Pulled into one nearby. I don't remember the name but it wasn't what I had expected. The place was barren with 3-4 dudes chilling out. Pretty depressing. Since I'm here already, I ordered a Guinness. Finished my drink and left and behold. rain and thunderstorm. Drove to another bar but it was even worse. From the outside, I could see, there was nobody in there except bar tender and a couple. Frustrated, I decided to go to a nearby strip club.
In my time in US, I've been to couple of them. Going alone to such places definitely sucks and gives out a signal that your life really sucks. With friends, its a different deal altogether. Plus, in my opinion, small town strip clubs are different than bigger cities in the sense that they are cheap plus the girls don't show attitude. They seem to be humble and understanding. Cities like in Chicago, the girls are kinda rude. If you don't give out enough money, they won't even bother. Anyways, its a nice experience to see strip clubs across the country, big or small town. This was a small one with $10 entry fee. The girls were okay. Not breathtaking or raunchy type as in Chicago. When I'm in Tulsa, I didn't even expect much so I was quite happy. Had a drink and a lap dance. Not a bad climax to a day of mixed experiences.
Came back to the motel. I had a pair of 25lb and 30lb dumbbells loaded in my car and I thought I'll give a break to my car's suspension for the night. I took them out and kept them in the room as the room was on the ground floor and my car parked right in front of it. My car must definitely be happy. 

Stumble Upon Toolbar

Friday, October 25, 2013

US Route66- Day 2, Sept 18, 2013 Wednesday. Illinois giants and Springfield

This was the most eventful day if I consider the number of attractions I ticked off. I had already beaten the Chicago traffic so I knew I have plenty of time to cover most of the sights. Getting stuck in traffic around major cities in US is in my opinion the worst way to waste your time. Its frustrating. I hate it. I'm moving like a snail, and smoking gas like crazy. A quarter of gas tank burned and I might have only moved 5-7miles. Not to mention the pollution. I cannot roll down my windows so I'm totally on the mercy of my car air conditioner. Did I mention the gas wastage? There have been occasions where I was stuck. After I've bought my car (pre owned '07 corolla) I offered to drive my friends to Chicago auto show and boy will I ever forget the worst traffic I saw that day. It was 2hrs before I picked up speed above 20mph. Horrible.
At the end of my 66 trip I was stuck in LA's traffic, around 5pm. The matter was made even worse by an accident on the highway. Anyways, glad to have beaten Chicago traffic on this day.
With goodbyes to Siddharth, I left Bloomington and the first stop was Atlanta's Bunyon Giant.

Second of the trilogy checked. Nothing special here too. Just the
Bunyon Giant
usual giants one would expect after seeing the first one(Launching pad). This one is Red and Blue though. There was a park near the giant with murals painted on the wall and various signals depicting
aspects of 66.
Atlanta is a small town. I was there early in the morning so did not see much crowd. Took some pictures to remind me I was here and a wee bit stroll.
It was cloudy today. I like a weather like this. I don't like bright and sunny. The sun is always on the eyes. But I find the scene much more beautiful when its cloudy. The darker the clouds the better it is. Its not too hot or cold. Just the optimum. Moments before a thunderstorm is the time I'm talking about. My eyes don't hurt, I don't need shades, neither am I sweating. Perfect day for me. Although the sun did come out after few hours but until then,
I couldn't have asked for a better day for a drive.

I usually prefer to take a long drive in such weather conditions but
unless you are with your girlfriend or wife, this drive is missing
something. May be it brings out the romantic side of you. May be its the rain thats romantic. No wonder that poets usually write about dark clouds, rain and winds when describing love. I don't recall bright hot sunny day being compared to anything romantic.
sweat and heatt is always associated with irritation and frustration in my mind.

Lincoln Tomb, Springfield, IL
Old state capitol, Springfield, IL
Lincoln Home, Springfield, IL

After the Atlanta Giant, I drove to Springfield, capitol of Illinois. I had few attractions lined up to see there. First stop was the Lincoln Tomb. Its a cemetery and of course Lincoln's grave is there too, inside the Tomb. Some sculptures, paintings, a huge US flag and tall Tomb. More than the Tomb, I enjoyed sitting in there and enjoying the weather and calmness. It was peaceful, away from traffic and noise. Cloudy weather was cherry on top. It made it even more enjoyable. Not too cold not too hot. Just perfect. As much as I wanted to stick around for few more minutes, I had to get going. I like to think as if there is some place which can be even better than this so I move on. It is this feeling that drives us all. May be that has led us out from the jungles into the present human civilization and I agree its better. The other day I heard on some podcast about a tribe in Papua New Guiana which has been untouched by modern civilization. They still live in jungles, dressed up in leaves, hunting for food and what not. One may ask why someone from this tribe didn't think that I should seek a better life than this and ventured out to the world. It would have taken one man from the tribe to be adventurous and then the whole group would have followed. I'm not saying to leave jungle and start living in the city right away but a touch of modern world is a good start. Instead of walking, they could use the wheels, a bicycle  may be. Instead of stone, use a sharp metal to hunt etc. They are different than the Amish people though because the Amish live by a choice. They know there exists automobiles, electric bulbs, highways and runways but they choose to live a life like theirs. I'm sure the tribe in Papua isn't the only tribe. There may be thousands more. I think may be its a matter of time. When they encounter food shortage because their hunting methods are no longer effective, may be they'll come up with something which is one step closer to modern world.

Next stop was the Old State Capitol building. It used to be the administrative offices back in late 1800s. It wasn't too exciting. I mean what exciting stuff can one expect here anyways. At my age the bars, pubs, clubs, tennis courts, soccer fields hold the excitement. And I did notice a huge number of oldies visiting places like these. Post retirement folks, yeah this is decent place to hang out and spend the weekend. Plus they relate to old things better than me since they were lived closer to this era. I hurried myself to seeing my next sight, which was Lincoln's home.

I was kind of frustrated at this place. Its free of charge so thats good but they have a strict policy that if you want to see the house, you have to accompany a tour group. One cannot just visit the house of their own. This was ridiculous. The next tour wasn't going to start for another hour or so I didn't know what else I could have done but wait. I thought of having lunch but feared that I might miss the tour and then would have to wait another hour. I just don't have time to waste around. Time is more than money. I like to say that I'd rather spend my time sitting at home watching nonsense over internet than be stuck in traffic jam. That in my opinion is the worst way to waste your time. I hate it even more when I'm in the driving seat.Anyways, so I waited for my time. The tour guide comes along. She is in her late 50s. She opens the lock on the main door and lets us in. We were 8-10 people in the group. I was the only one bringing down the average age of the group. Everybody else were between 55-65 age group. It was awkward to say the least. The next frustrating thing was that you've to stay with the group. What the hell!! This old lady would visit one room and start giving a lengthy history lesson about the room, the drapes, the carpet, the chairs tables and mirrors. How long does one take to assess a room? Hardly 5 minutes? Right, but you cannot move on to the next room because this lady is still flapping her lips and my God, everybody else are deeply listening. I noticed the men in the group becoming restless after 10 minutes of lecture but the women were listening like there is an exam tomorrow. And boy, did they have questions after the lecture. Did the future first lady used this mirror to comb her hair? Are you kidding me! The tour took 1 hour 30 mins. When it would have hardly taken me 20-30 minutes to wrap up, I (wasted) spent and more than hour either side of it.
Had I been the authority here, this is my 2 cents to make a visit worth everybody's time. This is free of charge, so no need to spend government money on tour guides' salary. Secondly, for people who really want to take a proper tour, sure, keep few tour guides handy but there must be option for people to explore the place of their own. We are all adults here and know we are not to touch or spoil the things in there, but to make the point clear some placards, notice or poster doesn't hurt.
After the house tour, I went straight for lunch as I was dying of hunger. Found out a lunch place using google maps. I'm a foodie and like to try new things but I'm not too fussy about it. I don't like to remember a restaurant and menu if I had an excellent lunch or dinner there. Eat and move on.
Next stop was Lauterbach tire Giant. The last of the three. As I mentioned earlier, I had to be here else the first two wouldn't have mattered. This completed my trilogy.



So far so good. Next stop was the Country Classic car museum. There were two dudes working on a car in a garage there. I think they own the place. I asked them where the entrance was and headed in their pointed direction. There were 4-5 huge sheds holding all sorts of car, from Chevy to Ford, from 1920s to 1990s. Almost all of them were for sale. I think the dudes outside repair a car, make it drivable for may be 5000-10000miles at least, and sell them. I liked this place. Not too much crowd and at your own leisure pace, you can see the cars and take pictures.




Some people do get a thrill out of driving these vintage cars. I haven't driven one although I would definitely like to try one day. I am just not enthusiastic enough so haven't really gone out of my way to get me a rental or something. Automobiles have become such an integral part of American life that it is common to see people's interest in Auto shows and museums. It was only appropriate that I stop by one such place and see how the automobile has evolved over the years, in terms of design and performance. In India, a car is a luxury. In US it is a necessity. I think slowly, young crowds are finding the motorcycles to be more convenient and affordable than a car. It has been in India, in fact, even a small nuclear family can do away with a 2-wheeler. I like 2-wheelers more than car personally but because of safety issues I stick with car here. For office commute only I think I'd prefer motorcycle. There is one paragraph in 'Zen and the art of motorcycle maintenance' where the author describes how he likes driving a motorcycle compared to car because you are totally connected with the outside world. There is no door or glass window to separate you. This I couldn't have agreed more and the thought has stuck with me ever since.

My quota of today's attraction was done so I found out a place to crash for the night. Super8 in Sullivan, MO seemed alright. I usually check in google maps about motels and their ratings and reviews etc and this one wasn't bad but some reviewers had described some horrible experiences there. Still, I went in there and I must say that this was the best motel experience of my whole trip. The room was big with clean bathroom, TV and other essentials. I threw my stuff in there, took a shower and headed for the nearby sports bar.
The place was called Boomer's Sports bar. Decent place. Not many people were in there partly because it was Wednesday. There was one girl and one middle age dude serving drink. There were couple of folks sitting around a table and sipping beers while 2-3 were sitting in the bar and smoking. Back in Chicago, I had never seen people smoke inside the bar. Usually there was a designated place outside but here they were smoking inside. I guess the place wasn't too sophisticated. I took a seat in the bar but soon I realized my mistake. There were two dude sitting on either side of me and guess what, both were smoking. It was obnoxious. Smoke from both side and I was inhaling it all. I don't like the smell of smoke that much. Its funny because I do smoke but very very rarely. I can practically count on my fingers how many times I've smoked and how many cigs. I take good care of my body and try to stay fit and smoking is definitely something that I avoid. However, when you are in the company of friends and having a good time in a bar/club and if a friend is smoking and asks for company, you can't say no. So my smoking is restricted to social occasions only. I don't smoke when I've no reason to. I don't get cravings for it, which is good and hopefully it should stay like that.

After picking my Guinness, I excused myself to a nearby empty table. Much better. Ordered some fish and chips as I was starving. The girl there was beautiful. And she was the only female there! I wanted to take a picture with her but feared that the other server might be her father and may not see this gesture friendly. Plus everybody else in the bar seemed to know each other and I feared they might gang up on me, beat me up, rob me and what not. Its silly I know but when the mind wanders off, it can think of impossible extremes. I summed up my courage. When she dropped the check, I asked her if I can have a picture with her. She obliged instantly and guess what, the other server came out and ... offered to take the picture. I didn't ask her if he was her father or not. I got the picture that I wanted, paid my money and left. Went back to hotel and crashed. It was a good day. Looking forward to Day-3.

Stumble Upon Toolbar

Thursday, September 26, 2013

US Route66- Day 1, Sept 17, 2013 Tuesday

Its finally time. I had initially thought to start on Wednesday morning but two things led to change my mind. One of my friend who lives in Bloomington, IL, failed to visit me over the weekend because he got stuck with work. It'd still be okay for me to leave Illinois without seeing him because we met the previous weekend but I thought what the hell, lets meet him for one last time because I don't know when will we see each other again. Bloomington is 2 hr drive away from my place and its actually on 66 as well so doesn't hurt to pay him a visit. I could have started Wednesday morning, stop by his office, have lunch with him and then leave but I thought if I leave Tuesday evening, not only will be able to stay at his place for the night, I'd also beat the Chicago traffic in the morning, thereby saving me precious travel time. Great. So I decided to leave Tuesday evening.
Most of the day time was spent on packing my stuff. My roommate, Sreejit, helped me pack. He then also helped fill up my car with my stuff. I had two big bags, a chair and table which can be dismantled and put in box, kitchen stuff in a big box, exercise equipment like dumbbells, door gym etc. I was little worried looking at those heavy dumbbells that these might break down my car's suspension. Driving few miles with these weights loaded up is one thing but driving 2200mi over 6 days is completely different. For a moment I had given up. I had plans to leave those weights behind and take only those stuff that are absolutely necessary but then these weights are crucial for my daily exercise routine too. Aahh!!! What to do?
Anyways, I thought I'll carry them with me and will deal with things later on, if anything happens. I put some cushions on the car floor like pillows and comforters and wrapped my dumbbells in there, plus I spread them over both sides (driver and passenger) as well as front and back row. Cool!
All set, I took a picture with my roommate and started the drive. The traffic was very light so the drive was without much frustration. Filled up my tank before I touch Chicago city and then moved on.
The first stop was Launching Pad drive in where we have the Launching pad giant, one of the three giants in Illinois. Some iconic figure representative of 66. I knew that if I include Launching pad giant, I've to visit the other two giants too. I cannot afford to miss even one. Then it will always feel incomplete. Very much similar to the trilogy of movie or book. If you watch or read one, you gotta finish the other two too. One hour of driving and I'm there. It was around 8:30pm. Not many people were around. There was a gas station across the road. I went in there, got myself a bottle of water but couldn't summon the courage to ask the cashier lady to come out with me and take a picture of mine with the giant. Came out of the store and saw a dude filling up his tank. I asked him to take a pic and he obliged. First attraction done. It wasn't so bad. The giant is nothing special. Its glittering green and, well, a giant.


In the meantime, my Bloomington friend, Siddharth has been calling me up and inquiring how far am I now. He was waiting for me to arrive so that we can have dinner together. As soon as I left the giant, I saw the route 66 sign. I had to stop and take a picture. I knew I'd see such signs throughout my trip but I thought I might not have time to stop and get out of traffic etc to take a pic so might as well do it now when its 9pm and there is no traffic whatsoever for miles. A pic using the front camera of phone and I'm done. I've got evidence for myself, that I've done it. This should be enough to remind me of my epic trip that's going to happen.

Anyways, I reached Bloomington at 11pm, had dinner with my friend then gossip for an hour before retiring to bed. Long day ahead and it starts at 9am.

Stumble Upon Toolbar

Wednesday, September 25, 2013

US Route 66 - Chicago to Santa Monica.........Prologue

66 is epic. Its the mother road. It used to be the sole most important highway connecting two of the most important cities of US, Chicago and LA. From gangsters to cobblers, everybody used this road until the 70s when I-40 came along. A interstate highway running parallel to 66 for the most part but better constructed. 66 started getting ignored, its roadside businesses going out. However, it still retains the essence of US and has drawn road trip enthusiasts from across the globe. I cannot say that it sums up US but I'd say that it has its own charm and one will definitely get the feeling of what US is about.
The 2200mi stretch is in itself a bit of a challenge. Its not surprising that I've been fascinated by it. I've always had the eye for an exciting road trip and a cross country trip is the pinnacle. An ideal trip would have been NY-LA but CHI-LA isn't much less to me anyways.
So here I was coaxing my friends in Chicago to come aboard for 66. I live in Chicago so I've got the start covered. A continuous driving would finish in 2 days but I don't want to do that. Its of paramount importance that I enjoy the trip, spread it over a week or more, drive from dusk to dawn with long breaks for food, gas and route attractions. The most ideal choice is 6-8 days one way. This means my friends would have to take 2 weeks off from work which is difficult. Even it would be difficult for me to take 2 weeks off but since my manager was uber cool guy, I thought I could pull this off. Because we usually want to save our vacations for India trip once a year. This thinking applies to me too. So I know I'm asking too much from my friends but still now and then I'll just throw 66 on the lunch or dinner time with friends when we were deciding on our next long weekend plans. With constantly mentioning 66, my friends had gotten the idea that I really want to do 66. Anyways, long story short, we all knew 66 isn't going to happen anytime soon and with ease.
Time went by. Few months later, first week of Aug, my employment with BlackBerry ended. The company wasn't doing well for past 2 years, reporting losses after losses every quarter. It had been laying off people to reduce costs. Then came a time when managing remote offices in US became expensive (Blackberry HQ is in Canada) so in Aug the company decided to shut down its Chicago office. There, me and my team and other teams in Chciago, were told we are no longer required. They paid us severance and other special payments etc, which I must be honest, was decent.
Anyways, what to do when you are jobless, you find a new job. So I started applying to Microsoft, Amazon, Google etc and finally after 4 weeks, I had accepted an offer from vmware. Vmware is in Palo Alto, California, some 350mi north of LA. Accepting position in vmware means I now have to relocate from Chicago to Bay area. Then, it struck me, why not do the 66. I must do the 66. This opportunity is not to be missed. I don't have to worry about taking time off from work because I'm not working, plus I get to relocate thereby saving myself some money and enjoying 66. Its a win win idea.
Then I started planning for the trip. I decided to start 2 weeks earlier than my start date in vmware. That would give me enough time to finish 66 with plenty of time to stop and see attractions. Plus San Diego is only 2hr drive south of Santa Monica where Apurv lives. So I'd have plenty of time to visit him, stay at his place for couple of days, recharge my batteries, rest and relax, meet other San Diego friends and then finally drive 6hr north to Palo Alto.

This has a very philosophical touch to it. For long I've dreamed of doing 66 and right when it seemed like this isn't going to happen anytime soon, the whole universe conspired to make it happen. I must have wanted to do 66 from my heart and the wish was so pure that everything else fell into places to make it happen for me. A window automatically opened for me. Its funny that I'm an atheist.

So I started my route66 adventure. First thing was to draw a list of attractions that I fancied. I took notes from http://www.drivingroute66.com/sights/ and made a list of sights I want to visit. I decided driving an average of 350-400mi per day should be enough. A google map plan I made is here.
https://mapsengine.google.com/map/edit?mid=zqA-jOutiQj0.kTA9BfStiInc

Stumble Upon Toolbar

Saturday, July 28, 2012

Getting my life back

What the F*** I am doing here? I am sitting in my room in front of my laptop. its 1am. My friend from a nearby city is in my house for the weekend. He is lying in the bed, his belly popping out, snoring. I am looking at him and I am having a completely different thought. What the F*** I am doing? I am in USA, I am 27, bloody healthy young blood, enthusiastic, average intelligence and I am right now staring at this fat guy. Is this the best way to spend my precious seconds of my precious life?
The thing is, I am the kind of person who when comes across some great quotes, and if it sticks to my mind, it sticks forever, every now and then pinching me, reminding if this is what I should be doing right now. For example, long time back, I saw a movie Fight Club, no not the crappy bollywood shit but authentic Hollywood. I came across this quote "This is your life and its getting over, one minute at a time". Fuck.
Now every now and then when I am doing something totally pointless, like watching a fat guy sleeping, I think to myself, just wasted another minute of my life. I wish I had not seen that movie but what to do about many other such quotes I come across everywhere, facebook, twitter, friends, colleagues, parents.
I think to myself, I am at a place, few people get to be this lucky. Some random people in Africa do not know anything except starving. They are born, they starve, they die. And here I am. I gotta list the stuff I want to do and this is an endless list, but I gotta start organizing my shit together. I gotta get back my life. Its going to happen one wish at a time.

learn flute (Basics learned)
switch company -better position, more money (Done!!!!)
bloody I have to study for company switch. shit
travel route 66  -- (Done!)
work out. run 4-6 mi. need to bring out my 6 packs (Almost done!)
I have to travel to so many places. Colorado, vegas, padre islands, hawaii
see europe
buy a better camera. learn photography (Camera bought)
bungee jumping


There are so many places I want to travel to and if I start listing them here, it will take a long long time. Anyways. I have already noted down enough. I should set a time frame to accomplish these. I am thinking a year. Hmm sounds good. I am feeling a little better than what I was feeling an hour ago. Cool. This is good. So, let me start working out from tomorrow. Shouldn't take more than 3 months for the packs and other muscles to show up :P
Company switch is next priority. Must study and work hard every day.
May be I'll use this blog to keep track of my progress.

chao!

Stumble Upon Toolbar

Thursday, July 14, 2011

Blackberry app for Pace Bus of Chicago - Entry 2

I wasted the whole of yesterday in watching movies, eating and sleeping and so did not work on the app at all. Today I worked some quality time on the app and overhauled the map UI interface.

I had implemented a working prototype of map feature but there were couple of problems. First thing was the Map was drawn directly from the main PaceBus screen. That was a very bad design and I thought it would be simple for now, for development sake and hence went with it. But going through that design I was having trouble bringing the route information into the Map and passing it around the timer and HTTP connection thread to fetch the route's data. So this morning the first thing I worked was to make a Map Launch Screen containing drop down box and a button to launch Map. The drop down had the routes populated from the HTTP route fetch thread.The user is required to select the route from the drop down, click on Goto Map button to open map. This way I had the selected route in the Launch screen and was able to pass it to any module as need arises.
The next problem was to handle the timer. The idea is to have a timer set up which will go off every 15 secs (say) and everytime it triggers, the timer thread would run a fetch thread to obtain the new coordinates from the PaceBus web server and pass it to map to update the locations. The change in UI helped me in this also. Previously I had problem in deciding from where to start the timer and from where to terminate it. Now it was clear that I should start the timer when user clicks on the Goto Map button. So on button click, map is invoked and timer is run.

/**
* @see FieldChangeListener#fieldChanged
* Note: Due to the reason this is only back door, when user changes _kbUseAreaBasedProbability field the threshold will be set to default.
*/
public void fieldChanged( Field field, int context ) {
if(field == _gotoMapButtonField)
{
//Map button clicked. Get the route number selected
int routeSelectedIndex = _routeNumberChoiceField.getSelectedIndex();
strRouteNo= (String) _routeNumberChoiceField.getChoice(routeSelectedIndex);
if(strRouteNo == null || PaceConstants.SELECT_ROUTE_FROM_LIST.equals(strRouteNo)){
Dialog.inform("Select a route from the list.");
return;
}
//fetch the bus coordinates for that route
Thread fetchThread = new Thread(){
public void run() {
HTTPDemo.getInstance().fetchPage(PaceConstants.MAP_COORDINATES_PAGE+"?u="+strRouteNo, PaceConstants.EXTRACT_COORDINATES);
}};
fetchThread.start();
//In the meantime, run the spinner
UiApplication.getUiApplication().pushModalScreen(spinner);
//start a timer to timely fetch bus coordinates
timer = new Timer();
task = new TimerTask()
{
public void run()
{
//on timeout, fetch data only if Map application is running
boolean MapRunning = false;
ApplicationDescriptor descriptors[] = ApplicationManager.getApplicationManager().getVisibleApplications();
for(int i=0; i
if(descriptors[i].getName().equals("BlackBerry Maps")|| descriptors[i].getName().equals("Maps")){
Thread fetchThread = new Thread(){
public void run() {
HTTPDemo.getInstance().fetchPage(PaceConstants.MAP_COORDINATES_PAGE+"?u="+strRouteNo, PaceConstants.EXTRACT_COORDINATES);
}};
fetchThread.start();
MapRunning = true;
break;
}
}
if(!MapRunning){
//cancel timer if Map application is no more running
timer.cancel();
}
}
};
//after a delay of 5 secs, the timer will timeout every 20 secs
timer.scheduleAtFixedRate(task, 5000, 20000);
PaceBusApp.log("MapLaunchScreen(): Goto Map button event is handled. Timer started.");
}

}

The code above describes the action taken when Goto Map button is clicked. It also contains the timer initialization code. Everytime the button is clicked a fresh timer is created. One more modification done was that the timer would fetch coordinates only when there is a Map application currently running. If there is no Map application running, then the timer will cancel itself.
The MapLaunchScreen implements GlobalEventListener so it gets a notification when the coordinate fetch is complete. In the event handler, if the data received from fetch is null that means there are no buses running at this time and this is also the place where we should stop the timer (remember the timer was started the moment Map launch button was clicked) plus we should invoke a default map which doesn't have any location info. Just a generic map. Makes sense.

public void eventOccurred(long guid, int data0, int data1, Object object0,
Object object1) {

if( guid == PaceConstants.GUID_PACE_FETCH_BUS_COORDINATES && data0 == PaceConstants.EXTRACT_COORDINATES)
{
PaceBusApp.log("PaceBusApp: MapLaunchScreen - eventOccured(): GUID_PACE_FETCH_BUS_COORDINATES");
//if spinner is running, close it
if(this.spinner != null){
this.spinner.close();
this.spinner = null;
}
//save the object received
if(object0 == null){
Dialog.inform("There are no buses running this time.");
//remove timer
if(timer!=null)
timer.cancel();
//show default map
Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments());
return;
}
CoordinatesData = (BusCoordinatesDb)object0;
//display the coordinates on map
handleMap();
PaceBusApp.log("PaceBusApp: MapLaunchScreen - exiting eventOccured()");
}
}

The code above is the event handler which is invoked everytime the coordinates have been fetched.
handleMap is a simple function which forms the location string from the coordinates obtained and call the Map application with that argument.


public void handleMap(){
//return if we did not receive valid coordinates
if(CoordinatesData == null)
return;
Vector lt = CoordinatesData.getLatitude();
Vector lg = CoordinatesData.getLongitude();
//prepare the location string
stringBuffer = null;
stringBuffer = new StringBuffer("");
for (int i = 0; i
int g = (int) ((Double.parseDouble((String)lg.elementAt(i))) * 100000);
int t = (int) ((Double.parseDouble((String)lt.elementAt(i))) * 100000);
stringBuffer.append("");
}
stringBuffer.append("");
//launch the map application. If Map is already running, the locations will be updated
Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments( MapsArguments.ARG_LOCATION_DOCUMENT, stringBuffer.toString()));
}

The map code idea is borrowed from BlackBerryMapsDemo project under the sample applications. This much should suffice for now. Next time I'll try to fix some UI related bugs in the module developed so far.

KD

Stumble Upon Toolbar

Wednesday, July 13, 2011

Blackberry app for Pace Bus of Chicago - Entry 1

If I had the power to go back in time 4 months from now, this would be that blog entry. Today I realized I should blog about my 4 month old project i.e the Blackberry app I am developing for the Pace Bus transit system of Chicago suburban. The project is still going strong and I am very pleased with the results so far. Since I am late in blogging about it, I'll start it right away. In this blog I'll summarize the work done so far and from now on I will make sure to have one entry at-least every time I am working on the app.

I was in Chicago 4 months ago, doing my internship at Research In Motion when my colleague Anu suggested that we should develop an app as an internal project in RIM. I thought its exciting and will be a good use of my spare time so I agreed instantaneously. Then we decided to sit down every Wednesday for 2 hrs to discuss about it. The first meeting was to decide on the app we would be developing. Necessity is the mother of invention. I suggested to let us make a list of things we do from the moment we get off the bed till we go to bed and see if we can improve on something to make the job easier. To make my point clear, I gave Anu an example. Lets say you wake up in the morning on a typical day and do what, may be brush your teeths, shower, dress up, then reach the bus stop and wait for bus....wait a sec....may be we can develop an app that would let you know whens the bus coming and ...Bingo! We got our-self an app.
The agenda for next Wednesday meeting was 'Research'. We would look around for an existing app that does the same thing more or less. We could not find any, no Android or iPhone or BlackBerry app. There were apps for the Chicago subways but not for Pace Bus, the suburban bus service system. Next is feasibility study. Doing an exercise on sample BB apps and the tools, IDE etc went fine and a successful HelloWorld app was a boost for the confidence. Pace Bus has its own website of course and a little help from their web server combined with our effort could indeed produce an app.
And so we began coding. Design was simple. Ask the user about routes, directions and stop info through drop down menus and fetch the information from their web server using a background thread. The UI design is driven by how the Pace Website UI is. Anu's contribution is invaluable to the project. She is a genius in coding and makes the job so much easier for me to code thereafter. The app was now able to display the next three times at which a bus is expected at the selected stop just like website. On top of that we added 'MyFaves' wherein the user's selected stop info can be saved to be used later without going through selecting the stuff all over again. Then we added 'Rider News' to the app which will display news about any route affected because of construction, re-routing, temporary suspension of service etc.
We wanted to implement the map feature but it was close to my end of term and so we submitted the app to BB App guys for launching. Maps and other knickknacks were postponed for ver2. Then I moved to Florida to finish my last term in the University. Anu remained at RIM.
For reasons beyond significance here, the launch date of AppWorld got postponed to 3 months which is like 5 weeks from now. While in Florida and with launch delay, I got around to fix couple of things in the app. The Logo, for instance, had to be changed. We had used Pace's official logo but afraid of copyright issues, I designed a new logo for the app. Then I started working on the map feature. Anu was busy with company work and I didn't want to distract her so much but she was again very helpful in this. She sent me a list of links she visited when she was researching about the Map thing.

These were really important esp the first one which actually holds the dynamic coordinates of the bus, exactly the thing I was looking for. I have no idea how on Earth was she able to find that link. I tried real hard myself to locate one such link but failed. With these parameters available and borrowing codes from sample BBMaps codes, I made a working map feature, which is now able to display the location of buses in the map and updates them periodically.
This much information is enough for this post. In short, the app is working, with features like dynamically displaying time, MyFaves, Rider News and now Maps (partially done).
Next post onwards I'll discuss the development on a daily basis.


KD

Stumble Upon Toolbar