Narendra Dhami

My Site

Archive for October, 2009

Benefits Of Having A Good Posture (And 13 Tips To Getting One)

Posted by Narendra Dhami on October 27, 2009

Do you have a good or bad posture? As you are reading this, how is your posture right now? Are you sitting upright? Are you slouching your back? Have you totally sunk into your chair?
When I was a small kid, I was very conscientious of keeping my back straight the whole time, because my parents and teachers were constantly reminding everyone to do so. My back was so straight that there was a time when my teacher commended on my posture and told the other students to follow me as an example, much to my embarrassment.
However, things changed when I was 15, where I had my own computer and started spending copious amount of time in front of it. My posture became pretty bad. I would generally alternate between slouching over my desk, curling my whole body into my chair or sinking into my seat. It was as if my spine turned into jelly. The fact that I was (still am) taller than most girls around me (I’m currently 5′ 7″ (170cm), 4 inches taller than the average Singaporean girl at 5′ 3″ (160cm) ) didn’t help me in maintaining a good posture too.
Initially I didn’t care too much about improving my posture, because I figure I could just switch back to a good posture whenever needed. However, after a few years, I began to recognize the value of maintaining a good posture at all times. More …

Posted in Health | Leave a Comment »

Lifehacker’s Complete Guide to Windows 7

Posted by Narendra Dhami on October 23, 2009

Windows 7 officially launches today, but we’ve been testing, tweaking, customizing, fixing, and writing about this OS for a year now. We present here a guide to everything we’ve learned about the OS, from first install to final settings change.

Whether you’ve played around with Windows 7 during its beta or release candidate versions, launch day is finally here, and Windows 7 is finally ready for widespread, public consumption. This guide will take you straight through from system requirements and upgrading your PC to highlighting Windows 7’s best new features to helping you hit the ground running with all of the awesome tweaks Windows 7 has in store for you. More …

Posted in Windows | 1 Comment »

PHP Certifications. Where, Why And, How To Get Them

Posted by Narendra Dhami on October 21, 2009

Becoming a certified PHP developer, does not mean that you become a better developer but, it can surely give you some more chances to get the job. We tried to do a little research about PHP certifications, where to get one, what it takes to get one and why you need it. We also tried to find some online tests for you in order to prepare yourself before you actually go for it.



zendlogoThe industry’s standard can not be anything else than Zend’s Certification. Zend has been running the PHP certification program for more than 4 years and has certified nearly 5000 PHP developers. Actually, there is a contest running at the Zend site that will reward the 5000th certified developer with $5000. This is what they say:

We are rapidly approaching the 5000 PHP Zend Certified Engineer and we would like to give the 5000th person to achieve this prestigious accomplishment a special gift of $5000 in Zend Training Units and if we reach this milestone before ZendCon09 – a free entry pass to the conference!

There are guides and online exams that can help you prepare yourself to get the certification but you have to pay some money to get to them except the Zend Framework Certification study guide that comes free of charge.

There are 2 ways to get the certificate. The first one is by purchasing the examination from the Zend online store and the second one is by scheduling an exam with Pearson Vue, the company with which Zend certifications are executed.

Upon certification, you are listed to the Zend Yellow Pages, where a lot of employers look into for PHP developers and you get special discounts on Zend PHP conferences worldwide.


w3certW3Schools has been a web development resource heaven for many years now. It is not luck that it is the first site to visit for most of people who want to learn web technologies and development. Recently, w3schools has been rolling out a PHP certification program. You can take the exam online and you should be supervised by a person that you select so, you have to choose a supervisor wisely in order to add credibility to your certificate. This does not add value to the certification though IMHO.

The examination consists of 70 multiple choice or true/false questions about PHP (it requires fundamental knowledge of SQL too) and you have 70′ (minutes) to complete the test. To become certified, you have to have 75% of the questions answered correct and, if you get more than 95% you get an excellency degree. The service will inform you about your pass/fail status immediately after the end of the examination and if you have passed the exam, you will be sent a PHP developer certificate. Your supervisor should sign the certification which, you can use to prove your PHP knowledge. You can verify your certification online at a unique URL that the certificate points to.

The w3schools certification costs $75 and you can pay by Paypal or credit card.


bbBrainbench is dedicated to helping organizations use assessment science to predict employee success. Using the Brainbench assessment platform, companies improve hiring and retention, boost training success, enhance customer satisfaction, and increase profitability. One of the ways to do this, is by certifying several aspects of job criteria. Brainbench has tests for you to certify your knowledge for nearly anything from aerospace to programming and of course, for PHP.

