Skip to content

When it rains in Bangalore

16-Jun-09

9:30 PM - 20 K.Ms - Shutdown the system. Lappy goes in the bag, lights off. Door locked. Into the parking, hit the road.

9:45PM - 12 K.Ms - Old Madras Road signal. Lights, red.  Gigantic water drops started falling. Being on a two wheeler, had no option but to stop. Parked in Indira Nagar on the juice shop. Had an awesome mango shake. Rain pouring in at gushing speed. Roads started submerging , water everywhere. All traffic rules violated, everyone rushing here and there. No option , but to wait, cosy and dry under the shop.

10:15PM - 12K.Ms - Making calls to friends to kill boredom

10:20PM - 12K.Ms - More calls !!! geez, I am bored.

10:30PM - 12K.Ms - More calls !!! geez, I am bored.

10:40PM - 12K.Ms - Rain seemed to reduce in intensity. Made an attempt to proceed further, drenched slighlty. But bearable. Heading south.

10:50PM - 10K.Ms - Whoa, what’s that? Never seen so many vehicles and jam on a flyover (Domlur flyover). Cars coming in from all the directions. What’s happening. Rainfall intensified.

11:00PM - 10K.Ms - Managed to get down from the flyover, swerving in between car spaces. Drenched badly. Roads submerged in water till knee length. Parked the vehicle and hid under the big stationary shop.

11:00PM - 10K.Ms - Waiting for rain to reduce. Cars, trucks , buses all stuck up on the road. Honking honking ! Jam packed. No one goes anywhere. No movement on other side of the road. Looks like the other end is witnessing a phoenix, ganges in south !!! World came to standstill.  People trying to manoeuvre their bikes across the water logged gaps, pavements. People falling in water logged ditches, heading in some direction. Total chaos. Power went off. Street lights off. Can see big shiny blue DELL on the far end.

11:30PM - 10K.Ms No traffic movement ahead. Looks like the inner ring roads are submerged totally under water for a stretch of 4KMs. No one goes ahead. The mob broke the divider to let the water flow out.

12:00 AM - 10K.Ms Still waiting under the shop. A noble voice shouted: The inner ring road is totally submerged and vehicle movement is impossible. Cars take a reverse and follow Old Airport Road, Old Madras Road, MG Road etc. Slight movement in vehicle began.

12:15 AM - 10K.Ms The traffic reduced. All vehicles headed in reverse direction. Drizzling. I too took the reverse route .

12:30AM - 8K.Ms. Brigade Road . Roads damp, but not flooded.

12:30AM - 6K.Ms. Bannerghatta Road.  I am an idiot that i did not take this route. May be I would have escaped that Domlur inner ring road crisis.

12:45AM - 2K.Ms Outer Ring Road. Whoa, I am reaching home finally . Hurray.

12:50 AM - 0K.Ms Alas ! Reached home. Drenched. Took a shower to freshen. Had dinner. Did some tweeting and finally slept at 2:00AM . It was a tiring day .

Epilogue

Wallet got drenched badly. It took two full days to dry. Luckily, the two 500 notes managed to stay off from getting biologically recycled owing to excessive hydration.

Catastrophes bring people closer. They seamlessly start helping each other without thinking as otherwise they would.

Voila, it was an amazing experience :)

Solution to the 23 pages puzzle.

10-May-09

Hi,

Just came across this awesome 23 pages puzzle via a forward chain mail.

http://www.freestuffhotdeals.com/hacker/1.html

I could crack it .

Give it a try before looking at the solution.

Pages in sequence are

