Tuesday, July 31, 2007

Need a Freshener

I am in really bad mood. My MySQL nahi chal raha hai. I am not able to find any fix for that. I need something really very interesting and refreshing thing from which I can draw some motivation. Now I am moving out to meet friends, hoping that they will fix me, if not MySQL.


@Koteswara sarma

MySQL - Few Observations

I have observed few things about MySQL, what it supports and how it supports.

MySQL supports different storage engines. Storage Engines not only describe how Indexing is done but also features supported. Primary Key is supported by MyISAM and InnoDB(These are widely used Stored Engines). But Foriegn Key Constraints are supported by InnoDB only.

MySQL works in different sql modes namely, STRICT_ALL_TABLES, ANSI, STRICT_TRANS_TABLES, TRADITIONAL, ALLOW_INVALID_DATES etc. SQL Mode tells, what kind of MySQL Syntax it supports and level of data validation checks it puts on Input Data. By Default, sql_mode is empty. sql_mode can be seen by
mysql > select @@session.sql_mode;

Importance of sql_mode:
My table definition is person(id int unsigned, name char(10), primary key(id));

Behaviour of this table under default sql_mode(which is empty).
mysql > Insert into person values(-1,'sarma');
Query OK, 1 row affected, 1 warning (0.07 sec)

Warning (Code 1264): Out of range value adjusted for column 'id' at row 1
Value is adjusted so that it will fit into id, if you see value of id, u find it to be Zero.

So, for first time, MySQL does not issue Error, but when you attempt to do it second time, inserting another -Ve value, it also adjusted to Zero again, causing Primary Key violation, so issues Error 1062(Duplicate Entry).

changing sql_mode to STRICT_ALL_TABLES will solve this problem.

mysql > SET SESSION sql_mode='STRICT_ALL_TABLES';
will change for this Session for this client.
If you want to change for all clients and for all sessions(globally), then better to change in /etc/my.cnf file.

It solves many problems, as MySQL issues warning when there is a mismatch between expected and actual values for a column. For Example, column Dt expects value to be in 'yyyy-mm-dd' and actual value is 'dd-mm-yyyy', it simply rejects rather than making it '0000-00-00'.


@Koteswara sarma

MySQL Error 2013

Of all MySQL errors I got, Error Number 2013 is most frustrating and annoying. MySQL Errors like 1062(Duplicate Entry), 2002(Server is not started), 2006(Server has gone away) are easy to identify and solve. 2013 says that you lost connection to server in the middle of query execution.

2013 is frustrating because, you can't produce it again for same sequence of actions. So you never know when it will come or when it won't.

Finally, I have come up with few points to look for when MySQL Error 2013 occurs.

1. check for MySQL Status
shell> mysql -u root -p -e "\s" | grep Uptime

It will give uptime of MySQL Server. If it is less than 1 min, then server must have gone down and started again. So, you have look for Status Variable wait_timeout. By default, wait-timeout will be 28800 sec (8 Hours). Developer can change it while starting a server(change has to be done in my.cnf file) or by setting parameter "CLIENT_INTERACTIVE" in "mysql_real_connect()". If Uptime is not less than a min, then there is a problem with Query.

Query can be too long or it is syntactically correct but not semantically.

Example: I am running a stored procedure spLogin(uname, pword, status). Here uname and pword are input parameters and status output parameter. To supply input to this stored procedure, I use user defined variables.

So, order of queries will be
mysql > SET @user = 'sarma', @passwd = 'sarma';
mysql > call spLogin(@username, @password, @status);
There is a chance that it will give an error 2013, as query is syntactically correct, but values passed to query are garbage.

Remedy will be
mysql> call spLogin(@user, @passwd, @status);
query Success(if stored procedure is correct).

But as I said earlier, it is tough to reproduce Error 2013. Care should be taken in passing inputs to either Queries or Stored Procedures and wait_timeout should be atleast 4 Hrs.


@Koteswara sarma


Monday, July 30, 2007

Week-end 27.07.2007

Week-end(Friday, 27.07.2007) started with Heavy rain. So I was in IIT with my friends. I was awake all the night either chatting with my frens on "Operation ThotaRamudu" or working for it or watching movie or listening Songs.

