News for hackers. Stuff that matters.

Tell HN: Programmer interview "test" status ...

In reference to this item:

http://news.ycombinator.com/item?id=1383169

I've had 76 submissions from 73 people, and although there are a few stragglers still submitting, I'm in the process of commenting on the code and writing up a summary.

If you think you've submitted code you should have an email from me saying so, giving you a reference code, and quoting the code I've extracted and am testing.

If you think you've send me code but have not received an email, check your spam bin, and if it's not there, send me an email. Please use the details in my profile, including the anti-spam measure.

The code is interesting, especially in the spread of techniques. It's clear that not everyone codes in C anymore. Those who do produce similar code, those who don't have a clear accent, and speak with varying degrees of fluency.

I'm starting the write-up, even though some entries are still dribbling in. This is your last chance to be included.

( 15 comments | 35 points | on HN )
Re:Tell HN: Programmer interview "test" status ... by johkra on Tuesday June 01, 2010 @08:15AM (#1394878)
After submitting, I was embarrassed when I compared my solution to other people's elegant 4 liners.

But then I had another look at my code and it captures exactly how I thought about the problem. I think I would be happy to write code like this in an interview.

Re:Tell HN: Programmer interview "test" status ... by sireat on Tuesday June 01, 2010 @07:35AM (#1394812)
Thank you for doing the job of compiling(pun intended) the entries. :)

I, for one, am looking forward to the summary.

Re:Tell HN: Programmer interview "test" status ... by RiderOfGiraffes on Tuesday June 01, 2010 @06:30AM (#1394754)
Sorry - forgot ...

If you reply to me, please quote your submission reference to make my life easier.

[deleted]
Re:Tell HN: Programmer interview "test" status ... by RiderOfGiraffes on Tuesday June 01, 2010 @07:56AM (#1394844)
Why not submit it?

Of course, you'd better check it first, since it doesn't actually work.

EDIT: Ah - I see you've edited it, but without saying you've done so. It still doesn't work.

EDIT2: It's also bad form to put code here when others might want the challenge of trying it themselves.

Re:Tell HN: Programmer interview "test" status ... by thelonecabbage on Tuesday June 01, 2010 @08:21AM (#1394884)
The only meaningful edit I made was a ; after the do{}while(). All of the other edits were just for formating sake. Didn't think it a bother.

Where should I submit it?

Re:Tell HN: Programmer interview "test" status ... by RiderOfGiraffes on Tuesday June 01, 2010 @09:32AM (#1394982)
I see you've submitted it - thanks.

I also note that you didn't put BEGIN and END as I asked, you sent it as HTML text, as I specifically asked not, you sent it not to the address in my profile, you didn't include the anti-spam measure, and your code doesn't work.

Color me grumpy.

Re:Tell HN: Programmer interview "test" status ... by ciupicri on Tuesday June 01, 2010 @08:15AM (#1394880)
Submit it where?
Re:Tell HN: Programmer interview "test" status ... by DrSprout on Tuesday June 01, 2010 @08:23AM (#1394887)
Re:Tell HN: Programmer interview "test" status ... by ivanstojic on Tuesday June 01, 2010 @07:47AM (#1394828)
What better way to comment than to quote Rider himself:

Those who do produce similar code, those who don't have a clear accent, and speak with varying degrees of fluency.

Re:Tell HN: Programmer interview "test" status ... by thelonecabbage on Tuesday June 01, 2010 @07:54AM (#1394842)
What can I say, after C every other language is just adding idioms.

You never forget your first love. Oh others came before her, and after, but no one can replace her or what she taught you.

Re:Tell HN: Programmer interview "test" status ... by VBprogrammer on Tuesday June 01, 2010 @08:23AM (#1394885)
That's quite poetic considering your C is far from idiomatic.

Surely manipulating pointers would be the expected way of doing this, and probably easier to optimise for the compiler.

Re:Tell HN: Programmer interview "test" status ... by thelonecabbage on Tuesday June 01, 2010 @08:42AM (#1394903)
Because array syntax is clearer (to me), does the exact same thing, and the speed of a computer doubles every 24 months but programmers don't.
Re:Tell HN: Programmer interview "test" status ... by thaumaturgy on Tuesday June 01, 2010 @11:05AM (#1395194)
I'm not picking on you, but this is a common sentiment among many programmers that really aggravates the hell out of me. Because of that kind of thinking, lots and lots of people are being forced to replace perfectly good hardware just to be able to run software "designed" for newer systems. The expected benefits from Moore's Law are nearly nonexistent, except for a few specific niches.
Re:Tell HN: Programmer interview "test" status ... by ido on Tuesday June 01, 2010 @06:01PM (#1396287)
> Because of that kind of thinking, lots and lots of people are being forced to replace perfectly good hardware just to be able to run software "designed" for newer systems.

Feature, not a bug (for the providers, anyway).

Re:Tell HN: Programmer interview "test" status ... by nfnaaron on Tuesday June 01, 2010 @12:47PM (#1395481)
It doesn't actually do the exact same thing:

http://c-faq.com/aryptr/aryptr2.html