Sunday, February 17, 2008

Pongal by choice

I dont't know what comes to your mind if I say pongal, the food, or the festive, but some people in Bangalore can think of pongal as one of the finest places in Bangalore which can bring back sweet memories of tamil nadu.
This restaurant, I dont know how this thing make you feel but I felt a bit awkward seeing the name board.
The Pongal
Veg Cafe
but anyways, every time I went there, the one thing that remains common other then full satisfaction is, I could barely walk after eating there, and I could barely feel that I have paid, (think me and pranav eating and paying less than 100 bucks), so try this place, its near Jeyadeva institute in banargatta, the first left turn in the direction towards jeyanagar after the flyover.
PS: when me and pranav were recalling about how good Dosa's in pongal, I thought Pongal is food, festive & restaurant, and my perverted mind immediately thought .. you know ...porn? (highlight the space to see, for newbie's)

Thursday, February 07, 2008

Some more 'C'

in shared memory IPC in C, if you share a pointer does that mean that you share the memory location pointed by the pointer, no, after many hours of debugging a code, where a program shared an array of pointers with its child process, the child process calculated Fibonacci series and updates the array pointed by the pointer which is in shared memory location, after the child process ends, when we tried to access the array, the famous GCC report "segmentation fault".

A multithread program to calculate Fibonacci series, if every thread waits for the output of previous thread (assuming, that each thread calculates fixed number of elements in the series), then why the hell you need a multi-threaded program, so we all know that there is a formula to calculate nth number in Fibonacci series, and iterative calculation is better than formula, so what do we do.
Split the range so each thread can calculate some amount of numbers, in every thread use the formula to find the first and second number and iterate to find others.

It happens in Bangalore

roaming around Bangalore is a very different experience (every city will give a different experience for sure), I had some "believe it or not" experience in bangalore, i'll list them lets see how much of my experience is in line with yours.
1. A restaurant in MG road which closes by 8.30pm and forces you to leave with all possible anti-customer approach, they bluntly ask you to pay the bill even when serving, once the time becomes 8.30pm and they close the front door, that means that you have to leave that place via back door, and believe it, it is a very popular place.
2. A signal(a lot of them) that shows both red and green.
3. "Denial of entry" in forum, once our boss asked us to come over to some place in airport road for some work and we left that place at 7.30, not wanting to miss the mess food, we(I and aditya) managed to reach koramamgala signal and took an auto to forum, now we have to cross forum to take a bus to electronic city, so when we tried to go inside, the security people didn't allow us, the reason given was that we are carrying a bag and they don't allow it, we had to walk through the parking lot to get to the other side, I don't know whether they have "rights of admission reserved" policy, if not I'm thinking of suing them, but pity I don't have any evidence.
but I should say that Bangalore is a wired place and I like being there.

I am from alibag, so is Sagar

The trip to Pune was amazing one, I got to see the mighty of Marata kingdom(shivaji maharaj).

The comedy started, when I started to ask for dawoond, a place Pranav said that is 60km before Pune, so that I can call him, giving him enough time to reach railway station to pick up me.
Luckily some one said that its Daund and not Dawoond, oh my god, I started to think what would have happened if I got arrested in suspicion case, first of all I can't communicate in any language other than Tamil/English and I was carrying a book about Israel-Arab conflict in Tamil(which looks like Arabic), and it had pictures of AK-47 and Arafat, alas they would have thought me as a terrorist and god knows how many years I would have been in Jail (good creativity right).

The one complaint I have is everybody, every damn guide who talked or explained the history and significance of the place we visited missed the one thing, I noticed that everybody talks only about shivaji maharaj, shivaji was great and an amazing king, but there is history after him, it seems everybody had forgotten about that. I wanted to know about shivaji but the same time I also wanted to know more about the history of each place, and in that regard I was disappointed.

The best thing in the trip was "Alibag"

we asked to "please switch on the fan"
he said "sir there is no light"

we said "cancel the 2/3 soup order, instead bring a 3/4 soup"
he brings 2/3 + 1 full soup

"I hope you people won't booze in your rooms" , said the hotel manager
"only restaurant", he asked, when we asked for a restaurant.

I started to wonder, is Alibag, a "kind" of a place.