I slept on Satday Morning from 6 am to 11 pm, then had some work in Bank, did that, then I came to Office. (2 nd and 4 th sat days are working days for me). My Project Manager was so angry on me.. not for coming late to Office, but for not sleeping in the nite. She told me that it was not good for health and all.

I was in the office till 7 pm, then I went to meet one of my friends, Anil to get some info on "Operation ThotaRamudu". He said few things. It was all OK chatting with him and his roommates. Then I called up Mahesh(Saketa), he was in PVR, Mulund, to watch "Shankar Dada Zindabad". Then He took ticket for me also, I went there and watched "Shankar Dada Zindabad". It was super, awesome. Megastar's performance was too gud.

Sunday Morning, I had hair-cut. It has little significance, because I had it first time in last 10 months.

Then I went to Charni Road, to work for a program called "Feed the Hungry Children", run by Yuva Unstoppable, Ahmedabad. We(Team of about 15 people) spend some good two hours with Children, teaching them, explaining on good habits and Behaviour, and finally providing Food.

I reached my Flat by 4:30 PM. I worked for "Operation ThotaRamudu" for some time, then I went to sleep. I woke up at 12:00 PM and again spent some time on "Operation ThotaRamudu".

Monday, Morning 8:30 AM, I was in the office... started working on User Management.


@Koteswara sarma

Review - Shankar Dada Zindabad

This review is from one of the fellows who says MegaStar Zindabad and whistles whenever Megastart appears on scene, claps for every dialog. I usually admire people who sell themselves for Best Price. Megastar is just one of them.

I watched Lageraho Munnabhai and this movie is remake of "Lageraho...". The only difference is Lageraho is class classic and Shankar Dada is Mass masala.

Movie was Super, especially Megastar's Performance. He did his best. His mass appeal, Dialog Delivery and Style was too gud to watch. Srikanth has done very well to that role. I guess, Prabhudeva or whoever concerned did not work much for Heroin's role. May be they thought, its Megastar's movie, so why to waste money on a Heroin who performs well. Karisha kotak... no facials, no body language, no dance performance, just a doll beside Megastar. Sada is also Good. Shiyaji Shinde impressed me alot, i did not expect that he would suit into that role so well.

Coming to Story, Shankar dada is a Social worker(goon), who helps Raj Lingam to acquire lands and buildings illegally. ATM is right hand to Shankar Dada. Shankar Dada falls in love with voice of Jahnavi, a Radio Jockey. Shankar Dada gets a chance to meet Jahnavi, and he falls in love with her beauty also. He himself introduces a History Professor to Jahnavi, which creates all problems. How he handles all them and why follows Gandhigiri to Dadagiri is you should watch in Movie.

Dialogs were not that Good, but the way, Megastar delivers them was awesome.

Few dialogs which i remember are "nenu ippudu peace follow avutunna, ledante ninnu eppudo piece piece chese vanni", "For Dog's Bite, Slipper's Slap", "Open Banana, give for eating", "No emitting, No vomiting".

Songs were good because of Music, not because of Lyrics. "Bhoogolamanta..." song which is sung by Adnan sami was best of all.

Gandhigiri Zindabad


@Koteswara sarma

Saturday, July 28, 2007

Indian Cricket League

Indian Cricket League is a cool idea to make our first class cricket format strong. When there is a competition we get better results, because we compare the Both. If there is only entity BCCI, which is not accountable to any one, and whoever is in its President's seat will be owner of BCCI, then there is not much to talk about.

Kapil Dev said that we were managed to produce great players but not great teams. I wish ICL works towards making Great Teams. ICL initially have 6 teams - players from India and a few Foreign players also. It will be a good chance for Bright Youngsters in India also, they learn a lot while playing with Greats like Lara, Warne etc.

This will help Indian Cricket in Long run, may be after Dravid, Sachin - we look for alternatives from ICL.

It would be nice if ICL shapes up soon and starts functioning.


@Koteswara sarma

Friday, July 27, 2007

Missing Home...

Its been long time that I left for home. I feel very sad but I am not in a position to leave for home now. There are hell lot of constraints... one I can publish is MONEY. I usually have many works at hand, so that I do not get time to think about anything but work. But still, I miss my parents.

I feel - I am tired, I am upset, I am sad and I am bad.

Last but not least, thanks to all my friends, who help me always to keep focussed on work and at least for some time, I feel Happy.

