Raymond Davis

Dawn Newspaper 3/17/2011

ISLAMABAD: Federal Minister for Information and Broadcasting Dr Firdous Ashiq Awan said on Wednesday that Raymond Davis was released after the payment of blood money (diyat) in accordance with the Shariat Law of Pakistan.”

While skimming through today’s news paper the above headline caught my attention and like many Pakistanis a series of questions came up in my mind. Yes that’s true that Islam has laid down a proper code for accepting money against bloodshed to forgive the culprit. However on what grounds Raymond has been released from other cases such as carrying illegal arms and doing actions such as spying and putting the whole integrity of a nation on line? Which Shariat law or Country law allows foreigner to invade country secrets carry illegal arms and than just go away??? Any Pakistani involved in a similar action in US would have been let go this easily?.  Raymond should have been put under trial and test for all offenses before allowing to fly off away from the country. It’s a shame that Government officials preplanned everything to allow him a safe exit.

Honorable minister although your statement reflects your loyalties to your party and to your seat and NOT to Pakistani nation, but would you have accepted bloodshed money decision if God forbids something of similar sort had happened to your loved ones?

Let’s for a change draw a line at some point in degrading ourselves in front of  US.


Leave a Comment

Struggling Freelancer? Follow the 10 Commandments!

Struggling Freelancer? Follow the 10 Commandments!

The Ten Commandments which according to the Hebrew Bible is a list of religious and moral imperatives that were given by God to the people of Israel to give them a clear direction as to how to achieve religious success by avoiding some cardinal sins! Without a doubt success in any domain can only come if we avoid “sins” related to that domain and freelancing is no exception. To make the best out of our freelancing job we have to avoid these sins and follow what I call the 10 Commandments of Freelancing.

1. Thou shall not Work without a contract: Pinch yourself hard! Does it pains? Yes it must have, sadly this is real world! We are not living in a world only to be heard of in fantasy stories where everyone is loyal and you can trust every potential client and can’t believe that they can stab us in the back. The biggest mistake many freelancers do is that they just trust the client too much! Protect all your bases before starting the work with a fully documented contract including things such as payment terms and scope of work to be delivered.


2. Thou shall not undercharge: Are you working 18+ hours a day on your freelance projects and still managing a diet which includes beans and bread most of the time? Surely is one of many signs that you might be charging too little! Most freelancers don’t even know what they are worth! Or are happy with an amount with which they can meet there minimum expenses. Always keep yourself up to date with the latest hourly or fixed time rates for the domain you work in.


3. Thou shall not overcharge: Having said that you should know what’s your worth is and not undercharge you should always understand that clients are always looking for a quality yet cost effective solution. Keep up to date with market prices of similar services and always bid around it to gain attention. Anything way above or way down and alarm bells start ringing in the customers mind.


4. Thou shall not overload your plates: you should know your limits. I agree that the feel of earning more and more dollars is simply irresistible but “reputation” that’s something on which your business would grow in the future. Avoid working like the greedy algorithms searching for a local optimum and in turn spoiling the global optimum! Don’t overload yourself with work, be within your limits and build a reputation with quality work.


5. Thou shall not miss deadlines: I can’t insist on this more! This may be one of the worst forms of sins in freelancing. Clients hate deviations in commitments and this would ruin all your reputation until and unless you have a very genuine excuse.


6. Thou shall not work with simply every client: Remember it’s a real world! There are all types of clients in the world, some clients want the whole word but simply don’t want to spend anything. Some clients are just simply too hard to please! No matter what you do. Excuse such clients in a polite manner so you can focus more on clients who are happy to pay you up to par and bring you more success.


7. Thou shall NOT rely on just a single client: That’s a major mistake many freelancers do when they initiate a startup. You might find an angelic client who would suffice your need for the time being for success you need to diversify yourself work with different people which not only improves your confidence but also you establish growing relationships and business links.


8. Thou shall not become static: Technology never stays the same! If you want to achieve success in the freelancing domain and keep up with the pace of changing technology.


9. Thou shall not stop marketing your services: Have a lot of work? Well let’s be honest it’s not going to last forever. Keep advertising or marketing your services socialize with people go on business events or conferences that’s where you make relationships and out of any such relationship you get a solid lead or a reference.