http://www.freestuffhotdeals.com/hacker/1.html
http://www.freestuffhotdeals.com/hacker/2.html
http://www.freestuffhotdeals.com/hacker/three.html
http://www.freestuffhotdeals.com/hacker/iv.html
http://www.freestuffhotdeals.com/hacker/evif.html
http://www.freestuffhotdeals.com/hacker/ssiixx.html
http://www.freestuffhotdeals.com/hacker/7777777.html
http://www.freestuffhotdeals.com/hacker/neptune.html
http://www.freestuffhotdeals.com/hacker/neun.html
http://www.freestuffhotdeals.com/hacker/oct.html
http://www.freestuffhotdeals.com/hacker/jack.html
http://www.freestuffhotdeals.com/hacker/tWeLvE.html
http://www.freestuffhotdeals.com/hacker/169.html
http://www.freestuffhotdeals.com/hacker/number14.html
http://www.freestuffhotdeals.com/hacker/quince.html
http://www.freestuffhotdeals.com/hacker/lincoln.html
http://www.freestuffhotdeals.com/hacker/septendecim.html
http://www.freestuffhotdeals.com/hacker/10010.html
http://www.freestuffhotdeals.com/hacker/potassium.html
http://www.freestuffhotdeals.com/hacker/uxfouz.html
http://www.freestuffhotdeals.com/hacker/icosihenagon.html
http://www.freestuffhotdeals.com/hacker/17711.html
http://www.freestuffhotdeals.com/hacker/Woody.html

Navigation made easy

09-Feb-09

With the advent of web, location base searching and driving directions have been of key importance as these form one of the integral needs of the time. There have been many key players viz. Google, Yahoo, Everyscape etc providing driving directions, routes on map, rich image experience etc. 

The latest addition to the field is video based direction, which is new and unique in its kind. Video Maps is the new terminology coined by the Bangalore based startup Vidteq . The key features include video for the complete route, location based services images etc.  Video based experience is beneficial for people on the move and who are new to  the city.

Vidteq on NEWS9



How to crash a DELL laptop in seconds and unscrew it (with a video)

25-Dec-08

P.S. The whole video/literature etc. is not targeted to malign the manufacturer and is rather based on writer’s personal experience. No offense meant.

_____________________________________________________________________________________________________

A brief intro on how it happened

It all started with my adamant attitude to have a dual partition on my Dell Vostro 1510. Fedora, my obvious choice led to multiple crash of the lappy’s motherboard. The reason sounds strange, but is the concrete reason, as it happened not once but rather twice. Burnt the ISO image of Fedora Core 10 on a DVD and began to boot the lappy. It started normal, but before the UI asking for Fedora installation could load, the laptop hung with nothing shown on the LCD. Forceful shutdown and subsequent reboot led to weird behavior, caps lock, num lock and scroll LEDs glowing indefinitely, without anything up on the LCD. The usual methods of removing the RAM, resetting the static electricity failed to work and it turned out that it was a motherboard failure. Hence a replace for the same was done by the manufacturer.

Video

The video below is shootout of the replacement of the motherboard. ( Done by manufacturer’s engineer). But you may give a try on your old laptop or if your eagerness could not be held anymore.
Part 1


Part 2

Part 3

Part 4

Part5

Part 6

Part 7

How did we capture and process the video

The video capture was done using a Sony Ericsson phone and which resulted in multiple 3gp files. It was essential to merger these multiple files and convert them into flv format for upload using some tool. ffmpeg was the ideal option and worked like a wonder. Key steps were …

-> Converting indiviual 3GP files to flv with all the parameters viz. bitrate, frame etc

ffmpeg -i file.3gp -s 320×240 -vcodec h263 -r 25000 -b 200 -ab 64 -acodec amr -ac 1 -ar 8000 file.flv

-> Merge all files into single. This method somehow did not work with flv files, hence they were converted to mpg format and back to flv for upload to youtube.

converting to mpg with same parameters

ffmpeg -i file.flv -sameq -y file.mpg

Merging into single file

cat 76.mpg 77.mpg 78.mpg 79.mpg 80.mpg >final_mpg.mpg(This method somehow did not work with flv files)

And finally, back to flv file

ffmpeg -i final_mpg.mpg -sameq final.flv

A strikingly odd web application exposure

04-Dec-08

