Author: rahul

  • James Bond and The Telugu Guy

    Once it so happened in a flight that, James bond was sitting besides a Telugu guy..

    Both were traveling to US.

    Telugu Guy : “Hello, May I know ur name please?”

    James Bond : “I am Bond.. James Bond.”

    James Bond: “and you?”

    Telugu Guy : “I am Sai… Venkata Sai… Siva Venkata Sai…Laxminarayana Siva Venkata Sai…. Srinivasula Laxminarayana Siva Venkata Sai…Rajasekhara Srinivasula Laxminarayana Siva Venkata Sai…Sitaramanjaneyula Rajasekhara Srinivasula Laxminarayana Siva Venkata Sai …Bommiraju Sitaramanjaneyula Rajasekhara Srinivasula Laxminarayana Siva Venkata Sai..”

    James Bond FAINTS.

  • Never be late

    A priest was being honored at his retirement dinner after 25 years in the parish. A leading local politician and member of the congregation was chosen to make the presentation and give a little speech at the dinner. He was delayed so the priest decided to say his own few words while they waited. “I got my first impression of the parish from the first confession I heard here. I thought I had been assigned to a terrible place. The very first person who entered my confessional told me he had stolen a television set and, when stopped by the police, had almost murdered the officer. He had stolen money from his parents, embezzled from his place of business, had an affair with his boss’s wife and taken illegal drugs. I was appalled. But as the days went on I knew that my people were not all like that and I had, indeed, come to a fine parish full of good and loving people.”

    Just as the priest finished his talk the politician arrived full of apologies at being late. He immediately began to make the presentation and give his talk. “I’ll never forget the first day our parish priest arrived,” said the politician. “In fact, I had the honor of being the first one to go to him in confession.”

    Moral: DON’T EVER BE LATE

  • Complete Guide to Obtaining Driving Licence (India – Andhra Pradesh – Hyderabad)

    Please do not send me any enquiries reg. driving licences. I do not work for the RTA and have provided the information available here from the procedure I followed while procuring the licence. For further information refer to my comment AP Transport Website. You may find some of the procedures listed in this image which I have taken in Secunderabad RTO Office.
    
    Also if you want to know how to obtain an international licence, you might find this article useful - http://magnificent-hawk.blogspot.com/2009/08/obtaining-international-driving-permit.html.
    

    Note: This article was written in 2007. While chances are less, there is always a possibility that the licence application rules / driving track rules might have changed. It is always suggested to cross-check the driving rules at the testing center.

    The procedure for obtaining a driving licence is in two stages. First you should obtain a learner licence. This will be valid for a period of six months. The second stage is applying for a permanent licence. You have to wait for at least a month after the issue of learner licence for applying for a permanent licence.

    Obtaining a learner licence

    – In order to apply for a learner licence, first you will have to fill two forms. These forms shall be available at the RTA office. At the time of writing this article, the forms costed Rs.2/-.

    – Next you will have to furnish documents for proof of address and proof of age.

    Valid documents for address proof:
    1. Ration Card
    2. Electricity Bill
    3. LIC
    4. Passport
    5. Pay slip / ID card issued By State And Central Government along with residential address

    Valid attested documents for age proof:
    1. Passport
    2. PanCard
    3. School Certificate
    4. Birth Certificate issued by State Government / MCH Authorities
    5. LIC

    – Once the forms and the relevant documents are submitted, a photo of yours is taken. Please note that you need not get any photographs of yours. A digital photo of yours is taken by the RTA authority itself.

    – The last stage and the most important stage of obtaining a learner licence is to clear a written exam. This written exam is based on traffic signals, rules and other general questions. You need to answer 20 questions in 10 minutes. The passing mark is 12. The links give in the “references” section below should help you in preparing for the exam. But the best thing I suggest is to go to the RTA office and buy the book (about Rs.15). Going through it should prepare you well enough for clearing th exam.

    – Once the exam is cleared, a learner licence is issued for a period of 6 months.

    Obtaining a permanent licence

    – The permanent licence can be applied only if you hold the learner licence for a minimum period of one month (the applicant is expected to learn driving the vehcile in this one month).

    – At the driving test center, a form should be filled out and submitted.

    – The fee for application of driving licence depends upon the class of vehicles for which you have applied the licence for. For a geared two wheeler and a four wheeler, the cost is Rs.440.

    – After the forms are submitted and the fee is paid, you will be asked to take a driving test. Below is the track on which you will be asked to drive. (Unless you clearly understand the below diagram, please don’t assume anything). Also for two wheeler only the ‘8’ turn in the first block has to be performed and the next two blocks can be ignored as there is no reverse gear for two wheelers.

    Driving Track

    Certain things to keep in mind while driving

    • Always use indicators at turns
    • Slow down at speed brakers
    • Look for complusory horns
    • If driving a two-wheeler, you should not put your foot down
    • You shouldn’t touch any of the dividers
    • I think it is alright if the car stops (not sure about this) but definitely the two wheeler shouldn’t switch off

    – Also note that you have to get your own vehicle (RTC will not provide any). And you might have to drive all the vehicles for which you have applied license for. So for example, if you have applied license for four wheeler and two wheeler, it won’t be sufficient to drive four wheeler only. You might be asked to drive the two wheeler as well.

    – Once the driving test is cleared, a permanent licende is issued (this is generally sent by post one week later).

    References:
    http://www.aptransport.org/html/faq.php
    http://www.chandigarhtrafficpolice.org/
    http://www.delhitrafficpolice.nic.in/
    http://www.uttaranchalpolice.com/traffic/traffic_rule.htm
    http://www.worldtravellers.net/roadtravel/india/india.html

  • Informing search engines about change in url

    I recently changed my website address from rahul.ind.in to rahul.amaram.name due to some reasons. The biggest problem I was facing with this was that all my pages were previously indexed in Google with the website name rahul.ind.in. Though I re-submitted my new url to Google (http://www.google.com/addurl/), the rankings were still for the old url. And I couldn’t find any way of contacting Google customer care / any method to inform of the change in the url.

    While googling for a solution, I came across a page from which I realized that redirection can be used for this purpose. Further more I realized that if you redirect a page and send a 301 status response, it indicates to the application requesting the page that the page has moved permanently. This information is especially used by search engines such as Google to update the old site to the new site and make sure the ranking of the old page is not lost. I used the below code in Apache VirutalHost Section for setting up permanent redirection.

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^rahul.ind.in$ [OR]
    RewriteCond %{HTTP_HOST} ^www.rahul.ind.in$
    RewriteRule ^/(.*) http://rahul.amaram.name/$1 [R=permanent,L]

    The same method might be quite useful if you currently do not have a domain name but host a blog / site somewhere and plan to purchase a domain name for yourself later.

  • The tragic story of Chandrashekhar

    Hi guys,
    Today I am going to narrate the tragic story of one of our employees who had been betrayed by another employee of our company and has now become a “Devdas”.

    This is the photo of Chandrashekhar, our company mascot and a loyal employee.

    Chandrashekhar

    He was a happy person and very productive until one fine day a lady “Chaitanya” joined our company. You might have just heard and read in books but I saw with my own eyes how this gal (as naive and innocent she may look) actually played with the feelings of Chandrashekhar. Even though Chandrashekhar did not show any interest, she used to affectionately call him “Chandu” and show him a lot of importance. So much so that she even shifted his position from near my desk to near her desk by bribing the higher officials. Gradually he also began to treat her in a special way and started calling her “Chaitu”.

    Everything was well n fine. Their affair went on for a month and then she began to lose interest in him. Gradually, she again bribed the higher officials in our company and got his seating position shifted back. This poor guy wasn’t able to understand why Chaitanya was behaving in such an odd way. Papam pasivadu vaadiki emi telusu amayulu naaga paamulu ani. Now he has gone into a depression and now he wears a pink hat, a black shawl and just keeps boozing all day.

    He has shared all his happy and sad moments with me. The happy times when Chaitanya showed so much importance and the sad times when she dumped him. Below is the photo of Chaitanya.

    Chaitanya

    Andaaru baaga chudandi. This is the same person who has reduced our Chandrashekhar to such a state. And you won’t believe this. But she even went to the extent of physically abusing Chandrashekhar upon my asking her as to why she had dumped him. If you ever come across her, please maintain your distance. More importantly if you see her flirting with anyone, be sure to warn the boy. You will be doing the entire humanity a favour.

    I hope that at least after reading this mail, Chaitanya will realize her mistake and accept Chandrashekhar back into her life. And if not, I hope Chandrashekhar comes out of the depression soon and will be the same old cheerful guy.

    An observer to a tragic love story,
    Rahul.

    Follow up

    The latest update is that I spoke to Chaitanya yesterday night. I think her intentions were good though her actions did not reflect the same. She told me that she left Chandu because she felt for his personality and his social status, he would find a much better person than her. Anduke she took that drastic step of dumping him. I am so sorry for misunderstanding you Chaitanya. Please forgive me ^:)^.

    And lastly the good news is that Chandrashekhar is recovering. He quit boozing and has thrown away the shawl. I guess he thought about it over the weekend and has finally concluded that life is very short and it is not worth wasting it. That’s the way to go buddy. Yippeeee!!!

  • Cheap Heat Reduction Strategy

    We (my colleagues and I) are currently working from a single room in the top floor (which means the room is exposed to the sun almost throughout the day). I was looking for ways to beat the heat other than using an A/C (as it is costly) and Air Cooler (as it would increase humidity which might harm the computer systems). This is what I finally did to address the heat problem.

    1. Applied two coats of coolant on the roof. Please note that both the coats shouldn’t be applied on the same day. There must be at least a gap of 12 hours. And also you should not apply the coolant it if it is still sunny. We purchased the coolant from Vasanth Hardware Shop located in Krishna Nagar (which is to the left on the road connecting Indra Nagar and Yousufguda) for Rs.120 each. But coolants are generally available in most of the hardware and paints shops.

    2. Purchased 4 vatti vella chapalu (these are mats made out of some scented roots) and hung it to the windows. We initially looked for them in Erragada. There was one shop selling them for Rs.120 each. We weren’t satisfied with the quality as it was not thick. And it is necessary that these be thick so that they absorb and retain water. Later through some reference we got to know of another shop “Kerala Coir Mats” (located to the left on the main road connecting Ameerpet junction to Greenpark Hotel before Jayaduraga Furnishings opposite to Vijaya Textiles). Here they were selling the lower quality mats for Rs.75 and they were better quality mats available for Rs.150. As we were purchasing 4, we convinced him to sell them for Rs.115 bucks each :). Also if you don’t sit directly under a fan you might feel sultry when using these mats :).

    And the result? Pretty good. The temperature might have gone down by probably 10 degrees centigrade or more when compared to previously. Of course, it is necessary that you wet the mats regularly (we do it thrice in a day – morning, noon and evening) so that the room remains cool.

    On a side note, someone had suggested us that we could stick thermocol directly above the roof. But we got to know from a hardware shop that it is not very effective and that it is a very complicated procedure. Hence we dropped this idea.

  • How to ask your Boss for a salary increase

    One day an employee sends a letter to his boss asking for an increase in his salary:

    Dear Bo$$,

    In thi$ life, we all need $omething mo$t de$perately. I think you $hould be under$tanding of the need$ of u$ worker$ who have given $o much $upport including $weat and $ervice to your company.

    I am $ure you will gue$$ what I mean and re$pond $oon.

    Your$ $incerely,
    ABC.

    The next day, the employee received this letter of reply:

    Dear ABC,

    I kNOw you have been working very hard. NOwadays, NOthing much has changed. You must have NOticed that our company is NOt doing NOticeably well as yet.

    NOw the newspaper are saying the world’s leading ecoNOmists are NOt sure if the United States may go into aNOther recession. After the NOvember presidential elections things may turn bad.

    I have NOthing more to add NOw. You kNOw what I mean.

    Yours truly,
    Manager.

  • Domain Name Changed Again And …

    Do not forget to checkout my latest post on domain registrars – New Domain Registrar.

    Hopefully the last time. Yes, rahul.ind.in is soon going to be obsoleted. The new domain name is rahul.amaram.name. And now I also have my own personal email id which is of the from firstnameATlastname.name. The reason for the shift of the domain name is:

    1. I got tired of switching to a new email id whenever I changed my email service provider. Initially, I had a hotmail id, then started using a yahoo id and currently using gmail id. Tomorrow I may use another email service provider. Hence I decided to have one email id for mail and have mails forwarded from this id to the current email service provider.

    2. My current domain name “rahul.ind.in” had a .in extension. I didn’t want my domain name to be country specific. Moreover .name extension is for personal domain names (http://www.name). Hence I decided to change my domain name.

    My old domain name “rahul.ind.in” was due for expiry this month and I decided to search for alternate domain name providers as I did not feel my current domain name provider (sify) was very feature rich. One very important thing to keep in mind while choosing a registrar is to make sure that it is reputed or else they may pose a problem later when trying to transfer the domain to another registrar.

    Features to look out for while choosing a registrar

    – Total DNS control (Managed DNS for modifying A,MX,CNAME records including those of sub-domains)
    – Email forwarding (useful if you want to forward all emails coming to your domain (ex. john@smith.name) to some external email service provider (ex. john.smith@gmail.com))
    – Url Forwarding/Masking
    – Preferably instant DNS record changes
    – Private/Hidden whois (if privacy is a concern for you. A hidden whois will hide your details from the world)
    – Support for various domain extensions in case you have multiple domains (for ex. I am the owner of three domains – rahul.ind.in, amaram.name and diya.in. I would definitely want to have a single provider which would allow me to register all these three domains with it so that management becomes easy for me)

    Recommended Indian Accredited Registrars (especially if you plan to purchase multiple domain extensions)

    http://www.mitsu.in
    http://www.answerable.com (not Indian but ICANN accredited registrar)
    http://www.name.com (this provides great features for a very reasonable price but customer support may not be that great)

    Other accredited Indian registrars offering the some/all of the above features

    http://www.enames.in
    http://www.net4domains.com
    http://www.signdomains.com
    http://www.netandhost.com
    http://www.indomains.net
    http://www.indialinks.com
    http://www.netlynx.org
    http://in.incyberinc.com
    http://ikon.myorderbox.com
    https://registry.sify.com
    http://www.onlinenic.com (Real bad reviews on the internet)

    Other non-accredited Registrars which provide many free features

    http://www.hostindia.net/domains.php (has very good customer support)
    http://www.bagfull.net
    http://www.webhosting.sanver.com/domains.htm

  • Javascript Naming Conventions, Coding Guidelines and Best Practices

    While most of the popular languages (Java, .NET, C++) have elaborate documents on the naming conventions to follow, I couldn’t find any such good document for javascript. All I could find was bits and pieces here and there. This is the main reason why I am creating this page listing the javascript naming conventions I follow. This may not be complete but I shall try to make it as comprehensive as possible.

    1. All variables should be prefixed with a letter indicating the data type of the variable (Hungarian notation). These would be as below:

    s – String
    n – number
    b – boolean
    a – Array
    o – object (Native Objects, Host Objects and user-defined objects)

    Further, the first letter of each of the words should be capitalized.

    Ex:

    var sSampleText = "Hello";
    

    2. Apart from this a letter indicating the scope of the variable should also be prefixed. This will help in differentiating the local variables from the global variables.

    g – global
    m – All member variables (private and public)

    Ex:

    var gsSampleText = "Hello";
    

    3. Further all private member variables and methods of classes should be prefixed with _ to distinguish them from public member variables (Please note that the arguments of a constructor and all the variables initialized inside the constructor are actually private members of the object).

    Ex:

    function Person(_msFirstName, _msLastName)
    {
      this.msFirstName = _msFirstName;
      this.msLastName = _msLastName;
    }
    

    4. All class names should be a combination of words with the first letter of each word capitalized.

    Ex:

    function XmlParser()
    {
      // Do something
    }
    

    5. The function names and method names should also be a combination of words with the first letter of each word capitalized except for the first word. Function and method names should generally indicate the action they are meant to perform. It is a very common practice to begin functions with get/set/is word depending upon whether the function is returning a value, setting a value or returning a boolean result.

    Ex:

    function Animal(_mnAge)
    {
      this.getAge = 
        function()
        {
          return _mnAge;
        }
      
      this.setAge =
        function(nAge)
        {
          _mnAge = nAge;
        }
    
     this.isAgeValid =
        function()
        {
          if (_mnAge < 0)
          {
            return false;
          }
          
          return true;
        }
    }
    
    function doSomething()
    {
    // Do something
    }
    

    Apart from the above mentioned naming conventions, I also follow the below coding practices.

    1. All statements should end with a semicolon.

    2. Comments should be used properly. Every function and method should being with a comment indicating the action to be performed by it. Every logic should be commented properly.

    3. Use single quotes for javascript literals and doubles quotes for HTML element attribute values. While this is not reallly necessary it makes it easy and consistent to write javascript code in-place within event handlers as well as html text in javascript code.

    Ex:

    HTML snippet: <a href="http://www.google.com" onclick="alert('You will be redirected to Google');" />
    Javacript snippet: divElement.innerHTML = '<input type="text" name="age" id="age"/>';
    

    4. For inline javascript (no need for js written in external file), make sure it does not cause a problem when validating the page for XHTML compliance. This can be achieved by writing the javascript code as shown below.

    <script type="text/javascript">
    //<![CDATA[
    
    /* Your javascript code -- variables, functions, 
        classes and everything else */
    
    //]]>
    
    

    As far as I remember, this also hides the javascript code from old browsers.

    6. Follow proper indentation

    Indentation should be consistent. Use an indentation length of 2 or 4 spaces.

    Ex:

    if (sAge != null)
    {
      if (!isNaN(sAge))
      {
        if (parseInt(sAge) > 0)
        {
          return parseInt(sAge);
        }
      }
    }
    

    References:

    http://www.peachpit.com/articles/article.asp?p=24273&seqNum=5&rl=1
    http://www.sitepoint.com/article/oriented-programming-1
    http://www.crockford.com/javascript/private.html
    http://www.irt.org/articles/js169/index.htm

  • A Visit to Anantagiri Hills

    I along with few of my IIIT classmates had planned a get together yesterday. Not wanting to go to one of the regular places, we decided to pay a visit to Anantigiri Hills (75 kms from Hyderabad). Not a bad choice but at a completely wrong time. We’ve heard this place is really good but that is only in the rainy and winter season. Only too bad, we went in summer :). All the trees had shed their leaves. Some of us tried trekking for a while after which we got so exhausted that we just lazed about for a couple of hours in the shade and then started back. The best part of the visit though was the highway drive and lunch :D. Later in the evening I visited my friends place, played with his niece for a while and then had dinner at another friend’s place. Photos can be accessed here.