10. Thou shall always follow up with your clients: Have a bunch of happy clients? Always follow up with them introduce new services and keep in touch. They can be your biggest source of new work both by giving you work themselves or referring other potential clients.


The list is exhaustive however if you follow these 10 golden rules you are guaranteed to have success in freelancing domain.

Leave a Comment

How to Apply for a Freelance Project

I started freelancing back in 2006 when I was going through the final phases of my Bachelors degree in Computer science and like any other graduate student I wanted to make some extra cash apart from my pocket money to meet my every growing list of expensesJ.

The toughest part of being a freelancer is hunting for leads and then stands out amongst a huge pool of potential candidates to catch the employers/clients attention. While popular job boards such as vworker.com, odesk.com, guru.com, freelancer.com and elance.com have made the job of searching for suitable projects/jobs easier, the later is still a difficult job on hand.

Over the years I have grown a complete company out of my initial one man freelance startup with some simple methodologies that make you have employer’s attention instantly. Once you have his attention. Well done! Now you simply have to build on this to secure the lead.  In this blog post I wanted to share some of those insights that I learnt over the years.

  • Read the Entire Job Description: I know sometimes project postings can become really lengthy and boring and you just want to skim over the description and simply apply/bid on the position. I can’t stress that enough! Employers spend hours and hours nailing down the requirements and they expect the same from all the potential candidates as well! It’s their first criteria of filtering out a good candidate from a rejected candidate. For them it’s simple if you are not focused enough to even go through the entire description once than in the long run you won’t be staying focused on the actual job on hand.


  • Avoid Generic Bids: If I am the employer I would hate this the most! if you don’t even have the courtesy to go over my project requirements and reply back with project specific questions/relevant experiences or portfolios/suggestions etc. than it would be better off that I ignore your bid altogether. So as a rule of thumb attract the client always by asking him questions about the project and try to involve him in a conversation. This gives the employer an impression that you are serious about the project and give some thought about his requirements. Give him a feeling that you gave special personalized attention to his project!


  • Remain within your limits: Since this won’t be the last post on which you would be bidding or commenting neither it would be the last project the employer would be posting its always a great idea to leave a good impression. So assuming the client project requirements state “I am looking for a C# programmer with over 10 years of professional experience” ask yourself am I entitled for this position/project? Considering the requirement would I be putting on stake client’s time and resources as well as mine? And of course in the long run would it spoil my freelance image in front of a client who has potentially a lot more of work coming up? Be honest with your self! It will really pay off in the long run. I have numerous clients who come over sometimes offering thousands of dollars for doing a development in language/domain I am totally alien in, at first it’s tempting but remember one failure means your whole image goes down.


  • Portfolio: Once you are done with everything in a structured manner and client is interested in talking further with you, he would be asking for your relevant experience. Always keep you portfolio up to date. Categorize your portfolio and make it very easy for the client to locate relevant experience. Remember the client is not interested in how fancy your portfolio page looks rather what’s the quality of work you have done until now.


  • Communication: I can’t insist it more but constant communication is the key to build a long lasting relationship. Clients are investing time and money in the project and most of the time they are under time pressures too. So if you can’t keep in touch at all times or give timely project status reports its more than likely that after an initial project the client won’t ever approach you again. Make your clients feel that their projects are in safe hands!


Comments (1)

Microsoft Interview Experience

Last month I applied to Microsoft through their college recruiting website for SDE/SDET positions and to my amazement the very next day I was contacted by a recruiter who was interested in setting up a telephonic interview with me and had sent me a few initial questionnaires to fill back and return to her. We decided a date and time and I started waiting anxiously for the big day.

Phone Interview

Nicole (recruiter) was sharp on time on the interview day and started off the conversation in a very friendly manner which really helped easing my nerves out. There were no technical questions asked (although I was anticipating a lot of them) and most of the conversation revolved around my resume on questions such as what was your most challenging project? What would you have done different if allowed to go back in time? Do you like to work standalone or do you prefer team projects? Why do you want to work for Microsoft? And finally before we hung up the phone she said “Ok if I want you to test a calculator with simple mathematical functions and made for small children. How would you test it? “. I then asked here a large number of different questions on Microsoft’s work culture, salary and benefits and career paths before we ended the interview. I was pretty satisfied with my performance and was expecting a call up for further rounds.