when we were coming back to Pranav's place, we were making so much fun about the incidents that happened in 3 days, and i/vijay recalled the first dialog,

switch on the fan
sir there is no light.

When we started to laugh fanatically, Sagar turned back and said in full ferocity, "fuckker are you from Italy, if somebody says that there is no light, then it means that there is no power, where are you from."

we (I, pranav, vijay) were stunned at sagar's reaction, we told him we dont know were we are from, but you are surely from Alibag.

Friday, February 01, 2008

Elections at Anna university

Even though now elections are history in Anna University, courtesy some police case due to political rivalry, my most memorable time in CEG were due to elections, it taught me how nasty politics is and how much I liked to be in that gutter, a post was long due regarding this and a good Saturday morning and NO-BOSS situation gave me some opportunity to write this.

It all started with the usual ragging fever in first year, but as slowly it turned out even if our seniors wouldn't have signed the NO-RAGGING form, they wouldn't have ragged us, I discovered the reason very next year, in very simple terms we Anna University people are lazy-ass buggers, as our future is more or less certain (some job in some company) we decided to spend our time sleeping and watching movies rather than building our skills be it technical or personal (so called soft).

But there were some seniors who were enthu enough to take us(freshmen) for a drive in their car, get us a snack in canteen, give us tips about professors, WOW what an atmosphere I thought, no ragging, helpful seniors, an assured job and I came to conclusion that if there is heaven then it is in CEG.

One fine day a senior called me to his room, even though I was irritated as I was disturbed during the most important thing a CEGian can do (sleeping actually), I promptly went to his room, after initial discussions about studies and where are you from stuff, he asked “are you a class representative”, I said No, he continued “why shouldn't be one?”, I being a more lazy ass then anybody else said “responsibilities are bad, I want to enjoy my life here”, he persisted “no, you'll get good intro with professors, good exposure to seniors, enjoy certain privileged which no body else can get.. blah blah blah .. “, to stop him I said “ok, I'll compete in next class representative election”, he advised me to be in good terms with all my classmates so I can be a successful class representative, I went back to WORK.

So in second semester, when the class advisor asked “who is your class representative?”, I in sleep heard only the “class representative” part and thought that she is asking for candidates and stood up firmly, she asked “who elected you?”, fuck man the whole thing became clear to me, so I decided to act smart, with my classic and pathetic smile I said “no one”, I don;t know what she thought after stunned for a second she asked, “anybody objections?”, being new to class and a ball thrown at them in the very first day everybody decided to keep silent rather than act, so I was elected as a class representative unopposed or rather unanimously.
Man, the real work of class representative is a pathetic one, I had to arrange for chalk, duster, scheduling of class, collect assignment, and the worst thing is resolve the clash between timings for test and extra classes, actually one faculty disowned me for his subject and appointed some other for it, actually I was more than happy to give away my position as my ass was feeling the pain.
The other part is I came to know about the elections stuff, I was repeatedly called for meetings explaining the importance of being in sync with others, spying on opposite gang etc, man what time you know I was both excited and scared, I was happy doing all those things as I got some attention at every damn meeting, somethings I say in my typical loud voice grabbed the attention of important people and I started to get calls for almost all their meetings and dinners.
But the worst thing happed in few weeks, I noticed that most of my gang from school were hanging out with opposite party, and karadi dragged me to one of their meetings and introduced to someone who was surrounded by most people as “this is Gowthaman, EEE class representative”, I was shocked to know at the course of that meeting that I was actually inducted as one of them, thanks to karadi, I changed by political side in 2nd month of my political career.