Without having to expose your backend stuff to the internet, how do you service a WAP/WEB request. The blog below discusses a typical method of achieving the same. Assuming that whole web system is being developed in a intranet and not hosted outside. Let us call the internal unexposed server as A. We need a server hosted on internet to fetch the WAP/WEB requests from the mobile or computer. This server is called as B. The request is being fired on the server B, the request is written to a flat file called request file. Server A runs a shell program viz fetchrequest.sh which reads the request file every second for any new requests coming  using the curl unix utility. Meanwhile, the server B sleeps off and waits for a response from server A. Server A will read the request and if its new (newness of a request is determined by saving the previous  request number in a global shell environment variable) server A processes it and shoots back the response to server B in the form of a file via FTP. Server B, in its sleeping state waits for the this FTP response file. Once recieved, it pushes back the response to the user. The whole wait process is scheduled for a fixed period of time, after which a dummy response is send like server is down, request failed, bla bla etc . Let us see how the same is achieved in fetchreques.sh running on server A.

File fetchrequest.sh

#!/bin/bash
while [ 10 -eq 10 ]

#Runs in a infinite loop checking request file at server B every second
do
if [ `env | grep -c lastCounter` = 1 ];then
newCounter=`curl -s http://serverB/requestFile.txt | tail -1 | cut -d: -f1`

#Reading request file at server B
param=`curl -s serverB/requestFile.txt | tail -1 | cut -d: -f2` #Extracting the request parameters
echo newCounter : $newCounter lastCounter : $lastCounter

#If there is a new request, sending a response back to the server B
if [ "$newCounter" != "$lastCounter" ]; then
echo "Need to send a response"
echo "Response URL : http://serverA/something.pl?action=something&param1&param2"

#Trimming of the response that needs to be send to serverB and storing it in a variable
output=`curl -s "http://serverA/something.pl?action=something&param1&param2" | grep 'cap\\|img' |
sed \ 's/<src>.*<\/src>//g;s/<cap>/\:/g;s/<\/cap>//g;s/<img>/\:/g;s/<\/img>//g'`
echo "Response received : $output"

#writing the response to a flat file to be FTPed to server B
`echo $output>"rp_$newCounter.txt"`
`export filename==rp_$newCounter.txt`
`echo ls -l "rp_$newCounter.txt"`
typeset -i responseSize=`wc -c rp_$newCounter.txt | cut -d" " -f1`
echo "Response size $responseSize"

#If the process response is garbled, small or null, sending a dummy error in FTP file
if [ $responseSize = 1 ];then
`echo "We are working , try later" > "rp_$newCounter.txt"`
fi

#making an FTP connection to serverB and launching the response file
`curl -s -T "rp_$newCounter.txt" -u username:password"ftp://serverB/rp_$newCounter.txt"`
echo "Uploaded the FTP file for $newCounter request"
`rm -f rp_$newCounter.txt`
echo "Deleting rp_$newCounter.txt after upload"

#Updating the request environment variable
lastCounter=$newCounter
export lastCounter
fi
else
lastCounter=`curl -s http://serverB/mobRequests.txt | tail -1 | cut -d: -f1`
export lastCounter
fi
done

The whole system works very well, and the requests are processed and response send to user. There are however limitations to this model.

Upgrade Fedora without burning the DVD/CDs

30-Nov-08

An upgrade of Fedora Core version normally requires burning the new version’s image in a DVD or CDs.  An alternate approach to the same is upgrading by copying the same to a hard drive or a pen drive. The approach mentioned below worked very well from me for an upgrade of FC9 to FC10.

Download the new version’s (say FC 10)  iso(DVD) image and save it to a disk drive partition. I used a pen drive for the same. It works very well for filesystems viz. FAT32,ext2 and not NTFS. Copy the image file to any directory say for example /mnt/FedoraCoreDVD.iso( Assuming, that pen drive is mounted at /mnt) . Mount the iso image in a directory(any) to extract the isolinux folder.

#mount -o loop /mnt/FedoraCoreDVD.iso /home/user/Fedora/

Copy the isolinux folder and paste it inside the boot folder.

#cp -r /home/user/Fedora/isolinux /boot

Now we need to make an entry in the grub file to boot the copied isolinux folder’s install.img

# cat /etc/grub.conf

______________________________

title Fedora Upgrade
root (hd0,8)
———–> should be your  partition containing the current linux installation (0->First Hard Drive,8-> Partition number on this drive )
kernel /isolinux/vmlinuz
initrd /isolinux/initrd.img

