Wednesday, November 30, 2005

MySql Optimization and Good Programming Skills

Why we do optimization: A little time can save thousands in hardware, As you data grows, you’ll see that your application Performance will degrade over time and you’re probably not monitoring it anyway. It is easier than re-coding you applications.
So I am describing the ways to use for optimization of your database (MySql):
1. Benchmarking
2. Profiling
1. Benchmarking: - It make simple performance comparisons, Determine load limits, Test your application’s ability to deal with change. here are following benchmarking tools that are available:
  • Mysql Benchmarking suite
  • Mysql super smack
  • MyBench
  • ApacheBench ( It comes installed on almost any Unix/Linux distribution with the Apache web server installed, to use it you have to run following command like: > ab -n 100 -c 10 http://127.0.0.1/finduser1.php where 100 is the total no of connections and 10 the total concurrent requsts send at a time. )
  • Httperf
Load generators: Contrieved Load Generators (Apache Bench) - For a particular web page, Realistic Load generators (Httperf) - For generating actual traffic.

2. Profiling: This enable you to procure information about - memory consumption, response times, locking, process counts from the engines that execute your SQL scripts and application code. There are a lot of profiling tools are available:
  • The SHOW FULL PROCESSLIST and SHOW STATUS command ( SHOW FULL PROCESSLIST example: mysql> SHOW FULL PROCESSLIST; run this command and then see the result. SHOW STATUS Command Example:
    mysql> SHOW STATUS LIKE 'Qcache%';)
  • The EXPLAIN command (Run Query with using EXPLAIN Command, it will give you the whole process of a query such as which column is used as index and how many rows are coming as a result and type of query.)
  • SLOW QUERY and GENERAL QUERY LOG (This you can use by adding some lines in your mysql conf file (my.cnf): log-slow-queries = /var/log/mysql/mysql-slow.log long_query_time = 1 here /var/log/mysql/mysql-slow.log is the path of your log file by default this will create a file at /var/lib/mysql with a suffix of -slow.log and long_query_time is the time which is the longest time a query can take and its lowest value is 1 and DEFAULT value is 10)
  • MyTop (It summarizes the SHOW FULL PROCESSLIST and various SHOW STATUS statements. Practicallu used it, its a good tool for profiling, but you need to install it from http://www.cpan.org/modules/by-module/Term/ )
  • The Zend Advanced PHP Debugger extension (APD) - It is very good Profiling tool for profiling PHP as it does function call traces for your pages, memory consumption, execution time etc.
Practically, I have used AB (ApacheBench) for generating load for a single page of the site. It was giving the whole process time for a page when 10 (I gave 10) requests were concurrently processing for the page for total no of 100 connections, Then I checked my slow query log file which were having the list of all queries taking long time than given in mysql configuration file. I used mysqldumpslow (in command prompt go to the log file directory and do :> mysqldumpslow slowlogfilename) for checking this log file, mysqldumpslow will give how many times each query run and its process time. And I got that a lot of queries were repeated for a same row, So I changed my API in the form so that it will fetch the data from same table for same WHERE clause in a single database hit then I process those values further in my API. So I suggest that for a good programmer, he/she must design his/her API in such a way so that lowest data base hit will occur, and only select those column which are necessary at that time as use of SELECT * FROM... is much more costly than SELECT column_name1 FROM ...

I also used indexing for the tables in which SELECT queries were more called more that INSERT, UPDATE or DELETE. (I suggest to use index for a table for only that column which is called many time in WHERE clause of query and also make indexing for a single column when you are using AB so that you will get to know easily for which column index your query processing time is lower.)

I also suggest to INSERT or SELECT data in BUNDLE. (So that less data base hit will occur)


Nine Rules for Web Startups

I am describing nine rules for website designing, Hope these will be useful for all web developers.

1: Be Narrow:
Most website try to do too many things that it become too difficult to manage and understand, so always try to do smallest things that are potentially useful.
2: Be Different: There are a lot of people who will be thinking same as you are, so always try to do different from others.
3: Be Casual: Flickr enables personal publishing among millions of folks who would never consider themselves personal publishers—they're just sharing pictures with friends and family, a casual activity. Casual games are huge (Now this is not the era of hobbyist web or the professional web) even Skype also provide casual conversation.
4: Be Picky: You must give space to others if something is not going right, false negatives are usually better than false positives. One of Google's biggest strengths—and sources of frustration for outsiders.
5: Be User-Centric: User experience is everything.
6: Be Self Centered: Create something does not exist in this world, be a user o0f your own product.
7: Be Greedy It's always good to have options. One of the best ways to do that is to have income.
8: Be Tiny:
Acquisitions are much easier if they're small. And small acquisitions are possible if valuations are kept low from the get go.
9: Be Balanced: You must be balanced in each and every situation as you have to give a lot of commitment to acquire something, but this will not be for always.




Tuesday, November 15, 2005

Linux Packaging..

There are a lot of problems about linux packaging, like why they dont have a single MSI (this is Microsoft Windows Installer which is having the collection of all the dependencies file in one .msi package) in which all of its dependencies are collected and they just ship them with their installation package. So I want to tell the benefits of linux packaging system.
1. Linux is the world best shared library (dynamic link Library DLL) system: Linux have one of the best shared library system, even you can get more version of same library.
2. linux automatic dependencies system is good: Dependencies are the third party software that are installed to support another software. In Windows when you installed any updation for software then in windows this new DLL overwrite the old DLL, and this creates the registry corrupt. But in linux it save the new DLLs in a new directory under file system (/usr/local/..). And we can switch in between new and old DLLs as needed.
In Linux if the linux is installed properly, then the possibility to get dependencies files will be more. So if any new person is installing linux first time then he/she must choose its full version.

Friday, November 11, 2005

Installation experience

Today I have installed profiling software for my project that will catch the time for all functions running on a page. And a lot more about the classes we are using on that page.
I have also installed Wiki (an open web page), in which any user can change any thing on that page himself. This was quite intresting as I am knowing a lot about Apache installation. It is very necessary for a developer to know not atleast about his/her programming language but also about the enviornment in which his/her is working.

Sunday, October 16, 2005

Are college dropouts more successful?

Are college dropouts more successful than people with good education?
Might be, just see this link RICHEST BILLIONAIRE and find out.

Monday, October 10, 2005

Qazi -- become proudy

This week when judges choose Qazi safe (this is first time when qazi is safe through judges), he is now going to make fun of his friends, he started commenting on others as for Arpita he commented "Sabse pahle to danger jone ki hetrick ke liye congratulation." and this attitude is really a sign of proudness. And I think this can be injurious for him. He should not behave like this, even when he was in danger jone and all others were in safe then no one commented out on his performance, now because of public votes he is here in this position and thats why he become like this.
He feel that no one can come in with public votes other than him. Why public gives his votes, what all see, what all doing, I don't know really.
Lets see what is going on..

Friday, September 16, 2005

Marc Canter at Tekriti

Yesterday Marc canter the cofounder of Macromedia and Broadband Mechanics came in Our company Tekriti Software . He also gave us an inspiring session in Social Networking and personal publication. It was really very motivating, he is thinking 15 years ahead of World, its really very surprising for us too as we are working for our future not for our present.
Its risky (as Marc said its risky but we don't have any other choice) but I am sure that this will really BUZZ the world with these new creative innovations.

Review of Fame Gurukul

Finally, Qazi got selected by faculty, as since he was in Fame Gurukul, this was his single wish that once he must be selected through faculty. Its really very nice for the person who gets his dreams true. Yes ofcourse his selection is right, he is the deserving person. As his performance is improving day by day and now he is also capable of being one of the candidate in fame jodi. It was also a bad moment for Fame Gurukul when Sumit was out, he was also a deserving candidate. Well now its really difficult to guess that who will be selected by us (By Indian Janta's vote). Lets see what is going on the way.

Wednesday, September 14, 2005

Values and Vision

Values and visiond exactly mean that "DOING THE RIGHT THINGS FOR THE RIGHT REASON".
How do we judge our value system.
The seven deadly sins according to Mahatma Gandhi are:
1. Wealth without work
2. Pleasure without conscience
3. Commerce without morality
4. Science without humanity
5. Knowledge without character
6. Religion without sacrifice
7. Politics without principle
So each of these things reflects a lack of values.

Here is an ultimate test to check our value system, we can call it as mammas test. In this test Whenever you are going to do any new thing you can just think that if your mom were to see you doing this would she be feeling proud of you or she would be feeling shame.
certainly you will get an answer that you are right or wrong..

Thursday, September 08, 2005

Key to success in organisation


- RIGHT ATTITUDE
- EXPAND YOUR HORIZONS
- BE WELL INFORMED
- SET SPECIFIC GOALS and WORK TOWARDS ACCOMPLISHING THEM
- MAINTAIN A RECORD OF YOUR ACCOMPLISHMENTS
- DEVELOP A NETWORK
- BE PROACTIVE

Follow these steps and work hard, the success will be on ur path..

Tuesday, September 06, 2005

Namaste...

I came to know the actual meaning of Namaste...
Namaste means "the Divinity within me salutes the Divinity within you...."
it has very nice mean, and if a person say Namaste to any other person by heart then its a salute of one soul to other one.

Monday, July 18, 2005

My visit to Delhi..

Day Before yesterday, I went for delhi visit. I was really so excited for it. I went with my family and my friend. We all were very excited for it. This was really a very fantastic trip for me as I didn't these places before.
First I saw Lal Killa, this is really a marvellous place and I like most the work done on the walls of the mahal, it was really a difficult task to fill those rigid walls with the different coluredstone pieces. Here is the View of Lal killa.





And then after visiting this place we saw Raj Ghat (the samadhi of Mahatma Gandhi). Its a very peaceful place.
Then we visited India Gate, this was the great moment for me to see and touch the Grand monument that has been built in the memory of our great warriors of First World War.
Then we visited Indira Gandhi Museum, where we saw the pictures and the things that she was using from her childhood, I saw the glimpse of her living style. She was a great lady, she believed in simple living and high thinking.
Then we saw lotus temple(the place where the people of all religions can pray to God), Birla Temple( also known as Lakshmi Narayan Temple and it is one of the oldest temple in India), Kutubminaar, ... and we also travelled through metro train.
It was really a memorable day for me..


***************************************************************************
This photo is only linked here, not copied, with full respect to copyight.

Monday, July 04, 2005

Review for Paheli..

Yesterday, I saw this Hindi Movie named Paheli, before seeing this movie I was so excited to watch this movie, even I was waiting for the weekend to watch this movie, and this was all because the promos that they were showing before releasing this movie.
But after watching it I was quite disappointed as it was far below from my expectations. The story of the movie is just a ghost was being fallen in love with a newly married girl. It was totally unrealistic movie just like the story of Vikram and Betaal, that we have seen on our childhood. So I think its really very disappointing for Indian Cinema. These are the reasons people criticize bollywood than hollywood. Lets see the strategy of Indian Cinema in the next coming movies...

Thursday, June 16, 2005

A Great News..

I am really very excited to tell u about this great news. Last week , I got the news that HBTI Kanpur (the college from where I did my B.Tech.) got 21st rank in India in all IT colleges.
IIT kanpur in on the top of the list, then other IITs, NIT Trichi, Allahabad Thapar Institute and DU. In that list DU got 57.1 points and HBTI got 57, HBTI is just below 2 DU in this list.
one another good news that IIT Kanpur got 26 points in Intallectual capabilities n HBTI got 29 points in that category.
This list is published in DATA QUEST(May issue). So Its a great news for the hercourtians, I wish the glory of our college will be maintained for the next coming years..

Friday, May 27, 2005

Its the era of replicating robots..

Now self replicating robots is not just a science fiction... the time has been changed a lot.. Now self reaplicating robots has been created by the scientist of Cornell University (in Ithaca, New York). They have created small robots that can build copies of themselves.
And according to their information "Each robot consists of several 10-cm (4 inch) cubes which have identical machinery, electromagnets to attach and detach to each other and a computer program for replication (like a virus replication program). The robots can bend and pick up and stack the cubes. "
So it is a great development in our life as these robots will be more useful in the hazardous situation..where human involvement is quite risky..like in space flights. Now lets see whats more surprising development is coming..

Friday, May 20, 2005

My Tech Friday..

Today was my presentation, and I was excited a lot for it and a bit nervous too. then I read once my presentation notes and I tried my self to involve in any other work as it was creating more n more problem for me to read my topic again n again(as I tried to read it again but it was creating more nervousness.).
Now its time for My presentation...
I was trying to be cool..
and I started my presentation with a bit nervousness. and it was nice but not as a I supposed it should be (I forget once.. n it was very disappointing for me.). well before my presentation I was thinking that it would a boaring presentation but as it was going, it was becoming more intresting. People were so active to be involve in the discussion.. and it gave us a lot of knowledge about Search Engines and I hope that it would be helpful for our company website www.tekritisoftware.com too.Link

Monday, May 16, 2005

Be Proud..


Today i read this news ...
This is not only ground breaking news; it's space-breaking news indeed. And I want that u people should also know about it.
"Ramlal Bhagat, a XII std. student from Haryana, has developed a 32-bit operating system demonstrated to be far superior to any of the desktop operating systems in the market today. The program has been named "O-Yes". O-Yes provides operating system services on any Pentium-based personal computer (PC) and does not require MS-DOS as a base operating system. The operating system's capabilities were demonstrated in a student convention at the Indian Institute of Technology (IIT), New Delhi.
HCL Ltd. conducted benchmarks on the system and published results, which are partly reported here: O-Yes is 34% faster than Microsoft's Windows 95 on similar hardware. It is 29% faster than
IBM's OS/2. O-Yes loads 54% quicker than Windows 95 or OS/2. O-Yes has a customizable, user-friendly graphical User Interface (GUI), in which every program can be accessed with a maximum of two button clicks. The operating system provides plug n play capability with numerous hardware devices. It has a superior memory management function. The operating system is compatible with Windows 95&WindowsNT 4.0. HCL, Ltd. has offered an unknown amount to Ramlal Bhagat for purchasing the rights to the software. Ramlal Bhagat, described as "quiet and philosophical" by his peers, was not available for comment. Suresh Reddy, spokesman for HCL Ltd.,said, "this is the operating system that the world has been waiting for". On HCL's move to purchase the rights to the software, he said, "We are here to ensure that Mr. Ramlal gets fair recognition and compensation for his innovation. HCL Ltd. can provide him a firm launch-pad to market software globally". Is this the beginning of the end of the Bill Gates' monopoly? Let's see...

Tuesday, May 10, 2005

Site from my office..

This is the view from my office, its really very beautiful..



***************************************************************
This photo is only linked here, not copied, with full respect to copyight.

Monday, May 09, 2005

Great Mr N R Narayana murthy

Yesterday I read bibliography of Mr Narayanan Murthy, it was really intresting to read bibliography of a great person. In his bibliography I read about the problems that he tackled in the starting of INFOSYS.
He started it in 1981 with other 5 partners. Initially it took them a year to obtain a telephone connection, two years to get a license to import a computer and 15 days to get foreign currency for travelling abroad. One thing struck on my mind that at that time it was really very tough to open a software company in India, but they didn't loose their PASSION and Now you all know where the INFOSYS is.. so PASSION IS THE MORE IMPORTANT THING THAN FINANCE FOR A COMPANY.

Wednesday, May 04, 2005

The Great Day

Hey folks, today is the great day of our 2005, as it is 05/05/05.
I think very few people remember it...
So lets celebrate this day with our great starting..
Good Day..

my Day

Today I am feeling better than yesterday, day before yesterday i went isha's Home, Her mom dad are very nice person. Her mom is really very beautiful as well as very kind spoken, mujhe unse milke bahut acha laga. I felt like home there.

Monday, May 02, 2005

today is one of my worst day

Today i am feeling vey sad, as nothing is happening right with me. why God do these wrong things only with me.

Friday, April 29, 2005

People, Its my first Blog.

As this is my first blog, thats why i am much excited this feature, by which people will know wbout a totally unknown person.
I am very simple gal, having high ambition in my life. Right now i am working in a Software Company as a software engineer in Gurgaon.
rest is for next time...