## Tuesday, November 29, 2005

"Akhir, Hyderabad ki zindagi kya he" .Whats all about hyderabadis ,and thier way of living.This mail explores certain ascpects of hyderabadi life style.I wish to seek some reviews basing on which I will post more.
It some time looks stranger than fiction when a Hyderabadi while driving on the road feels that he is the 'king of the road' and the traffic rules are meant (only )to be broken, so don't ever cross the path of a Hyderabadi when he is on the move. In case if you cross his path, he invariably tries to get into an argument as if 'raking up a fight is in the blood' of Hyderabadi.Even if he is wrong, as the proverb goes "barking dogs seldom bites "(Shara** style), he tries to get you by neck but the crowd around him stops him by holding his hands while he vainly tries to get his hand over you (a Hyderabadi seldom gets into fitscuffs )so don't worry you won't be beaten but you have to bear the choicest abuses in the Hyderabadi slang. The Potti Patana "Hyderabadi Ishtyle"
So far so good, the other aspect of a hyderabadi life style or rather estyle is "potti patana". It is the favorite pastime for some while for others it is a fulltime job. A Hyderabadi would try all the tricks in the book and outside the book to get hold of the woman of his dreams. With the girls of the generation next it is "potta patana hai". If people in rest of India were carried over by the movie "Hyderabad Blues" that it is taboo for guys and girls to be seen in public together,then they are going to have a culture shock if they come to Hyderabad.So don't believe those confused desh returned non-real Indian (NRIs).If you don't believe me have a dhekko on the Necklace Road -the scene would put to shame even the overly romantic French. Bindaas Batein
The bindaas attitude of Hyderabadis is personified in the numerous cafes of the city where in you get to see a whole lot of bindaas Hyderabadis sipping tea for hours together. One might wonder as to how these people have all the time in the world to indulge in such long sessions. There is so much of time available with folks over here that at times you have to literally ask them to go for want of peace.
Warning:
Beware of some nerds living around garden cafe ,Sec-Bad YMCA(Yocs and KC janta).They are extreamly intellectual and are always angry that swedish society has not awarded them nobel prizes for thier ideologies and symbolisms,trivias,Information oveload's.Make sure you drive around clock tower to avoid YMCA road , if your are a mere mortal .
"Abhi" never mean NOW...and Parson never mean day before yesterday.
eg "Parson ich apun world cup jeetenaa" Nakko is a famous word used forever! Lite lena mama! is ubiquitous
Irani cafe and Irani chai A typical scene in an Irani cafe The Steward shouts "Ye chotu ..Ek Chai La Rey" and gets it himself(!) to serve to his customers. We are talking of Irani Hotels where some people build their lives around it. They sit for hours and hours and chat with friends, families and even strangers. Irani hotels are an excellent franchise( but of course no royalty, no ownership and no rules). They can only run one way and that is successful way. Every one likes the "Chota Samosa" made out of Onions that are special to any Irani Hotel. Fine Biscuit, and the world famous Osmania biscuits were born from this concept called Irani Hotel.Some famous Iranis Cafes Blue sea, Garden,Niagra, Paradise,Madina,Sarvi.Always try to avoid cafes on lower tank bund road named as "Tea city " and "Tea Den ",For reasons follow above mentioned warning. Gold Flake Rs 3/(rate keeps fluctuating ,includes tip for the "Khadir")- and Irani Chai along with samosa and osmania biscuit make the day for many.
[Thanks to my friend sagar for sending this :))]

### Script2Executable project....