After two weeks I was again contacted by another recruiter who wanted to set me up for a face to face interview in Dubai on 3rd March 2011.  I was asked to provide all my travelling details which I did so and Microsoft arranged a fully paid trip to Dubai for me.

My interview was in the evening session and to avoid any last moment delays I reached Microsoft Office 30 minutes before the scheduled time. I had to go over 4 technical interviews with Directors of Microsoft Business solutions, Windows Azure, Silverlight and Visual Studio groups respectively.


My first interview was with Director of Business Solutions group (Mr. Azfar). We started off with general discussion about my resume before I was handed a marker and was asked to solve problems on the white board.  The questions that I was asked here were as follows:

  • Write a function that takes a pointer to the head of a linked list and an index and deletes that node. Node consists of a void pointer data and link to the next node. Write test cases for this function.
  •  What’s the difference between master data and reference data?
  • Suppose you have to design the sales modules of an ERP system how you would structure the model for better reporting?
  • Suppose you are given a bit stream and you don’t know from where the bit stream starts. Write a function that returns true if the bit stream has an alternating pattern. For example 000000101010 would return true and 0000001010000 would return false.  Also I had to write test cases for the function.

I was very confident throughout and hardly faced any issue in nailing out the problems on the whiteboard.  I was walking through my algorithms keeping the interviewer in loop and also managed to come up with solid designs and test cases. The interview ended lasted for about 50 minutes after which I was given a 2 minute period to ask any questions if I had. Overall the first interview was a very satisfactory one and it geared me up for upcoming interviews.

We had a 15 minute break during which the recruiter on site Erick, a nice friendly chap made us fill some forms and asked me about my interests and possible teams I would like to work on.


My second interview was with Jason who is head of Testing in Microsoft Visual Studio team (if I am recalling correctly) he was one of the most nice fellows I have ever came across in my professional career he was very friendly and supporting throughout the interview.  Once again I was asked to code on the whiteboard. The coding problems were as follows:

  1. Write a function that takes two strings and returns true if one string is the substring of other.
  2. Suppose you have a  2D array whose elements are increasing both row wise and column wise and you have to find an element if it is present in the array or not. I had to come up with an efficient algorithm for doing this.
  3. Write test cases for both the above functions.
  4. Design a stack using two queues.

I got confused a bit during the interview and hence took longer than normal to solve these simple problems. However Jason was very comforting and supporting throughout.

Interview 3

Third interview was with Director of Windows Azure Development group. This interview focused totally on problem solving and writing test cases for the problems. The problems I was asked during the interview were

  1. Suppose you have a dictionary of words design an algorithm that would scan all words and determine all words that are anagrams. Your algorithm should be efficient and NOT O (n square).
  2. Write a function that would return the first non repeating character in a string. So “Total” would return 0.
  3. Write a function to print the mth from last element of a linked list. (m=0 is the last element). This had to be done using one loop only.
  4. Reverse a string in place ! (in place was the only catch here)

Once again I managed to come up with solutions of all the problems. There was a slight bug in my solution to problem 2 which the interviewer pointed out and I fixed it. Other than that the interviewer was pretty satisfied on how I approached the problems and covered all cases. I was pretty satisfied with this interview and was anxiously waiting for the next one.


Interview 4

This was my final interview for the day. I don’t exactly remember the name and designation of the recruiter but he was one friendly chap. Very energetic! And as soon as we entered the conference room he laid the rules straight away! “Write a fully working code! And write efficient code and nothing less!”  All I managed to do was to smile and reply back “ I will try my best”. This interview lasted for 50 minutes and I had just one problem to solve. The problem was as follows:

  1. Suppose you have Binary tree you want to store the binary tree somewhere on the disk or on the cloud once stored than write a routine that would retrieve and rebuild the tree. Cover all cases and come up with at least 10 solid cases.

