Re: interview question on primes




Indeed. There is a very good argument made in this article:
http://tinyurl.com/yerwac for giving an interview candidate some very
simple programming tasks during the interview. The goal isn't to see
how the person accomplishes any real-life tasks (which would be
impossible to gauge in an interview timeframe), but just to see if he's
fluent in the very basics of programming.

Such as the function of stacks, and the separation between the UI and business logic?

Can he write a strlen
function? Can he write a function to tell whether a string is all
caps? Etc.

Jesus, I am only an amateur C# programmer, but I really need some guidance on this. In real life, I would pull up the properties available for strings, and look for an iscaps property - which almost certainly exists - and a count method (definitely). One line of code, and probably entirely consisting of mouse clicks aside from typing the name of the input and output..

If you asked me to do it in VB, I would be pretty screwed. Even in VB.net, I don't know the syntax for strings, so even if I can use the same object call I don't know how to construct a string.

This would not, however, seem to preclude me from writing VB.net code. I am certain I could learn the syntax for strings pretty quickly - maybe even in 15 minutes, if the online help is good.

All this test demonstrates that the programmer operate in the IDE/language they use. Who picks it? If the person can pick their own, is a single C# call OK?



The thing to watch for is how *quickly* he writes the
code. A superstar will be able to write such code about as fast as he
can write. An inferior programmer will probably be able to write the
code, but it will take much longer.

Well, this would seem to be entirely a function of how familiar the user is with the syntax of the language used.

Nor am I convinced that writing code quickly is neccesarily a good thing. The average programmer produces (it is widely believed) about 20 lines of production code in a day. Seeing if an applicant can do a day's work in 15 minutes is probably not a good index of real world productivity.


--Mark

Peter Webb

.



Relevant Pages

  • Brian Kernighan, maybe Im not worthy, maybe Im scum
    ... It's a critique of the "Beautiful" code authored by ... Rob Pike and discussed by Brian Kernighan in a new O'Reilly book. ... programmer, right? ... strings, only for what we call in .Net, sbyte, strings o' bytes. ...
    (comp.programming)
  • Re: A note on personal corruption as a result of using C
    ... Why did you feel the need to handle NULs in strings? ... A bad programmer can recreate Fortran in any language. ... It troubled mathematicians that the square root of minus one seemed to ...
    (comp.programming)
  • Re: security enhacement to C runtime library (XXX_s)
    ... In the below link MS announces a security update to the C runtime ... Every buffer overflow error that was made before can still be ... strings in C the way they are used in every other programming ... how can we increase the programmer ...
    (comp.std.c)
  • Re: User Input issue
    ... now we know that the int data type uses 4 bytes of memory. ... You wrote a moment ago that the programmer does not ... covered strings yet (I'm a college freshman in a Programming I/Novice ...
    (comp.lang.c)
  • Re: PL/I string representations
    ... Mr Nilges is talking through his nose again. ... > machines that use ASCII. ... He liked large strings last year, ... example of a non-promotable programmer who's unfit for any role above ...
    (comp.programming)