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.

By "good job" I mean mostly a job that is well paid and involves the development of market-leading products/services (of course within my area of interest). I have a masters degree in economics and no formal education in computer science. I'm a completely self-taught programmer. I do have a few small projects that do solve a real-problem in my portfolio, as well as one year long "career" at some company as a junior programmer. So I expect that when interviewing for another job I will be given some qualifications test.

What are the chances that I will be given programming puzzles to solve? (I'm interested in Europe mostly, if there are some big differences geographically.)

I've seen a few of those and I'm positive I wouldn't be able to solve 90% of them on the spot, with a blank sheet of paper and no internet or book references. Add to that the stress of the interview. To tell the truth, I think only a very small percent of the population is able to solve those with no preparation - the rest passes them because they practice. During my studies I did have courses that required solving some economic optimization case studies, which were based on algorithms (although different from those typically associated with programming), so I know that the best method of learning how to solve such puzzles is solving a large number of them. Problem is, I believe it may take at least 6 months of full time study to practice some most often encountered puzzles, so that I have a fairly good shot at passing most interviews. And I'm a very practical guy, who values his time greatly. My economic gut tells me that I'd rather spend 6 months of my time polishing a commercial project, that I've been working on, rather than developing my "interview passing skills".

Don't get me wrong. I am aware of the hard science behind programming. I do have a collection of books that I consult very often as soon as I encounter a mathematical/algorithmic problem, I do know where and how to ask questions, sometimes I do even browse PhD-level research papers (if I have an important but specific problem). But reading the whole Cormen's or Knuth's book and solving the puzzles in those books? I'm not that kind of guy and even if I were, I don't have time for this.

I do fairly well in tests that target primarily the language or API, especially C++. That is because I work with them every day, and C++ being quite dangerous, I kind of had no choice but to master it. That was needed to complete a real life problem. On the other hand, it took me 3 years to come across a situation where I had to pick the most appropriate sorting algorithm and adapt it for my needs. Which leads me to think that if I don't explicitly train to solve camouflaged specific sorting algorithm puzzles, then I won't be able to solve them during interviews.

Note that I cannot simply go to every interview and try my chances, as I live in the middle of nowhere and usually an interview is a major logistical challenge and a strain on my time (mostly the whole trip takes 3 days) and money.

share|improve this question

closed as off-topic by gnat, Bart van Ingen Schenau, GlenH7, Dan Pichelman, MichaelT Oct 18 '14 at 2:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking career or education advice are off topic on Programmers. They are only meaningful to the asker and do not generate lasting value for the broader programming community. Furthermore, in most cases, any answer is going to be a subjective opinion that may not take into account all the nuances of a (your) particular circumstance." – Bart van Ingen Schenau, GlenH7, Dan Pichelman, MichaelT
If this question can be reworded to fit the rules in the help center, please edit the question.

If you're indeed applying for a good development job, then it's the interviewer's responsibility to pay for your interviewing trip and expenses. –  Ioan Alexandru Cucu Jan 12 '12 at 7:56
From my experience they cover for the flight and hotel, not for my time (3 days), restaurant and taxi bills. –  RobertELee Jan 12 '12 at 8:09
I can't directly answer your question ie: what are the chances. However, if you think there's a chance you'll be tested and you choose not to prepare, and you miss a job, ... well ... are you really that serious? If I was employing you and knew you chose not to put in the effort to prepare for the interview, I'd be wondering fundamentally how serious are you about this? –  jasonk Jan 12 '12 at 9:29
Knowledge is King, but personality matters. Being able to solve complex puzzles is nice, but should(!) not be the only criteria, especialy if he is going to be part of a larger team. But as said in other answers this depends heavily on the Interviewer/Company. That said, dont be too scared of puzzles. :) –  Manuel Schmidt Jan 12 '12 at 9:31
Please stop adding tags, like jobs and career, that clearly say not to use them. They're not relevant to your question. –  user8 Jan 12 '12 at 10:06

6 Answers 6

I have been on the field for a while, and have been through dozens of job interviews (all in Europe) during this time. In the majority of these, I was not asked to solve puzzles IIRC (at least based on my definition of puzzles, and my hazy understanding of what you mean by puzzles, derived from your post*). When I was asked, I could answer these on a satisfiable level, without much struggle, even though I have never read Knuth nor Corman, and I have never explicitly practiced solving such puzzles, apart from my university studies. Even in these cases, the puzzles were only part of the picture, I was asked a lot of other questions.