You can take the examination online for $49.95 .


hd03ExpertRating is an ISO 9001:2000 company that offers hundreds of popular certifications and tests which are suitable for students, professionals, job seekers and companies.

ExpertRating tests consist of timed, multiple choice questions with one or more correct answer/s to each question. Each test covers basic to advanced questions on each topic. The test taker should keep in mind that the knowledge of applied skills gained through real work experience is emphasized rather than theoretical knowledge. For achieving certification the test taker must score at least 50% marks. Clearing the test with a score of 80% or more will be credited as a distinction and mentioned on the certificate of accomplishment.

To get PHP certified with ExpertRating, you have to pass a 40 multiple choice questions test. You have 45 minutes to answer all questions. The certificate costs $9.95


OST_LogoIn OST’s unique online Learning Sandbox®, students have access to their own web programming and Unix shell-based database environments where they will apply new skills as they are presented by completing real-world projects.

Completion of the 4-course series earns students a Certificate of Professional Development from the University of Illinois Office of Continuing Education. All courses are certified by the University of Illinois Department of Computer Science, and students receive Continuing Education Credits upon completion of each course in the series.

The PHP/SQL Programming Certificate series is comprised of four courses covering beginning to advanced PHP programming, beginning to advanced database programming using the SQL language, database theory, and integrated Web 2.0 programming using PHP and SQL on the Unix/Linux MySQL platform.

The certificate costs $398

What does it take?

To become a certified PHP developer, besides PHP knowledge, you might need to be aware of :

  • HTML
  • SQL (MySQL most commonly)
  • Web administration
  • XML


Because as stated on the top of this post, being a great PHP developer sometimes might not be enough. Sometimes, you have to prove your knowledge to an employer to get the job and, being a PHP certified developer is one great way. Employers from around the world can find you easier since, most of the times, your name will be listed as a PHP developer on pages associated with employers.

OK I like it. Where do i start?

Here is a good list of tests and quizzes to help you get accustomed with most of the exams above:

Orginal From

Posted in PHP | 1 Comment »

HTTP performance testing with httperf, autobench & openload

Posted by Narendra Dhami on October 19, 2009

httperf is a benchmarking tool that measures the HTTP request throughput of a web server. The way it achieves this is by sending requests to the server at a fixed rate and measuring the rate at which replies arrive. Running the test several times and with monotonically increasing request rates, one can see the reply rate level off when the server becomes saturated, i.e., when it is operating at its full capacity.

autobench is a Perl wrapper around httperf. It runs httperf a number of times against a Web server, increasing the number of requested connections per second on each iteration, and extracts the significant data from the httperf output, delivering a CSV format file which can be imported directly into a spreadsheet for analysis/graphing.

openload is a load testing tool for Web applications. It simulates a number of concurrent users and it measures transactions per second (a transaction is a completed request to the Web server) and response time.

More …

  • Ref: 1
  • Ref: 2
  • Posted in Testing | Leave a Comment »

    25 New & Useful PHP Techniques & Tutorials

    Posted by Narendra Dhami on October 14, 2009

    PHP is the most popular and widely accepted server side scripting language among developers due to its easy to learn nature, free of cost and its large ever increasing helpful community. Here are 25 useful PHP techniques and tutorials, most of which have been published only in this year. More …

    Posted in PHP | Leave a Comment »

    10 Things You Definitely Should NOT Do In Japan

    Posted by Narendra Dhami on October 10, 2009

    When you are travelling in Japan follow these simple guidelines to ensure that cultural misunderstandings (or worse) do not occur.

    10) Misuse Your Shoes
    Thresholds at businesses and all homes and apartments in Japan have a convenient place for you to store your shoes and don borrowed slippers for your journey. However, did you know you should never wear slippers on tatami mats? It’s also a huge cultural faux-pas to come out of the bathroom still wearing toilet slippers, as they’ve been rubbing on dirty linoleum (although this even slips Japanese minds from time to time).

    9) Bathe in the Bathtub
