17 Apr

The Top 10 Must Haves For Your Shiny New WordPress Website

So you want a website...

Okay so I have been setting up a few WordPress sites for my friends and partners at large. WordPress has come a long way and is my goto answer for many solutions. Years ago, I would have considered Joomla, Drupal or thought about searching for another CMS but today – WordPress is enough. I say – let’s find the right theme and the right plugins to make it do what you need and if it still doesn’t do what you want, let’s find a developer who will build if for us – in WORDPRESS.

Installing a WordPress vanilla site is quite simple but with many hosting providers now providing 1-click installers like Softaculous, that insanely simple install is even simpler.

But after that, you will have this plain site with nothing installed and a base WordPress theme that is quite configurable and you can get started creating content right away. But before you proceed, you’ll need few things to keep your site safe, running, trackable and restorable if something goes wrong. So here’s my list of the top must haves for your WordPress site.


You’ll need a theme that suits your needs on the website and finding one may not be that easy. Most free themes are great and premium themes usually have plugins and functionality built into them that makes some of the plugins listed below redundant. You’ll probably want to try a few out before you get it right – That’s OK. It’s a lot of work – and that’s OK too. Here’s a few places you can go to find some good themes:

Finding and installing a theme is only half the battle. Then you have to go get some images and graphics for your website. If you have photos of your own or want to go click them yourself / have a photographer friend – great. If not, there are tons of stock photo websites out there that publish some amazing stock photos that you can use on your website. Based on what you’re building, you’ll have to find the right images for your site’s branding and identity. A logo and a favicon may also help along the way. You may opt to have a static frontpage and a separate blog page. You may also create other pages and the one you absolutely must have is a Contact Us page with a simple form where users can send you messages. Jetpack allows you to do this if your theme doesn’t have a similar function.

Once you’re done configuring your theme, then come the plugins. Here are some absolute must haves if your theme doesn’t already fulfill that function. And note, don’t install too many plugins and never multiple security or SEO plugins at the same time. People also recommend some performance / cache plugins but I’ve burnt my fingers in the past with them and thus don’t use or recommend them.


  • Security Plugins (Careful – not setting these up correctly can lock you out of your site)
  • Backup Plugins
    • UpdraftPlus – Backup/Restore: Automated backups & restorations that can be uploaded to remote storage locations like Google Drive, Dropbox, AWS S3 buckets etc.
  • Feature Enhancement Plugins
    • Jetpack: Jetpack is my favorite one stop shop for many things WordPress, namely:
      • WordPress.com SSO
      • Fully Customizable Contact Us Forms
      • Site Stats & Analytics
      • Automatic Sharing on Facebook etc.
      • Related Posts
      • Downtime Alerting
      • High Speed CDN for Images
      • Carousels, Slideshows & Galleries (this is usually part of most themes though)
      • Simple Media Embeds
      • Twitter / Facebook page embedding on your sidebar
      • Email Subscriptions
      • Comment Login using G+, FB, Twitter
    • Akismet Anti-Spam
  • Tracking Plugins
  • SEO Plugins
  • Code Plugins / Formatting Plugins

Once you’ve got these plugins installed, you’ll need to spend a few hours configuring them. Some of the plugins require subscription to additional 3rd party services like getting an Akismet API Key, signing up for a Google Analytics account, signing up for a WordPress.com account.

After doing all that, you’ll need to do a few more things to get some visibility to your website:

  • Register your website with Google, Bing etc.
  • Setup Google Search Console (submit your XML sitemap while your here)
  • Setup Bing Webmaster Tools (submit your XML sitemap while your here)
  • Setup SSL for your website (this is a complicated topic with many easy or difficult ways to achieve it so i’ll leave it to another blog post. Psst: my host provides free auto-SSL – read below)
  • Register your business on Google My Business
  • Register your business on Bing Places
  • Setup your Facebook Page, Google+ Page, Twitter, Instagram, Pinterest etc. accounts – do this even if you are not going to post or manage these now or later. You don’t want a disgruntled customer or employee or ex-friend to claim these handles that have your business / blog name and start posting  stuff on it that you don’t like.
  • Test your site for errors, crawl-ability from bots, performance etc.. There are many tools to do this and most of them are free.
  • If you care about listening to the internet and what people are saying about your business, you can try Mention.com‘s free plan.