______________________________

Copy the isolinux folder also to the pen drive(/dev/sdb, mounted at /mnt in this case) and reboot the system. Select the ” Fedora Upgrade” option in grub and the normal installation/upgrade demon anaconda will start. It will ask for the option of disk partition and folder containing the iso image and iso linux folder, which is /dev/sdb1 in this case. Select the same and the upgradation works like a charm.

Busted ! Think before you speed up next time baby !

06-Nov-08

Advancements in technology has penetrated all domains and Bangalore traffice police is no way refrained from adopting the same. Inner ring road, one of the lone roads, situated across sparsely populated region. It connects the densely populated region, commercial Koramangala and the Old Airport Area, Domlur. This is fairly long stretch of road that give motorists and other vehicles a speed up zone to catch up with time. Owing to no residential or commercial construction on the sides, the traffic is swift moving. Unexpectedly, on a fine weekday afternoon, a vechicle loaded with gadgetry stuff was parked with lot of traffic police men in and around it. The motorist speeded up past the Koramangala-Ejipura signal   to gain an acceleration lead on the inner ring road. Whoa, why is he stopping me, I am wearing helmet, the emission test are done. Cannot escape, had to stop. Thunderbird, as the name suggests was talking to winds. The motorist was stopped by the cops.

Officer : You have over-speeded

Motorist : Hmm… I was just 70 Km/hr

Officer [Hands him a printout]:  See this. You were at 76 Km/hr. The statistics have been captured by the #@&^*#5 camera with %#6*#*9 technology. Its all given below. I will have to fine you . 300 bucks.

Poor motorist had no other option.

P.S - Identity of motorist is concealed and is of no concern with respect to the blog.

Think before you speed up

An IT corporate giant vs a product startup ! my perception and experience

01-Nov-08

Both of these share their own importances and have wide differences in functioning, lifestyle, work culture, ambience etc. Working at each of them has its own pros and cons. Let us see what are the striking differences among them that can be of interest to you. Here onwards I shall designate MNC by M and a startup with S.

M: Large coffee machines, surplus supply of beverage, good enough for coffee/tea addicts.

S: Limited supply of beverages, may vary depending on where startup is located, its own office, or a business incubation center.

M: Manager says, you need to be in the office at 9:00AM sharp, they are aussies, ahead of us by 4.5 hrs. We need to bridge this gap. Mails need to be checked every second. Sticking your ass in the office without doing anything is the motto. Punch the clock, 9:15 hrs a day. Some companies have started a early bird offer, earlier you reach the office, say before 8:30 AM, you acquire credit points making you eligible for the lucky draw coupon of Rs 500, Rs 1000 and so on.

S: A product based startup, timings are flexible, no one is going to ask you to push your ass at 9:00AM. But you have critical goals and targets to be achieved, which are of extreme significance for the startup. Hence, you cannot simply laze around in the office. You need to get things done and if you are passionate about work, this can be your dream come true.

M: Please display your ID, where is your ID. I hate this. You are like one in a million. Just another piece of shit in the campus.

S: You know everyone else. The whole comapny is a team and you are a integral part of the company. ID card?  I don’t remember the last time I wore it. Only thing you need is the incubation center’s access card. No one is going to pester you to hang the id round the clock, as if you may be a terrorist.

M: Dress Code. This is the most fascinating part. Mondays-Tuesdays- Ultra Formal, Wed-Thurs- Mild Formals, Fridays-Freedom, but with a limit, off course. Thank god they do not have any restriction your undies.

S: Dress is not a restriction. Work is all what matters. But that doesn’t mean that you can park yourself in the office wearing your sleeping t shirt and shorts :-P.

M: Use of brain, minimal, rather its a rare event. And if you are a fresher, I suppose you will be doomed in most of the cases, they treat you really fresh. They may put you in some low profile, time consuming work and may not listen or ascertain your technical capabilities.

S: Ideas are supposed to nurture in a startup. Brainstorming and impelmentation of cool  thoughts to reality is inevitable.

