Monday, December 29, 2008

zimbabao@Twitter

Follow me @ Twitter

Wednesday, November 12, 2008

Stopping and starting a process on Unix/Linux

#Stop the process with process it (equivalent of ctrl-z)
kill -s SIGSTOP processid

#Start the process again
kill -s SIGCONT processid

#get the list of back ground jobs
jobs

#get a process on frontend
fg // job id will be listed in output of job

fg is equivalent to fg %1

#bg
bg is equivalent to bg %1

Wednesday, October 01, 2008

Sar utility on Linux/Unix

At Yahoo! I was using something called Ysar to get the historical system resource performances.

For others the same utility is called sar.
For more about this utility check this link

Installing it using Yum

root#yum install sysstat

than initialize the sar by running

root#/usr/sbin/sa

Wait for sometime(20 mins) and check that you have done things correctly.
root#sar -A

you will see the output like


08:40:01 AM proc/s
08:50:01 AM 0.17
Average: 0.17

08:40:01 AM cswch/s
08:50:01 AM 3364.52
Average: 3364.52

08:40:01 AM CPU %user %nice %system %iowait %steal %idle
08:50:01 AM all 4.66 0.00 1.55 12.26 0.00 81.53
08:50:01 AM 0 0.22 0.00 0.22 0.21 0.00 99.35
08:50:01 AM 1 0.10 0.00 0.07 0.22 0.00 99.61
08:50:01 AM 2 3.86 0.00 1.23 37.90 0.00 57.01
08:50:01 AM 3 14.44 0.00 4.69 10.71 0.00 70.16
Average: all 4.66 0.00 1.55 12.26 0.00 81.53
Average: 0 0.22 0.00 0.22 0.21 0.00 99.35
Average: 1 0.10 0.00 0.07 0.22 0.00 99.61
Average: 2 3.86 0.00 1.23 37.90 0.00 57.01
Average: 3 14.44 0.00 4.69 10.71 0.00 70.16

08:40:01 AM INTR intr/s
08:50:01 AM sum 3869.91
Average: sum 3869.91

08:40:01 AM CPU i000/s i001/s i008/s i009/s i012/s i050/s i066/s i074/s i217/s i225/s i233/s
08:50:01 AM 0 1000.27 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
08:50:01 AM 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 112.25 0.00 0.00 0.00
08:50:01 AM 2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 92.54
08:50:01 AM 3 0.00 0.00 0.00 0.00 0.00 0.00 2664.85 0.00 0.00 0.00 0.00
Average: 0 1000.27 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Average: 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 112.25 0.00 0.00 0.00
Average: 2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 92.54
Average: 3 0.00 0.00 0.00 0.00 0.00 0.00 2664.85 0.00 0.00 0.00 0.00
..... and lot more.

Wednesday, June 18, 2008

Developing for web on machine with no IE (Mac, Linux)

Testing is integral part of development.
And you don't have IE on Mac OS X. This was a big trouble for me. I had to ask fellow developers to test my code for IE.

So to solve this problem I Installed free desktop virtualization monitor.
Now I'm running Windows XP as process on my Mac Box. And try and fix IE bugs.

Get VirtualBox here.
http://www.virtualbox.org/wiki/Downloads

VirtualBox works on any x86 hardware and on many host Operating Systems like Windows and several Linux distributions.

Monday, June 16, 2008

Shantanu asked me to do so ...

This is pretty simple, just write your set of answers for the questions here!

1. What is your middle name?
Suresh

2. How big is your bed?
I sleep on floor

3.What are you listening to right now?
hummm of cpu fan of a box in my office

4. What was the last thing you ate?
Roti and curry

5. Last person you hugged?
My friend and classmate from college I met after 5 years ..

6. How is the weather right now?
Sunny

7. Who was the last person you talked to on the phone?
Nitin -- we discussed something just before deployment ..

8. The first thing you notice about the opposite sex?
feet and face ...

9. Favorite type of Food?
Fish, dal roti, pizza, ice cream. I actually eat anything.

10. Have you ever cried over a love lost?
No ..

11. Last Movie you watched?
Forest Gump ..

12. Do you have any piercings?
No

13. Favorite Movie?
Many: Godfather-1,2, Jane bhi do yaaron, Munnabhai MBBS and few more.

14. What were you doing before filling this out?
Reading RGV's blog and Aish comments on it

15. Have you ever loved someone?
Yes


16. Who would you like to see right now?
Mother and father.

17. What color are your bedroom walls?
Cream, I love that color coz you can't make out dust on the walls.

18. Have you ever fired a gun?
Yes. NCC camp.

19. Do you like to travel by plane?
Yeah. I love to see childlike wonder in people asking me to exchange my window seat with them.

20. Right-handed or Left-handed?
Right-handed.

21. If you could go to any place right now where would you go?
Goa, Konkan Coast, Everest .


22. Do you still watch cartoons on Saturday mornings?
Sometimes (my roommates watches them, so I have to)

23. What is the wallpaper on your cellphone?
Road in the wilderness

24. Favorite hangout:
My home, TGIF, Cubbon Park

25. 3 things you can't live without?
Run, computer, book.

26. Favorite songs?
Another brick in the wall, Coming back to life

27. What are you afraid of?
Failure, Tractor I collided with on my cycle.

28. What are your nicknames?
Sagar, Zimba, Zimbeshwar, Carlos, raju, Guruji, Goa.