After a few minutes of brainstorming I came up with an algorithm which I guess really took the interviewer with surprise and he was really impressed with the approach. We managed to walk through the algorithm and write proper code on the white board. The test case session was a very interactive one and I managed to come up with some strong test cases. Overall the interview ended up on a very satisfactory note and I walked out confident and hoping for success!

Post Interviews:

Microsoft gave all the candidates souvenirs and we left for our hotels. I had the flight same night so had little time to roam around Dubai.

Now after 3 days of my interview I was contacted back by Microsoft that they would like to make me an offer in their Dynamics team! It’s an amazing feeling and I have no words to explain this. I am looking forward to a life time experience at Microsoft in coming months!

If you have any questions related to my experience you can contact me by responding to the post.

Comments (28)

Comparison of Various SharePoint Products

 The attached excel sheet gives a good comparison of the following SharePoint products:

  • Windows SharePoint Services 3.0
  • SharePoint Portal Server 2003
  • Office SharePoint Server 2007 for Search
  • Office Forms Server 2007
  • Office SharePoint Server 2007 Standard CAL
  • Office SharePoint Server 2007 Enterprise CAL or for Internet Site

 Comparison of the products is based on the following features:

  • Collaboration
  • Portal
  • Search
  • Content Management
  • Business Process and Forms
  • Business Intelligence
  • Management
  • Platform

 Click here to download the complete excel sheet for your reference.

Comments (4)

DUMMY’S Introduction to Concept of Sites and Site Collection

Today going through files on my hard disk, I came across this tutorial which I wrote about 2-3 months back for one of my very close friend Salman, who was interested in learning SharePoint so I thought I should share this tutorial on my blog for benefit of those people who get themselves confused between Sites and Site Collection concepts in SharePoint 2007.


Most people find it difficult to grasp the concept of sites and site collections when they first begin with SharePoint. Today I would discuss in detail both of these concepts and then we will also see how we can create some sample sites and site collection. Before we proceed further lets define a few things.


  • Site typically would store lists of documents, events, tasks, discussions and many other types of information.
  • Sites may also contain pages and web parts that provide access to information that is either on stored within the site or in some external locations.
  • Sites would also control access and define permissions levels for users and groups within a site (We will discuss this further in Security Authorization section)

Site Template:

The initial configuration of lists, pages and web parts constitutes a site template.

Site Collection:

A site collection is a set of sites connected together, and of course there is a relation between sites and that is that one site is the parent site (also known as the Root Site) and the rest are sub-sites or child sites.


Site Type:

When you create a site the site creation page allows you to select a site template for the site which would determine the functionality and the initial configuration of content on the site

Create a site collection

Now let’s create a new Site Collection step by step.

1) Log in to windows using the Admin Account.

2) Go to Start –>Administrative Tools–> SharePoint 3.0 Central Administration

3) This would open the Central Administration Page. On the Central Administration page click on the top navigation bar, click Application Management.

4) On the Application management page, in the SharePoint Management Section click on Create Site Collection.

To download the complete document please click here.

Comments (4)

Customizing Context Menu in SharePoint 2007

A couple of days back I got an email request from one of my friends who wanted to know that how can he customize the context menu for items in the document library for WSS 3.0, and the very next day I was assigned a project at my job in which I had to do exactly this as one of the requirements. So today I am writing this post to put a little light on how we can customize the context menu for items in a document library. Ok I am going to illustrate this with the help of an example problem.

Problem Statement:
Whenever we upload an excel file in the document library, the context menu should have an extra item in named as lets say "View Excel Sheet as a webpage" ofcourse in this post I am not going to illustrate how we would render that excel sheet as webpage to the user but this is just to give you an idea of how things are done. This menu item would also have an "excel" like icon along site it and whenever we will click on the menu item it would just alert the user the location of the excel file .i.e. where it is stored with reference to the site.

Ok now having stated the problem lets get to some basics first.

The context menu is itself a javascript program means that the context menu is generated by a javascript code . This javascript program can be found at

\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\Core.js

Yes the name of the file has changed to Core.js from ows.js, menus in Windows SharePoint Services and SharePoint Portal Server 2003 were located in a javascript files at the following location

\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS\1033\ows.js

