October 8, 2010

Job interview

What question give you a better understanding of one's skill?
  1. Tell me about a project that you work on that was a success, and tell me about your contributions.
  2. Tell me about a project that you work on that did not go according to plan, and tell me what went wrong and what you learn from this experience.
I personally found the second question more insightful. It is a well known fact that software development is a risky business. Unless the project you are working on is well defined and all unknowns are well documented, the chances of things going wrong are high.

So what do you get from someone that articulates his shortcomings on a project? 
  • Well for starters, he/she is comfortable with the unknowns and the risks that comes when embarking on a project. 
  • He/She is able to use his/her previous experience to identify potential problems. 
  • And most important, he/she acknowledge that this profession is difficult and complicated, and that every project have something new to teach us.

September 15, 2010

Do you know algorithms?

Not so innocent question

Not to long ago, I met a computer science professor with the hopes that he will accept me as a Master student. The meeting was informal and no agenda was set. To get a feel of what I offer, he asks me a simple question.
Do you know algorithms?
Sure I know algorithms, or did I? My mind was scrambling to find a suitable example. And that is when it occurred to me that I rarely used algorithms when I code. So I began my research in this matter. Where best to begin then by looking at the definition of algorithm
In mathematics, computer science, and related subjects, an algorithm is an effective method for solving a problem expressed as a finite sequence of instructions.

Not an isolated incident

It was not the first time my brain was picked on algorithms. I was interview a few months ago by Google. I had 2 interviews and both focused on algorithms. Stevey's interview preparation article describes very well the company hiring process emphasizes on analysis a problem and provide a data structure and algorithm for it. I have a background in C++ and when I explained my solution in terms of std::list and std::vector, the interviewer was not happy with the answer. He probed me on the inner working on the std components I was using.

What do you mean "know algorithms"?

So what is it to know algorithms as a software developer? Well, it depends. It is according to the work environment you work in. I see some similarities to The project management triangle The question to choose 2 of the 3 attributes cheap, good and fast apply to this question.

  • If the project environment is cheap and fast (most projects fall in this category) then you go with the tried and true standard libraries. The brute force is used most of the time.
  • If the project is cheap and good then you still rely on the standard libraries but a in depth understanding of the algorithms used under the hood. What algorithm does the std::sort use? Or is it better to use a std::set instead?
  • If the project is good and fast then you need to reinvent the wheel. In other word customize the solution according to your needs. And that is where you prove your worth.

So the next time you are asked Do you know algorithms?, you will able to provide a better to answer him/her then I did.

Happy coding.