Of course, my situation is different from yours in that I graduated from a (locally) fairly well respected uni. And by now, my past jobs tell a lot about me, so noone bothers to ask me whether I know the difference between shell sort and heap sort (which I actually couldn't precisely tell off the top of my head right now ;-)

My advice to you:

  • Read up on fundamental algorithms and data structures (if you haven't done so), so that you can pick the right type of collection (set, map, list, tree etc.) for a given task, and explain your reasons. I don't think you're expected to know the deep differences between, say, different obscure implementation variants of hash tables at this level. But know at least the STL collections and algorithms well (and maybe some from Boost too).
  • Prepare a portfolio of your achievements so far, with code snippets demonstrating how you solved specific real world problems. Mention this prominently in your CV and during the interview if you can. Since you have no formal education on this field, you must be able to convincingly demonstrate that you know what you're talking about.
  • If getting you to a face-to-face interview is so expensive, I am sure they will try to do at least one phone interview before they invest in a personal meeting, and in a phone interview I believe you are more likely to get open-ended questions, or concrete technology questions than puzzles, so you get a better chance to show your strengths. And in case they do ask questions you find difficult to answer, at least you know there may not be much sense in traveling to the interview - or you can prepare in advance to some extent.
  • In case you are given puzzles to solve, do your best and tell them how you would attempt to solve the issue, step by step. A good interviewer is not looking for a perfect coursebook answer for an assignment, rather a demonstration of your problem solving skills. And a bad interviewer** does you a favor by not hiring you anyway :-)

*So a question like "we have a graph containing currencies as nodes and exchange rates as weighted links. There may be circles in the graph where the cumulated exchange rate is positive, i.e. by exchanging 100 units of currency A to B, then B to C, ... then back to A, you get back more than 100 A's. How would you find such a circle?" can be called a puzzle. A question like "what are the different types of inheritance in C++, and when should you use each?" is not a puzzle.

**by "bad interviewer" I mean an interviewer with unrealistic / unclear expectations and insufficient knowledge about SW development, not necessarily an interviewer with insufficient interpersonal skills. In my experience, if I am interviewed by such a person, I am most likely in an organization where management does not have a clue about SW development, and/or the real developers have no effect on the hiring process. Which probably means that the atmosphere is not quite developer friendly, and they aren't hiring good developers. I wouldn't like to work in such places.

share|improve this answer
+1 for the good interviewer/bad interviewer :) –  Raku Jan 12 '12 at 8:53
How exactly does a bad interviewer do you a favor by not hiring you? They may be a terrific developer but a bad interviewer. Most developers hate to do interviews and few are actually trained to do good interviews. –  Dunk Jan 12 '12 at 19:51
@Dunk: A bad interviewer thinks there is only one right answer and does not want to discuss alternative solutions. It is an indication of a bad corporate culture environment to be a developer in. –  Spoike Jan 12 '12 at 22:32
@Dunk, sorry, the term was unclear indeed, although Spoike guessed the meaning correctly :-) I added further explanation to my post. –  Péter Török Jan 13 '12 at 8:20
+1 for Read up on fundamental algorithms and data structures... –  Qwerky Jan 13 '12 at 16:24

My only suggestion, if you get stuck, don't freeze up... just verbalize through what you're thinking. Alot of times interviewers are looking for your thought process rather than just rote memorization skills.

share|improve this answer

Getting back to the question asked ("What are the chances of getting a good development job without the training in solving programming puzzles?")...

Answer: it depends...

If your area of interest is economics (and the marketable part of your history seems to be there) then I'd say that programming puzzles are unlikely to arise in any likely interview process, since the probable targets would be research/structuring/quantitative analysis in the finance sector. Good news: pay can be good. Market-leading? Most development is proprietary, so you'd have difficulty knowing. I work in a quant/structuring team where some members (like myself) have a development background while others have a background in other disciplines (mathematics, economics, etc).

At the other extreme, if you were targeting a software engineering firm then the opposite would very likely apply. With no strong formal track-record in the field, however, the chances of getting an interview, much less a well-paid employment working on market-leading products, would be slim at best.

Is there a middle ground? Are there any companies developing software for economists? Who's the market-leader? Do they pay well? Some things to think about.

share|improve this answer
+1 for "Most development is proprietary, so you'd have difficulty knowing." –  Karthik Sreenivasan Feb 14 '12 at 5:38

It depends on the company and the interviewer.

By "puzzle" this could be very relevant to the job in hand. I don't mean the "why are manhole covers round" but practical ones that demonstrate your thought processes and approach to problems.

The issue is well documented on the internet, 2 examples:

Personally, if I was an interviewer (and I have been, many times) and saw this question when I researched your name, I'd throw your CV away...

Edit: OP seems to miss the "relevant" bit in my answer.

They asked "What are the chances that I will be given programming puzzles to solve?". I gave examples of where folk ask relevant ones. If you can't approach a problem (and I've seen folk who can't) relevant to the job you're being interviewed for (whether Fizz Buzz or database development) then you're wasting my time.

Knowing an API or the language isn't being a developer: that's having a good memory without understanding what you're doing. A good Java developer can pick up C# quickly: the underlying programming skills matter more then knowing an API.

Final edit, then question gives me a negative perception to what you think a developer is, your willingness to learn, with a hint of hubris for good measure