The bathing culture in Japan is unparalleled. Even if I soak in a mineral pool in the backwoods of New Zealand, nothing will make me feel more cleansed inside and out than a soak in a traditional Japanese hot spring resort. Ignoring the fact the water is still hotter and contains more minerals than most hot pools abroad, Japanese bathing etiquette dictates one should shower thoroughly before entering the steaming bath; if you were to do otherwise in Japanese homes (as a guest you would be given the honour of bathing first) the family would have to completely drain the tub, clean out the ring, and refill. You’d probably just be kicked out if you brought soap and shampoo into the pool at a public bathhouse.

    8) Fumble with Chopsticks
    You don’t have to be able to pick up an individual grain of rice to use chopsticks properly. Rather, just be aware that there are a few things for which they were not meant to be used. First, even if you’re sharing dishes with a group, do not pass food from one set of chopsticks to another, as this is considered in bad taste. Second, when not using them, set your chopsticks across your plate or bowl as you would a knife; poking them out of your rice resembles two sticks of incense commonly used for a certain death ceremony… and why would you want to be reminded of that over a fine dinner?

    7) Grope on a Train
    Obviously this isn’t a mere misunderstanding of cultures if such an act were to occur, but even when visiting Japan and having nothing but pure intentions, one should be aware of the dangers. Women (and even men) have been fondled on crowded trains and often cannot trace the hands back to their owners. This has lead to women-only subway cars during peak travel times, and the police giving advice to young girls: seize the arm of your attacker and don’t let go until security sees his face. I only mention this because if you’re a foreigner riding a train in the land of the rising sun who knows absolutely no Japanese, and when disembarking you find a man or woman screaming “shijou!” or “chikan!”, respectively (the terms for female and male perverts), you’re essentially at the mercy of one individual who may have mistaken your desire to get a little bit of room on the car as blatant groping.

    6) Choose the Wrong Seat
There’s a somewhat antiquated custom when it comes to eating out in groups. If you’re with some business colleagues, it’s better for a junior member (in terms of hierarchy, not age) to take the seat closest to the doorway or access point, the senior member the farthest away. The belief is that should an attack occur, the least experienced (thus the least valuable) will be killed first, giving the others time to mobilize and protect the higher-ups.

    5) Show Strong Emotions
One of the most common mistakes a foreigner makes upon entering the Japanese business world is to openly express his frustration when the unexpected comes along… and it always comes along. Showing strong emotions like anger is a social death sentence in Japan; the only time someone might get away with it would be if he were seriously inebriated, or at least making the effort to get there. Tears, especially those of happiness, can be forgiven (even from men), but take care to keep your temper in check.

    4) Blow Your Nose
Even out on the street when it’s sub-zero degree weather, blowing your nose in Japan is probably one of the rudest things you can do, even more so if you’re talking with someone face-to-face and take a moment to pull out your handkerchief. It’s the equivalent of asking someone to watch you use the toilet.

    3) Yawn
This is a good policy for conversations around the world, but it really hits home in Japan. Whereas in the States or other countries one might dismiss a tired expression with a certain nonchalance or a chuckle (e.g. “crazy night on the town?”), in Japan you might as well slap your superior in the face to completely prove your desire not to listen.

    2) When Listening…
I had an interview with an English school in Akita Prefecture not too long ago. As I was listening to the manager speak via Skype, I realised how out of practice I was at listening by Japanese standards. He spoke for only a few seconds at a time, each time taking my silence as an indication that the call must have been disconnected. Why? Because I failed to provide the appropriate guttural sounds: when speaking one-on-one with someone in Japan (group meetings can be an exception), it’s best to utter a few words every now and again to show you still have the speaker’s attention. A simple hai (yes), or so des ne (ah, I see) can work wonders.

    1) Respect Yourself
Modesty is a virtue. I cannot count the number of times as an English teacher I gave high praise to certain young Japanese students, only to have their parents contradict me by saying something like “yes, but she’s terrible studying at home” or “no, you must be mistaken”. Disregarding or refusing complements in Japan is the only way to accept them graciously:

    (in Japanese)
