6 ms·
Am I OCD when I cringe when I see 'p_rite' where he (I think) means 'p_write'? That alone would knock a few points off a candidate doing this test when he's int
by roel_v 16y ago
Am I OCD when I cringe when I see 'p_rite' where he (I think) means 'p_write'? That alone would knock a few points off a candidate doing this test when he's interviewing with me. 'rite' can mean 'write' or 'right' or even 'allright' - why the unnecessary confusion?
- tptacek 16y agoYou're not alone in feeling the OCD twinge, but are almost certainly alone in being willing to demerit a candidate writing that.
- sfphotoarts 16y agoI believe the intent was not to misspell (because clearly given one side of the coin being 'read' the word 'rite' is clearly meant to be its counterpart) but was to make for neat alignment of the variable declarations. char w, r might have been easier and less twinge inducing, but I think it important to correct the misgiving that the person writing 'rite' was not misspelling but making a deliberate choice to align their variables. His own form of OCD, a trait common in good programmers.
- Maro 16y agoActually, he's not alone in demeriting =)
- mynameishere 16y agoWhy would he be alone? Why is spelling less important in code than in normal writing? I would argue it is considerably more important.
- tptacek 16y agoIf 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.
- roel_v 16y agoThis 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.
- nocman 16y agoSome 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?
- roel_v 16y agoI 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.
- tptacek 16y ago
- cperciva 16y agoI haven't been in the position of hiring programmers, but I've mentored a few FreeBSD developers, and I would not allow one of my mentees to commit code like that.
- ComSubVie 16y agoI think he used p_rite so that the variable names length is identical to p_read, which can make the code look more pretty.
- aquark 16y agoI like having the variables the same length from an aesthetic point, but my brain also flags 'rite' as being spelled wrong and that detracts (albeit slightly) from reading and understanding the code.
- roel_v 16y agoYes that's what I figured, but still that's only in one place (in the declaration).
- jemfinch 16y agoIn that case, I'd suggest `p_rd` (well, IMO, just `rd` would suffice) and `p_wr`. Then they're both fairly unambiguous abbreviations.
- dkersten 16y agoI think p_wt is better than p_wr. Honestly though, aligning the length of variable names is, in my humble opinion, retarded - he should have went for p_read and p_write.
- nickelplate 16y ago"aligning the length of variable names is, in my humble opinion, retarded" I feel the same way.
- deleted 16y ago[deleted]
- ori_b 16y agoI'd probably go with just 'r' and 'w', or 'src' and 'dst'
- 16y ago
- jcromartie 16y agoAs long as it's not a blatant misspelling, I think shorthand is fine.
- shrikant 16y agoYou probably meant 'all right or 'alright'. See also: http://en.wikipedia.org/wiki/Muphrys_Law http://en.wikipedia.org/wiki/Muphrys_Law