If you are in search for a domain name, I normally recommend Godaddy but since Google has entered the the domain names space, I have been slowly moving my domains over to them for one main reason – Privacy. Google Domains include privacy in the domain price which is a steady $12 for most TLDs. Privacy is usually an additional fee with Godaddy or any anyone else plus there isn’t a flat low price for domains with Godaddy. You can pay retail pricing but there’s almost always a coupon or deal that can get you a domain cheaper, sometimes cheaper than Google.


Also, this article is about self-hosted WordPress (WordPress.org) and not WordPress.com websites in which I don’t have much experience. Depending on your hosting needs, you’ll have a ton of options in that as well. I’ve hosted over a few hosting companies and moved over time to my current one. And moving hosts is not easy but I’ve had to. I’ve been hosting with MDD Hosting for quite a while now. Check out their plans if it interests you – MDDHosting. Great service & support at decent prices and my sites load fast. And now they even provide free auto-SSL which means all my sites hosted on their servers automatically serve content over HTTPs – no configuration needed. How cool is that!

So as you see, buying a domain and setting up a website is just the tip of the iceberg in running a successful website for your personal blog or small business. There’s a lot of unseen effort that goes into configuring it correctly and making sure that search engines and users can find your content and also you need to make sure that it loads quickly without errors in devices of all sizes, keeps running 24×7 and doesn’t get hacked while you are enjoying a vacation on a summer beach.

If you think that the cost of running a website is simply the sum total of the price of a domain and your hosting costs, you are going to find out that your website is not really going to be very successful unless you sweat it out and make it work. If you are not going to have the kind of time to do this yourself, I recommend you to hire someone to do it for you.

02 Oct

Accessing the device camera using HTML5 GetUserMedia

Download complete source file here.

Primarily here’s the code that does that:


which takes a “contstraints” object as an argument which at the minimum looks like this:

var constraints = { audio: false, video: true }

videoElem is a <video> element on the page.

For simplicity reasons, I haven’t written this code to fail gracefully or support older browsers which may support a slightly different syntax. This is something to consider when you may be using this for something serious.


27 Apr

Enabling Cross Domain Ajax Requests using CORS

Okay, I usually harped about the one main limitation of Ajax Requests – Same Origin Policy. This policy exists to restrict XSS (Cross Site Scripting) attacks and vulnerabilities. But that is also a big party pooper when you want to legally make an Ajax call from your site to another domain, directly from the browser in order to load content from the other domain. There are exceptions to this policy that allow for embedding of certain resources like images, scripts, stylesheets, media and some other types of content. Thus CDNs for loading scripts like jQuery and stylesheets from Bootstrap are quite common and actually recommended too. But that’s not Ajax. Ajax begins when an XMLHttpRequest object is created. And that object cannot normally be used to make a request to any other domain other than the one it is currently on.

Same Origin Policy

For example, if a script on a page on the domain http://DomainA.com wants make an Ajax request, it is limited to make the request to any resource only on the http://DomainA.com domain by the Same Origin Policy.  If the script tries to make a request to http://DomainB.com, it will be actively blocked by the browser. The policy applies to Port numbers, sub-domains and protocols too. This is a good thing to protect users from visiting untrusted sites and having those sites steal the users sessions from trusted websites. But to legally make a script load content from another domain, say like your recent tweets, your facebook posts or your flickr feed or weather data or stock info from an online API or Web Service, this policy restricts you to adopting one of the following techniques to achieve your goal:

  • Use a Server Side Proxy
  • Use JSONP (if the remote API supports it)

