News for hackers. Stuff that matters.
Re:Interviewing programmers: coding test example explained by mynameishere on Thursday June 03, 2010 @10:07AM (#1401325)
Why would he be alone? Why is spelling less important in code than in normal writing? I would argue it is considerably more important.
Re:Interviewing programmers: coding test example explained by tptacek on Thursday June 03, 2010 @10:20AM (#1401372)
If you truly think the market for C developers is so favorable to employers that someone who can write the in-place-whitespace-removal function off the top of their heads is easy to find, then by all means, ding candidates for their spelling during interviews. Thanks for making it that much easier for the rest of us to hire.

In the industry I work in --- computer software --- it is ludicrously hard to find people competant in C programming, and I'm inclined to ignore idiosyncratic spelling in source code.

Re:Interviewing programmers: coding test example explained by mynameishere on Thursday June 03, 2010 @10:38AM (#1401419)
I think you exaggerate. If you actually look at advertisements for c/c++ developers, they tend to contain words to the effect, "Must have 4-5 years experience in high speed algorithmic trading", etc. But if you know any good-paying jobs that only require the skill level you suggest, point me in that direction. (I mean that--I can get away from my current huge and horrible codebase. Speaking of which, I remember being appalled by the consistently awful misspelling of virtually everything until someone pointed out that its DOS origins required 8 character limits on filenames. I suspect such charming beasts as atoi and strlen had similar constraints, if only for purposes of saving RAM on PDP 11s.)
Re:Interviewing programmers: coding test example explained by wmil on Thursday June 03, 2010 @03:45PM (#1402293)
In the original C implementation function names could be as long as you wanted, but the compiler only looked at the first six chars.
Re:Interviewing programmers: coding test example explained by metageek on Friday June 04, 2010 @02:14PM (#1405097)
I thought it was the linker that truncated. So functions called fredBlogs() and fredBlugs() would be fine as long as they were in the same compilation unit, and not called from any other compilation unit.
Re:Interviewing programmers: coding test example explained by JoachimSchipper on Thursday June 03, 2010 @05:57PM (#1402738)
It's worse than that, actually: the C89/C90 standard allows this behaviour. Yes, many programs would break if compiled with such a theoretically conforming compiler.
Re:Interviewing programmers: coding test example explained by nickelplate on Thursday June 03, 2010 @11:09AM (#1401497)
I personally would count that against any candidate during an interview. I wouldn't necessarily reject them, but I would definitely count that against them. I work in Toronto, Ontario. English is not my native language, but I always do my best to ensure that my code or documentation is as close to crystal clear as possible. This starts with using correct spelling. Code is written first for humans to read, and to me misspelling in code is no different than poor variable naming. It is the kind of broken window that, when left unchecked or dismissed as "not important", instills a sense of negligence that over time can turn a code base from "decent" to "poor old crappy code".
Re:Interviewing programmers: coding test example explained by angrycoder on Thursday June 03, 2010 @12:00PM (#1401673)
The counterpoint to this is that if you are they type of boss who would nit pick a candidate over something like this, he probably wouldn't want to work for you anyway. Especially when you take a quirky/cute spelling and try to expand it into inferring all sorts of other traits.

It reminds me of people who say they would never hire a developer who doesn't write comments. Really? Writing comments is a precious skill that takes years to develop? You just tell someone, if you work here, you need to write comments. Problem solved in one sentence. Same with variable names. Its a standards issue, nothing more, nothing less.

Re:Interviewing programmers: coding test example explained by btilly on Thursday June 03, 2010 @01:47PM (#1401954)
Do you really think that ordering someone to write comments and use good variable names is sufficient to get good results?

The relevant chapters in Code Complete may help you understand how much more complicated the subject is than that. (It may also fix your apparent belief that comments are necessarily a good thing.)

Re:Interviewing programmers: coding test example explained by tptacek on Thursday June 03, 2010 @04:08PM (#1402374)
If you want to narrow your shop down to the programmers who can quote chapter and verse from _Code Complete_ and who are inclined to care a lot about how people choose to abbreviate or mangle their variable names, that's totally fine. The rest of us can chop up the pool of developers who actually get stuff done. This isn't just snark; the Venn diagram we're dancing around here favors businesses that hire in my (implied) style.
Re:Interviewing programmers: coding test example explained by btilly on Thursday June 03, 2010 @05:44PM (#1402688)
I wasn't making a recommendation about who to hire. I was telling someone where they had room to learn more about an important topic.

In any case I don't care whether people can quote from Code Complete. What I care about is that they have good enough instincts that they can wind up writing reasonable code that I'd like to maintain. If you don't understand why people would want function names that describe what a function actually does, I don't want to maintain your code. Nor, in the long run, are you likely to be productive.

But it is a bar to meet, not a standard to judge by. Once you've met that bar, I don't care about the difference between OK, and best in the world. I'm on to caring about other things. Like productivity. Code quality and productivity isn't either/or. It is an and. (I've had to clean up enough after the super-productive producer of crap, and don't want to do it again.)

Re:Interviewing programmers: coding test example explained by nickelplate on Thursday June 03, 2010 @02:19PM (#1402034)
Except this is not a standards issue. It is a problem that can be solved in one sentence only if the programmer groks code construction to begin with. A lot of otherwise smart programmers - some of them very experienced - do not understand this stuff and do not develop good programming habits of the Code Complete kind. I probably exaggerated a little in my previous comment. Still, I always test for code construction "instincts" when I am interviewing a candidate. I may give the candidate a take home assignment - nothing difficult, as I really only want to see what the code looks like. Or I may ask the candidate to bring a sample of great code, and ask him why he thinks it is great. But I will always test for good habits, as they are too often taken for granted.
Re:Interviewing programmers: coding test example explained by SamReidHughes on Thursday June 03, 2010 @11:30AM (#1401570)
But if you're talking about a whiteboard coding problem, people are going to come in with different perceptions of what you're trying to test, and for the sake of brevity they'll do things like use shorter names or global variables. I feel like I'd cringe at seeing "rite," but not as much as when somebody thinks it looks impressive to start by showing you the testing code they would write.
Re:Interviewing programmers: coding test example explained by roel_v on Thursday June 03, 2010 @10:33AM (#1401408)
This is not a simple misspelling though. If someone would write 'int countar = 0;' because he doesn't speak English well or whatever, that's fine. But spelling 'write' as 'rite' is indicative of a certain mindset - of favoring a certain quirky sense of beauty or style over clarity. And I didn't say it'd be autoding, just that it lowers my opinion of the author a bit. If the rest was OK that would be noise in between all the other criteria.
Re:Interviewing programmers: coding test example explained by nocman on Thursday June 03, 2010 @12:48PM (#1401798)
Some would argue that if it lowers your opinion of the author it is an "autoding" already (whether you're willing to admit it or not).

Take this scenario: You have a single position you are interviewing people for. You've got two candidates with entirely even qualifications. The only perceivable difference between them is that one of them writes interview code with variable names spelled like in the original post. The other guy spells things the way you would expect. I'm willing to bet you'd end up hiring the second guy. Sounds like an "autoding" to me. Or would you argue that you would not do that?

Re:Interviewing programmers: coding test example explained by roel_v on Thursday June 03, 2010 @01:08PM (#1401853)
I don't understand your logic. Two people who are in every respect exactly the same, but one can't spell or at least has weird, non-standard spelling habits. The rational choice here is the person who spells correctly.

My point was, spelling in variable names is only a very minor factor when deciding on hiring or not hiring a candidate. If his reasoning and experience and work ethic etc. are all ok, spelling wouldn't make those factors irrelevant.

When a factor is automatically excluding, that means that no matter how good in other respects the candidate is, I still wouldn't hire him (for example someone with a swastika tattooed on his face applying for a customer-facing job). I never suggested any such a thing anywhere (and I don't think you're claiming I am). So I don't see how you're coming to the conclusion that I think that making spelling mistakes automatically excludes a candidate.

Re:Interviewing programmers: coding test example explained by tptacek on Thursday June 03, 2010 @01:27PM (#1401904)
His logic is that you are in fact "dinging" the candidate. He used an artificial scenario to illustrate that.

In reality, you never have two candidates who are absolutely equivalent except for spelling ability. The interview process is extremely high-error, brutally timeboxed, and infamously ineffective. The most important capability you need to assess is "ability to code". You know a priori you're going to do a crappy job assessing that capability.

Whether or not he thinks you should be wasting time on trivialities like variable name spelling (I myself would dodge this problem by using names like "x" and "cp" for utterly trivial, well-known example problems like this), I don't know. My bias is pretty clear.

Re:Interviewing programmers: coding test example explained by roel_v on Thursday June 03, 2010 @01:45PM (#1401946)
Let's clarify terminology first - I shouldn't have used the word "autoding" because it's slang and its use in another message board that I visit may not be universally accepted. I meant "an automatic disqualifier" - a condition that would completely negate any positive aspects.

Under that definition, I don't see any way to construe my earlier remarks as meaning that I would such a high importance on spelling of variable names.