Today....I'have been thinking about this very exiting project..."SCRIPT2EXECUTABLE". I have googled on the net and found that some specific projects were existing for perl, phyton, etc.... But in this unix would we have several interpreters like expect (which I'have been using lately), lisp, csh (shell interpreters)....
So now my ideal is to create a program which takes the interpreter name and the file (script) and create a compiled executable file, which can run standalone. There are several advantages of this program one thing is that this hepls the developers to hide the code of the scripts, what are the other advantages??....
STEP1:
o I'll create a dummy executable file compiled, with a placeholder for the script as follows
#include
static char buffer_space_for_script[MAX_SCRIPT_FILE_SIZE]="#Cheating perl hahaha...";
/*Driver program to launch the script, similar to piping except the program reads from static buffer and writes into the pipe.*/
int main(){
int fd[2], pid;
/*create a pipe all finer details avoided*/
pipe(fd);
dup2(1,fd[1]);
pid = fork()
........
if(pid==0){
dup2(0,fd[0]);
exec(perl/other interpreter);
.....
}
else{
write(1,buffer_space_for_script,MAX_SCRIPT_SIZE); /*write into stdout will be read by interpreter in the child*/
}

Now I wanted to compile this program and use 'hexdump -c a.out" find the seek location(byte in the physical file of the buffer_space_for_script and write the contents of the script file into the file a.out)....
I almost coded it but suddently realized that the major objective of this has been breached since hexdump -c will read out the ascii, thus a intelligent user can read the script using hexdump, even though we have created a compiled executable from the script.....
:(

## Monday, November 07, 2005

### Algorithm to build DFA's to test divisibility

I found this following algorithm very useful in designing DFA's (especially making DFA's to test the multipules, divisibility etc.....). This logic can help slove may DFA problems lets start with an example and generalize this after that..
Problem: Create a DFA to test the divisibility of a binary string by 3. (Assume the string can be scanned from left to right....ex 11 , 110 )
During the scan of the binary string the current state (Value of the binary string scanned till now) can be in one of the following states
1. 3K 2. 3K+1 3. 3K+2
So if the current state of the DFA is 3K+1 and we scan a '0' the value becomes 2*(3K+1) == 3k+2. If we scan a '1' it becomes 2*(3K+1)+1 == 3K. Similarly if we scan '0' in state '3k+2' it becomes 2*(3k+2) == 6k+4 == 3k+1. So now we have 3 states and move according to the following table.
CURRENT STATE SCAN_LITERAL NEXT_STATE
3k (final state) 1 3k+1
3k (final state) 0 3k
3k+1 1 3k
3k+1 0 3k+2
3k+2 1 3k+2
3k+2 0 3k+1
We can now extened this for the divisibility test for any 'k' that requires a D.F.A of kstates (can we minimize?). With this we can solve problems like the following.
Problem: Design a DFA for the set of string in {0,1,2}* that are ternary(base 3) representations, leading zeros permitted, of numbers that are not multiples of four.
Thought that this would be a useful piece of information.......Cheers Vamsi.

## Sunday, September 18, 2005

### Small observation in our life

A small truth to make our Life 100% successful.......... If A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Is equal to 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Then H+A+R+D+W+O+R+K = 8+1+18+4+23+15+18+11 = 98% K+N+O+W+L+E+D+G+E = 11+14+15+23+12+5+4+7+5 = 96% L+O+V+E=12+15+22+5=54% L+U+C+K = 12+21+3+11 = 47% (None of them makes 100%) ............................... Then what makes 100% Is it Money? ..... No!!!!! Leadership? ...... NO!!!! Every problem has a solution, only if we perhaps change our "ATTITUDE". It is OUR ATTITUDE towards Life and Work that makes OUR Life 100% Successful.. A+T+T+I+T+U+D+E = 1+20+20+9+20+21+4+5 = 100

## Sunday, September 11, 2005

### klists an ideal way for building asynchronous applications.......

Hi doood's, Long time blogging.....its high time now "I'am back to hack". Was following a lot of lkml threads these days to garner some intriguing suff. Just found 'KLISTS', these datastructures are highly consistent across the asynchronous processing within the kernel (basically from interrupts from the devices as well as software interrupts).
Ok let me put this in much lucid terms... 1. I have some data to be shared across process's (not threads). 2. This shared data is accessed asynchronously. We get this type of context typically in telecom applications ( I recall from my experience from moto****). They have a unix based system, with several process's running each communicating with each other.
Ok talked a lot about the problem so whats a unix way of solving it. BTW way the data should be consistent and pocess the ACID (Atomic .....dont remember :-p) behaviour i.e a typical transcational behavior, basically the solution should'nt be error prone to race conditions occuring due to asynchronous behaviour within the process's. So how do you architect this kind of applications?
Ok let me give you some really shoddy professional solution which MOTOSHIT has sold to _NEXTEL_ (being soooo dump bought it from moto***a). 1. Moto***a had a real dumb soultion, to make sure that the data is consistent across the process's they seem to use a DATABASE :)).... 2. I have seen code which tries to access a shared variable as a row in the database table. 3. They just dumbly put every shared suff in the database...to make sure that the data is having ACID properties during the modification of the data by these asynchronous process's. 4. And more ludicrously they buy a database from a shoddy database vendor informix....and just heard that they are lobbying for support form IBM for this outdated product. really amazed by the quality (the romantic quality form zen and art of motorcycle maintenance :-p) of the approach to this problem. After knowing about klists I just felt that kernel which also has asychronous stuff inside does it in a much smarter way using KLIST. (KLIST is worth a reading please use the link above).

## Monday, August 22, 2005

### Solving serious problems....

I was just reading about an article about 10 best innovators in computer science. Infoworld magazine names 6 people from solaris 10 development team as best innovators. You should emphatically read the blogs of each of these sun engineers....So coming towards problems its a really hard problem to find serious and effective problems especially in computer science. Most of the research work is essentially a cliche. Frankly speaking I always do something to get a research publication, may be I feel gingerly that I dont have enough research publications compared to my friends.
Surely this kind of attitude will not help serious problems. But I have that innate feeling that I'am not doing any challenging and substantial stuff at work, so during the last few months I adopted an attitude shift in my thought "rather than complaining about the dark try to light a candle", I took all the pain to refactor every thing except the inane attitude of the superiors around, but they seem to have an attitude similar to some examples in my last post.
I quickly realised that they were just using me to their own glorification. Surely my managers are not my ideals but try to force that thought on people that they are great role models, I just keep mum. I really feel that they could really drive innovation and conceive innovative things, rather than drinking that materialistic vine.
Maan I just feel that I should do something different.

## Friday, August 19, 2005

### The power of intention.

Just finished studying the book "The power of intention", really felt very inspired after reading this. Some of the authors statements had striking effect on me, statements like "Don't die with the music still left in you!!". Seemed to me a very good way to do my self talk. Other highlights in the book which was equally striking was the authors description about the ego. The author gives the following example of how people are really blinded by this ego.
1. A tiny and thin beam of sunlight suddenly thought that is was the sun...
2. A mild ripple in the middle of the ocean suddenly beleives that its the ocean...
Yes its really true on how ego can really doom a person. If you are reading this just dont be egoistic ever in your life, just relax and think about it again.

## Thursday, July 28, 2005

### Why this vacuous discernment between senior and junior?

I still remember Dr.PJN telling during my college days...."To test a person's real character, give him immense power". Its long time I'have been blogging just wanted to write about some topcoder dynamic programming problems in this post (I had drafted it may be I'll post in my next post).
All my mood is off when I see this guy walking ostentatiously all around, with a sneer unfurling those perverse insinuations, to motrify me. I guess his vanity has reached a zenith. All this is because of the discrimination the management shows between experienced and people with little experience. They just seems to despise our ideas with a prejudice that only experienced people only can make successful things and get things working, the management seems tout excessively that they will give weight to everyones views.
Its just because they think they are really privileged , they demand obligation....I really feel these are not the ideal people, no one is a junk. I'am not writing this out of jealously that they are getting paid more and are accessible to more stuff, these are words right out of a morbid mind twarthed by such inane seniors guys working along....I just learned one thing out of it although its a hard way to learn, I will never show that attitude when I become experienced. In fact I will never become a manager, its really a job with massive sagacity not to create any internal humilation among the people working under the manager.....I strongly feel that there should'nt be any discrimination among people interms of experience.