share|improve this answer
Even if you try to be offensive, neither of those articles is relevant to the question. You also made a remark that you didn't bother to explain. Nevertheless I thereby bow to your 2000+ rep. –  RobertELee Jan 12 '12 at 8:26
You asked "What are the chances that I will be given programming puzzles to solve?". I gave examples of where folk ask relevant ones. What do you think is relevant to ask then? API calls? –  gbn Jan 12 '12 at 8:29
You don't know me at all but you bothered to publish your negative assumptions about me. Probably you haven't been judged by others for a long time (yourself being an interviewer etc). Don't waste your time being offensive on the internet. –  RobertELee Jan 12 '12 at 9:17
@RobertELee: ha ha ha. Now who's making assumptions. Deal with it: you asked a public question on a public forum. –  gbn Jan 12 '12 at 9:21
@gbn: OK, make a note, if General Robert E. Lee ties his horse up outside my office and comes in looking for a job, I shouldn't hire him. :-) –  Carson63000 Jan 12 '12 at 22:24

The thing to remember, apart from in the minority case where the interviewer seems to be trying to prove a point with the "cleverness" and impossibility of the coding tests, is they're simply trying to gain insights that you're at the right level for the job on offer.

So if you're at a suitable level for the vacancy you shouldn't expect something impossible unless you see the hidden "catch", thrown your way - as it proves little for the interviewer. That's not so say you never get them - sometimes you do, but I contend they're not helpful for either side.

But you can absolutely expect to be given puzzles to solve - be that a scenario where you're expected to use a common pattern, or construct a simple design on the whiteboard, fleshing it out as the interviewer gives more information. If you rattle it off in 2 minutes expect to have a follow up talking of optimisations, or unusual scenarios. Again the idea is to get an insight into your thought processes.

Even some of the famous "smart" questions can have a place - "How many piano tuners in London?" is a pointless question right? Perhaps, but it at least shows a thought process and application of reasonable (albeit all entirely wrong) estimates. It's not about showing the right answer, but showing you know how to start breaking something like that up.

It's common to start with a simple few questions on objects and inheritance etc (and you'd be amazed how many people fall at even this step - sometimes answering with absolute gibberish!).

But if you're applying for something that needs C++ expect to see some questions on the language basics, and some scenarios to work with that can show you can reasonably apply that knowledge.

share|improve this answer

The primary goal of formal CS education is not to teach you a programming language but to teach you the hows and whys of programming. Why are some sorting algorithms faster than others, why is it better to use data structure A instead of data structure B in one case, but vice-versa in the other. And most of all, a good CS course will teach you how to approach problems systematically and logically.

The puzzles you mentioned are meant to test exactly how good you are at that. You should be able to use the basics like if-then-else constructs without having an IDE in front of you and no matter which programming language you are supposed to use. I wouldn't even care if you write C code when I ask you to write Java, but I would bother if your analytical abilities are not strong enough to write a 25 lines program that consists of one loop and a method that contains a single if-elseif-else. No matter how many years of experience in programming you have, this is the bare minimum and that's what the FizzBuzz test is there for.

So, in short, if your problem is to approach tasks in an analytical way, maybe think about getting a CS degree on top of your current education. Your work experience will help you with achieving that, but you'll gain a lot more from what they teach you in one of those programs.

share|improve this answer
What should I do to avoid people underestimating me like this in their answers? ;) Really, I thought that "understand research-level papers" would be enough... –  RobertELee Jan 12 '12 at 8:58
Robert, sorry if I sounded like that:-(. My problem is to understand why you can understand research papers on the one hand but you have problems with FizzBuzz on the other hand. If you understand research, I doubt it's a terminology problem. What exactly throws you off track when you get one of those questions? –  Raku Jan 12 '12 at 9:55
I just googled FizzBuzz. I mean puzzles much more difficult. I think the problem with puzzles is that they presumably test thinking process, but in practice people pass them because they did something similar earlier or even memorized the underlining algorithm as part of their study. –  RobertELee Jan 12 '12 at 10:26
@RobertELee, this is what separates good interviewers from bad ones. Bad ones expect some specific solution to the puzzle, so one can beat them by blindly memorizing things; which is not going to work in real life, with real problems, where there are no set answers. Good interviewers know this, so they are more interested in your ability to solve problems in general (your thinking process if you wil), rather than whether you know algorithm X by heart. Knowing algorithm X by heart doesn't help you directly when dealing with algorithm Y; clear logical thinking and a systematic approach does. –  Péter Török Jan 12 '12 at 11:48
Peter is right. It's definitely not your fault if they ask the wrong questions. In the worst case they've just heard "Hey, the latest trend is to ask puzzle questions in interviews. Do that too!" from their boss. They've never thought about which questions would be suitable, they've probably never taught IT as a teacher in a classroom. In that case it's definitely ignorance on their side. They're not giving you puzzles, they're giving you the wrong questions ;). –  Raku Jan 12 '12 at 12:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.