7 ms·
It was for a junior c# position so I doubt it's applicable considering Visual Studio will point out the problems. But I'm curious what position would this ques
by trinovantes 5y ago
It was for a junior c# position so I doubt it's applicable considering Visual Studio will point out the problems.
But I'm curious what position would this question make sense?
- burntoutfire 5y agoIt doesn't sound that stupid, it checks whether you know the syntax of the language you'll be programming in.
- exdsq 5y agoDepends... imagine getting four pages of C# code and having to play Where's Wally but you're not even sure what Wally looks like. Surely it'd be better to just write FizzBuzz.
- mns 5y agoIt's literally asking someone to write perfect code in a time limited situation, under pressure, how can someone with any kind of coding experience ask someone else to do in an interview?
- killtimeatwork 5y agoIt not literally asking to write any code, just to read it.
- coldcode 5y agoNot one person ever code reviews code that was not already compiled. Requiring you know the syntax of a programming language (in my case, Swift, changes syntax in every release) outside of a compiler is pointless. I remember in the early days of J2EE people asking you for the home interface of an EJB stateful session bean. Like who the hell cares about memorization in the era of Google, and that was 20 years ago when Google did no evil. This isn't first year computer programming 101, you are paid to make things that work, not regurgitate syntax.
- michaelt 5y ago> I'm curious what position would this question make sense? I was once asked a similar but better posed question: I was given some code and asked what I'd point out if asked to do a code review on it. And the code had loads of things wrong with it, from bad variable names and incorrect comments, through unit tests that didn't have any assertions and loops that weren't actually loops, all the way to choosing a non-secure random number generator in an application that needed a secure one* In other words, it was a test of my ability to code review, with some glaring issues to give me some easy marks and set me at ease, and some subtle issues where talented people could really set themselves apart. It was fair and relevant to the job because I was presenting myself as a senior programmer with lots of experience doing code reviews and coaching junior developers. It's possible trinovantes's interviewer intended to give the same sort of test - but either didn't explain the question clearly enough, or trinovantes misheard or misremembered. * A bug right out of puzzle 94 in 'Java Puzzlers'
- w0mbat 5y agoCitrix gave me a page of code which had a lot of tricky obfuscated syntax problems. Code that looked live but was actually commented out, nested comments that were not terminated properly, code formatted in a very deceptive way, strings that were not quoted correctly so they would not end where expected on the page. It was all very contrived stuff that was deliberately deceptive, not like real broken code, and the errors would have shown up with syntax highlighting. I caught most but not all of the tricks. This is also the only interview I have ever had where a panel of engineers stood behind a desk and all barked questions at me. I did not get the job. At a different interview, this one with Microsoft, the lead engineer showed me a page of actual code from their app and asked me what I thought. Luckily the bug instantly leaped off the page to me, although many people would not see it. That was a good way of proving that I have a useful ability, and a better use of time than whiteboard coding or quizzes. I got the job and they were glad they hired me.
- RHSeeger 5y agoI tend to believe that "walk me through a peer review of this code" is a great interview question. It speaks to the user's familiarity with the language, with problem solving in general, and also people skills. Sure, it's not the end all/be all, but someone needs to be pretty amazing to want to work with them if they are incapable of doing a peer review.