All was going well till I told about these things to my mom, you should have seen her at that time, I have never seen her getting furious in any of my activities, a big lecture and lot of threatening(actually cutting my pocket money) persuaded me to not to stand for 3rd semesters class representative post, but I decided to work or support from outside (this continued till for next one year, and when karadi decided to compete for president and I had no option other than being his “advisor”) .
So I was not actually a part of any of the election stuff till 5th semester, in second year our party didn't even compete, the person whom I was introduced felt that he cant do or something and no alternate was available I believe, so we LOST.
In 3rd year, we WON, actually I had nothing to do, but some of our gang guys cars were damaged and karadi went for a big war with them (verbally I should say), and some stupid bugger from our side crossed the limit of his verbal attack and got physically assaulted by them, so that followed enquiry and 2 week suspension for those involved in “inhuman brutality” committed to a very good person from our side [this was a big propaganda introduced by me, when I ran out of ideas for campaigning].
So one fine day, current IFS officer and to be IAS officer came to my room, after initial “kind” words for each other I was asked to help out them in elections but limited only to our class. What big deal, I thought so on that day at 9pm started my mega entry to restless campaigning which lasted for about 3 months, day and night, anyone who comes in sight will be canvased for a minimum of 2 hours, some people just to escape our torture said they'll definitely vote for us, and they didn't.
So after the initial taking care of our class, I had a status update with core gang, and our prospects of loosing are very bright, rather than winning, so everybody decided to pull socks and decided to work hard for next 2 months giving time for our honorable president candidate to study so that he can pass those few subjects where failures are the only norm, and I forgot that my limit is just for our class, there goes my entry into hardcore politics.
Now you can imagine everything that political parties do, booth capturing , ok we have class advisor capturing (from counting of votes, to conducting elections during favorable conditions), accusing the opposite party for what they did and they didn't, election promises that even from the beginning we know that can't be done or we won't do etc...
I now wonder what the Hell happened to me, I was accusing political parties for their activities and we are doing exactly the same, when it comes to grabbing power my idea of right, wrong and ethics everything just vanished, not even in air, but to vacuum.
So everything was going fine and smooth till department president election came and RK wanted to contest, now the dilemma which election is important, I thought that when it comes to department election we'll make some bugger from opposite/confused[those who claim to vote for both sites] gang win and get his gang vote for us, but this RK wants to be that bugger, so my first strategic mistake of not keeping my mouth shut turned to be a big damage for RK, so eventually we lost department election so by contesting we created more opposing parties, which lead to the losing of class representative post, there is some stupid phenomenon in Anna university, where if you lose 4th year, 3rd and 2nd year will follow, so we lost the entire EEE, in a matter of hours, we had few surprises in other departments.
finally holidays followed by placements, no one was in college other then “we mighty mighty seniors”, so we lost touch of all elections things, placements seemed more important than anything else in this world, so by the time we were ready to pounce on the opposition with new ideas, our 6th semester results were declared and guess what our presidential candidate had got not one but two Cups, man how could this be, so we searched for alternative we had none, so the entire party took rest, for the sake of not allowing them to win unanimously we filed a good charming person to lose, so eventually we lost, 16 to 23, and we had a big party that day at shakes and creams to celebrate our losing of one year of work, like political parties we said cried foul. [man how did they correct the class advisor of compsc AB batch, and kicked out our VP candidate from elections, Man this is booth capturing].
so coming to the end, there is no point in blaming the political parties for their actions, if common people like us, that too students behave the way we did, there is some problem in the society I don't know what is is, probably we didn't/don't have good examples, but I should say, winning or losing elections are fun.
so before complaining about politics, I think people should compete in elections and see how they behave themselves and think about their actions.

Wednesday, January 30, 2008

Protective nature of life

Year: 2006

Time: 4.00pm

Place: Anna salai, in 23C bus

I was going to my Redhat class & Anand was on his way to home, the bus was crowded and I luckily got a place to sit, in nandanam signal an old man boarded the bus and everyone (including me) took pity on him and want someone(!!) to give him a seat, it didn't occur to me that even I can give my seat, Anand gave his seat to that old man, Wah… what happened to me, I was shocked by my action(or no action), when did I become so selfish and become a common man with no intention of helping (I always considered myself to be one).

This incident provoked me to think, and then I decided to "offer my seat before anybody does"

Year & Time & Place: various part of my life, How many time

  • You got afraid/felt uncomfortable when a stranger was near you, may be due to their physical appearance or their outfits?
  • You tried to avoid some people "thinking" that they might be here for asking help?
  • You prepare a reason to cry foul, even before the person in front of you start to ask for help?
  • You avoided a person because you promised them something but didn't do as per it?
  • You have told lies but kept on emphasizing that you are trying to be honest?