## Thursday, June 30, 2005

### Verminous ego stench .........

I don't know why we(including me......) inanely always do things anticipating something, yes every one anticipates for good things to happen for their course of action. But in some cases this anticipation is different , sometimes you try to flaunt in doing things as if some one watching and you actions are mended in such a way to impress people around you. Every time you write a mail , talk to people or do some thing you want to impress people around you. But I feel that you should do things naturally but not to impress any one....the root cause of all this is ego of people . I too was a victim of it but I think I have realised some thing about it and these day I listen to people and value what they say............its ok if you are a wise man and can take great decisions but you should'nt make others feel low or jeer at people at sloppiness, but every one can slowly get things accomplished and I feel that touting may not always converge to a right solution.............and sooner or the later every one will realise this.
BTW the book I'am studying this week is "If tomorrow comes" , really a good one by sheldon makes us feel how a sapped, anguish and vindictive mind with a sedative torso feels. It was a story of a dejected lover tracy withney who tries to endure with a slender hope to seek vengeance.
TGIT (Thank God Its Thursday)
V@msi

## Sunday, June 26, 2005

### Fervent gaming hermit....

Hmm.....finally I have moved into this reclusive world of FPS games, had spent around 90% of this weekend time quaking.....just fragged sarge 20 - 7 in a nightmare, in a map with no railguns only rocket launchers, plasma guns and shot guns (machine guns ofcourse :)) . I like this rocket launcher (although I was succumb to the rockets launched without a lot of span between walls and myself)...I almost fragged very accurately with this rocket launcher. My dodging skills are improving with every game, I felt the best way to dodge is to hold all the three keys 'w' ,'a' and 'd' which will make you move forward and press 'space' during aim and leave the keys 'a' and 'w' while shooting, this seems to be a very useful tactic of dodging, surely you can frag a human with this dodging, there are some really good players here like 'KeYmaker' and 'Devil' they fragged me couple of times. Its really great fun when you have a bunch of bacchanalian quake freaks at work places, good that I also I have 'Geforce Go' on a LCD which makes gaming more exotic.