I will leave the JSONP technique for another day and get to my subject now. The W3C made CORS (Cross Origin Resource Sharing) a Recommendation in January 2014, a document that was in the works for some time now.

The CORS Recommendation allows a way around for web servers to allow for cross domain script requests. Servers can now do this by adding new headers in the HTTP response to a cross domain request, namely:

By sending this new header, the server can let the browser making the request know that it can allow the request and response to be used by the script, and hence not block the request. You can read more details about the CORS spec on W3.org and MDN. This is great for API developers who want to make a service available for consumption from simple Ajax requests from any domain.

I will jump to my demo now. https://sreenath.net/demos/CORSDemo.htm

To demonstrate this, I use the OpenWeatherMap’s REST API to provide me the cross domain content. And I use a standard XMLHttpRequest object pointed to the Open Weather Map API’s URL for retrieving the current weather data for the requested city.

For example, if I want to get the current weather conditions of New York, NY, my XHR’s URL will look like this:

and my request headers (on chrome) look like this:

And the response headers from the server look like this:

Yep, a 200 OK response alright. And since I didn’t specify a format, I would receive the default JSON format from the server containing the current weather conditions.

Observe the last three response headers. They are all from the CORS spec and there are more. To go deeper into this topic, Monsur Hossain has published a book “CORS In Action“, available Sept 2014 in print or now through MEAP. You can also visit Enable CORS website to get updated information and use this link to know about browser support for this new spec.

With ASP.NET Web API where it currently is, this development greatly enhances the idea of Service Oriented Applications and also emphasizes the role of JavaScript in the world of programming today. Get cracking!

Questions? Comment below ↓

03 Apr

JavaScript Animations and HTML5 Vibration APIs

HTML5 Logo

First checkout this demo link on your cell phone: https://sreenath.net/demos/animation.htm

On a normal desktop browser with no Vibration hardware, you will see a ball simply bouncing on a black background. On a device with Vibration hardware and a supporting browser, you will feel the ball bounce off the sides of the window with a short vibration.

That’s new in HTML5 and JavaScript. Here how its done:

It’s that simple. 100 here is the duration to vibrate. You can also pass in an array of milliseconds, duration of vibration followed by duration of silence and so on as follows:

Now about timing the vibrations with the animation:

I use a JSON object as a Singleton for storing data about the window height, width, position of the ball, direction etc.

I have the following event handlers attached to the window load event and the window resize event: (Note that this code wont gracefully degrade in IE8 and older browsers)

My startAnimation function:

It is important that the CSS for the box1 object to move is to set its position as absolute. Otherwise the best code won’t work on it. So here’s the CSS:

Finally my Animate function.

Its important to update the direction of the movement of the box once it hits the edge and to check the direction each time before moving the box to determine which way it should be headed – to decide whether to increment or decrement the left/top property.

And my setDimensions function, required for initial loading and handling browser resize events:

Known Issues with the demo:

  1. Doesn’t handle resize due to re-orientation event of your device.
  2. As of publishing time,  Safari doesn’t support the Vibration API. That leaves out all iOS devices from enjoying this demo.
02 Dec

HTML5 Drag, Drop and FileReader in JavaScript

HTML5 Logo

I love JavaScript. And combine that with the awesome power of HTML5 and I have an ice cream with generous serving of hot chocolate sauce on top.

Till HTML5 came about, there was no way in which JavaScript could receive a Drag & Drop event from the File System. Sure you could drag and drop elements inside browser window but not files from outside the window.

Plus JavaScript had no way in which it could process a file selected in an input[type=file] control on the client side. So if you wanted to upload a set of images to an online gallery you could only preview the image or check its properties after the upload completed. And it would be such a pain to realize that you selected the wrong set of images to start with. So re-upload!