Me: Excuse me, but could you tell me the way to the nearest train station?
Japanese: Ooohhh! Your Japanese is so skillful!
Me: No, no, it’s nothing really.

    By claiming you have no skills or any life experience exceeding that of another, you in fact raise their impression of you. If I were to refer to myself as “Turner-san” or respond to such praise of my language skills with “Thank you very much! I have been diligently studying for nine months!”, then I might be forgiven as an ignorant foreigner… but more likely marked as arrogant.

    Original From:

    Posted in Japan | Leave a Comment »

    Web Service API Design By Example

    Posted by Narendra Dhami on October 9, 2009

    API design is one of the more important skills possessed by web developers today. The reason behind this fact is that web applications are increasingly unable to live in isolation while at the same time providing the scope of features and web awareness users have come to expect. Developing for the web means, to a greater or lesser degree, being a productive citizen in a kingdom of online data exchange; and whether by formal engineering or organic growth, this means building an API.


    Posted in Web | Leave a Comment »

    12 Tips to Better SEO

    Posted by Narendra Dhami on October 8, 2009

    Advertising is very expensive, studies have shown that it is not as effective as being on the first page of search results. These SEO tips will help you rank higher on the search engines results, and who doesn’t like free referrals.


    Content is King
    Search engines want something to index. If your website doesn’t have much content the search engine will not rank you as higher authority for these keywords. Also it gives other websites the opportunity to link to you. For instance if you have a blog, this can generate many links to your website. These links will allow the page rank to flow, the more links to your website the sooner it will be indexed and more often.

    SEO Friendly URLs
    URLs that use query parameters to get a website like, have nothing in the URL that describes what the website is about. On the other hand a URL similar to gives a brief description of the content on the page.
    It’s important to optimize your website for keywords that match what your user base is searching for. Using URLs with less query parameters allows these keywords to be placed within the URL.

    Create unique Titles, Meta keywords and Meta description for every page in the site.
    These can be used as information displayed to the user on the search result page. It’s a good idea to keep these descriptive of the content on the page. Another reason to use the Google webmaster tools is it will show you which pages have duplicate title and/or descriptions.

    Implement valid HTML (or XHTML) and valid CSS The easier you make it for a search engine spider to crawl the page the more it understands your page. Always use the correct HTML tags for your content. If its a header use one of the Header tags, etc…

    Always Use alt and title Attributes
    Not all elements on a page can be read by the search engines. If you have images on your pages the search engines don’t know what is the content of these images. It’s recommended that you use the alt and title attributes to describe these images.

    Create a site map that lists every page in the site.
    The easier you make it for the search engines to find your website, the faster and more thoroughly they will index your pages. You can also ping Google to let them know that your site-map has changed. If you are using Django look in to this Django application makes it really easy to implement a site-map.

    Keep Adding Content
    Search engines love to crawl for fresh and new content. Sites that don’t have fresh content on a regular basis remain stagnant, and will not be crawled as often by search engines. One great way to keep the content on a page fresh is by running a blog and blogging about your interests or important aspects about the market your in.

    Maintain your CSS and JavaScript files Externally
    This does not clutter you HTML documents and the search engines can get just what they want most, the HTML.

    Use Google Webmasters Tools
    Google provides this great tool that every webmaster should be using, it shows the stats about the last crawl of your website and gives you suggestions to raise your page rank. Also allowing you to submit a site-map and display any errors that have been found on the website.

    Check for Broken Links and Images
    People hate when they see a 404 page on a website and search engines don’t like it either, it is a known fact that sites with many broken links get penalize for this. A tool that can help check your site for broken links is provided by the WC3 at

    Avoid Duplicated Content
    Duplicated content may trick a search engine into thinking it’s spam and penalize you for it. This is especially penalized when the duplicate content crosses domains, duplicate footers on the other hand will not be penalized.

    Use robots.txt
    robots.txt file gives the search engines the direction of what to index and what to ignore. The Google webmaster tools has a great tool to create this file.

    Original From:

    Posted in SEO | Leave a Comment »

    MySQL Cluster: Two webserver setup

    Posted by Narendra Dhami on October 1, 2009


    This HOWTO was designed for a classic setup of two servers behind a loadbalancer. The aim is to have true redundancy – either server can be unplugged and yet the site will remain up.

    You MUST have a third server as a managment node but this can be shut down after the cluster starts. Also note that I do not recommend shutting down the managment server (see the extra notes at the bottom of this document for more information). You can not run a MySQL Cluster with just two servers And have true redundancy.

    Although it is possible to set the cluster up on two physical servers you WILL NOT GET the ability to “kill” one server and for the cluster to continue as normal. For this you need a third server running the managment node.

    I am going to talk about three servers:

    Servers 1 and 2 will be the two that end up “clustered”. This would be perfect for two servers behind a loadbalancer or using round robin DNS and is a good replacement for replication. Server 3 needs to have only minor changes made to it and does NOT require a MySQL install. It can be a low-end machine and can be carrying out other tasks. More …

    Posted in MySQL | Leave a Comment »