Tech Support > Computers & Technology > Programming > Re: Interview Question
Re: Interview Question
Posted by Dan Tex1 on August 13th, 2003


From: Richard Heathfield dontmail@address.co.uk.invalid

Even a "hello world" can be quite revealing???
Really? LOL ;-)

I'm thinking there are only a few ways it may be revealing:

1) If the applicant is careless and misspells a lot and requires several
trials to get the code to work correctly.

2) If the language used requires too much code to put "hello world" on the
screen. ( this one reveals more about the language complexity than the
programmer I think ).

3) If the applicant can't write a "hello world" program ( embarrasing I'd
think ).

Dan :-)

Posted by MSCHAEF.COM on August 13th, 2003


In article <20030813131451.28261.00001154@mb-m24.aol.com>,
Dan Tex1 <dantex1@aol.com> wrote:
...
Maybe in Intercal or Unlambda. :-)

More seriously, in C, I'd expect the developer to do things like
declare main correctly, return a return value, etc.

-Mike
--
http://www.mschaef.com

Posted by Programmer Dude on August 13th, 2003


Dan Tex1 wrote:

It would show general style and--as Mike said--that they're aware
of certain commonly-missed basic requirements. Which would you
be more likely to hire:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
main()
{
printf ("hello world");
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
#include <stdio.h>

int main (void)
{
puts ("Hello, World!");
return 0;
}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~

--
|_ CJSonnack <Chris@Sonnack.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|___ ____________________|

Posted by Programmer Dude on August 13th, 2003


"Arthur J. O'Dwyer" wrote:

==D==

Hee, hee! It's like one of those, "Find what's wrong with
this picture" puzzles.... (-:

--
|_ CJSonnack <Chris@Sonnack.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|___ ____________________|

Posted by MSCHAEF.COM on August 13th, 2003


In article <3F3A8E39.C19FC744@mmm.com>,
Programmer Dude <cjsonnack@mmm.com> wrote:
...
I thought of this, myself:

One of these things is not like the others,
One of these things just doesn't belong,
Can you tell which thing is not like the others
By the time I finish my song?

Did you guess which thing was not like the others?
Did you guess which thing just doesn't belong?
If you guessed this one is not like the others,
Then you're absolutely...right!

-Words and Music by Joe Raposo and Jon Stone

-Mike
--
http://www.mschaef.com

Posted by Arthur J. O'Dwyer on August 14th, 2003



On Wed, 13 Aug 2003, Russ Holsclaw wrote:
Good. :-)

I dunno about "not interesting," but "easy to read" is always
good. I wanted to make a "not easy to read, but actually correct"
version for Interviewee E, but it was too boring. (All the
others were in some way incorrect, except D and I think B, which was
just redundant and poorly indented.)

-Arthur

Posted by Programmer Dude on August 14th, 2003


"Arthur J. O'Dwyer" wrote:

I faulted B for the indenting, unnecessary use of printf() and no
blank line between the #include and main. Basically just style
stuff, but D was clearly the better choice!

--
|_ CJSonnack <Chris@Sonnack.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|___ ____________________|

Posted by ak on August 15th, 2003


On Thu, 14 Aug 2003 20:49:02 +0000 (UTC), Richard Heathfield
<dontmail@address.co.uk.invalid> wrote:

|>>And who's to say whether the candidate is the person who wrote the code?
|>>Far easier to get them to write a few lines for you when they arrive. Even
|>>a "hello world" can be quite revealing.
|>
|> Even a "hello world" can be quite revealing???
|> Really? LOL ;-)
|
|I was perfectly serious. Arthur O'Dwyer has shown why. You can't necessarily
|determine that a candidate is a /good/ programmer from his "hello world"
|program, but you can very often weed out a bad one.
|

In a former company of mine we used to let the candidate
write a toupper() function(MS-DOS days), it was not the
actual code that was interesting, but rather how they reasoned;
if they thought about different national characters, readability
vs efficiency etc.

/ak

--
ak @ workmail.com
A wise man washes his hands after he pees. A wiser man doesn't pee on his hands.

Posted by Phlip on August 23rd, 2003


Ruby!

p 'yo planet'

--
Phlip
http://www.c2.com/cgi/wiki?TestFirstUserInterfaces



Posted by Programmer Dude on August 25th, 2003


Richard Heathfield wrote:

LOL! I can't believe you wrote that in public!! (-:

--
|_ CJSonnack <Chris@Sonnack.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|___ ____________________|

Posted by Richard Heathfield on August 25th, 2003


Programmer Dude wrote:

It's a perfectly valid C90 program; although its return value is undefined,
its behaviour is not. But it's not something I'd do in production code, of
course, any more than any of the other programs are illustrations of good
practice.

--
Richard Heathfield : binary@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton

Posted by Richard Heathfield on August 25th, 2003


Sheldon Simms wrote:

In C90, main() is equivalent to int main(), which is effectively equivalent
to int main(void), save only that int main(void) is a prototype, which int
main() is not.

Your quote is from C99, not C90. I explicitly said that the program conforms
to C90. In C90, or at least in the draft that I have, the word "shall" does
not appear in that part; the word "can" is used instead.

I am well aware that, in C99, the code requires a diagnostic (because
implicit int has been removed from C by the C99 Standard), but I didn't
claim that the code was a valid C99 program.

--
Richard Heathfield : binary@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton


Similar Posts