## Tuesday, June 21, 2005

### Don't be afraid of making mistakes.......

Yep....I was depressed last week. But I'am starting a new life now, honestly I'am concentraring on my guitar in all my solitude they(guitar skills) seem to be improving, I feel good finally I learned to play "happy birthday......" for that special occassion next month. All this inspiration came from watching "Million dollar baby" again.......Mr.Scrape's words to danger seem to show me some light...."Any one can loose one fight....." , "Sometimes to deliver a good punch is to step back...." . And also thanks to call from karun, karun called me from canada and reminded me about st.laurel street in montreal, and about the good times we had, I really felt excited to receive his call (he will be in india soon). Sometimes this kind of suprise calls make you feel happy, and you feel something new....one more thing is I started playing cricket, people are really happy about my batting....seem's like I have'nt ever thought about my cricketing skills after a long break from club cricket during highschool...during those days I used to spend many hours to get my timing right, but was not quite getting it....but today after a long break and zero practice I'am batting like I'am in a great touch......some times when you try to work too hard on anything you don't seem to get it right (probably I'am too afraid of making mistakes during those old cricket days to get selected into the team), but when you have removed that thing of being afraid of making mistakes (because right now I dont care wether I'am in the corporate team or not) you seem to do things naturally and you get it right.......may be its a pathological example on how one should remove fear of screwing up something......... \/ /-\ /\/\ _\"" |

## Tuesday, June 07, 2005

### Transmeta lessons.......