In the new HTML5 supported browsers, one can write methods to process a file using the new File API. Although not strictly part of HTML5, it is currently supported only in Firefox 4+ and Chrome 7+ and other browsers are quickly falling in line.

So JavaScript’s events “dragover”, “dragleave” and “drop” can now respond to files dragged and dropped from the file system. And the “FileReader” object can read text files, file properties like size, name, path etc., read an image file and load a preview – all on the client side using plain JavaScript.

Check out the sample demo here.

So here is how to get started:

The addEvent method is my handy library function to attach Event Listeners to DOM elements in a cross browser fashion. The event object passed to the event listener contains a property “dataTransfer” which contains the reference to the selected/dropped files.

TIP: Remember, during a drag and drop, it is the element that receives the drop that will contain the dropped files. It need not be an input[type=file] control.

To give a feedback to the user that the page is responding to the drag and drop, I have incorporated the following technique:

Now to process the uploaded files. JavaScript has got this new object called the FileReader which is what I am using here:

We create a FileReader object, bind an onload event handler to the reader which will process the read file and perform the necessary operations to update the UI (as required) and then we call the reader.ReadAsText() method to read the text data of a file. We can even use the reader.ReadAsDataUrl() method to read binary image data as an encoded Data URI.

And that’s it. We have the power to process files client side now!

23 May

Pure CSS 2 Animation Effect

Yesterday I was looking up this interesting CSS 2 property called background-attachment.
Its no big bang. It can have a couple of values scroll and fixed. Scroll will scroll the background image with the page and is the default for all elements that have a background image specified, Fixed will make the background image stay in the same position even when the page is scrolled.But with a few tricks combined with the background-position property, this can be leveraged to give neat little animation effects when the page is scrolled.

I notched up a small demo with a couple of paintbrush illustrations and tried to give the effect of filling a glass with water. Those interested may fill it with Beer or whatever they like. 😉

View Demo.

It’s no rocket science I know and with the advent of CSS 3, JavaScript libraries like MooTools and jQuery that can do better animations with a single line of code, one would ask why bother? Sure. This was just an experiment. But check out how creative Román Cortés got with this concept using a 2D displacement map of <p> elements for each pixel of the scrolling image in this demo here.


28 Apr

Configure WAMP (Apache) to work on a custom/non default port

While I was guiding a colleague of mine to install a WAMP server on a windows XP machine and faced this small configuration issue which I thought would have a straightforward fix.

Seems that there isn’t, at least not for the situation I had so I found the hard way to do it. And decided to write a post explaining it since there wasn’t a good article anywhere already for doing it.

Situation: Install Apache to work on a non default (non port 80) port since we already have IIS on port 80.

This post here by Matthew Phillips explains how to configure the httpd.conf file to make Apache listen on a custom port (say 8080). (He blasts IIS for follies which I don’t really agree with, that is not really the point in discussion here 🙂 )

But that doesn’t closely solve our problem since we just modified the Apache’s configuration file and that WAMP is still unaware of the change.

Trying to Install the Apache service from WAMP now still gives the error:


The next step after that would be to tell WAMP in its scripts to actually test the custom port (8080) and proceed to install apache. That we do in two files in the Scripts directory located in the WAMP install path.

Edit the following files in notepad:

  1. testPort.php
  2. testPortForInstall.php

In the above files, replace 80 with your custom port number (8080). For me, it was present in 3 places in each file. Save and close the files and restart your Wampmanager and try removing/installing the service now and it should work.

However, there still is the option “Test port 80” under the Services menu in Apache and other links that open up Localhost and phpMyAdmin in the browser that still point to port 80.

 This menu option text is populated from the file Wampmanager.ini and which in turn is refreshed from the wampmanager.tpl each time the Wampmanager.exe is started. The menu item captions are populated from the various language files in the lang folder. The actual actions that are performed are in the wampmanager.tpl file. Just update this file to open the correct URL upon clicking Localhost or phpMyAdmin links. Look for the [Menu.Left] section.