Let's stop the questions and ponder for answers.

I believe that "protective nature" of our life, is the main reason for above questions, we are protective about every damn thing in this world.

"Good fences make good neighbors", the good old statement, it tells about a trade-off between being protective and trusting your neighbor.

Can't we live life which is completely free form any sort of "protection", protectiveness has led to lot of uncomfortable situations where we feel lost, helpless even when we haven't done anything wrong, saying simple words (in other words accepting) like "sorry", "no", "I didn't" or "I Can't" etc at appropriate time and place will not only put the opposite party in safe position of taking a decision by their own.

Year: 2007

Time: 9pm

Place: Mysore to Coimbatore bus

An old couple boarded the bus in someplace after Mysore, and its cold, almost all seats are occupied by one person and they wanted to sit in the middle seat where there will be less cold, and they asked with someone and their request was denied, "vaanga, inga ukkarunga"(come and sit here), I said it and sat in last seat, even though I was suffering the cold and rough ride, I was happy that I was helping someone and I kept the promise I made to myself.

Sunday, November 11, 2007

the first story

once upon a time there was a grandmother who made vada and sold them, she'll eat the last vada as her food.
one day a crow took away the last vada, grandma became sad, and started to cry, her beloved pet, a dog named dommy, wanted to help her, so he went to the tree where the crow took shelter and said, "how  beautiful you are, i want to hear your sweet voice, so please sing for me", the crow became overjoyed and started to sing, kaa kaaka ... the vada fell from its mouth, the dog picked the vada and gave it to grandma, both lived happily ever after.

the moral of the story is, if i don't have anything to write, I'll write these kind of things, so forgive me

Blogged with Flock

the Zzz Stories

once upon a time ....

i am a great lover of stories, i wish to share interesting ones here ...

nowadays i have been adding the "Zzz" sound to most words, so welcome to "the ztories"

http://zstories.blogspot.com/

welcome

once upon a time ....

i am a great lover of stories, i wish to share interesting ones here ...

nowadays i have been adding the "Zzz" sound to most words, so welcome to "the ztories"

Saturday, November 10, 2007

Give windows a “bash”

How many of us, who love the power of command line feel handicapped when it comes to windows, with its pathetic cmd.exe or command.exe, I was missing the auto-completion, multiple tabs, and most importantly the commands, pipes, redirection, tee, I am not sure of the windows equivalents of these, so I was looking for some way to Linux-ify my widows.

Being a TA required me to compile few softwares for windows (skyeye, softgun, arm-elf-gprof etc...), so I had to choose between MinGW and Cygwin, first I started with MinGW and found it quite inadequate, since Cygwin gives a complete Linux environment, I settled for it, but I still miss the tabbed terminals, I was searching for “tabbed command prompt” in google and found a few links but none were open source, some how I stumbled upon a blog where they have mentioned about Console2, an open source one currently under development, so I downloaded it and am pretty happy about it, now i'll give a step by step procedure how I got a almost working gnome-terminal(or Konsole) alike...

  • download and install cygwin
  • download and extract console2
  • open console2
  • press ctrl+s to bring settings dialog
  • go to tabs option, click add change title to you something you want, select cygwin.bat from CYGWIN_HOME, press ok
  • now if you want a cygwin terminal press ctrl+f2 (assuming the cygwin appears below console2)
If you dont want cygwin then you can use gnuwin32 package, and add its wbin folder to path and just use console2 with all the power of unix

Console2: http://sourceforge.net/projects/console

Blogged with Flock

Banana, Good day & mineral water

what is your favorite mode of travel, 3-tire AC, Business class air travel or a private cruiser, mine is unreserved train travel, i.e.. general compartment, my friends who knows Hindi can recognize my Hindi knowledge which is mostly attributed to train travel, “Yatrigan kripya jyandije .. ghadi number ... Mumbai sai Chennai central sub janevalli ....platfrom number .. aaye hey”, ya I know its not exactly Hindi, but this is what I “hear”.

I haven't tried any form of luxury travel in my life before coming to IIITB, some times I end up paying 190 bucks for Bangalore-Mysore trip because its a bit faster and I can sleep properly(it doesn't mean i cant sleep in other situations), the one thing that I miss after coming to Bangalore is train travel (the other one is hot sun).

