Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Possible Duplicate:
What are the pros and cons for the employer of code questions during an interview?

I am curious to know why do companies hand you a blank paper and ask you to write code? This confuses me, because these days intellisense, google, stackoverflow etc are common sources to look up syntax and / or IDE gives you a colored indicator if your syntax is wrong.

I usually get stressed out during these situations. I am curious to know opinions of other developers. I am posting this on this forum, hoping to get helpful feedback from other experienced developers.

share|improve this question
Because they're trying to figure out if you can think critically without the use of aids like Google, etc. –  Jason Nov 16 '11 at 17:04
If you can't write some lines of code without using google you are probably not that of a good hire. –  stavnir Nov 16 '11 at 17:07
See programmers.stackexchange.com/q/21230/20011 for a thorough discussion of this topic from both the interviewer's and the candidate's points of view. –  Caleb Nov 16 '11 at 17:33
Not putting you in Visual Studio or some other IDE is fine, but I'm baffled at why a company can't just put you at a standalone (not connected to the Web) computer and ask you to type some stuff in Notepad. Typing seems like a pretty fundamental skill for a programmer. –  Kyralessa Nov 16 '11 at 18:25
Intellisense for a pseudocode? An interesting idea... –  SK-logic Nov 17 '11 at 7:30
add comment

migrated from stackoverflow.com Nov 16 '11 at 17:08

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Caleb, Kate Gregory, Vitor, Anna Lear Nov 16 '11 at 21:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

7 Answers

I think they are not so interested in checking your syntax but the logic that are trying to put. They need problem solvers and it is important to know what approach you are trying to implement to solve a problem. Correct syntax would be a plus but not necessarily what they are looking for.

share|improve this answer
Exactly, I don't think they will type your code into an editor and compile it. I think they want to see how you approached the problem without Google. –  Matt Hulse Nov 16 '11 at 17:05
That's why they should allow you to write it in pseudocode (unless they need diehard code monkeys). –  rightfold Nov 16 '11 at 19:24
add comment

Speaking from experience on having been on the interviewee and interviewer side of things: Problems where you're asked to use a piece of paper or white board is done because your potential employer essentially wants to know two (2) things about you:

  • Are you a problem solver? It might sound elitist and harsh but if you can't solve my problems then why should I hire you?
  • Are you able to communicate well about how you solve a problem? You will be working together with a team, the management and sales. Failure to communicate is problematic in a team environment, there are a lot of times during software crafting/development where making one solution may wreak havoc on another. I can't stress enough how important a simple chat would've saved you and your team from dealing with the havoc and come up with an even better solution.

When the problem you're given is done right by the interviewer then you should be able to answer some questions and solve problems without the need of IDE's or other tools. Usually the problems you're given should be answerable regardless of intellisense/autocomplete knowledge as they won't help you anyway on software and algorithm design anyway, so it is a bogus statement if anyone tells you otherwise as those tools only aid your productivity. I wouldn't be surprised if candidates that complain about the lack of IDE are red flagged as copy-and-paste/wizard users rather than "real" coders/programmers.

So if you're in a situation where you have to write code then do the following:

  1. Take a deep breath. Get that blood circulating in your head.
  2. Focus on the problem at hand. Everything else is irrelevant.
  3. And whatever you do: Don't panic! Always assume good intentions. Just so you know: freaking out is a bad sign.

Usually you won't be gauged on syntax correctness anyway. As long as you know what variables, arrays, loops and conditionals are, you should be able to solve problems on paper. Bonus points if you can remember some computer structures and algorithms. Sometimes the interviewer might probe you on typos and it would help to recognize your own mistakes; in such situations just apologize, correct and move on.

And if you want practice, there is Project Euler... or you could just work on real problems writing real applications.

share|improve this answer
add comment

Few companies I know of are too particular about syntax. They don't expect you to write pseudo code, but they don't expect you to write syntactically flawless code either. Its to see you know what how to proceed.

If a company expects you to write compilable code on paper, its probably not a company you want to work for.

share|improve this answer
add comment

It shows how much you actually know.

Auto-completing intellisense / google / other sites - are just tools.

Although i must admit that knowing what to look for, and doing it fast is also a skill, it's a different one than what is required in that type of test.

A person who can write a program without looking it up first will usually be more productive because he's not wasting time looking for it.

share|improve this answer
They are tools, but intellisense really dumbs me down (in the sense that I hit "." and I know the default method that intellisense will display, and I hit tab without thinking twice about it. –  MJH Nov 16 '11 at 17:07
add comment


Because too many people with nice looking resumes can't code their way out of a paper bag.

Also, there are people who maybe can code, but can't communicate what or why they are doing it that way, which is a big detriment in team coding situations.

And don't worry about punctuation coloring and the other stuff that the IDE can fix; because if it's someone you want to work for, that's not the part of the answer in which they're really interested.

share|improve this answer
add comment

Because I want to know if you can go up to the board during one of our brainstorming sessions and convey your ideas to the rest of the team.

I don't even care if you know how to spell your name, as long as you can get up in front of the team and convey your ideas to the rest of us.

share|improve this answer
add comment

This could be percieved as a good way of identifying the candidates true understanding and experience of a language.

Im not a fan however, programmers today use IDE's and tools because they improve productivity. If a candidate can do great things using just Notepad i wouldn't value them over someone who can do great things using intelisense, why would i?.

You may be the greatest digger in the world with a shovel in your hand, but i would hire the guy whos great with the excavator if i wanted to dig a big hole.

From personal experience though, im astonished at how many times ive tried to jot down solutions to simple problems and been stuck trying to remember basic syntax. It can be really good way of solidifying your understanding by trying "think in code".

share|improve this answer
A code question in an interview won't have anything to do with 'great things.' It'll be a fairly simple task like FizzBuzz, a database query, something like that. Nobody wants to sit around watching while you write pages of code by hand. In simple terms, the question isn't "How awesome are you?" but "Are you minimally competent?" –  Caleb Nov 16 '11 at 19:20
add comment