To update the captions, you will have to edit the appropriate language file – find the variable name used in the wampmanager.tpl file for the specific item and look for the caption setting for this variable in the language file and change it accordingly.

For ex.: To change the caption of the item “Test port 80”, I checked that wampmanager.tpl uses a variable called w_testPort80 to populate this value. I opened up the lang\english.lang file and looked for this variable name and changed the string caption.

Restart Wampmanager and Voila!

Disclaimer: The changes mentioned in this post are to customize the work environment for a development machine and any such changes on production servers or internet facing servers should be made with more caution. But then that’s a rare situation to run your website on a non 80 port, isn’t it?

I am using WAMP version 2.0.

07 Aug

jQuery, jQuery UI, ASP.NET Web Services and SharePoint for Feed Syndication using Argotic Framework

Okay, so I recently completed building an end to end  Feed Viewer Web Part for SharePoint 2007.

I used jQuery for AJAX calls and DOM manipulation.

jQuery UI for creating Tabs and a ‘custom’ Accordion control

ASP.NET Web Services

Argotic Syndication Framework  to get, aggregate and generate feeds. (This free library is real cool stuff. Let me add a Web 2.0 style banner in cheers to it!) RSS Can

‘No Server Code’ User Control to load the Feed Viewer entirely using JavaScript code.

WSPBuilder to code, build and package my web part, lists and the custom Web Service into SharePoint.

While building this, I faced a lot of technical issues and built workarounds on them to finally roll it out successfully.

Let me foreach over the issues and workarounds.

1. ASP.NET Web Service does not accept an AJAX Call using a GET Request. Also, it does not honor the AJAX request if the content type is not explicitly specified as contentType: “application/json” in your AJAX call.

So you can right away throw the jQuery AJAX methods – get(), post() and getJSON() methods out of the window when your server side is an ASP.NET Web Service. Why – How can you explicitly specify the content type using these methods?

So we are left with the low level $.ajax jQuery call (its actually pretty neat to be called low level.) and here is a sample code snippet:

Read about this restriction from The Gu. So that leaves us with another crippling limitation – We cannot make a cross site/domain (XSS) jsonp call to our web service. (Coz jsonp can be used only with GET requests and not POST.) SO this means our web service will have to be hosted within SharePoint’s domain itself and not on a separate web application even on the same server so that our jQuery web part can make a call to it.

Another headbanger: If you want to simply display SharePoint data on a web page (outside SharePoint) through this web service, then you will have to enable forms authentication on your SharePoint site or do a Windows Authentication Handshake before making this web service call. Not getting into that detail as its a very rare case of implementation.

Read more in detail about making jQuery calls to ASP.NET AJAX Web Services here. Thanks Dave for such a wonderful series!

Did I mention that the plain vanilla ASP.NET 2.0 Web Service is not capable of handling scripted requests (as in from JavaScript). Yes, that’s true. You either need to install the AJAX Extensions 1.0 for ASP.NET 2.0 or upgrade your .NET Framework to 3.0 or 3.5. Then you will be able to add the following tag to your web service class to make it accessible via scripted calls:

There is of course more to making your service and web site AJAX enabled. Discover options to AJAX enable an existing web service here. Neat video.

Best workaround for these problems: Use WCF! Works with GET; ContentType not restricted to json; REST support using UriTemplates and more. I tried this too but since upgrading to .NET 3.5 on the production server was a little too much to ask for this, I stuck to Web Services. If you are giving WCF a trial, might I also suggest the OOB Syndication Framework support in WCF. (Might help if your clients are against using open source plugins such as Argotic in their production environments.) It has support for RSS and ATOM as well as a Generic Syndication format which one can extend/override and use as you wish.

Now to the UI:

jQuery UI is a neat framework which provides OOB Javascript Tab controls complete with CSS themes (choose your theme and download the CSS). It also provides a neat ICON sheet with different colour overlays for different UI states. Check it out too.