Thursday, July 26, 2007

My Theory

One:

The more BUSY You are, The more FREE time you will have.

The more FREE time you have, The more work you can Do, and in a way you become more BUSY.

Moral of the Story : Have more FREE time to become more BUSY, so you will have more FREE time.

Two:

To forget the things, we have to Remember them.

So Remember things, to Forget them.


@Koteswara sarma

Why to choose a start-up

Many of my friends ask me why Did you choose a start-up when you have offers from some other MNCs.
I question them what is the advantage of working in a MNC which is not in a start-up. They told me that when you are swicthing from one job to other job, there will be less risk and you need not to advertize about your company, you carry a brand name, if you work in a MNC. My reasoning to them is, Why should I think of swicthing my job before joining in that? If I am not satisfied with the work I am doing or If I am not fit into the team , then only I think of swicthing job. So doing work is my priority, which I certainly get in a start-up. I am not sure whether I'll be assigned work from Day 1, if I join in a MNC. I am not against working in MNCs, they have their own headaches. Its true that Resource Management is the toughest thing. The reason, I opted for start-up is if I work for some time, then I can get job in MNC at any time. But if I join in a MNC and happened to be on bench (or member of Freepool), then it would be tough. Working in a start-up gives you the next best chance to see how a company shapes up.(Best chance to see is to start a company). Working in a start-up has other advantage, you can watch the building process of a company very closely,you know ups and downs in making it Big. More importantly, every one's voice is heard in a start-up, so u can raise your voice, you can take part in design discussions, brain storming sessions. This is all happens in MNCs also, but you need to gain some experience, before raising your voice.

This is all experiences I heard from my friends, I never worked in a MNC.

Note : The views expressed here are mine and not my employer's.


@koteswara sarma

Wednesday, July 25, 2007

Filing IT Returns

Today, I filed IT Returns through e-filing. It is simple and Happy Hassle-free process. Thanx to IT Dept of India for providing such a facility and Prashant(my colleague) for letting me know this opportunity. I have a good impression on IT Dept of India, from long time (may be from the time, I applied my PAN Card), now I have very good impression.

To file e-returns, download form from http://incometaxindiaefiling.gov.in/portal/html/individual_huf.jsp fill it properly, check it out. Then Generate Bar code, take print out and export it to XML Format. Create an account in http://www.incometaxindiaefiling.gov.in and uplaod XML File by loggin with your username. You get ITR-V (Income Tax Returns Verification) form as acknowledgment. Take print out(2 copies) and submit in your nearest Aayakar Bhavan.

Submitting ITR-V form in Mumbai is done in seconds. and many people know about this fecility in IT Office here.

Humor

A TWO-LINE RHYME WITH THE MOST ROMANTIC FIRST LINE, BUT THE LEAST ROMANTIC SECOND LINE:

My darling, my lover, my beautiful wife:
Marrying you screwed up my life.

I see your face when I am dreaming.
That's why I always wake up screaming.

Kind, intelligent, loving and hot;
This describes everything you are not.

Love may be beautiful, love may be bliss,
But I only slept with you 'cause I was pissed.

I thought that I could love no other --
that is until I met your brother.

Roses are red, violets are blue, sugar is sweet, and so are you.
But the roses are wilting, the violets are dead, the sugar bowl's empty
and so is your head.

I want to feel your sweet embrace;
But don't take that paper bag off your face.

I love your smile, your face, and your eyes --
Damn, I'm good at telling lies!

My love, you take my breath away.
What have you stepped in to smell this way?

My feelings for you no words can tell,
Except for maybe "Go to hell."

What inspired this amorous rhyme?
Two parts vodka, one part lime


Source : From one of Forwarded emails....

Trivikram's Style

Chelli : Akka, nuvvu Bread Jam tho tintava? Butter tho tintava???

Akka : nenu Aakali tho tintanu.



Source : Amar Sujit, one of the beloved juniors in IIITM, Gwalior

Typical Libran's blog

Here are some of my(Libran's) traits...

Nice to everyone they meet. Their Love is one of a kind. Silly, fun and sweet. Have own unique appeal. Most caring person you will ever meet! However, not the kind of person you want to mess with... you might end up crying...

Above all, libran's are the most romantic persons on Earth...