Really feel sorry about this high technology microprocessor designer. But I really appreciate their nerve to compute against titans like INTEL and AMD. I feel that monopoly is bad and it reduces innovation and checks conceiving new products. Transmeta's low-power combat against is definitely a dud, I feel that transmeta should have invested more in research to overcome the 'underpower citics' rather then demonstrating a mere obeisance, may be transmeta management failed to notice the infliction points the company has being going through, intel on the other hand have been leveraing on grove's pedagogy(Only the Paranoids survive) of identifying these infliction points and thus bashed transmeta. Intel was the first one today to get a dual-core chip out, amd followed later, but I don't why transmeta never thought about dual-cores. This indicates Intel's astute ability to pick up infliction points, but transmeta I feel should conceive something really creative to get back and start running.

I feel it as a small practical reminder about how one should always keep track of the infliction points, at any instance there are millions and millions of people competing with you and a slight negligence might create a infliction point with negative slope............ Think big to conceive a marvel.

## Monday, May 23, 2005

### Podcasting with itunes...

Ohh...that sounds 'leet right. Yes indeed it is. Thankgod no need of any external podcatchers, since every thing would be integrated in itunes itself. You just need to sync up your ipod by just connecting and you get all your favourite radio shows.
BTW the following are radiostations I'have been listening all my downtime
http://feeds.feedburner.com/ITConversations-EverythingMP3

## Monday, May 09, 2005

### Love you momma!!

Hmmm......have been thinking about too many things these days, finally I got some time to write about momma.

I just shut my mind up for few minutes and start thinking about momma feeling a little nostalgic. Momma made me realise that "success is going from failure to failure with out loss of enthusiasm", without her motivation, I would'nt have accomplished any thing till now. In fact every day is a mothers day for me.......I love you momma!!!

Wishing all of you a happy mothers day

## Friday, April 29, 2005

### Solace for the weekend.....

Feel's like I had found an oasis in scorching heat.....just heard from JMMA (Journal for Mathematical Modelling and Algorithms) www.kluweronline.com/issn/1570-1166 . That they have accepted a work which I had done at the school related to polygon enclosure algorithms titled "Optimal algorithms for some polygon enclosure problems for VLSI Physical Design". No Idea in which month they will publish it but just finished off a final LaTeX version of it. I remember I submitted this around Nov-2003 and they had screened it now really loooong time right? (Ref No:100335). I almost forgot about this submission was having no hopes on this but suddently it comes back at right time helping my confidence. Really speaking after school I did'nt do much research. But I always use to tell my friends that I'am still working on that "external memory algorithms project" but could really never finish it off. May I got really complacent these days....but "Its never tooo late to get it back!!!"

## Tuesday, April 26, 2005

### Corporate victimization of enthusiasm.......

I guess you should have been hearing things like "Employee centered company" , "Employee * company". This is just to exploit the energy of the young kids in the company get the work done at a very cheap price. Ultimately bussiness is just making money yes thats true. But the way the current corporate culture is evolving these days in india especially of the outsource buzz word is really pathetic. The managers who take the initiative of settting up shops in india for corporates tend to be extremely selfish...selfish and selfish, this is not silicon valley attitude of "Win...Win" in the managers. Yes I'am currently a victim of this and I really had a feel of this selfishness, I dont know any where else but atleast in indian corporates (MNC's) this is what every one crib about...I felt really demotivated about these vices in the corporate culture of india. I feel that there is no use of doing things proactively taking up responsibilty and showing an effective commitment towards in getting things done ultimately. I have learnt a lesson that you should just do what ever is enough and nothing more. Live your life do what you think is good and what you think is right. Dont become an work addict at the corporate there are better places where you can prove your self and prove not just to the corporate to the complete world, write opensource software make opensource software run efficiently fix bugs in them do research and what not you can do any thing what ever you like.... So the bottom line is "Never count on anyone except your self!"

## Tuesday, April 19, 2005

### IPOD Mini on the go......