View jQuery UI Demos here.

There are tabs and accordions available OOB for me to use. This was all I needed for my feed viewer web part. The root categories would be the tabs, sub-categories would be placed into accordion panels. Alas, I was too happy too early. jQuery UI is great, no doubt. But when it comes to nesting one control in another, it fails miserably. Maybe it wasn’t built for it but it surely made my life difficult just when I was thinking things were going smooth.

So I used the tabs from the UI. Then wrote my own jQuery code to create an accordion control which would load feed data from a SharePoint list on expanding. Of course, I made use of the library’s CSS classes for the accordion – active, inactive states etc.

My final UI looks like this:

Of course, how can I forget my friendly jQuery Plug-ins: jFeed and Pager

Now over to the server.

On the Server I needed a Web Service which my Web Part would call:

1. Get a category hierarchy for my tabs and accordions to render. I chose to send an xml string with sub-categories nested under categories in the xml with important data such as CategoryId which I hid into hidden fields in the accordion.

2. Get an aggregated feed data on a per category basis once user expanded a certain sub-category panel. This would require me to send information such as CategoryId, PageNo and pageSize to the web service via an Ajax call.

My Web Service method signature was like this:


and my AJAX call looks like this:

  TIP: To ensure that my web part is configurable, I need to allow the user/admin to configure the parameters such as List Names, Service URLs etc. Now since all my functionality is on the client, I needed to make sure that any Web Browsable Property I create gets added as a hidden input control to the Web Part controls so that my jQuery can pick it up. Remember to add a unique class name to the hidden control and not to use the ID to identify the control in jQuery, since ASP.NET adds its own additional meta characters to uniquely ID server controls but maintains class names as they are.

Next was a simple task to reference the Argotic Library in my web service and do the needful. The Argotic library is available in both .NET 2.0 assemblies as well as .NET 3.5 assemblies. It provides abstraction to fetch feeds, aggregate them and create new feeds and save them to XmlReader streams. Pretty neat stuff.

Now since I was using a jQuery plug-in that accepted either ATOM or RSS feed data and converted them to html, I only needed to aggregate multiple feeds into one Feed object on the server and then save the contents into a stream to return to my client. The plug-in would then parse the xml for available fields and generate appropriate HTML. I needed only the title and link to the item so I modified the feed a little to render only items I need.

And the majority of my functionality is done. Now remained to enhance it to make the Paging work, add a refresh button which would refresh the feed data and set an auto timer for it to refresh it automatically every 5 minutes and the likes.

I added all my JS code to a User Control. Created a WSP Builder Project and created a Web Part that would load this control and also add appropriate Web Properties. Added features to package my dependent SharePoint Lists and their instances and also a feature to deploy my custom web service to SharePoint and add my dlls to the GAC.

Read about deploying lists and list instance using features and solutions on André Vala’s blog. This is the blog series I have referred the most till date. Thanks André!

Read about hosting a Custom Web Service in SharePoint: newbie tutorial | msdn walkthrough

It was a thoroughly enlightening experience building this web part. Adios for now!

05 Apr

Setting up PKS – Podcasting Kit for SharePoint Pt.1

When I first heard of , I wondered whether this is really gonna be of so much use, especially in the world of SharePoint. I mean, who would want to setup a site like YouTube on a SharePoint server?

Even today people would raise such questions but I am actually amazed at the number of client requests that I am coming across who want a site in their SharePoint intranet/blog/public website where they can simply upload a video and others can watch it plus have some additional social networking features such as rating and commenting a video, viewing the video publishers bio, tagging videos and searching based on keywords, show a thumbnail of every video uploaded etc. Imagine if you had to built such a site on SharePoint yourself? And for those who are still unaware, is the solution for the above requirement and it provides even more features and configuration options.

