Blog

  • Correct file permissions for WordPress on Apache

    File permission is a simple yet complex issue. If you manage a website, you need to ensure that the file permissions are adequate so as to allow users to perform operations on the file and at the same time, you need to ensure that file permissions are strict enough to prevent security and hacking incidents.

    Wrong permissions will break your automatic updates. Also, if you run composer, you may struggle as composer should not be run as root or sudo user, and non-root user would need read/write permissions to run composer.

    This situation usually arises when you run a website on a self-managed server like the one provided by DigitalOcean or Amazon AWS Lightsail. However, the permissions are equally valid for managed or shared hosting where the host has provided you the SSH access to your files.

    In this article, I have provided simple file permissions for your WordPress website hosted on Apache server. These permissions should be sufficient for most of your websites, including those which are not built on WordPress.

    Giving the correct file permissions to your WordPress website

    To begin with, Apache server runs all the processes requires to read/write the website files & directories. So, we need to provide the ownership of the website files & directories to Apache. As Apache runs as www-data, following command is appropriate to give ownership of your entire website folder to www-data user and group.

    In your SSH terminal, run the following command.

    sudo chown -R www-data:www-data /var/www/wordpress

    Here, I am assuming that your wordpress website root is /var/www/wordpress. You can change it to the directory in which your website is hosted.

    Now, we need to give all file permissions (read, write, execute) to owner (Apache server) because server needs to perform read/write operations on files & directories. It will ensure that our website runs smoothly without error.

    Giving read/write permissions to www-data is fine for your website to run and auto-update without any errors. But, if you try to SSH into your server as a non-root user, you will not be able to read/write your files inside the wordpress directory.

    Also, if you use composer, you need read/write access to website files. As per composer’s official documentation, it is recommended that you should NOT run composer as root or sudo user. You should run composer as non-root user. Same is true for other utilities as well which require read/write permissions in your wordpress directory. This means we need more permissions.

    For this, I am assuming you have already created a new user with sudo privileges and have logged in through that sudo user (not root use).

    First, add you to the www-data group using the following simple command in your SSH terminal. Remember, you must be logged in as a non-root user, with sudo privileges, as whom you want to run composer.

    sudo adduser $USER www-data

    Above command adds you to www-data group.

    Now give read/write/execute permissions to all the files and folders to both owner and group.

    sudo find /var/www/wordpress -type d -exec chmod 770 {} ;
    sudo find /var/www/wordpress -type f -exec chmod 660 {} ;

    Update: Recently I was facing following error while running these commands-

    `find: missing argument to -exec'

    I fixed that by adding a slash before the terminating semicolon.

    So, the update commands are-

    sudo find /var/www/wordpress -type d -exec chmod 770 {} \;
    sudo find /var/www/wordpress -type f -exec chmod 660 {} \;

    You need to log out and log in again for the new permissions to take effect.

    That’s it. You now have the correct permissions.

    How to check if your WordPress website has correct file permissions

    After setting up file permissions, you must validate the new file permissions. To check this, try the following two things-

    • Run composer and check if there is any permission error.
    • Try uploading a file in the WordPress media library.

    If you are able to execute the above two operations successfully without error, your WordPress website has the correct file permissions.

  • Customize your link preview on Facebook

    When you share a link to your post on Facebook or Twitter, it automatically generates a preview card with a title, description, and optional image. This preview helps your post visibility by presenting it in an attractive manner to other users.

    This preview can be customized for all our pages using Open Graph Protocol (OGP) created by Facebook. Twitter supports this protocol adding a few tags of its own as well. In this post, I will discuss the required meta tags to customize your link preview.

    In this article, based on the Open Graph Protocol, I will tell you the exact tags to be added in the head section of your blog. This will transform your posts into rich social objects on Facebook, Twitter etc.

    What is Open Graph Protocol

    Open Graph Protocol is a schema to assign properties to a web page which can be easily understood by the compliant applications. Open Graph Protocol is implemented through meta tags in the head section of HTML web page and is loosely based on other existing schema technologies.

    Open Graph Protocol provides different meta tags to be added to your page to customize the different elements of a web page as well as to define a lot of other properties for that page.

    Though we can add all the tags defined in the Open Graph Protocol for a webpage or blog post, it will be redundant and will add to extra code. So, in this post, we will look at the basic required meta tags which will be sufficient for your customized link previews on Facebook & Twitter.

    Customizing a link preview

    If you look at your link preview of a post you shared on Facebook or Twitter, you will observe that there are three important elements-

    • Title
    • Short Description
    • Image

    These are the visible elements which are needed in a link preview. Apart from these, there are two more properties, which are type and url.

    Type defines the type of web page. For blog posts and news articles, it is ‘article’. Url is the canonical url of the object. This acts as a unique id for the object in the entire graph. In case of multiple pages sharing same data like comment pages on a blog post, this url remains same.

    Apart from this, Facebook requires you to add their FB App ID in another meta tag. As described in my previous post on the topic Social Sharing Buttons, you can easily get your Facebook app id from your Facebook for Developers dashboard.

    In case of Twitter, though it defines it’s own tags, it officially supports the Open Graph Protocol as well. So, if you add separate Twitter meta tags along with Open Graph tags, Twitter tags will be redundant. So, in the interest of keeping our code concise, we will only add those Twitter tags, which are not covered by Open Graph Protocol.

    Twitter only requires one extra meta tag, ‘twitter:card’, which we will add in our code.

    Let’s take a look at the final code.

    <meta property="og:type" content="article" />
    <meta property="og:title" content="Title of your page">
    <meta property="og:description" content="Description of your page">
    <meta property="og:image" content="Image/url/of/your/post's/featured/image">
    <meta property="og:url" content="Canonical/url/to/your/page">
    <meta property="fb:app_id" content="Your_FB_App_ID" />
    <meta property="twitter:card" content="summary_large_image">

    You can see that "og:type" and "twitter:card" tags are static and will remain the same for all blog posts. "fb:app_id" will also remain the same if you are using same app id for entire website.

    You will have to modify four tags as per your post data- "og:title", "og:description", "og:image", "og:url".

    Paste these tags in the head section of your HTML page. Your page is now rich social object.

    Sometimes Facebook or Twitter fetches wrong values for these tags, or sometime they may not even able to fetch any data. Also, you may have changed the post title, description or image after the page has been fetched by Facebook/Twitter. As Facebook & Twitter cache their data for many days, you may not be able to see the updated data when you share that link.

    In such cases, you may use the Facebook Sharing Debugger which shows how Facebook looks at the Open Graph Meta of your page and shows you the open graph data currently saved by Facebook for your post. It also allows you to force Facebook to fetch the data again, in case, there is a discrepancy.

    What happens when there are no Open Graph meta tags on your page

    If there are no Open Graph meta tags on a page, Facebook tries to get that data automatically based on page content. Usually, the title of the page is taken as title. Description is taken from the description meta tag, if available. Otherwise, it takes first few lines from the content. Similarly, the first image found on the page which is larger than 200×200 pixels id taken as image.

    There is no confirmation that in the absence of Open Graph meta tags, Facebook will take only these values. It can take any value as defined by their fetching algorithms. So, to avoid this uncertainty, it is always advised to add the above seven meta tags to all your web pages.

    Conclusion

    So, you can see that Facebook’s Open Graph Protocol is currently kind of a universal protocol to define social properties of a web page. It is supported by Twitter and many other social networks.

    It is very easy to implement as it requires adding only seven basic tags. You can add many more tags by referring to the Open Graph Protocol Documentation.

    So, don’t wait anymore. If you have not yet implemented the Open Graph meta tags in your blog or website, it is important that you do it now.

  • JSON-LD: Add Structured Data to improve SEO

    JSON-LD: Add Structured Data to improve SEO

    Adding structured data like JSON-LD to your blog or website is a very important search engine optimization (SEO) technique. It helps Google to understand your content better and helps your website to get a better search ranking.

    What is Structured Data

    Structured data is a standard format to add information to a page which can be easily understood by search engines to identify the content of the page. For example, if you have a cooking blog, Google needs to understand if a particular page is for recipe and if yes, it needs to extract key information from that page to match with the user query. Structured data helps Google by directly providing this information.

    Structured data is comprised of predefined properties which are based on schema.org.

    There are multiple formats to add structured data to your website. The three most popular formats which are supported by Google are-

    • JSON-LD
      This is a subset of JSON where all the properties are defined in the head section of an HTML page.

    • Microdata
      In the Microdata format, structured data properties are nested within HTML content by using HTML tag attributes.

    • RDFa
      Similar to Microdata, RDFa uses HTML tag attributes which are officially HTML5 extension.

    Out of these three, Google recommends using JSON-LD for structured data whenever possible.

    So, our focus in this post will be only on JSON-LD. There is no use to add multiple structured data formats. One structured data format implemented efficiently is enough for Google to understand the key information provided by our content.

    JSON-LD is the easiest to implement among all other structured data formats as it is consolidated at a single place in the head section. Also, the JSON structure is easy to create either manually or through programming making it very fast to implement. The cluttered approach of Microdata & RDFa is something which actually results in errors in implementing structured data. JSON-LD is free from all that mess.

    The content on internet is mainly written in the form of blogs containing a lot of blog posts. So, in this article, I will tell you how to implement JSON-LD for a blog post.

    Though, schema.org provides a large number of properties for each page type, it is not necessary for you to implement all those properties. A few important ones are enough.

    Implementation of JSON-LD in a Blog Post

    First of all, let’s take a look at the complete JSON-LD snippet to be added to the head section of a blog post. Then, I will explain each property. Most of the properties are self explanatory.

    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "BlogPosting",
      "headline": "Enable browser caching on Apache server using htaccess",
      "description": "Browser caching for all types of files can be easily done using Apache's .htaccess file. This simple configuration results in a faster website, less consumption of bandwidth and better user experience.",
      "mainEntityOfPage": "https://webrosis.com/enable-browser-caching-apache-server-htaccess",
      "image": "https://webrosis.com/assets/images/logo.jpg",
      "datePublished": "2019-08-06",
      "dateModified": "2019-08-06",
      "author": {
        "@type": "Person",
        "name": "Abhineet Mittal",
        "description": "Abhineet is IIM Alumnus and Founder of popular Digital Publishing Platform, Sahityapedia. He is a technology enthusiast by hobby &amp; an avid reader.",
        "image": "https://webrosis.com/assets/images/logo.jpg",
        "url": "https://webrosis.com/about"
      },
      "publisher": {
        "@type": "Organization",
        "name": "Webrosis.com",
        "logo": {
          "@type": "ImageObject",
          "url": "https://webrosis.com/assets/images/logo.jpg"
        }
      }
    }
    <script>

    In this code, I have taken JSON-LD from one of the blog posts of this blog. Let’s discuss each element used in this code.

    • The entire JSON-LD snippet has to be wrapped inside <script type="application/ld+json"> and </script> tags.
    • @context is standard and should be used as-is.
    • The most relevant type for a blog post in schema.org is BlogPosting. So, we will use that for @type.
    • Headline is the page title. This title will be visible on the Google search results page.
    • Description is a short summary of the page, and like Heading, it will be visible on the Google search results page.
    • mainEntityOfPage defines that the topic discussed is the primary topic for this page. That means it has to have canonical URL.
    • Image is URL to featured post or thumbnail of this post.
    • datePublished & dateModified are self-explanatory.
    • Author adds nested properties to define a Person. Add your name, description (biography), image and URL.
    • Finally, Publisher is similar to Author, but it indicates an organization and must have name and logo properties.

    Interestingly, according to schema.org, Publisher can be either Person or Organization. But Google only accepts Organization as a Publisher. So, do not use Person there.

    Finally, you can validate your schema using Google Structured Data Testing Tool. If you see any error, try to fix it based on the comments provided by Google.

    And that’s it. Your blog posts are now SEO ready which can be easily understood by Google.

    Make sure you do not stuff structured data with unrelated content. Structured data should clearly describe the actual content in the blog post. Doing otherwise, will hurt your search ranking as Google’s algorithm’s are smart enough to notice any discrepancies.

    When all this is done, wait for a few days and observe the change in your search rankings. Properly implemented structured data will definitely boost the search ranking of your blog bringing in more traffic.

  • Social Sharing Buttons without Javascript

    If you are developing a website, it is imperative to have social sharing buttons to increase social engagement which in turn will result in higher traffic. A lot of widgets are available for this purpose.

    The Pros

    Adding a single line of Javascript adds all the popular sharing buttons to your website. Some services allow you to customize them through remote dashboards. They also add share count and other metrics to your buttons.

    From button styling to icons, everything is handled by these widgets. All you have to do is select which buttons to show and style of those buttons.

    These services also provide cloud-hosted analytics data where you can easily monitor the visitor and their sharing pattern of different posts.

    The Cons

    When you add these widgets, they simply add the Javascript SDKs of these social websites which load the sharing button and other metrics like the number of shares, likes, etc. along with the buttons.

    This may seem good, but it adds a lot of processing to the webpage. This results in higher load time and thus, lower ranking in search engine result pages (SERP).

    A major portion of your added analytics becomes redundant if you already have Google Analytics code installed on your website. Social analytics can also be implemented through events in Google Analytics, thus making additional tracking redundant. In most cases, social analytics added by these sharing buttons adds little value.

    Also, many of these services, track your visitors and you have no option to opt-out of it. They get all the traffic data of your website, slowing down your website with their trackers, and you have no control of that. For a webmaster, this is an uneasy situation.

    The Simple Solution: No Javascript

    The simple solution is to eliminate all the Javascript and add simple HTML buttons with sharing links provided by almost all social networks. This entire code will be purely HTML and CSS without Javascript.

    I have created sharing buttons for some popular social networks and included the required CSS for the buttons. You can add your styles as well. In case you need an even better look, you can also add icons to your buttons.

    The CSS

    First, let’s create CSS for these buttons.

    .button {
      text-decoration: none;
      display: inline-block;
      text-align: center;
      padding: .25rem .5rem;
      font-size: 1rem;
      font-weight: 300;
      border-radius: .2rem;
      color: black;
      background-color: white;
    }
    
    .button-facebook {
      background-color: #4267b2;
      color: white;
    }
    
    .button-twitter {
      background-color: #1DA1F2;
      color: white;
    }
    
    .button-whatsapp {
      background-color: #25D366;
      color: white;
    }

    Facebook

    In the case of Facebook, you will also need a Facebook App ID which is very easy to get. Don’t worry, you do not have to create an app. Just go to Facebook for Developers dashboard, and fill the form with new app details. A Facebook app will be created and added to your Facebook developers account. Once you get the app id, use it in the following code to add simple Facebook sharing buttons.

    <a href="https://www.facebook.com/dialog/share?app_id=your-app-id&href=https://example.com/link-to-your-post" target="_blank" title="Share on Facebook" class="button button-facebook" rel="noopener noreferrer">Facebook</a>

    Twitter

    <a href="https://twitter.com/intent/tweet?url=https://example.com/link-to-your-post&text=Post-Title&via=your-twitter-username" target="_blank" title="Share on Twitter" class="button button-twitter" rel="noopener noreferrer">Twitter</a>

    WhatsApp

    <a href="//example.com/link-to-your-post" target="_blank" title="Share on WhatsApp" class="button button-whatsapp" rel="noopener noreferrer">WhatsApp</a>

    These are just three, but you can add any number of buttons of different social networks based on the sharing link provided in their documentation.

    These links are simple HTML and CSS with NO Javascript. They do not add extra load on your page and give you the required functionality. You may miss the share count displayed on your sharing buttons, but it is not needed and the downsides of adding it to your website are simply not worth it.

    So, just add these buttons to your website posts and pages to replace the heavy sharing widgets, and move towards a faster, cleaner code and a fast loading website.

  • Add url rewriting router to PHP built-in server

    While developing a project, PHP built-in server is much more flexible and easy to use compared to desktop setups like LAMP, XAMP, WAMP, etc.

    However, without Apache, you also lose access to the magical and powerful .htaccess feature where you can create simple rewrite rules.

    What if our application needs such rewrites like loading .html files for permalinks without extension?

    Don’t worry. PHP provides an excellent and simple solution for this as well. You can create your router.php and call it while starting the server. Now, you are free to add any rewrite rule or any other condition to run your code.

    To do this, create a file named router.php in your project root. You can choose any name for this file, but router.php provides the right context.

    In this use case, I have a static website with all the static content like HTML, CSS, etc. But my permalinks are without HTML extension, though the file name is the same. I want to write a router that can rewrite my permalinks to .html version and at the same time, not mess us my style (.css) and script (.js) files.

    Here is the code which I wrote for my particular use case. You can modify it to suit your requirements.

    // router.php
    
    // Get the url path and trim leading slash
    $url_path = trim( $_SERVER[ 'REQUEST_URI' ], '/' );
    
    // If url_path is empty, it is root, so call index.html
    if ( ! $url_path ) {
        include( 'index.html' );
        return;
    }
    
    // If url_path has no dot, it is a post permalink, so add .html extension
    if( ! preg_match( '/[.]/', $url_path ) ) {
        include( $url_path . '.html' );
        return;
    }
    
    // In case of css files, add the appropriate header
    if( preg_match( '/[.css]/', $url_path ) ) {
        header("Content-type: text/css");
        include( $url_path );
        // You can do the same for other file types as well
    }

    Your router.php is ready. Now, open your terminal, go to the project root and start the PHP server with the following command.

    pathtophp.exe -S localhost:8000 router.php

    Finally, open your website by going to localhost:8000 on your browser. It works. Great.

    Please note that this method is good for small applications so that you can quickly do a test run and check the code without deploying it on a proper server. In the case of bigger applications, this setup may become complicated as it is difficult to scale.

  • Enable browser caching in WordPress using htaccess

    Browser caching is very important for any website as it helps in speeding up the website as well as reduces bandwidth costs.

    To enable browser caching on Apache, you must have the required modules enabled.

    If you are on a shared host like GoDaddy or HostGator, these modules are already enabled in most cases. So, you can skip the following steps and directly go to the htaccess code given at the end of this post.

    In case, you are on a cloud server like DigitalOcean, you may need to enable these modules which can be done in following easy steps.

    Open your terminal and run following two commands.

    sudo a2enmod headers
    sudo a2enmod expires

    Now restart the Apache server by running following command.

    systemctl restart apache2

    It will ask for authentication. Enter your password and Apache will restart.

    You have successfully enabled Headers and Expires modules on your Apache server.

    Now, open the root folder of your website and create a .htaccess file with the following content.

    # BEGIN Webroris.com cache-control
    <IfModule mod_expires.c>;
        ExpiresActive on
        ExpiresDefault "access plus 2 days"
        ExpiresByType image/gif "access plus 1 month"
        ExpiresByType image/png "access plus 1 month"
        ExpiresByType image/jpg "access plus 1 month"
        ExpiresByType image/jpeg "access plus 1 month"
        ExpiresByType image/x-ico "access plus 1 month"
        ExpiresByType image/x-icon "access plus 1 month"
        ExpiresByType text/html "access plus 1 seconds"
        ExpiresByType text/xml "access plus 1 seconds"
        ExpiresByType text/plain "access plus 1 seconds"
        ExpiresByType text/css "access plus 1 month"
        ExpiresByType text/javascript "access plus 1 month"
        ExpiresByType application/xml "access plus 1 seconds"
        ExpiresByType application/rss+xml "access plus 1 seconds"
        ExpiresByType application/json "access plus 1 seconds"
        ExpiresByType application/javascript "access plus 1 month"
        ExpiresByType application/x-javascript "access plus 1 month"
        ExpiresByType application/pdf "access plus 1 month"
      <IfModule mod_headers.c>;
           Header unset ETag
           Header unset Pragma
           Header unset Last-Modified
           Header append Cache-Control "public, no-transform, must-revalidate"
           Header set Last-modified "Tue, 1 Oct 2014 10:10:10 GMT"
      </IfModule>;
    </IfModule>;
    # END Webroris.com cache-control

    And that’s it. You do not have to restart your server now as .htaccess file works in real-time. All the files served from your server will now be cached in the user’s browser as per the expires directive mentioned in the .htaccess file. You may also change these to any value of your liking.

  • Should you quit your job for CAT Preparation?

    Should you quit your job for CAT Preparation?

    Common Admission Test (CAT) is the gateway to IIMs and other prestigious business schools in India. But at the same time, it is regarded as one of the toughest exams to crack due to very high competition.

    A lot of aspirants prepare for CAT after their graduation while on a job. And if you are in a hectic job, you may find it very difficult to concentrate on your studies.

    So what should one do in such a scenario? Is it a wise choice to quit the job and start CAT preparation with full dedication? Or, is it possible to prepare for CAT while working full time? Let’s find out.

    As a business manager, in life, you will have to make difficult decisions. Consider this decision as one of them. And to take any important decision, you need to sit calmly and think about what options do you have and what would be the outcome of each option.

    CAT is not a knowledge-intensive exam. It is a conceptual exam which needs a lot of practice. The syllabus of CAT is very limited. One can easily cover the basic concepts in a couple of months. The time taking part is to practice as many questions as you can. And practice needs discipline and sincerity.

    It does not matter how many hours a day you study. What matters is that you do it every day, even though it is only for one hour each day. This kind of regularity is needed to master the concepts. Another aspect is mock tests, which you should take very sincerely.

    If you are preparing for CAT or planning to start soon, you can read my detailed article here: How to start preparing for CAT

    The complete list of books and material you will need for your CAT preparation can be found here: List of Important CAT Preparation Books

    Now lets come to why people quit their jobs to prepare for CAT. Most of the time it is a bad manager, less salary or disillusionment with the current job. It makes sense to leave something for something much better. But you have to decide the right time to do it.

    Having a job has multiple advantages for your CAT preparation as described below.

    1) Without a job, you are in a do-or-die situation

    If you have a job, no matter what happens, your career is not ruined. A jobless preparation becomes a do-or-die scenario because one has to have a career no matter how they perform in CAT. This puts undue pressure on the candidate and many times they are not even able to concentrate as much as they could if they prepared along with their jobs.

    2) Job gives you a routine

    This may seem trivial, but when you are working, you have a fixed routine everyday. You wake up on time, go to office, eat on time, sleep on time. Your efficiency is very high and you try to utilize every free minute you find during the day to prepare for CAT. When you leave your job, you have no compulsion to follow this routine anymore. And that’s where you lose focus. Without a routine, without discipline, you unknowingly waste time and your efficiency gets low. Combined with the first point above, it is a disastrous situation to be in.

    3) Pre-MBA experience matters in campus placements

    If you left your job for preparation and got into your dream B-School, your pre-MBA job experience will still play a role in your campus placements. It is usually easier to answer job based questions in interview compared to academics. Many companies count this experience to calculate offered CTC and designation. Even a few months of extra experience may get you a higher position at a better salary compared to your classmates.

    4) A gap is a negative point in your CV

    Quitting job to prepare for CAT puts a gap in your CV which is hard to defend in any job interview. No matter what you say, you are seen as a quitter who could not handle job pressure along with studies. This may not be true for you, but for an interviewer, this matters and it can ruin one’s chances to get the job.

    5) A job is your plan B

    Job acts as a plan B in case things do not turn out as you wish. A lot of aspirants argue that thinking about a plan B is doubting their capability even before they start. This thinking is wrong, as it does not consider the unpredictable scenarios. One may be perfectly capable of cracking the exam, but life is full of uncertainties and it does not harm to have a backup option.

    6) Your savings will help you pay your bills

    This may not look like a critical point, but it does have its own importance. If you are selected into multiple B-Schools, sometimes you need to pay booking amount for multiple colleges in case you are waiting for your dream college convert. Your savings from job will help you pay these. Also, with each passing year, MBA is getting more expensive. Even if you get into an IIM, you will have to pay more than 20 lakh rupees just in fees, accommodation, food etc. Add your personal expenses to this, and the amount will increase even more. Though you will easily get collateral free education loan as this is a risk free loan for banks, it will definitely ease you if you have some savings from your job which you can use either to pay first installment of fees or for your personal expenses.


    All these factors are important and should be considered while making the decision.

    When I was preparing for CAT, I was working too. I was tempted to leave my job based on reasons similar to most other CAT aspirants. It was a very hectic job coupled with many other factors. But I did not. And it was a good decision.

    I always advise against leaving your job for CAT preparation. However, there may be exceptions and one should take this decision based on their own circumstances.

    I hope my experience and views will help you make the right decision.

  • How to count words in Unicode string using PHP

    How to count words in Unicode string using PHP

    How to count words in Unicode string using PHP?

    How to count words in Unicode string using PHP? This sounds too easy. After all, PHP has so many string manipulation functions. To count words, we can simply use str_word_count and we are good to go. But there is a problem.

    While this function works fine for English strings, developers find this function unpredictable as sometimes it also counts some symbols. But the real problem is that this function doesn’t work accurately for Unicode strings.

    I faced this problem while working on one of my websites which is entirely in Hindi. When I searched, I was surprised to find that there is no straight forward solution or function to do this. There should be a standard function which should work for all languages, but the variation in structure of languages does not allow this.

    A new function to count words in Unicode string using PHP

    So, I wrote a small function which can be used anywhere to count the words in a Unicode string and works for a large number of popular languages. It first removes all the punctuation marks & digits to ensure that we do not count them as words. Then it replaces all white space blocks, including tab, new line etc., by a single space character.

    Now all words of the string are separated by a single space separator. We can simply split/explode them into an array and count its elements to find the word count.

    You can see the code below.

    Just copy this code to your PHP project and start using this function to count words in any Unicode string.

    And this is equally good for English strings as well. I found it more accurate than str_word_count.

    Remember, it will work accurately for all those strings where spaces are used for word separation. But it may not work accurately for languages like Mandarin, where words are not separated by spaces.

    Please do let me know how you like this article "How to count words in Unicode string using PHP" through comments section below.

  • I missed you too

    I missed you too

    It was the best she ever looked. She was determined to fix everything today. Her flowing hair shining like gold fluttered through the breeze. Once again she looked at her cellphone mirror. “Perfect. He would love to see me.” She said to herself.

    It was a bright day, full of sunshine. As she walked by the corner of the main market road, her eyes followed her image reflecting in the huge front glasses of the shops. “He still loves me like old days. We will be together now.” She couldn’t resist talking to herself.

    After a long walk along the market main road, the residential area was in sight. She took a deep breath to prepare herself once again. She felt even more confident causing her to speed up. The white castle was now just a few steps away.

    It was a small bungalow painted pure white. When sun gazed at it in broad daylight, it shined like a dazzling white monument surrounded by lifeless stones. She crossed the gate and walked inside into the main hall.

    He was sitting in a corner on a wooden chair with a small table in front of him. There was a glass chess on the top of the table and it seemed like the game was at full swing. He was in deep thought thinking about the next move and didn’t notice her arrival.

    She quietly walked towards him and sat on the empty chair opposite to him. He was still immersed in the game looking into the emptiness. Something clicked and he rose his head with a huge smile. “Check & mate.” he cheerfully declared. His eyes were shining like he has won the world.

    She looked at him & smiled. His happiness made her happy. His joy made her cheerful. For a while, she forgot why she was here and felt the moment. He won. She felt as if she had won too.

    She waited for a few seconds as he settled down. As he rose his head, he finally noticed her. Along with the smile, a tear came rolling down his cheek. He was speechless. She was as beautiful as she had always been.

    He rose up from his chair and moved towards her. She rose up too. He hugged her so tightly as if this moment was going to last forever. It was what they both always wanted, to be together.

    A loud voice startled them both. “How dare you?” A huge man appeared from the inner house with an angry face. “Get out now, or I will call the police.”

    He froze and felt helpless loosening his arms around her. But she was determined today. While she held his hand, her other hand slowly slipped into her purse which was hanging on her shoulder and she grabbed something. A loud sound, and the man was lying on the floor, surrounded by his own blood. “It ends today” She murmered.

    She turned back to see him horrified. “It’s over. No one is going to hurt us anymore. We will go far away from all this. I missed you so much.” As he looked in shock, she slipped her gun back into her handbag and started walking towards the door still holding his hand.

     

     

    “I missed you too, Mom” he finally said and followed her out while looking back at his father’s motionless body. The headline of a local newspaper kept on the center table loudly read “Mentally unstable wife accuses husband of child abuse, escapes from asylum.”

  • List of Important CAT Preparation Books

    List of Important CAT Preparation Books

    A lot of candidates ask me about the important CAT (Common Admission Test) Preparation books to be referred while preparing for CAT.

    In this post, I will give you complete list of important books for CAT Preparation. Also, I will share some good resources/material which will help you a lot in your CAT preparation.

    I have included links to most of the books & resources. This list is the latest list of books updated for CAT 2019 preparation.

    If you are preparing for CAT or planning to start soon, you can read my detailed article here: How to prepare for CAT

    List of Important CAT Preparation Books

    The All-in-one

    If you are not willing to go through multiple reviews for CAT preparation books, you may go for this bundled package of 4 books for complete CAT preparation by Arun Sharma And Meenakshi Upadhyay.

    Continue reading below for topic-wise list of books from multiple authors as well as some additional books.

    Quantitative Ability

    There are two good books for Quantitative Ability. Practicing only one of these is enough for your preparation.

    How to Prepare for Quantitative Aptitude for the CAT by Arun Sharma

    This is the most popular book for quant preparation. It is a very good book with questions segregated into different difficulty levels.

    Quantitative Aptitude Quantum CAT For Admission into IIMs by Sarvesh K. Verma

    This is another good book. It was suggested to me by a friend and I referred to this book for my Quant preparation.

    Verbal Ability

    This is the most important section of CAT which becomes the reason for unexpected CAT scores. Following books should be referred for this section.

    Word Power Made Easy by Norman Lewis

    This is the most important book of your entire CAT preparation. Read it from end-to-end as per the instructions in the book and your vocab would never be the same.

    How to Prepare for Verbal Ability and Reading Comprehension for CAT by Arun Sharma & Meenakshi Upadhyay

    This is a good book for Verbal Ability and can be used as the base reference.

    Wiley’s ExamXpert Verbal Ability and Reading Comprehension for CAT 2019

    This is another popular book for verbal and reading comprehension preparation. You should go only for one of these two books.

    Apart from these, for Verbal Ability and Reading Comprehension section, you must have excellent English language skills which can be developed through regular reading. I have written a detailed article about this which you can read here: How to Develop the Habit of Reading

    Data Interpretation & Logical Reasoning

    DI & LR are very scoring sections of CAT and should be handled very efficiently. I have listed three books here- two individual books for DI & LR each, and one book for both DI & LR. Do not get all three. Either get first two books, or the third one.

    How to Prepare for Data Interpretation for the CAT by Arun Sharma

    This book by Arun Sharma is a popular choice for DI.

    How to Prepare for Logical Reasoning for the CAT by Arun Sharma

    This is a book on Logical Reasoning by Arun Sharma.

    Logical Reasoning and Data Interpretation for the CAT by Nishit K. Sinha

    This is a good book which covers both the Data Interpretation & Logical Reasoning. You can practice DI & LR questions from this book.

    Previous Year’s Papers

    Once you get through the basics, start practicing previous year’s papers. It will give you a good idea about the exam. You can choose any book as the questions are going to be the same. The following is the latest available book containing last 24 years CAT solved papers.

    24 years CAT Topic-wise Solved Papers (2017-1994) with 6 Online Practice Sets 11th edition

    Study Material

    If you complete these books, you may also refer to the study material of any one good coaching institute. No need to collect material from multiple institutes. You can even take someone’s old material which may be equally useful.

    For quant, study material may not be of much use to you as you will get a lot of questions in various books. But the study material may prove beneficial for Verbal Ability, Data Interpretation & Logical Reasoning. Try to practice all the questions from these topics.


    I hope this information would prove useful to you and you will crack the CAT and secure a seat in an IIM.

    All The Best.

  • My Idea of a Peaceful Dream Vacation

    My Idea of a Peaceful Dream Vacation

    A group of ducks enjoying the peaceful life of Mysore (Infosys Mysore Campus)
    A group of ducks enjoying the peaceful life of Mysore (Infosys Mysore Campus)

    We come across so many beautiful people, places and moments in our life. At times, we feel to revisit those moments, to relive the amazing past. Such nostalgia occurs to me every now and then. The memorable moments of my life I spent in Mysore.

    Yes, it is my dream vacation destination where I want to spend some quality time again. Away from the chaos of daily life, a place with still lower level of pollution, a place housing one of the best corporate campuses on earth- Infosys Mysore.

    It should be at least 1 month long vacation. I would leave from Delhi Airport to land in Bengaluru and from there I would take a cab to Mysore, the city of peaceful life. I can imagine the cool breeze entering my car and touching my face. The weather is amazing throughout the year.

    I want to book a guest house, not a typical hotel, but an independent villa-type house, slightly outside the main city, entirely for my use during the vacation duration. It would be a place where I would feel like home. It would be a place where I would not have room service to disturb me or next room neighbors to create any noise.

    I will spend the first week roaming around the city everyday and visiting the beautiful places like Mysore palace, Chamundi hills, Vrindavan Garden etc. The city is known for yoga and I want to practice it too while connecting with the people who passionately practice the art of yoga.

    A very nice place near to Mysore is Ooty. A beautiful hill station known for its huge expanse of tea farms. It is such a beautiful place that one can forget everything while visiting this heaven. The views from some of its points is so breathtaking that one can sit there and enjoy for hours just by looking at the natural landscape and enjoying the cool breeze. I will visit there for at least 3-4 days hiring a cab service for daily commute.

    Two things which are very famous in Ooty are homemade chocolates and tea factory. The tea factory manufactures so many varieties of tea including chocolate flavored tea. One can buy a ticket to even visit the factory and witness the whole production process. At various points, they offer you sample tea of different flavors which is a delight to taste. I will not be able to leave that place without buying at least a few kilos of tea powder.

    Another place in Mysore I want to visit is Infosys Mysore campus. It is a beauty in itself. I spent 6 months in training while staying in the campus and next 6 months working while living in Mysore city and the memories of this whole year are still so fresh. One can take days to completely roam the campus on foot and golf carts and parked cycles are a must to expedite the exploration. A day or two there will freshen me up a lot.

    For the remaining 2 weeks, I would rather chill out and enjoy the weather, place, people and the life in Mysore. I am sure it would completely recharge me to get back to the same energy level I had when I first visited this place and while going back to Delhi and arriving at the Delhi Airport, the smile on face would be the shiniest of all.

    To book your flight ticket, cabs, hotels etc. easily, you may log on to Yatra.com and get great deals on domestic air tickets on Domestic Airlines.

  • “New IIM” vs “Old” Private B-School

    “New IIM” vs “Old” Private B-School

    The new IIM dilemmaEvery year, a lot of students get confused between getting into a “new IIM” or established “non-IIM private” B-schools. I hope this article will help them in making a choice.

    In last 8 years, we witnessed 13 new IIMs which brought the total number of IIMs to 19 in India. CAT aspirants, who are unable to secure admission in older IIMs and get selected in new IIMs, find themselves in a huge dilemma whether to join these new IIMs or some already established premier non-IIM B-School.

    With a lot of opinions of so many so-called “experts”, it is obvious for a prospective B-school student to get confused. So, lets try to find a solution to this problem by analyzing some facts.

    Let us first look at what is the current general perception. I heard many people say that new IIMs are not good. They swear by other established non-IIM B-Schools. The sole reason for them is good placements in those colleges compared to new IIMs. Other than that, old established colleges have good faculty, thus good education, good infrastructure and finally good alumni base (which is again good for placements). I do not think there is any other reason due to which these people prefer other B-Schools over new IIMs.

    Now lets see what it actually means to be a “good MBA”. As per my understanding, apart from classroom teaching, MBA is mainly about “peer learning” while performing different tasks together in teams. Unlike technological courses, it does not require any sophisticated infrastructure/laboratories other than decent classrooms, auditorium, seminar hall, computer lab, library and faculty/staff cabins/offices. Other than that, any good college will provide some sports facilities and a decent residential facility (hostels).

    As per my knowledge, all new IIMs, though operating in makeshift campuses, provide decent level of all these facilities through various means. So, good infrastructure may not be a differentiating factor.

    Then comes the learning part. First we consider peer learning which means we need to have good students. As we know, the criteria for getting into IIMs is CAT which is considered one of the most difficult exams of the world due to its very low conversion ratio. For less than 4000 seats in IIMs, 2,00,000+ students are competing every year. This means that the conversion rate is less than 2% which is very low compared to top B-schools of the world.

    Even for new IIMs the general cutoff has been near 97 percentile which is higher than or equal to cutoffs for most of the non-IIM B-schools. It means no general student of new IIMs has got percentile less than nearly 97. If good CAT percentile is indicative of hard working, sincere, intelligent and talented students, most of the students admitted to new IIMs are good and thus facilitate good peer learning.

    Same is the case with faculty. In most premier colleges, there is a tradition of employing visiting faculty who are experts in their respective fields, along with permanent faculty. As a part of a new IIM with 15+ permanent faculty and 150 students in a batch, I have seen visiting faculty from old IIMs, other top B-schools and industry veterans for various courses. I do not think that I missed any superior kind of learning which I could have got in any non-IIM B-school.

    Regarding the course structure, the pattern in new IIMs is almost similar to the older IIMs with similar subjects, electives and exam criteria.

    The spirits of students are high in new IIMs as well. They organize events/fests, take part in (and win) various national/international competitions, celebrate majority of festivals, write research papers, attend conferences etc. I did not find anything significantly better in the description of such things happening in premiere non-IIM B-schools from people studying there.

    Till now, we saw that when compared to premiere non-IIM B-schools, new IIMs does not have any significant difference or disadvantage in terms of infrastructure,learning, environment, and student spirit. Then where is the actual difference.

    This brings us to a very interesting and highly controversial topic of placements. I do agree that old IIMs and a couple of non-IIM B-schools provide excellent placements. Apart from these, I find good placements in some other colleges, but not excellent.

    And this is the case even with their huge alumni base. A new IIM without any alumni base getting placements comparable to long established non-IIM B-schools is a huge indication of the excellent quality of an IIM. It shows that the quality of students in IIM makes them not overly dependent on alumni for placements and industry is ready to offer them good profiles.

    Moreover, the source of information of placements of any college is the placement report prepared and distributed by that college. There has been a history of highly inflated and misrepresented placement figures by many colleges. Can we actually believe the placement report of any college? I think, it would be better to consider more than just numbers. Though, in case of an IIM, you can try filing RTI to get true information.

    May be the new IIMs are new, may be their inception (in 2010) coincided with the world-wide recession which caused them to begin with somewhat less but still decent placements. But is this slight “apparent” difference, the reason to miss the opportunity to study in an IIM?

    Also, most of these non-IIM B-schools are expensive than new IIMs in terms of fees. Is it really worth it?

    I have shared my viewpoint. You have to take your own decision while considering realistic facts and avoid getting influenced by irrelevant hype and rumors.

    After all, an IIM is an IIM and its equally difficult to get into a new IIM.

  • CAT vs GMAT- Dilemma of every MBA aspirant in India

    CAT vs GMAT- Dilemma of every MBA aspirant in India

    CAT vs GMAT

    There is a lot of confusion in the life of a student. One thing is, should they study further or join some company. Once they make a choice, a plethora of further sub-options emerge and the person has to decide again. Now, for the sake of our topic, suppose the person chooses to study further, and that too MBA (lets ignore the Post Graduation in Science/Engineering vs Business Administration vs some other field to be taken on a later date).

    Now, in the context of India, MBA again has many sub-options- Whether to take CAT (Common Admission Test) and similar Indian exams to go to top B-Schools of India, or take GMAT and plan for MBA in abroad. Both exams are similar though very different from each other and it is quite difficult for a student to take a decision.

    First of all, we should understand that there cannot be any fit for all, generic answer to this question. Everyone has their specific set of circumstances based on which one of the above decision may prove to be a better option for them.

    CAT vs GMAT is a tough choice and a lot of factors should be considered to make it a good one.

    GMAT is considered easier to crack than CAT based on very low conversion ratio in CAT. However, GMAT is much more expensive than CAT, both in terms of application as well as college fees.

    Also, Indian B-Schools are more inclined towards lesser work experience of candidates. In contrast, B-Schools abroad have minimum work experience requirement.

    I personally feel that IIMs, XLRI, FMS etc. are more suitable and make more sense if you want to remain in India in the initial years of your career.

    So, based on the above scenarios, you need to make a choice as per your circumstances.

    Just sharing an interesting fact. Many of my friends who could not clear CAT even after 3-4 attempts finally took GMAT and got into some decent colleges abroad.

    For preparation, the content of both the exams is mostly similar however exam pattern is quite different. So, basic preparation can be same for both the exams but you need to subscribe to different test series to practice for the actual exam.

    I would suggest to identify your situation based on the scenarios I mentioned earlier and choose to take only one of the two exams. No need to ride in two boats. Going for both the exams will only distract you.

    However, if you want to take both the exams for the sake of keeping a back-up, you should first go for CAT because it is a fixed date exam. Once you take CAT, immediately start preparing for GMAT. Having already prepared for CAT, you have little to study and just need to practice a lot as per the pattern of GMAT. Once you get your CAT result, schedule a date for GMAT giving a time gap of about 4-6 months.

    Meanwhile, if you clear CAT, you will have to devote a lot of time for interview preparation. So, you can plan your GMAT preparation and date of appointment as per your interview schedule.

    Below is information about good resources for preparation of both the excams-

    For CAT Preparation, you can refer to my article here- How to start preparing for CAT (IIM)

    List of most important books for CAT Preparation- List of Important CAT Preparation Books

    Here are some good books for GMAT Preparation-

  • Beyond the Illusion of Real Togetherness

    Beyond the Illusion of Real Togetherness

    Real Togetherness

    There would be hardly anyone who would want to be alone in life. We always need family, friends, colleagues, acquaintances, neighbors, pets and even unknown people around us. It is human nature to be together and seek happiness and being with others. But has it changed these days?

    In old days, the only way of being together was to sit together. Telecommunication was still a distant dream usually practiced in fantasy movies by fictional characters. But everything has changed now. With the advent of 24/7 connectivity through small pocketable handheld devices called mobile phones, togetherness has got a new meaning.

    Earlier it was telephony where people used to talk for several hours a day. But with the introduction of internet, smartphones and apps, connectivity is now 24/7. People remain available all the time and remain busy in reading and responding to text messages. And it is so much consuming that they hardly get any time to think anything else.

    This connectivity is virtually connecting us to millions of people, but is it real togetherness? I cannot “new-pinch” my friends when they wear a new dress, I cannot dance with them on latest dance numbers, I cannot hug them when I feel lonely, I cannot hold their hands when I feel afraid. Whoever I am connected to using this technology, I am still sitting alone in a 10×10 room holding a smartphone in my hands. This is not togetherness. Rather, this is an illusion of togetherness which is taking away the real togetherness.

    The real togetherness is when we are actually together laughing on jokes, dancing on tunes, playing hide-and-seek, caring when someone is sick, cooking new dishes, traveling to new places, solving riddles, drenching in the rain etc. The list is endless and it is so much different than sitting in a room and imagining all these things.

    We all are slowly forgetting the joy of being close to nature and we prefer the comfort of sitting in our beds. And it is true that even being alone, we are technically not alone as we are constantly connected through technology. But we need to break free from these and get back to real life.

    Kissan has released a nice commercial showing how planting some tomato seeds bring a group of people together belonging to all ages. It shows how we are still those nature loving humans who truly enjoy when they are together, who still recognize the power of togetherness.

    We need to do something similar to make things better. There are so many things we can do like enjoy the sunrise every morning on our roofs, walking on the green grass barefoot, singing along with the birds, watering the plants in the garden etc. There is so much we can do.

    We are slowly going away from the real life which we need to stop, and being closer to nature is a great way to achieve that.

    You can visit the Kissanpur to learn more about above campaign here: http://www.kissanpur.com/

  • More Speed, More Happiness and Less Carbon Footprint: Its 4G, its Future

    More Speed, More Happiness and Less Carbon Footprint: Its 4G, its Future

    Image Source: Movie Poster of Jumper (2008 Movie)
    Image Source: Movie Poster of Jumper (2008 Movie)

    When I look back at year 2005, I remember Nokia N-Series 3G capable phones publicized all across the nation using all kind of media channels, be it hoardings, television, radio, newspapers, magazines etc. That was the telecom revolution which has come a long way in these ten years.

    I remember people buying 3G phones in a hope that telecom companies will provide 3G services some day. And the day came when even 3G services are about to get obsolete. The new kid is in town- 4G. And it claims to be way faster than 3G something which I am looking forward to experience myself.

    I remember my first broadband connection with 2 Mbps speed and it seemed like I was in a future world. But it had its limits and movies still took hours to get downloaded. Moreover, it was not mobile and I was stuck to my wifi range circle of my house to get the speed advantage. But 3G changed this by giving me mobility along with speed.

    However, my expectations had increased by now. I wanted more speed on the go; streaming low resolution videos on my mobile while moving seemed so antique. It still feels the same as 3G is still what I have.

    Airtel 4G makes huge claims about its speed, no doubt it is India’s first 4G network launched across the country. I am quite curious to use that. Moreover, my desire to move forward to the next technology is pulling me more towards it.

    If Airtel 4G works as expected, consumption of multimedia on smartphones will get a whole new definition. The high definition display of smartphones will actually feel utilized. The countless hours wasted while looking at the status bar representing the loading of a web page would be saved.

    Not just time, downloading a movie in minutes means no extra electricity consumption to keep the devices running during over-night movie downloads. The carbon footprint should actually reduce.

    And at psychological level, frustration and irritation due to slow internet or bad connectivity can be avoided thus making life happier and cheerful. I can imagine smiling people looking at their phones while using 4G in crowded Delhi Metro. Atleast one reason of stress will be gone.

    If it all works well, it can change the world around us as we see it today. May be internet of things will get the required boost and the imagined science-fiction future will be true, where every living and non-living thing will have an IP address. 4G may not be a reason for this, but it can atleast act as a catalyst.

    May be I am too much optimistic about it. But who knows. Even if it turns out to be 50% of what I am imagining it can do, we are looking forward to a better connected world, with lesser internet carbon footprint, less frustration, more happiness and higher technological growth.

    Airtel is India’s first network with such a huge 4G launch across the country. You can find more about it here: www.airtel.in/4g/.

    Just to add a little humor, here is the latest Airtel 4G ad campaign:

  • Togetherness without being together

    Togetherness without being together

    We have fun loving people all around us, but very few of them love people more than fun, and that makes all the difference.

    I always wonder the meaning of being together. Is it about being able to look at each other, talk or even touch each other? Save the “touch” part, looking and talking is now-a-days possible no matter you are physical near to each other or not, thanks to the technology in the form of Skype or Hangout.

    But, I believe that being together is much more than this. It is when we are together even if we are unable to hug, see, hear, or touch the other person. It is when our hearts are together, our heartbeats are in sync even if we are away, our memories make us feel as if we are still next to each other. This, I believe, is true togetherness.

    Usually, in one’s life, family and close friends are the main source of strength and motivation. I am no different. Even while living at different places, unable to meet many of them for months, even years, we are still together. Many times, when I felt low, they inspired me, took my hand and made me stand up to the challenges of life.

    Once I was unable to visit my home for 8 long months. I was working thousands of kilometers away from my home while also preparing for MBA entrance exam. Sometimes it became very hectic but my family stood together and kept me going, even though they were so far away from me.

    My closest friend lives in my hometown and we are friends from our school time. We rarely chat on line and once in a while on phone. Even then, when we meet even after long duration of time, we feel as if we are meeting each other every day for the last so many years. The bond is unaffected by distance because it is nurtured by love and care.

    When I was in Hyderabad, working in a very hectic job on weekdays, preparing for CAT on weekends with no time to spare for roaming around or parties, my roommates helped me out in every possible way. Even away from home, with them I found a new home. I feel lucky to be there, together with them at that time. Sometimes I felt as if they were more worried about my exam than I was. And it all worked out pretty well.

    Love and care are the main ingredients of togetherness, mixed with goodness of heart. In the absence of these ingredients, there is no meaning of being with someone. It is as if one is alone even when surrounded by crowd. We have fun loving people all around us, but very few of them love people more than fun, and that makes all the difference.

    Housing.com is encouraging people to be #together. You can visit them here: housing.com

  • The change that fueled life

    The change that fueled life

    When I was about to graduate from my engineering college, I felt the uneasiness created by the upcoming change in my life. I felt sad by the thought that soon my college life will be gone. At that time, a very good friend of mine told me that “change is the norm”. And moreover, some changes are irrevocable and one has to accept them anyway.

    Very soon my work life began. I was excited to begin a new life. But at the same time, I was little bit skeptical about going 2500 kms away from my home. “Is it worth it?” I asked myself. And guess what, yes, that change in my life was for good. I will cherish those memories for life.

    As a matter of fact, I believe most of the changes in our life prove to be good at some point of time or other. When I moved to Southern part of India, I got a chance to experience an entirely new life, to learn so many new things, get familiar with a culture totally different from mine and meet people who are different yet same as I.

    When I was in my hometown, I never liked South Indian food, or I can say that I never liked South Indian food cooked in North India. I was prejudiced that I will get the same food there. And fast forward to 1 year later, it became a norm to eat dosa in breakfast for me. I literally loved some of the South Indian dishes.

    I am from Northern part of India where we experience extreme weather phenomena throughout the year. There are too much hot dry summers, too much humid summers, excessive rainy season, pleasant spring and extremely chilly winters. It is good to experience all types of weather but all this in a single year sometimes make it difficult.

    In South India, I found that weather can be uniform as well. While Mysore and Bangalore were so pleasant throughout the year, Hyderabad only got somewhat hot only for 4 months. That was a new experience and I realized that it was good too in its own way. However, it seemed monotonous to me after being in North for such a long time.

    Gradually, all my prejudices were gone and I enjoyed my stay there. And finally, one day, I had to leave that place too. I still remember the day I left that place. I felt really bad. Remember, this was the same place which was thousands of kilometers away from my home and I was feeling bad when leaving it.

    This taught me that sometimes some changes in life seem really big and our inner inertia may obstruct us from committing to that change. But most changes are for good and we should overcome that fear and take the opportunity to experience something new. I took my chance and it was definitely worth it.


    A company named Housing.com has changed for good. You can visit Housing.com to experience the good change.

  • When a stranger made me smile

    When a stranger made me smile

    Image Source: www.forangelsonly.org

     At a certain point of time, we start believing that there is nothing good left in this world. But, there are those little moments in life which make us realize that we are wrong, that there are still so many good people in this world and it brings smile to our face, a relief in our heart.

    In the present day life where everyone is running around aimlessly, competing with others to win some race, everything seems full of pessimism. At a certain point of time, we start believing that there is no one with a good heart left in this world. But there are those little moments in life which make us realize that we are wrong, that there are still so many good people in this world and it brings smile to our face, a relief in our heart. And I found those moments a few months ago while travelling in Delhi Metro.

    It was the evening of a very hectic day full of surprises and I did not want any more surprises. I still had so much to do and I wanted to be at peace. The overly crowded Delhi Metro is no more a place for peace lovers. You can find people fighting for seats, boys leching on girls or people holding their pockets tightly, trying to avert pickpockets.

    I got a seat after 4-5 stations. But I still had 30+ stations to go and had to change metro at on place. The battery of my mobile was down so I could not play any games on it to kill time. Suddenly, I noticed that the passenger sitting next to me was watching a movie on his mobile phone. I started watching it though I could not hear the sound.

    This went on for a while. Suddenly, that passenger looked at me, smiled and offered me one of the ear buds of his earphone and turned the phone’s screen towards me so that I can also watch the movie. I was surprised. But I had nothing to do. So, I accepted his offer and put the earbud in my ear. The man politely explained me the story of the movie which I missed till that point of time and then we started watching the movie. I felt really good as if my tiredness was gone.

    In between, we talked about various things, though I was not much interested in trivial talks. Also, I was a little bit skeptical about him. How can someone be so friendly with a stranger in the present day world? But he was an exception. I double checked my wallet and phone, everything was at its place.

    I started enjoying the movie with him and did not even realize that I was just 4 stations away from my destination. At that station that man deboarded the train. Before leaving, he said a very nice good bye and greeted me with a smile which I reciprocated. We never asked each other’s name and we may never recall each other’s faces even if we meet in future. It made me sure that the man did all this without any expectation of gaining something from me. He was just sharing his happiness with me. And someone has rightly said, happiness is multiplied when shared with others.

    It made my day. I was no more skeptical about the world. There are still so many affectionate people who smile at strangers without any bad intention. From that day onwards, everything around me looked even more beautiful. more positive. I realized that world is full of optimism if we are willing to look at it. And once we start looking at it, life becomes more beautiful.

    The memories of that heartwarming journey will always be there in my heart and I will contribute towards making this world a happier, more beautiful and optimistic place.

    You can visit Housing.com/lookup to see how Housing envisions a world filled with positivity.

  • How to start preparing for CAT 2019

    How to start preparing for CAT 2019

    How to start preparing for CAT? CAT (Common Admission Test) is one of the toughest exam to crack. It is the gateway to getting into prestigious IIMs and other top B-schools of India. A lot of CAT aspirants ask me how to prepare for CAT. Here I am sharing a few tips which I feel helped me in cracking this exam and score 99.41 percentile.

    Understand the syllabus

    This is a useful tip for almost any exam. Understand the syllabus by going through past year’s papers and official guidelines. CAT can be segmented into four broad parts-

    • Quantitative Ability
    • Data Interpretation
    • Logical Reasoning
    • Verbal Ability

    The concepts used in this examination are broadly of class 10 level. However, the questions are little bit tricky to solve and require good amount of logical thinking. But it can be developed by practice.

    Begin with the end in mind

    Start your preparation with sheer determination. Whenever you feel demotivated, you can dream about the day when you will crack the exam and it will definitely motivate you. March-April is a good time to start preparation for the exam which will be held in October-November. However, if you are starting late, say 3 months before the exam, you still have a decent time to prepare and crack this exam. It all depends on how efficiently you can utilize your time.

    Should you join coaching?

    This is based on a lot of things. If you have a lot of time, you can go for coaching. However, if you are into a hectic job and get very little time to study, you can prepare on your own without wasting that time in going to coaching. Coaching will only give you guidance. Rest depends on how sincerely you practice.

    Also, the syllabus of this exam does not require any special training. Most of the things we already study in our school. There are few concepts which can be revised from books and other material. Rest is a lot of practice.

    Books and material

    I have prepared complete list of books and material you will need for your CAT preparation which can be found here: List of Important CAT Preparation Books

    First of all, get CAT preparation material of some good coaching institute.

    For Quant, there are two good books- Arun Sharma & Sarvesh Varma. You can refer to any of these. I referred the latter one as suggested by one of my friends. However, I think the former is more popular with the students. Both the books are good. But don’t buy both. No need to unnecessary collect a lot of books & material. If you have limited time, solving one book is enough. Go for the second book only when you have finished the entire syllabus.

    No special book for concepts of Data Interpretation, Logical Reasoning and Verbal Ability. You can rely on the coaching material for all the concepts and can solve all the practice questions. However, you should refer to more books on these topics only after you finish the entire syllabus.

    For verbal, you also need to read “Word Power made Easy” by Norman Lewis. It is a very good book which helps in increasing vocabulary not by memorizing stuff, but by understanding the ideas behind the words. It is distributed into 45-47 sessions meant to be read one at a time. It is a must-read book and should be completed within two months of starting your preparation.

    You also need to read a few good story books as explained in the next point.

    That’s it. Yes, you do not need any other book for concepts. This much is enough.

    Reading, reading & reading

    Many students, specially engineers are already good at quant but perform badly in verbal. Earlier, CAT was heavily based on vocab and grammar concepts. But these days, it is more of a general English exam which tests one’s command over English in common usage. You should be very much familiar with English.

    The only way to improve your verbal score is to read a lot of good books written in standard English. These can be fiction, non-fiction or anything, just written in good English.

    I have already written a detailed article to help you develop your reading habit. You can find it here: How to develop the habit of reading.

    In the article, I have also mentioned the example books. Reading 4-6 books during your preparation would increase your familiarity with English and you can easily score good.

    Test Series

    This is like the Holy Grail of CAT preparation. Subscribe to one good Test Series and write all the tests very sincerely in simulated environment. Fix a day, say Sunday, fix a time, say 9 AM, and give the test every week at the same time. Sit in proper position while attempting the test and tell all your roommates or family members not to disturb you at that time.

    Once you write 15-20 such tests, CAT will no longer be a stranger to you. When you will sit for actual CAT, you will feel as if you have done this a lot of times and it will help you to remain confident during the exam.

    Most coaching institutes try to set the Mock Question paper to be as near to the real exam as possible. Subscribe to a test series which is more difficult than actual CAT. You may find it difficult to score good in the mock tests. But it will boost your confidence when you will find the actual CAT to be easier than the mock tests. Many good test series are available.

    News coverage for post-CAT preparation

    Once you clear CAT, you need to qualify the Personality Test rounds of various colleges which include Group Discussions, Written Tests and Personal Interviews. Qualifying CAT makes you eligible to attend this stage and its your performance in these rounds which finally help you getting selected. Preparing for this stage immediately after CAT result can be difficult. Try to follow the basic news in your daily life from today itself. This will ease down the load of preparation for Personality Test rounds and boost up your confidence as well.


    And that is all. I followed these things and I feel it helped me to get through this exam. I hope these tips will help you in preparing well for CAT. All the best for getting into an IIM!

  • How to develop the habit of reading

    How to develop the habit of reading

    From our childhood we are told that reading is a very good habit. Specially, if you are preparing for any competitive exam like CAT, GMAT, GRE or even UPSC (it now has a paper with questions on reading comprehension), you must read a lot of books written in English. In this context, from here on, by reading I mean reading books written in English language.

    Why Reading is a good Habit?

    Reading improves our comprehension as well knowledge. Reading a lot of good books makes us familiar with English language and we no more need to memorize grammar rules to find out if any sentence is wrong. It is the same way as a child learns her native language just listening to her parents and not by learning grammar rules.

    Once a respected gentlemen rightly said that to write well, you need to read a lot. So, apart from helping us to understand what others write, reading is also essential to express our thoughts in good words and proper language.

    But what if someone doesn’t read at all? What if mere thought of reading a book makes you yawn? Is there any way to develop this habit, easily?

    Well, all big things in life require some amount of work. However, there are few ways to do it the right way so that you get maximum benefit in minimum amount of time. And obviously, you need to be motivated enough and self-determined to maintain a disciplined schedule, atleast when you begin.

    I was not exactly a reading buff. Though I read books every once in a while, I was not the kind of guy who reads scores of books every month and asks for even more. Every time I finished a book, it used to be an achievement for me. But during my CAT preparation, I realized that I need to read a lot and I was actually able to read a lot of books during that time. How? I followed a simple approach.

    Pick the right book

    First of all, reading here does not mean reading “anything”. I am no one to criticize Chetan Bhagat for his books. He writes books in simple, lucid language to be easily understood by anyone. But for the kind of competitive exams mentioned above, those books may not help you. You need to read something with a higher level of English. Books of famous English authors written in standard English is a good point to start with.

    Pick a book from a famous author, an interesting one. You can pick J. K. Rowling’s Harry Potter books or Dan Brown’s books like DaVinci Code, Angel and Demons etc. There are many more authors like John Grisham, Jeffrey Archer, Stephen King, you can pick any of their books based on your interest. This is because once you get involved with the story of the book, you would like to continue reading it, even if you find the language difficult or boring.

    Stick to a simple schedule & Take it easy while reading the first book

    Now make a schedule to read for 15-20 minutes every day before you go to bed. Yes, this much is enough to begin with. No matter what, read for some time everyday before you go to sleep. Slowly your reading time will increase as you will get involved with the story. Don’t worry even if you do not understand many words. No need to look them up in a dictionary. Just try to understand the meaning from the context and move ahead. Referring dictionary continuously will obstruct the flow and make reading boring. Completing a book is more important at this time.

    Level up once you cross the milestone

    After 1-2 months of this when you finish reading your first book, you will definitely feel accomplished. You would also have developed at least some interest in reading. Now you can refer to difficult words while reading the next book. You can also read using an ebook reader as it is very easy to look-up words in these devices without breaking the flow of reading. You just need to touch the word and its meaning pops up.

    Finally, keep it going

    Slowly and gradually you can read more and more books. Finishing each book, will boost your confidence and as you go on, you will get familiar with more words making it easier for you to understand and time to finish a book will keep on decreasing. If all goes well, by this time, you would have developed the habit to read books. It will be no longer a far-fetched dream.


    The method described above may not be the best way to develop this habit but it worked pretty well for me.

    I hope you too find this useful. Feel free to leave feedback or suggestion in the comments section below.


    You may find following links useful:

    If you are preparing for CAT or planning to start soon, you can read my detailed article here: How to start preparing for CAT

    The complete list of books and material you will need for your CAT preparation can be found here: List of Important CAT Preparation Books