Recently bought an IPOD mini for just
\$199 . I felt this to be really great no hassles of batteries, no hassles of space (4GB). I really feel like throwing my samsung YEPP-90S (64 MB) mp3 player.

The great thing about IPOD's is their integration with audible ( click here). I could really play all my audiobooks in audible format without converting them into mp3's. Yes now I turned out into an audible freak listening tons of audio books in my down time.....guys wondering why I have photo of mine rather than an IPOD mini here??......keep guessing

## Monday, March 14, 2005

### Turned into a RSS Freak

I found this to be really intresting it saves my time by not visiting the websities for news and other tech stuff and most wonderful part of it is the integration with Firefox, yes I'am talking about teh Live Bookmarks a great feature in firefox which integrates a RSS Feed reader in firefox....Suddenly I realized that I wanted RSS feed for every thing I even wrote to timesofindia to provide a rss feed on their site..yes I have become an RSS freak now my firefox toolbar is filled with 18 RSS Feeds right from BBC News, Devx Tech updates, CNET News.com, Wired ..........to ESR's blog.
:-p Vamsi

## Tuesday, February 22, 2005

### There is no AI only RI (Real Intelligence)

On Intelligence
I have been studying "On Intelligence" these days I could'nt stop myself reading. I really liked the way Jeff tried to put this new Memory prediction framework. Wondering if this guy has any thing to do with stefen hawking? NOWAY.

Jeff Hawkins, the man who created the PalmPilot, Treo smart phone, and other handheld devices, has reshaped our relationship to computers. Now he stands ready to revolutionize both neuroscience and computing in one stroke, with a new understanding of intelligence itself.
Hawkins develops a powerful theory of how the human brain works, explaining why computers are not intelligent and how, based on this new theory, we can finally build intelligent machines.

The brain is not a computer, but a memory system that stores experiences in a way that reflects the true structure of the world, remembering sequences of events and their nested relationships and making predictions based on those memories. It is this memory-prediction system that forms the basis of intelligence, perception, creativity, and even consciousness.

## Monday, February 21, 2005

### The Aviator........

Hughes
"I am by nature a perfectionist, and I seem to have trouble allowing anything to go through in a half-perfect condition. So if I made any mistake it was in working too hard and in doing too much of it with my own hands."
-- Howard Hughes describing his way of working and the mistakes made in building the "Spruce Goose."

## Monday, January 31, 2005

### How to avoid BROKEN PIPE errors in code (SIGPIPE)

Recently I had to struggle a lot to fix a issue generating BROKEN PIPE on a AMD64 platform, this code works on EMT64 and other 32-bit platforms but fails on AMD64. The bottom line is be really careful when you do use a fflush.
void *stream = (FILE *)......;
............
............
//To make sure the data is written to disk (HA)
if(!fflush((FILE *)stream)){
printf("Flush failed due to %d error refer error.h\n",errno);
}
//This is really very dangerous code if you dont have a signal handler
//written for SIGPIPE (either you write a sig handler for SIGPIPE) or
//use the following code//

/*Safe Code*/
if(!fsync(fileno((FILE *)stream)))){
printf("Sync failed due to %d error refer error.h\n",errno);
}

I found the standards guide on context of libc functions really useful
http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_05.html
Hope you will not go through the same pain....
Vamsi

## Monday, January 17, 2005

### Symbol referencing errors for static variable in C++

Are you stuck with static symbol referencing errors in ur code??
What could be wrong in the following definition of a c++ class to find out how many instances of MyClass are created??
class MyClass{
private:
static int __instance_count;
public:
MyClass(){
__instance_count++;
}
int getInstances(){
return __instance_count;
}
};
main(){
....
}

When complied with g++ says that __instance_count is not defined...this can be resolved by defining __instance_count outside the class definition,as follows.
int MyClass::__instance_count;
Why do we need this seperate definiton of static variables?

01-01-05_1857