Having made a couple of installations of recently, I do admit that its not really just double clicking an .msi and you are ready. But the effort spent configuring it is well worth it if you have the requirement. I would say you need about 2 person days to set it up from scratch by following the quick installation guide that comes with the package, leaving configuration of search which would need another day and of course customizing the UI based on your needs would take its own time. PKS comes with its own masterpage and most likely you would want to change that so the portal look and feel is consistent with the rest of your site. And the amount of customization you need decides time needed for your UI trimming but my guess is it should not take more than a couple of days. So you can have a Podcast Publishing Site up and running in about one work week. The effort saving and the value it adds to your website is just amazing. Have you tried video marketing with the products you make? I suggest this is a good time for that since print ads and ads on the telly probably don’t reach out to the customer bracket you want to approach and also what better way to sell your product by showcasing it on your own website without additional cost – directly to the person who has come there in search of it. When you do decide for that, go for .

So what does have – Insider tips:

  • installs a few pages, lists and some web parts on your SharePoint site when you run the setup.
  • stores the videos you upload to a network file share and not the SharePoint database so it wont overload your content DB.
  • offers features for Video Rating, Commenting, Viewing the Podcaster’s information, Reporting features on videos uploaded/viewed/downloaded etc, Automated thumbnail generation on video upload, integrated video conversion to compatible format, mobile/zune/iPod/RSS support, tag clouds, search videos using tags, progressive playback of videos using etc.
  • Documentation for is exhaustive, clear and precise which makes the setup experience extremely smooth and also empowers you to extend it. There are video tutorials too! In fact its so good, I really wonder why any one would actually read this blog post.
  • It needs MOSS 2007. Won’t work on WSS 3.0.
  • is needed for to work. Thumbnail generation, duration detection and encoding to Silverlight are all done using that integrated into the PKS site.
  • There is still a bug in the thumbnail generation process for videos which are initially not in compatible format but are converted using Expression Encoder. The thumbnail wont get generated in this case as the application that queues videos for encoding tries to generate a thumbnail first and encode later. Hope this gets rectified soon.

Tomorrow I will cover the basic steps in configuring a simple PKS site. But the real resource is on the site itself.

23 Mar

BE Computer Science / Information Science Fresher Interview/Written Test Tips and Topics

I was asked by a friend of mine to help his cousin who is doing his BE in Computer Science for placements and I jotted down a lengthy email regarding what topics he should be concentrating on. Then when I read that email myself, I thought – "Hey this can go beyond a mail and help more people too. So here it is:

Short intro to my interview experience to give you a context on my ability: I have taken Siemens, TCS, Sapient and CTS interviews as a fresher. Among these, Siemens and TCS were in my 5th Sem (on campus) and Sapient and CTS were post 8th Sem (off campus). I did not clear the written round in Siemens. I got offers from TCS (did not join due to low pay, relocation to Kolkata and 2 year bond), CTS (rejected offer since I had Sapient already whose pay was better) and Sapient(opted for the offer due to their friendly HR and now very happy with that decision).

My Profile

College: RNSIT, Channasandra, Bangalore

University: Visweswaraya Technological University

Branch: Information Science and Engineering

Batch – 2002 – 2006

So now to our business:

For freshers in their 3rd year and those just out of college, the following are the most important topics quizzed on:

General Topic: Aptitude:

This is a common section in most written tests and constitutes atleast half of the weightage of your test score. Good books to practice from would be RS Aggarwal and also Shakuntala Devi’s Puzzles (my fav.). Instead of trying to practice solving more and more problems, try to solve a couple of generic ones in each topic in R  S Aggarwal and understand the methodology and the thought process of solving such problems. If possible, also devise your own algorithm/logic to solve the problem. The questions will never be directly from the book so practicing every problem in the book still would not guarantee your clearing the test. 