I don't know how many of you will agree that it's fun to travel in general compartment, the never ending line of vendors selling anything like chikkus, bananas, roasted ground nuts, murukku and other eatables.

I observe that most people in reserved compartment are well planed families who have the idea of hygienic food (i.e. Cooked and packed from home) or people who don't hesitate to spend money in branded products or people who hesitate to buy from these poor vendors, why others, even I feel awkward to buy and eat from these vendors when I travel in reserved compartment because no one else will be doing that, so I decided to be a general compartment person.

I even calculated the amount of money I spent on eating in one journey, 200 bucks is not that bad you know, few cups of coffee, two or three cups of tea, masala tea, tomato soup , ground nuts, samosa, a dozen of chikku, one or two custard apples, bananas blah blah blah ...

I always board the train with Deccan Chronicle and Hindu (why two?), I have to take care of my cloths which are mostly light colored ones (I have to wash them), so DC helps here..i travel light, light in sense real light(both in money and luggage), I didn't have a mobile phone, mostly I'll be unshaved and wouldn't have had a haircut, a small bag with a set of cloths and some books, every time I reach home I'll be hearing the same comment (grandfather: who will believe if you say you are a college student, mom: why torture me every time, all our relatives know about your pathetic state, I wont find a girl for you, dad: no girl will come near you) irrespective of what time I reach home (mostly around midnight), followed by “did you eat?”, the obvious answer is yes, no matter weather I ate or not, I don't want to trouble my mom to prepare something at that time, first of all I wont inform her, giving her an unpleasant surprise, and she'll be very angry of my appearance(don't forget the long nails).

I think I understand the kind of people who do general compartment travel, some wired people(Me!!), daily travelers, some people who didn't get a reservation or unplanned journeys, some poor people who don't know that reservations exist or can't afford that, etc.. however very few people enjoy journeys the way I do(I think), the heavy wind (some times hot) that hits your face when you sit near the door, the struggle to hold sambar from flowing out of plate, the water splash on face(people wash their hands thro the window, ya I know yuk..), fight between kids, elderly people, general discussion that ranges from politics to daily life, hmm It feels good.

But I should caution, if you don't like to sit with dirty people, hear some unpleasing words, worry about sitting comfortably through out the journey, or people snoring in your ears please stay away.

Other than that it's a wonderful experience to know about the majority of India, eat good snacks and fruits at throw away price, get good flow of air, and most importantly get to know some “good” bad words.

Welcome, to a new world of journeys


PS: what is “banana, good day & mineral water”, my regular food/eatables during journey nowadays, I cant expect vendors at every stop in bus, can I?.

Blogged with Flock

Tuesday, November 06, 2007

infront or infront of back

sounds crazy right, i could not come up with a sexy title for (pre or post increment operators in c), anyways today the issue of pre/post increment operators in c, sagar and i had a good 15 minute discussion how this works so he results are here

int i=5;
printf("%d,%d,%d",++i, i, i++);
/*
output: 7,7,5
*/

how, we understood that printf evaluates from right to left, so it'll do i++ first and return '5' and update value of i i.e. 6 in stack, the middle i is just i, the first ++i, will increment value of i in stack i.e. it becomes 7, now it'll examine the value of stack finds i=7, therefore it substitutes 7 as first and second argument


int i=5;
printf("%d,%d,%d",++i, i, ++i);
/*
output: 7,7,7
*/


how, we understood that printf evaluates from right to left, so it'll do ++i in stack i.e. 6 in stack, the middle i is just i, the first ++i, will increment value of i in stack i.e. it becomes 7, now it'll examine the value of stack finds i=7, therefore it substitutes 7 as first and second argument

because in post increment operator, the assignment happens before increment, therefore in case one 5 is assigned or returned, and get incremented on stack.
fair enough understanding i think.

refer:-

Blogged with Flock

Monday, November 05, 2007

Nurses or NCurses

the first time i saw this package was during Fedora Core 1 installation, a nurses package... what a funny name or is it really for nurses, but i forgot about it.
next comes kernel compilation for Advanced OS class, where make menuconfig reports some error in ubuntu.. after some digging someone found out that we have to install libncurses-dev package for it to work, and i remembered that funny incident that happened 3 years before.

the assignment questions seemed simple
  1. Observing “Linux“ behavior“ by writing a program to use the  /proc  mechanism to inspect various kernel values
  2. Learn how to write a UNIX—style shell program
what big deal, half the program is in book complete it and finish the assignment, my "proc" will intelligently display the status of the program if you give PID, and as an unexpected move Prof SN was completely "satisfied" with our work so we have to redo it.
so i want to add interactivity to my shell , that is history, command completion etc.. , so i have to capture keystrokes, but what shit, ours is not a complete shell, so the shell that we run on didn't give us the keycodes that we expect .. after a lot of blah blah .. nurses or ncurses came to resuce, there is a getch() function will capture all keys if we set keypad(stdsrc,TRUE), done...

worked for three more days to "port".. when every thing is working .. Hmm this is not what i wanted SEGMENTATION FAULT, why the hell!!, Hmm if do chdir() there is a seg fault, i got bugged of curses so had to revert back to non-interactive shell, but i can upgrade my proc code to work as a task manager (like top command) again 2 days of work, i could implement killing a process provided you have sufficient access rights, ya i know it has lot of flaws but i believe it is a "proof of concept" , now ask me do something in ncurses, i can do it with a bit of struggle.
next is a file manager in queue .. (long live ncurses ).

food for thought: try "tpp" the ncurses based based presentation program, ultimate, so decided to torture people with "tpp"  (available in ubuntu/debian repos)

Blogged with Flock

Movie Morning ...

we all would have heard about and experienced movie nite's, here is a place where we have movie mornings.

After making sure that i sleep early and get up early (save my wife) i have good amount of noise free time in the morning (say 4 to 8), first i thought about preparing for placements but god thought in different way (ya i believe in god vijay), gouuth@tLL happened and postpone that placement preparation forever...

I thought about doing my TA work, you know its difficult to work when nobody is around to disturb you (hostel effect), so i decided to go to college early ( say 5) and browse hoping that the internet speed will be good( and it is), gradually i got bored of it (actually 2 days), so i had to find some other option to "kill" time, then my old habit(actually CEG habit) of watching movies 24x7 seemed to be the best option, so here i am watching those all damn old movies(some even 20 times), suddenly i felt guilty when everyone in college is doing something important in life ( like sleeping ) WTF i am doing, so i want to see what others are doing, so today i instead of starting a movie directly took a look around and viola, there were 3 groups of people and of which 2 are ... watching movies .. what a good encouraging sight, i hurried to start my MOVIE.

so very soon expect some worst movie reviews here (PS: i kinda like all movies...).
I should say early morning walking alone in cold weather , going to infy for coffee is a damn good one, i urge everyone to try it once in every year ...

Blogged with Flock

Friday, November 02, 2007

MFC

MFC project problem statement is out...
in simple words identify a state machine which will accept the given string of alphabets (full 2 months), god only knows how to do this..        

Blogged with Flock

Intern....

accepted internship @ theLearningLabs, my professors startup.. technical updates will be in super-techie and others will be here ...                    

Blogged with Flock

Saturday, October 27, 2007

Really Nothing

Hmm... well a long time... nothing to write? Huh .. no .. its just plain laziness.
will try to post something in next week ..

Blogged with Flock

Friday, October 19, 2007

new blog

started a new blog, showing off my techie knowledge http://super-techie.blogspot.com

Blogged with Flock

cookbook

have a look at http://pleac.sourceforge.net/, thinking/working hard to contribute (Java & C++)  

Blogged with Flock

Lock "Stock"

after getting bugged by the internet speed, response time of nseindia.com & bseindia.com, java in firefox and the pain in maintaining a portfolio, i decided to build my own portfolio manager, here are the specs
1. Database: Postgresql
2. Programming Languages: Python(to populate database in 15minutes interval, using ystockquote module), JSP
3. TOMCAT (Obviously)

currently i have finished the database part, i think it's working fine. i am now in the process of building the front end, so i am going to use eclipse-europa-jee for that, wish me luck.
i'll keep posting about my progress and the details

Blogged with Flock