Ok now lets dig in a bit in the Core.js file, in the Core.js file the main function responsible for the document library drop down menus is AddDocLibMenuItems(m, ctx) and this provides a hook by which we can insert additional menu items.

The first few lines of the function are as follows

if (typeof(Custom_AddDocLibMenuItems) !="undefined")
        if (Custom_AddDocLibMenuItems(m, ctx))

Ok now what this piece of code does? it is basically looking as to whether a function named Custom_AddDocLibMenuItems is defined or not, if it is defined then it simply calls it. So the main idea here is to override this Custom_AddDocLibMenuItems function by our own script which we can use to extend the context menu, adding new items.

Note: It is recommended that you make a copy of your Core.js before you make any changes to it.

Ok now we can override the Custom_AddDocLibMenuItems function in core.js adding our own script as follows.

function Custom_AddDocLibMenuItems(m, ctx)
    var strDisplayTextCustom = ‘View Excel Sheet in Browser’;


    if(currentItemAppName.toLowerCase() == "microsoft office excel")
           var strImagePath = ctx.imagesPath+"XLS16.GIF";
           // Add menu item
           CAMOpt(m, strDisplayTextCustom, strAction, strImagePath);
          // add a separator to the menu

    return false;

How does the function above works?

The Custom_AddDocLibMenuItems function takes two parameters m and ctx, the first parameter m is basically representing the menu object itself, where as ctx provides HTTP context information about the web request. To add an item to the menu only one function call is needed.

CAMOpt(m, strDisplayTextCustom, strAction, strImagePath);

The CAMOpt function takes 4 parameters which are as follows:

1) The menu object to add item to.
2) The display text of the menu item.
3) Javascript action to perform when item is clicked.
4) Path to an image associated with the menu item.

CAMSep function simply adds a separator bar to the menu. Finally the function returns a false which means that standard menu items should also be included, if we had returned true then standard menu items would not have been included.

Having done all this simply save the Core.js file and open your sharepoint site and a few excel sheets to the document library and check its context menu. The context menu should be as shown in the image below.


Comments (39)

My New Apple IPHONE- 8 GB

Today I am not going to write about SharePoint, rather I will discuss about my new Mobile phone–Apple IPHONE (8-GB). I have been really excited to get this amazing product from Apple in my hands ever since its launch and finally the day has arrived and I have one of these revolutionary mobile phone of the future, all for myself.

Having spent a good amount of hours exploring the various features of  Iphone I thought to share them with you all.

1) Activation:

Iphones recently came to pakistan, and most of its vendors sell a cracked version of the apple software so you dont really need to activate your set which is a good thing but still one drop act that comes with it is that if you try to install an update for the phone software your set would be eventually locked and you will have to totally get the firmware reinstalled..which ofcourse would cost you more money.

2) Synchronization:

Syncing is really really FAST. The iPhone automatically syncs your contacts,
calendars, and mail accounts. It also will sync your Bookmarks from
Internet Explorer or Safari; sorry no Firefox option. Syncing is easy,
and that is really all there is to it.

3) Design:

I seriously have no words to describe its amazing looks, if you are looking for a best looking mobile phone then I think Iphone should be your top most choice. You only have one button and thats the home button which will take you to the home menu.

4) iPod

The iPod on the
iPhone is awesome. I love flicking through my music, and when turned
horizontally, the cover flow is cool. Just like Steve Jobs said
himself, you can touch your music.

As I explore more n more this amazing mobile phone + IPOD…I will keep posting.

Comments (3)

LIVE MOSS 2007 Based Site

If you are looking for a LIVE MOSS 2007 based site, you can find an excellent collection here


Comments (1)

Application pages VS Safe Pages

Application Pages: is a template page from _layouts virtual directory and has the following the characteristics

1) It is available within every site.
2) Only one copy of the page is there on the server.
3) NOT accessible via the designer.
4) Accessible through the IIS.

Safe Pages: Template page that comes from site definitions and has the following characteristics.

1) Exists only on sites where it has been specified by a template or created by a user.
2) More than one copies can exist on the server.
3) Accessible via designer.
4) NOT accessible via IIS.

Comments (2)

« Newer Posts · Older Posts »