In the test, dont concentrate on solving max. number of problems. Concentrate more on getting all the questions you attempt correct. That will fetch you more marks than attempting 90% of the questions and getting most of them wrong due to silly mistakes made in a hurry to complete the paper. For example, in my college, in the Siemens paper-> There were 50 questions in the Aptitude section to be answered in 60 minutes (3 marks for each right answer, -1 for each wrong). Imagining to answer all 50 (right or wrong) is just a farce. Instead one should attempt to get all the questions he attempts right. The highest score in that test (in aptitude) was 16. Which is effectively just 6 answers right and two wrong of the attempted 8 questions (of a total of 50 questions!!). Simple to beat if I look back today. Think about it, all you would need is to get 10 out of those 50 questions right to top the college, and you have 60 minutes to do it (6 minutes per question!). Easy right!

Tech/Software Sections:

  • SQL – Writing simple SQL statements to select data from a table given a condition.

-> Theory based questions too are common – like the Types of Joins – Outer Join, Left and Right Outer Joins, Inner Joins etc, Normalisation – 5 levels of normalisation – What are they and how are they important for good database design. Good book to refer for this would be the prescribed syllabus book. 

  • C++ – Most important. Would be asked to explain object orientation concepts such as Polymorphism, Inheritance, encapsulation etc and how it can all be achieved in C++. Syntax for virtual functions are also common questions. Would be asked to write small programs such as generate fibonacci series, replace a character in a string without using any inbuilt string functions etc. An interview tip would be to explain concepts with as many real world examples as possible. For example, instead of explaining inheritance in text book fashion as to say one class inherits functionality from its parent class, you could explain to the interviewer with a real world example say a Car class as the base class having turn, stop and start as primary implementations and then classes that inherit from it could be Ford,Hyundai etc. which inherit the base functions plus add their own and override on existing functions as well (if necessary, to say Hyundai i20 has ABS brakes so it has its own custom Stop function) to make custom implementations. Now that would convince the interviewer that you have understood the concept rather than just mugging up the text book.

  • Data Structures: Important to understand all types of queues, linked list etc. Most common questions are -> Reverse a linked list, Traverse a linked list, sort a linked list etc. Merits and Demerits of each type of data structure -> Arrays, Stacks, Queues, Linked Lists.

  • Algorithms: Sorting algorithms are most common written round questions. Either direct or indirect. Binary search, quick sort, string search etc. Common problems such as Travelling Sales Person, Towers of Hanoi etc are also common. Techniques to determine the complexity of an algorithm may be asked too – like determining Oh, Omega and Theta of a particular algorithm.

  • Computer Networks: Would be a crucial subject if applying for companies such as CISCO, HP etc. Hot Topics: OSI Layer, TCP/IP model, Routing algorithms *** (very important) and types of network discovery.

  • Operating Systems: Crucial subject for companies that build low level system programs such as Symbian, Intel etc. Hot topics: Processor Scheduling, Memory Management and Page File Swapping techniques. Deadlocks – what, detection, avoidance and resolution, semaphores and other locking principles.

  • Java: Since most universities cover Java in the end of 3rd year and placements usually happen before that, on campus interview dont focus much on Java. However, for off campus and post 8th Sem interviews, Java is a must (unless you are a MS guy like me and would rather stick to C# in which case proficiency in C# and .NET are required) There wouldn’t be very detailed questions on Java or C# for freshers and basic knowledge should be sufficient. If you do your 8th Sem project in Java or C#, it would be more than sufficient for you. So wisely choose your 8th Sem project. It could make up your career. And please please please implement your own project in your own code. Don’t download the code and showcase it. Your project is your portfolio in all the interviews you will face and your academic project will be the only project where you will implement end to end (all tiers) so this is a very important part of your career – to implement your own idea into a project and deliver it.

Apart from this, there may be certain niche areas that specialized companies may ask for but being strong in the above topics should get you through 98% of all interviews as a fresher.

Do post any questions you may have as a comment and I will get back to you.