   programmer interviews
  im wondering what these programmer aptitude test thingies are like, that are sometimes mentioned in programmer job advertswhat are you given at the start, what are you meant to do and how long have you to do it?anyone been through one of these? i'd imagine it'd vary from company to company as well like   
  At my first interview for an internship at Vertigo X Media they gave me a test similar to the IQ tests you find on the net. They also asked me several programming problems that I had to answer verbally. One of the problems was to make an algorithm that detects loops in a linked list.For an interview at Electronic Arts, I was given a page of some code in C++. I was given five or ten minutes to examine it and I was asked to report all the errors I found.For an interview at Gameloft, the test consisted of several pages of programming questions. On the first half of the test were questions about code optimization. The rest of the questions were about general knowledge of game programming and algorithms.;  It varies from company to company but often you'll be asked questions about the main language used at the company (in C++ things like what a virtual function is, when you should have a virtual destructor, etc.). Often you'll be presented with some code and asked to identify as many bugs and design flaws as you can. There will often be questions that require you to write a function to solve some simple problem. There may be general questions about optimization or debugging. For one job I was emailed a test and asked to email back my answers within 24 hours so there's not much time pressure there. For another job I was sat down in a room and given a paper exam and a pen and paper and given an hour to complete the test. Once the interviewers had reviewed my answers there was an interview where they went over the test with me and commented on what I'd written.In my experience, if you're actually qualified for the job you're applying for the aptitude tests aren't very difficult. Their main purpose is to weed out anyone who is not telling the truth on their resume and to provide some discussion points for the interview.   ;  In the last interview I had (and I got the job) they really weren't bothered about the specifics of languages and so forth, infact they said they weren't bothered if I could program in C or not, as they'd just send me on a course. They were really concerned about general thought processes, and how you approach problems. Hence there were a few algorithmic problems (bullet proofing algorithms, optimisation, etc..), and general logic problems (like the einstein 2% test).   ;  I got asked a question about how you would write an algorithm to detect loops in a linked list at a job interview once. I said: "That's what the debugger is for, the program will hang during list traversal". They didn't offer me the job (but I don't think it was that answer that messed it up; I'm a bit cynical and not "super keen and enthusiastic").I still don't get why you would need to know how to detect loops in a linked list at run time though. And I'm pretty good at finding and fixing bugs.The weirdest question I ever got asked was "If you had the ASCII representation of pi to infinite precision, would you be able to find the complete works of Shakespeare within it?". I said "it depends", but what I was really thinking was "no". Just because the Mandelbrot set is infinitely complex, doesn't mean you'll find a picture of the Mona Lisa inside it. Pi is probably more irregular than the Mandelbrot set, and has passed all known tests for randomness ever designed, but who is to say that there won't be any "space characters" after a certain amount of time?I didn't get offered that job either, despite scoring one of the highest marks in their C test they had ever seen... (I even named "Duff's device" from reading the code, but said it was a way to make your code more obfuscated, and if you are really worried about that sort of thing you should write some assembly).   ;  For an insurance company in Michigan, I had to take a pretty long-detailed test (1.5 hours long?). It was broken into the following sections:A) Determine the meaning of the following words: (a sentence with an underlined word in written, and multiple choice options to see if you can pick the 'closest' word.B) Very wide range of math questions.C) Basic logic questions.D) Fill in flow charts.The sections were timed, and I think they were 15-30min depending on the section.;  I can say this about programming interviews:  They're all different.  I remember, a long while back, a panel Q&A session in a lecturing hall with some hiring types at various games companies.  The audience was a whole group of hopefuls trying to find an angle in to the industry.  In the aftermath of a rather benign resume question, the panel broke out in argument-- "Resumes should be your name with only a web address of your demos!" versus "One page long, with your education first!" versus "Resume doesn't matter, just your cover and references!".  I mean the real kind of chaos and disagreement that makes cadets glance around.The reality is that no two hiring interviewers are the same, except for THIS.  When hiring, a company is seeking to satisfy two things:  1) Fill a job opening deemed in need, and 2) Avoid a hiring mistake like one made in the past.  The first is easy, they tell you right in the job description.  The latter is a thing that you need to judge delicately.  And if you fail the interview, don't lose confidence in yourself, that second criterion can be a bitch!;  I've had three at three separate companies so far. Two for summer  jobs , one I got (yay) and one I didn't (though the company went bust 6 months later, Schadenfreude for all!) and one for a full time job, that I got (yay!). I've also had a few email tests to do.To me it seems for many of the questions they aren't interested in the actual answers (unless you are mindbogglingly wrong) but more how you can justify them. Expect a few minutes conversation about each answer at least. Take a note book and pen along so you can draw diagrams for them to explain things if needed. They'll have paper there if you ask of course,but you can look more prepared if you whip a note book out without breaking stride.You shouldn't find anything very difficult but there may be questions to try and trip you up, to try and separate the great programmer from the good programmer (or the person that obsessively memorizes the ANSII C/C++ standards :P). Sadly I was under NDA for all my actual exams so I can't give any full examples, but remember all those silly little problems you'll find in your own code, the ones that take 2 hours to find because its so simple and that's the sort of thing you might be expected to find.I've often heard the rumour of interviewers challenging the applicant, saying something right is wrong to see how they react. I've still not come across that, but it's something possibly worth keeping in mind. If you get a question wrong or don't understand it, don't be afraid to ask your interviewer about it. It's probably not as good as getting the question right but which applicant would you hire, the one who acknowledges that he made a mistake or the applicant who tries to learn from it?One thing to remember is, if you have been focusing on games programming for a long time, learning Graphics/AI/Physics algorithms, and such, go back and brush up on your fundamental algorithms (Knuth's books are great for this), this is especially important for idiots like myself that took Computer Game Programming courses at university since these courses skip heavily on the computer science side. All my interviews so far have required knowledge of the computer science fundamentals, and saying, "oh I just use stl for that" isn't going to cut it.Gearbox used to host a practice interview exam a few years ago but I can't seem to find it anywhere, maybe if you have a good google around?Lastly if you are asking because you have one soon, then good luck!   