Category: Tech

  • A Dussera + Diwali + Thanksgiving + Christmas Gift …

    And that would be a USB to SATA/IDE cable … hee hee. About three months back I purchased an external 250 GB SATA hard disk. But as I wanted to use it for backup purposes I did not want to fix it inside the cabinet but keep it outside and access it via USB. For this purpose, I purchased an external SATA to USB enclosure from CTC, Parklane, Secunderabad and started using it. But soon I realized that it was hanging intermittently and the only way to access the hard disk again was switching off and switching on the USB enclosure. A similar drive brought by someone I know had corrupted his entire hard disk. What is worse is that these cheap quality USB enclosures available in CTC do not come with any warranty.

    This is when I decided I would order one from US. And my friend Sagar offered to buy me one. There are many USB to SATA/IDE cables available for ordering online. The one I got was from Granite Digital. Though this was a bit costly, I decided to go for it as it exclusively mentions support for linux. Another such cable which has got good reviews is the one from Vantec. Be sure to check out the reviews on the Internet before you buy any such cable / enclosure as a low quality one might corrupt your hard disk and cause data loss.

    And as to why it is a Dussersa + Diwali + Thanksgiving + Christmas gift, is because I had almost waited for 3 months for someone to get this to India from the US and during this period, all those festivals passed by. Thanks Sagar for this gift. It is a life savior.

  • PVC Tie Wire

    A tie wrap is used to tie wires or objects together. It is mainly used for binding electrical wires, rods during construction, plants in gardens etc. They are of many types depending upon your need varying in the make, thickness, coated or not, etc.

    The one I am going to talk here is a “Galvanized PVC tie wire” (thickness 1 – 1.2 mm). It is a steel/iron wire of 1-1.2 mm with PVC coating for insulation. I have been searching for this for the past 3 months and must have at least asked in 15 shops before finally finding a shop which sells it. It is available at “Pooja Electricals” near JNTU, Hyderabad. It might also be available in any big electrical stores. Here is a picture of it.

    Sample Tie Wire

    The reason why I have made the particular mention of this PVC tie wire is because I think it is extremely useful to us (at least to me who has a big bunch of wires at the back of his PC).

    Using it for winding phone wires

    Demo 1 Tie Wire

    Using it for winding my computer wires

    This image shows me using rubber bands previously which used to be a big problem because they used to become sticky due to heat and didn’t even last.

    Demo 2 Rubber Band

    This second image shows me replacing the rubber band with the tie wire.

    Demo 2 Tie Wire

    This tie wire might not immediately be recognized by electrical store owner as it is also knows as binding wire / tag. They might also refer to binding wire as the one used in construction and may redirect you to a hardware shop. So it might not be a bad idea to take a sample piece of this wire if you are looking to purchase one.

    Also as you can see I have quite a lot of that wire. They had sold me the bundle for Rs. 40 and weren’t willing to sell half or quarter of the bundle. So here is one simple deal I got for you for reading this post of mine patiently. Come down to my place and spend some time with me and I shall hand over 3-5 meters of that cable. Now isn’t that a lucrative offer 😉 ?

    P.S.: There is something known as Cable Tie which is actually more often used in electrical work for binding electronic cables and wires. And you get reusable cable ties as well. This is what I’d be recommending rather than PVC coated tie wire.

  • Increase Laptop Battery Life

    Hi,
    Below are a few links which has some useful tips on increasing laptop battery life.

    http://mobileoffice.about.com/od/usingyourlaptop/tp/laptopbattmtc.htm
    http://mobileoffice.about.com/od/usingyourlaptop/f/laptopbattery.htm
    http://mobileoffice.about.com/od/usingyourlaptop/f/laptopbattery1.htm
    http://www.laptopmag.com/Features/Five-Tips-For-Better-Notebook-Battery-Life.htm
    http://answers.yahoo.com/question/index?qid=20070925233811AACVHda

  • Free Long Distance Calling Using SIP (with Linksys PAP2 or any softphone)

    Short and simple steps for the technically challenged

    For this setup, you will have to first buy a phone adapter. A very good and cheap SIP phone adapter is the Linksys PAP2. This will cost around Rs.2500 in CTC, Secunderabad. If you want to use single phone for internet calling and normal telephone line, then you can consider buying Linksys SPA3102. (Note: Newer versions of these ATAs modelled SPA112 and SPA122 have been launched). After you buy the phone adapter, follow the below instructions to configure cheap calling to international destinations:

    1. Go to http://www.voipdiscount.com and create an account
    2. Get the IP address of your PAP2 device by following Step 1- Step 5 in http://www.callcentric.com/support/device/linksys/pap2
    3. Configure Voipdiscount in your PAP2 device by following the instructions at http://www.voipdiscount.com/en/sipp.html. See section on Linksys SPA3102. Also see section on “If you have audio problems:”.
    4. For US number, visit http://www.ipkall.com/. Create a new phone number and assign the below SIP address.
      SIP Username: Your VoIP discount username.
      SIP Server: sip.voipdiscount.com
      For UK number, visit http://www.uknumber.co.uk/voip.htm and register your SIP address : username@sip.voipdiscount.com (substitute username with VoIP discount username).
      For more such DID Providers, visit http://wiki.sipsorcery.com/mw/index.php?title=DID_Providers
    5. (Slightly Advanced) For direct IP calling, follow the instructions in http://faq.sipbroker.com/tiki-index.php?page=Inbound%20Calls%20Directly%20to%20your%20LinkSys%20or%20Sipura

    For understanding more about SIP, read on.


    Overview

    This is the second article I am writing on Long Distance calling. And in a way it obsoletes my previous article on Net Telephony. This article mainly focuses on using SIP for making long-distance calls. SIP (Session Initiation Protocol) is a protocol which is used for voice communication for internet (Read more). For making these calls, the bare minimum is a net connection. The setup is best explained with the below diagram.

    SIP Setup

    For furthur clarification, an analog phone is just an ordinary corded/cordless phone using which you place your regular landline calls. Now that you have an idea of the setup, let us get into some real action.

    Basics

    Choosing a SIP provider

    Just like when you chat on yahoo messenger, you have a yahoo client installed on your PC and Yahoo Server providing the messenger connectivity, for SIP you need to have a SIP provider (and SIP client). I had considered many SIP providers. I have summarized some of them below.

    • Callcentric – The biggest reason for me to try out Callcentric are its really good reviews at Callcentric Voip Reveiws. And true to the reviews, the quality of Callcentric as of today seems to be really good. Also their rates and packages they offer such as Pay Per Call are useful to the end-users. And definitely not to forget the excellent documentation they have for setting up your SIP device which you shall get to hear of soon.
    • VoipDiscount – Voipdiscount is perhaps the cheapest VOIP provider out there on the internet. It is owned by Betamax which also runs many other such similar VOIP services. You can find out more about Betamax and its products at http://backsla.sh/betamax and http://progx.ch/home-voip-prixbetamax-3-1-1.html. For configruing Voipdiscount with your SIP device, click here (you shall read more about what a SIP device is later).
    • sipgate and Voipfone – Though sipgate and Voipfone do not offer as cheap outgoing rates as Voipdiscount, they both provide a free UK number. While sipgate offers a number starting with 0845 or 0870, Voipfone offers a free number starting with 056. This makes it extremely useful if your primary need is to have your relatives in UK call your phone adapter.

    This was just an overview of some of the free SIP providers. They are many out there which you may feel to try out if you have the time and patience :). I intend to keep this updated as and when I come across any good SIP providers. So for now, we shall go ahead with Callcentric.

    Creating a SIP account

    The next obvious step would be to create a new SIP account. Kindly visit Callcentric or the website of the SIP provider you have chosen and create a new account.

    Please note that if you make only (or mostly) outgoing calls, then Voipdiscount is what I would suggest you look at.

    Configuring your SIP client

    Just as for yahoo messenger after creating an account you have to download and install the client, similar is the case with SIP. You have just created a SIP account and now you need to download, install and conifugre the client.

    You can use the free SIP phone X-Lite as a SIP client. There are many other SIP softphones available but I choose this because it is a very popular SIP phone. Also you can find step-by-step detailed instructions for configuring Callcentric on X-Lite here.

    Communicating with your friends

    Now ask your friend or whomever you want to voice chat with to follow the same procedure by creating a SIP account with some provider, download, installing and configuring the client. Once he does that, either of you can call each other using the SIP number associated with the respective accounts.

    Advantages of SIP

    You might have observed that what we have achieved so far (i.e. PC-to-PC voice chat) can be achieved using Yahoo Messenger or Skype or some other voice chat software. But what makes SIP so special is that it is based on open standards which enables use of the following features.

    Using SIP phone adapter (ex. Linksys PAP2)

    This is perhaps the best thing I like about using the SIP protocol. You can replace your computer + headset with a SIP phone adapter + any analog telephone. The phone adapter is especially a boon for those who are not familiar with how to use the computer.

    A very good and cheap sip phone adapter is the Linksys PAP2. I recently purchased this piece from Bhumika Computers (in Hyderabad, India) and it costed Rs.2800. As per my knowledge, the latest version as of September 2007 is PAP2T and it comes in a properly packed blue box. Also make sure that this is an unlocked version which you are purchasing. The instructions for configuring callcentric account can be found here.

    Also note that there are some other slightly costlier phone adapters / VoIP Gateways which provide additional functionality compared to Linksys PAP2. For instance, the Linksys SPA3102 integrates with your PSTN network thereby enabling you to use only one analog phone for PSTN and VoIP. This device also has the additional provision of configuring multiple outgoing providers and switching between them based on your destination number. If you call up various countries, this would be particularly useful.

    This kind of feature of choosing outgoing provider based on destination is also provided by services such as Voxalot and SIP Sorcery. But there might be latency issues when compared to configuring the outgoing providers directly in your phone adapter.

    If you have understood the working of the phone adapter, then you must have realized by now that if you have only one network connection, it is not feasible to use your computer and the phone adapter at the same time. To overcome this you will have to buy a device which provides routing functionality and phone adapter functionality OR buy phone adapter and some other router (netgear, linksys, softrouter, etc.) separately. The latter option is what I recommend because it will prove more economical to buy a separate router taking into consideration the features provided by a separate router (such as wifi, multi-port, etc.).

    Calling via traditional PSTN networks

    It is possible to reach your SIP phone via traditional PSTN numbers. This is made available through the SIP Broker service. Apart from this, SIP Broker service can be used for making calls between SIP networks. Visit their site for more information.

    I shall explain how this feature has proved a boon to my aunt who stays in India (she has a callcentric configured on Linksys PAP2 and let us assume her account id is 1722221224) and how her daughter who stays in England calls her via her PSTN phone.

    i. The daughther first selects a number from the list in SIP Broker PSTN Access Numbers. For her, all calls to London are free. Hence she selects a London PSTN access number.

    ii. After dialing the number, she hears a welcome message asking to enter the SIP number followed by the hash sign. Now she punches in the SIP Provider code which is *462 for Callcentric followed by my aunt’s SIP number which is 1722221224, finally ending it with a hash (#) sign i.e. after she hears the welcome message, she punches in “*42617772219612#” (without the quotes).

    iii. That’s it. Once she does that the SIP phone at my aunt’s place rings and they can talk to each other.

    Calling from other SIP networks

    It is possible to call callcentric users from other SIP networks. For example, people using Vonage / Packet8 should be able to call you directly using this method. For more details refer Callcentric FAQ.

    Incoming Phone Numbers

    Using the service offered by IPKall, it is possible to have a free local US phone number in the washington state. Please note that for callcentric users, your SIP number will be of the form “17770000001” and your SIP proxy is “in.callcentric.com”.

    Callcentric offers paid local phone numbers in other countries as well. For the details, visit Callcentric Phone Numbers.

    SIP Broker Alias

    For certain SIP providers, you are provided with a SIP account such as amaramrahul@sip.voipbuster.com but no SIP number. These would pose a limitation if someone would like to call this user using their phone as phones support only number dialing. To overcome this limitation, SIP Broker provides an excellent service which allows creating a free SIP number alias for your non-number based SIP URI. For furthur details, visit SIP Broker Alias

    Another way of calling non-numeric SIP address (such as amaramrahul@sip.voipbuster.com), is by switching to advanced view in Linksys PAP2 web interface, clicking on User 1 (or User 2 depending upon your line) and setting one of the Speed Dial numbers to the SIP address. Then you can call this SIP address by dialing the speed dial number (2-9) followed by the “#” key from your phone. But this does not provide a SIP number as in the previous case.

    Inbound Calls Directly To Your Phone Adapter and Direct IP Calling

    If you have a public IP / can set up one of the ports in your router to be forwarded to you phone adapter, then you can set up inbound calls directly to your phone adapter. This implies anybody can call your phone adapter using the public IP with which it connects to the Internet. The biggest advantage of this is that people who call you can directly call your phone adapter bypassing the intermediate SIP provider. A combination of Voipdiscount (for outgoing calls to traditional phones) and setting up your phone adapter to accept ip incoming calls proves to be really economical. To enable dialing the phone adapter IP using a SIP number, you may either use a SIP Broker Alias (details above) or Enum (details below). You can also use IPKall (details above) to map a U.S. phone number directly to your phone adapter IP. For more information on Inbound Calls to Phone Adapter, visit this article Inbound Calls Directly To Your Linksys Or Sipura on SIP Broker Wiki.

    Enum

    From http://www.e164.org – “E164.org is a public enum directory of telephone numbers that can be reached over the Internet by anyone anywhere. The system works by publishing a DNS zone, ‘e164.org’, that can be used by various Internet applications. The idea is to be able to map your phone number to an Email address, website, VoIP addresses, etc.”.

    For ex. this is how I can use it. Let us assume my home phone number is “+91 40 123456”, then using e146.org I can map my home phone number to the SIP address “amaramrahul@sip.voipbuster.com”. Now someone who knows my home phone number can contact me using the SIP Broker Service with the code for enum (*013) and my phone number (9140123456).

    Using the Phone Adapter as Intercom

    Alright, this you might not find documented anyway. But this is one small little trick I found out. As mentioned above, it is possible to call the phone adapter using the IP assigned to it and port number. As Linksys PAP2 phone adapter generally comes with two phone lines, it is possible to call up one phone line using the other. I’ll explain this using a small example. Assume your set up is as below.

    Phone Adapter IP: 192.168.1.2
    Line 1 User: user1
    Line 2 User: user2
    Line 1 Port: 5060
    Line 2 Port: 5061

    Go to “http://192.168.1.2 -> switch to advanced view -> User 1” and set “Speed Dial 2” to “user2@192.168.1.2”. Similarly go to “http://192.168.1.2 -> switch to advanced view -> User 2” and set “Speed Dial 2” to user1@192.168.1.2.

    Now either of the users can call the other person by using the Speed Dial feature of Linksys PAP2 adapter i.e. by dialing the Speed Dial number to which the address is assigned to (in this case “2”) followed by the “#” key.

    Other Useful Links

    http://www.myvoipprovider.com/blog/60_free_voip_services
    http://www.redflagdeals.com/forums/showthread.php?t=454642
    http://en.wikipedia.org/wiki/Comparison_of_VoIP_software
    http://voipguides.blogspot.com/2006/12/top-5-free-voip-providers-for.html
    http://voipguides.blogspot.com/2007/01/allfreecallsnet-hack-to-make-worldwide.html
    http://forums.whirlpool.net.au/forum-replies-archive.cfm/1159846.html
    http://voipstuff.net.au/IPDialling.html
    http://snapvoip.blogspot.com/2009/01/free-sip-accounts-revisited.html

    Summing it all up …

    VOIP i.e. the ability to transfer voice over the internet has become a big market today. Merged with standard protocols such as SIP, we are getting the convenience of the traditional phone at a very low price. Looking at the current trend, it might not be long before the traditional phone lines are replaced with IP phones.

  • 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.

  • 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

  • Activating BSNL AMS facility

    BSNL offers AMS facility for its customers. And in my humble opinion, their service sucks. I had the AMS facility activated after a lot of trouble and then one fine day, it was deactivated for no good reason. I again had to go through almost the entire procedure for having it activated.

    Anyway, my woos aside, here is the procedure for activating AMS. You initially need to call the AMS customer care (156) and ask them to clear your mailbox number. This is the steps they will ask you to follow.

    1. Dial 170512.
    2. You are presented with choices for language (Select 1 for English)
    3. Next you will be prompted whether you are calling from your own phone or a different phone (Select 1 if calling from own phone)
    4. Now you will be prompted to enter the pass code (Please note that at this stage if you are being prompted for a mailbox number then you will have to call up the customer care and ask them to clear the mailbox number). Punch in 000000 (six zeroes).
    5. Now you will be informed that your passcode has to be changed and asked to enter the new passcode. Enter a 4 digit or 6 digit passcode (ex. 300307).
    6. Next you will be prompted to reenter the passcode. Enter the same passcode (300307) again.
    7. You should now get a confirmation message informing you your new passcode.
    8. Immediately after the confirmation, you will be presented the various choices. Dial 9 to hangup.

    Also for me they gave me an account activation code which was 10 digits long and which they ask me to punch in directly from the phone. But as I had opted for STD facility and STD on my phone was locked, I was unable to punch in the 10 digit activation code. In order to have STD unlocked I had to do this. I remember calling up 23810025 for knowing the below procedure.

    Note: The below procedure for unlocking STD may not be entirely correct as I had done this long back. In case there are any corrections in the below procedure, then kindly mail me or add it as a comment to this post.
    1. First I think you will have to call up 23810025 and inform them to clear your STD passcode as you would like to enter a new one.
    2. Next select a 4-digit passcode (ex. 3003) and you will have to punch in 123-passcode-passcode directly from your phone. The reason you will have to punch in your STD code twice is for confirmation.
    For example, to have 3003 as your new STD passcode. you will have to type 12330033003. You should get a confirmation message.
    3. To unlock the STD facility, punch in 124-passcode-3 (ex. 12430033). You should get a confirmation message.
    4. To lock the STD facility, punch in 124-passcode-2 (ex. 12430032). You should get a confirmation message.

    This was what I had to do to have AMS activated on my BSNL phone. Finally to access your AMS, dial “170512”. The steps will be similar to what I have mentioned above except for that at step 4, you will have to enter your new passcode (ex. 300307), after which you will be taken to step 8.

  • Website Designing Tips And SEO Techniques

    It is now more than 2 years since I have launched my website. Below are some of the things which I think one should keep in mind while designing a website. This article was mainly written when I had a hand-coded website. Though now I am using a CMS (Drupal) for my website, I think most of the points still apply.

    XHTML 1.0 Strict and CSS 2.0 Compliance

    I think keeping this as the first point itself shows the importance of following standards. Unless really necessary, it is always best to make your website XHTML 1.0 and CSS 2.0 compatible. Following such rigid standards will be of great use later as you will have to worry less about cross-browser and cross-platform compatibility. You can more know more about XHTL in Wikipedia. Even CMS like Drupal produce code which are XHMTL 1.0 and CSS 2.0 compliant.

    Liquid Page Layout

    Try resizing the browser window and viewing. Change your resolution (make it higher (1024×768) and lower(800×600)) and observe. No matter what your browser size is and in what resolution you are viewing, you shall find the content filling the entire browser and the scrollbar being avoided wherever unnecessary. This is what is called “Liquid Page Layout” because it changes depending upon your browser size and the resolution. The easy part is that writing code for liquid page layout is very simple. Generally liquid page layout is achieved by defining the height and width of all elements in percentage. The difficult part is trying to make this liquid page layout design work in all the browsers :-).

    Templates

    The concept of templates is simple. In simple words, a template is a page with some parts of the page being the same across all pages. So let us say your page is divided into a header, content and footer. The header and footer remain the same through out the site where as the content changes from page to page. In this case, it would be a good idea to have the header in one file, the footer in one file and then for every content page include this header and footer file. The main advantage of this is that changes in the single header file / footer file will be reflected across all the pages of the site. For example let us say the header file is header.php and the footer file is footer.php. The header file could consist code for your menu. The footer file could contain the copyright notice and probably some acknowledgements. Then your content pages would probably look like this:

    header.php:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
        <title>My Website</title>
      </head>
      <body>
        <div style="text-align: center">
          <a href="content-page-1.php">Content Page 1</a> * 
          <a href="content-page-2.php">Content Page 2</a>
        </div>
        <div>
    

    footer.php:

        </div>
        <div style="text-align: center; color: #cccccc; font-size: small">
          This site is designed and maintained by Rahul Amaram
        </div>
      </body>
    </html>
    

    content-page-1.php:

    <?php include('header.php'); ?>
    This is Content Page 1.<br/>
    This is Content Page 1.<br/>
    This is Content Page 1.<br/>
    This is Content Page 1.<br/>
    This is Content Page 1.<br/>
    <?php include('footer.php'); ?>
    

    content-page-2.php:

    <?php include('header.php'); ?>
    This is Content Page 2.<br/>
    This is Content Page 2.<br/>
    This is Content Page 2.<br/>
    This is Content Page 2.<br/>
    This is Content Page 2.<br/>
    <?php include('footer.php'); ?>
    

    Avoid Frames

    Whether or not to use frames is always a controversy. Using frames, one would not have the need to go through the hassles of templates. There could be two parts (frames) with the links in one frame and the content in another frame. But then frames are unethical. They give out ugly scrollbars. Of course, there are always inline frames. Using inline frames you can display a frame anywhere in a page, even in a table! All you have to use is use the ‘iframe’ html tag. But then the problem of bookmarking which was there with ordinary frames is not solved even with inline frames. For example, you browse to some page in the inline frame and add to your ‘Favourites’ list. Later when you click on this Favourite page, you get always the content of the first page in the frame and not the page to which you had browsed. Therefore inline frames are only used by me when I give link to an external site and few other places. You can find more arguments on this at http://www.apptools.com/rants/framesevil.php and http://www.cti.hull.ac.uk/malang/authoring/design/frames.html.

    Make latest updates easily accessible

    In other words, the easier for the user to find newer content, the more likely is he to visit your site regularly. Adding a “What’s New” or “Recent blog posts” section is a real value addition to your website.

    Comments

    Unless you want your website to be some kind of broadcast network (like a Television :)), it is important that you provide some facility of taking feedback from users. Not doing so would mean you are not listening to your user’s opinion. Nor are you providing any facility where in the user can interact.

    Dealing with Spam (having some kind of anti-spam feature)

    Yes you won’t believe it. There are many crawlers out there which automatically post comments mostly related to porn. There are some well proved techniques to fight this kind of spam. For example, one can use some kind of image authentication (captcha) for posting comments. Another technique is to use some kind of learning agent which keeps improving over time in deciding whether a comment is spam or not learning from the previous spam comments.

    Domain registration

    I used a free url initially “amaramrahul.uni.cc” provided by uni.cc . But later I purchased “rahul.amaram.name”. My suggestion is that even if you have the smallest plan to own a website, first buy a domain name. Domain names are damn cheap (350-700 Rs. per annum). So buy one and keep it. And also remember the more you delay, the lesser are the chances that you’ll be finding your domain name. Here is an excerpt from one of my previous posts:

    ————————————————————-

    I purchased the domain “rahul.amaram.name” for Rs.350/yr from Sify. So my new website address is http://rahul.amaram.name :-). Some interesting things I noted during this entire process of domain name registration are:

    • If you are considering to have your own domain name, I would suggest .name, .in, or .ind.in. Though .com is very popular, .com generally refers to commercial websites. .NAME is the official top level domain registered by ICAAN for personal websites. .IN domain names are available to anyone! Companies, individuals, and organizations in India and abroad are eligible. .IND.IN is for individuals (ind) in India (in).
    • I tried for “rahul.name” and “rahul.in” before deciding on “rahul.amaram.name” but they were not available. “rahul.name” was registered by some Shyam and he was not ready to sell it as his son’s name was Rahul :-). “rahul.in” was for sale and I quoted 70$ to buy the domain. Here is the best part. The seller got back to me with a quote of 75000 USD =)). So this gives you guys an idea as to the money involved in domain name market. Domain names are generally re-sold for thousands of dollars. A furthur interesting fact is .IN was officially opened to the public on 16 February 2005 and “rahul.in” was purchased by Dot Name Communications on 16-Feb-2005 06:32:27 UTC :-). So that also tells you the demand in the domain name market.
    • Here are a few links which u may find interesting:

    ————————————————————–

    Good URL

    So, What is a good url? As mentioned in http://www.w3.org/Provider/Style/URI, a good url is something which does not change in 2, 20 or 200 years. This is especially important for content related pages. A simple example would be “http://rahul.amaram.name/blog/2006/11/31/why-we-adopted-boozi”. A similar scheme scheme is followed in wordpress. This article may come under any location, any category but the url will always be the same. mod_rewrite can be used to convert these urls to dynamic urls. You will observe that a lot of care has been taken on my website to make all urls good urls. With regard to the same, it is also a good idea to have some naming convention for urls. Some related links are:

    Separate content from view

    A very important paradigm. The presentation layer has to be separated from the data layer. This can be achieved only using dynamic urls. To elaborate, you will have the content in some database / flat files. When displaying each page, all you will do is just read in content from the database / flat files, populate the page with it and have it displayed. The main advantage of this abstraction of the content from the view is that the view (i.e. look-n-feel of the site) can be changed without making any changes in the content. All Content Management Systems follow this paradigm.

    Title

    It is a bad practice to have no title / the same title (ex. “My Homepage”) for all the pages in your website. Apart from giving information about the content of the page currently being displayed, the title is also used by Search Engines. Hence make sure that each and every page has a custom title.

    Site monitoring

    It is a good practice to have your site monitored for downtimes. There were periods when my site used to be down and I never realized it for days. Below is an excerpt from one of my previous posts:

    —————————————————-

    Added two new monitoring services for my website so that I can get immediate alerts when my site goes down. Apart from this I also get a weekly and monthly report showing me the site uptime stats. Some things you have to look out for while subscribing to these services are:

    • Monitoring interval – most free services offer 1 hour monitoring interval but you can also get a monitoring interval of 15 mins
    • False Alarm protection – this means that the site would be tested from various locations to be doubly sure that the website is really down
    • Contacts to be Alerted – sometimes it may be necessary to recieve the alert at a different email than the one with which the login was created or to receive the alert at multiple email ids
    • Performance Reports – Daily, weekly, monthly reports provide useful stats

    Generally free services do not provide the whole set of facilities. I am using both InternetSeer and SiteUptime to monitor my website :D. Two other services which could probably be conisdered are (I have not tested them) Killer Website Monitor and MrAlert Free Website Monitoring Service.

    ——————————————————

    Site statistics / Web Traffic Analysis

    Understanding the kind of traffic which you get and most importantly the kind of pages your visitors visit, will help you to make your website more popular. Two great sites for website traffic analysis are Google Analytics and StatCounter

    Content Delivery

    Make the content reach your visitors rather than the visitors reaching your content. Using emails and RSS, content can now be delivered directly to your user.

    Guidelines

    It is a good practice to follow guidelines. Below are links to some websites which provide you general Web Design Guidelines and also coding Guidelines.

    To be frank, I have not referred the coding guidelines in detail. It is not necessary that you stick to these coding guidelines. But then do follow some convention so that making changes later to your webpage will not pose a big problem and also it will help anyone trying to understand what you wrote :-).

    References

    Below are some of the websites I had referred for constructing my website.

    • W3Schools Online Web Tutorials – This is an excellent site which can be used for reference while building the homepage as it contains descriptions of all HTML tags, CSS 2.0, compatibility of tags with browsers, etc.
    • HTML 4.01 Specification and XHTML 1.0 – This site contains information about the W3C recommendation for building web pages using various tags. This is an extremely huge site and I recommend this to use as a reference only and not as a must read.
    • irt.org – This is another site which can be used for reference. While searching for solutions in google, I found most of the solutions were linked to pages in this site.

    There are a lot many things you can do to increase your ranking in search engines (like Google). The above are just some points which help you address design issues and increase site ranking in Google.

  • Contact Lens Queries

    I started using contacts about a month back. Anyway, I had many queries related to the usage of contacts. Hence I mailed these queries to Customer Care (Bausch & Lomb). I use traditional daily wear (soft) contact lenses for astigmatism. But I think the below response applies to any soft contact lens. Below you can find the questions I have asked and the responses I have received. The below responses are by Neeraj Dabral, Professional Services Manager, Bausch & Lomb. Also Bausch and Lomb has a FAQ reg. contact lenses at http://www.bausch.in/faq.html.

    Q) While travelling in the bus from office to home and vice-versa, I fall asleep daily for about 20-30 mins. Is this harmful to the lens/eyes ?
    A) While wearing your lenses, kindly avoid sleeping with them. Reason being that the oxygen reaching the eye goes down drastically when contact lenses are worn and the wearer closes the eye. Please restrain from sleeping even for 15-20 minutes if possible.

    Q) About once in 2 days, I may need to remove the lens in order to take a nap. But I don’t have the solution to clean my lens at office. So I remove the lens, keep it in the case (which has some solution) and later take it back and put it on. Is this harmful to the lens/eyes?
    A) If you have to remove the lenses in the office, then please keep a small size bottle of ReNu Multiplus Solution for cleaning ,rinsing, storage etc otherwise what you are currently following may also work. Kindly ensure that lens cases is filled with solution whenever you move out so that you can use that solution in case you have to remove lenses. Another recommendation is that kindly change your contact lens solution after every usage.

    Q) Lastly, once in a blue moon (3 months or so), I may need to travel to other places. Then if I sleep overnite with my lens on, is it harmful to the eyes/lens?
    A) Sleeping with these lenses overnight even on an occasional basis is not at all recommended. Kindly do not attempt it and it may lead to complications. Some of these complications can be sight threatening too.

    Q) Can I put on contact lenses while taking a shower ?
    A) Lenses can be used while taking shower however care must be taken that soap water doesn’t enter the eye. This is possible with lenses worn on Continuous Wear basis but not applicable to your lenses. Since you should not sleep with your lenses, it will be a good idea to wear them post you have taken shower.

    Q) Sometimes I rub my eyes with my contact lens put on. Can that hurt the iris/cornea ?
    A) Rubbing the eyes with lenses is again not recommended, reason being that if there is a foreign body then it can hurt your cornea and other fragile structures of the eyes.Incase you think something has fallen into the eye then best thing is to flush it off with a lot of water and then remove the lenses. If irritation still persists, kindly consult an ophthalmologist or your eye care practitioner.

    Q) Also was just wondering if an occasional (once in a week) nap of 10-15 mins could actually cause any serious eye damage ?
    A) Sleeping with contact lenses is not recommended as in closed eye condition the oxygen transmission to the eye drastically reduced. It may cause subsequent complications like lens getting stuck to the eye,Acute red eye etc.These complication may not happen all the time but sleeping with lenses even for a shorted duration like 15-20 minutes increase your risk of complications.

    Q) Can I use the contact lens if they are exposed to air for a very long time like more than an hour? (the response to this was given by my ophthalmologist)
    A) When exposed to air for a long duration, the contact lens become brittle. Upon putting it back in the solution they again become soft. You can use it then provided no scratches were formed on it. Also sometimes the lens become folded when exposed to air and does not unfold. In such a scenario, soaking it in the solution for a few hours will generally unfold it.