29. Stuck on a deserted island, and can only bring one thing?
Pizza with extra cheese

30. First thing you'll save in a fire?
My family

31. What is your favorite color?
Blue

32. What are the things you always bring with you?
Home key

33. What did you want to be when you were a kid?
Footballer and egineer (I don't play well so I became a engineer)

34. What do you usually do when the alarm turns on?
Get up ..

35. What do you think about before you go to bed?
Why I have to do this?


I'm Tagging everybody who reads this blog.

Thursday, May 29, 2008

How not to customize the wordpress blog?

Check out Amitabh Bacchan's blog by BigAdda.com.

They have biggest header I've ever seen (947pixel x 964pixel). This occupies whole of viewport (Not a good UE/UI guideline).
User have to scroll down to get to the actual content (for which they are coming for).

Such absurd approaches are ok with front page design in the name of "branding" or something similar .
But surely avoidable on individual post pages.(which bigadda didn't do).

Wednesday, May 21, 2008

Lambi Judai -- Old song from Hero and new one from Jannat

Hero


Jannat

Champions League Final 07/08 at १२:15am (२२ May २००८) and Ji Sung Park


Sea of Red at Red Square Moscow must be biggest Red Gathering after collapse of Soviet. Red Devils playing Deep Blues, a all English fight for European championship.

Live telecast will start at 12:15 am IST (22nd May 2008, early morning).

Chelsea owner Roman Abramovich will be happy to see his team playing in his place of birth.

Some Trivia:
1. This is the only 3rd time in Champions Trophy final both the teams are form same country.
२. Ji Sung Park will be the first Asian to play in Champions League finals.

Wednesday, April 30, 2008

Talk on fundamentals of AJAX usability


'

This talk was given in GWT Conference by Kelly Norton

Condoleezza Rice blames Asians for food shortage

US Secretary of State Condoleezza Rice tried to defend its government over biofules issue. Diversion of food in production of biofuel is causing global food shortage. In 2005 Bush administration embraced biofuels. Subsidized production of corn for ethanol reduced the amount of food grain cultivated. Result prices of food grains went up. They signed pact with Brazil in intention to form the "OPEC" like cartel of "ethanol fuel producers" (source).

Now she comes up with a master stroke blame Indians and Chinese for rise in food prices. According to her
"growing Indian and Chinese appetite is contributing to the global food crisis".(source). I personally feel that this comment is "politically incorrect" and some what heartless. What she is saying may be partially correct (although Montek SIngh Alluwalia is not agreeing with her). It looks like she making these comments to defend polices formed by her Government.

Monday, April 28, 2008

Amazon webservices tools (EC2 and S3)

1. Firefox plugin to visually check the EC2 a/c. You can see the available AMIs, see running instances, shutdown running instances, start the running instances.

check this link for more details
Elasticfox - firefox plugin

I found this tool very useful and saves lots of time.

2. Command line tool S3 tool for creating buckets, pushing data to S3 servers.
s3sync

This tool is very good in writing simple scripts to backup/store/bulk upload scripts etc.

3. S3fox - as name suggests firefox plugin for s3
s3fox

Tuesday, April 22, 2008

Dilbert.com flash widget. Good example for How to screw up the UI.




To read a strip you need 3 clicks per strip. Looks like UI designer forgot fundamental rule of design (clicks are expensive).

Monday, April 14, 2008

Maoist Power in Nepal and India

Yesterday evening when I heard the news of Communist Party of Nepal (Maoist) winning most of the results declared till now, first thought struck to my mind was this may be a moral booster for Maoist in India (Naxalites as they popularly known as).

WIth Maoist in power in Nepal cross border movements from Naxal affected states of India which are near Nepal like Bihar, Jharkhand,West Bengal, Madhya Pradesh and some parts of UP will increase. This will be of some concern to India. Although CPI-Maoist have very small cadre in India they do control parts of Andhra Pradesh and Jharkhand.

This will be an interesting twist in India's relationship with Nepal, we have to look forward how Indian diplomats handle this when most of India politicians busy with next General Elections.

Sunday, April 06, 2008

Its Usability and not being funky

I stumbled upon this talk by Azo Raskin at Google Talks.
A must watch if you are involved with writing computer softwares and expects people to use it.



Also see this Sample Chapter from book Don't make me think

Sunday, March 16, 2008

Economics in one page

I've been following economics blogs and articles for about a year now.
I found it a very interesting subject just because it could keep me interested in it for more than a month.

After a year I found a good article on fundamentals of economics.

http://thinkingonthemargin.blogspot.com/2007/09/economics-in-one-page.html

Monday, January 14, 2008

getAttribute -- problem on IE (Internet Explorer 6/7) -- YUI is affected

getAttribute function on yahoo has problems with form( till now I've found it with form element only).

<html>
<head>
</head>
<body>
<script>
function getAtr(){
alert(document.getElementById("mform"));
alert(document.getElementById("mform").getAttribute("action"));
};
window.onload=getAtr;
</script>
<form action="hello" id="mform">
<input name="action" value="i m not taking action"/>
</form>
</body>
</html>


Save above code in some file and open it with IE/FF/Safari.
Expected output is an alert saying "hello". But IE 6/7 prints object.

The culprit is input tag which is child of form. The name of the input tag is action and this input object is printed in alert.
Solution: Not to use action as input parameter in a form (specially when you will be manipulating the form in JavaScript.

YUI dialog is affected by this bug of IE.