P.S. Writings here are solely based on writer’s life experience and may not match up with the real scenarios or your beliefs. Contradications are likely to occur. Comments are welcome.

A poem, in python….

27-Oct-08

import money
import health
import fun

class Life:
    """
    health is defined as follows on the scale of 0 to 10000
    Excellent - 10000
    Very Good - 8000
    Good - 6000
    OK - 5000
    POOR - 3000
    VERY_POOR - 1500
    CALL_THE_AMBULANCE - 500
    fun is defined as follows on the scale of 0 to 100
    AM_I_DREAMING_FUN - 100
    DISNEYLAND_FUN - 85
    GOOD - 70
    MANAGEABLE - 50
    SUCKS_A_BIT - 30
    SUCKS - 15
    money is defined as follows on the scale of 0 to 100
    INHERITED - (some random amount)
    I_AM_BILL_GATES - 100
    AWESOME - 50
    GOOD - 30
    MEDIOCRE - 15
    MY_SERVENTS_EARN_MORE_THAN_ME - 5
    "
""
    OFF = False

    def __init__(self,inherited_money):
        """
        Initializing life object
        "
""
        self.my_money = inherited_money
        self.my_health = health.GOOD

    def _job(self,weekly_work_hours):
        """
        Calcutes the daily number of hours put in the work and number of days worked weekly,
        based on number of hours worked weekly.
        "
""
        self.saturday = OFF
        self.sunday = OFF
        if weekly_work_hours < 1:
            print "Dont sleep all day long dude"
            weekly_work_hours = 1

        if weekly_work_hours =< 50:
            self.my_money = self.my_money + money.MEDIOCRE*weekly_work_hours
            self.my_health = health.GOOD/weekly_work_hours
        elif weekly_work_hours > 50 and weekly_work_hours < 65:
            self.saturday = not OFF
            self.my_money = self.my_money + money.GOOD*weekly_work_hours + 100 #For working on saturday
            self.my_health = health.OK/weekly_work_hours - 10 #For working on saturday
        else:
            self.saturday = not OFF
            self.sunday = not OFF
            self.my_money = self.my_money + money.AWESOME*weekly_work_hours + 300
            self.my_health = health.POOR/weekly_work_hours - 25 #For working on both saturday and sunday

    def lifeWorth(self,weekly_hours):
        self._job(weekly_hours)
        health_quotient = self.my_health
        money_quotient = self.my_money
        if not self.saturday and not self.sunday:
            fun_quotient = fun.SUCKS
        elif not self.saturday:
            fun_quotient = fun.SUCKS_A_BIT
        else:
            fun_quotient = fun.MANAGEABLE

        life_worthness_quotient = (health_quotient * money_quotient * fun_quotient)*(24*7-weekly_hours)/10000000
        return life_worthness_quotient

if __name__ == "__main__":
    """
    sys.argv[1] is inhereted_money and sys.argv[2] is weekly_work_hours
    "
""
    import sys
    my_life = Life(sys.argv[1])
    my_life_worthness_quotient = my_life.lifeWorth(sys.argv[2])
    if my_life_worthness_quotient >= 100:
        print """Dude, you are one lucky b****** to have inherit bill gates’ empire and never to work again. You are an exception"""
    elif  my_life_worthness_quotient >=80 and my_life_worthness_quotient < 100:
        print """Either you keep your boss extremely "pleased" with your "performance", or you FBI agents are gonna hunt you down any second now."""
    elif my_life_worthness_quotient >=60 and my_life_worthness_quotient <80:
        print """You work really well and maintain a well bias of work and fun. You live ideal life"""
    elif my_life_worthness_quotient >=40 and my_life_worthness_quotient<60:
        print """You put a lot of time and work and dont have enough quality of life.Does it really worth it"""
    else:
        print """You suck! Go kill yourself…. Period."""

Google Maps on Phone

13-Oct-08

I had installed google maps on my Sony Ericsson S500i . Google maps have loaded up a new feature. It determines your location, possibly the location of the nearest tower from which the signal is reaching to your phone and display the location on the google maps. The location determined is fair to an error upto 500m.