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.

I recently went on a couple of interviews and all of them asked a one or two design questions, like how you would design a chess, monopoly, and so on. I didn't do good on those since I am a college student and lack of the experience of implementing big and complex systems. I figure the only way to improve my design capability is to read lots of others' code and try to implement myself. Therefore, for those companies that ask these questions, what are their real goals in this? I figure most of college grads start off working in a team guided by a senior leader in their first jobs. They might not have lots of design experience fresh out of colleges. Anyone could give pointers about how to practice those skills? Thank you very much

share|improve this question

closed as too broad by Greg Hewgill, Matthew Flynn, GlenH7, gnat, Bart van Ingen Schenau Oct 25 '13 at 9:43

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

4  
The goal of the super broad interview questions is to determine how well you can think through a problem. Not if you have implemented something before. If you show (through your answers) that you've thought it through before, they'll switch to another problem until they find one that you haven't thought through before. –  MichaelT Oct 24 '13 at 20:37
3  
I'll also point out that reimplementing other designs without understanding them will also lead to similar interview problems (that you are regurgitating designs without understanding). The thing to do is just sit down and on your own read the rules to Monopoly, and just try to design it out. Make a simple command line monopoly game (roll dice, move, evaluate (buy, pay, card, special), trade). The only way to learn is by doing and thinking through the problems, not working from someone else's design. –  MichaelT Oct 24 '13 at 21:08
    
The goal of such questions is to look for lack of the experience of implementing big and complex systems. Many people start programming by implementing a game for fun. I agree with you and everyone else. You need to write your own game/application/whatever and dive into someone else's to try to understand it. If you are paying your own way through college, this can take time and effort and you may have to accept a less challenging job for the first couple of years while you gain experience, then move up. –  GlenPeterson Oct 24 '13 at 21:32
    
My answer to those questions is "I don't know. A minimally sufficient design will emerge as I implement tests and continuously refactor... for example, for chess the first test might be 'reset the board and verify if the men are correctly placed', the next test case might be 'reset the board and list legal moves for white', etc. –  kevin cline Oct 24 '13 at 22:12

1 Answer 1

up vote 3 down vote accepted

The goal of an interview for a job where you will need to think is not if you can regurgitate known facts but rather how well you understand various things. Sometimes the facts are the indication of this knowledge (knowing what every place static and final can be used in Java and what they mean with an example is an indication of how well one knows the bits of Java).

When a question that is very broad is asked, it is an attempt to see how well you are able to work through the question. Asking "How do you implement a game of Monopoly" wants you to think through the problem. How do you represent the board, the cards, the placement of the tokens, the rules for the special squares, the houses and hotels and property values...

The interviewer wants to see you work through the problem and talk about the data types being used and the like. When you hit an area where you are unfamiliar with, how you work through that part of the problem is another key point of the question.

If one was to go and read the implementation of Monopoly (bsd-games monop) and then reimplement it, you aren't likely to gain anything besides knowing that implementation. When asked a question of how would you add a feature of Fast Food Franchise (a monopoly based game), or anti-monopoly you'd be at a loss.

The way to handle this is to actually sit down and design or think through the design of complex systems. Try implementing the game on your own. Though, I can assure you that if you can rattle off the game design in the interview, a good interviewer will switch to another game or problem that you aren't familiar with in an attempt to see how well you solve the unknown - because thats what programming is really about, solving unknown problems and debugging the empty file.

Related questions:

share|improve this answer
    
Appreciate those great tips! –  Cong Hui Oct 24 '13 at 21:44
    
@CongHui I must point out (my conscious is bugging me) that I am being quite sadistic giving you a link to monop. If you poke at it just a bit, you will see that its rather raw C with copyright dates of 1980 and things such as #if defined(pdp11) and implementing its own malloc (using pthread mutexes). I'm fairly sure that you'd get odd looks suggesting such a design. –  MichaelT Oct 25 '13 at 2:34

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