Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's too contrived though; not having a single working keyboard anywhere isn't a real business situation. A slow bottlenecked server, sure.

If the "w" key weren't working I'd copy-paste "w" characters from elsewhere in the document, or bring up the on-screen keyboard. Writing bastardized code -- for (;;), really?! -- would be a huge negative against a candidate. And, of course, if a company really didn't have a working keyboard to provide me with, I'd never work there in the first place, because if they can't even provide working peripherals there's no limit to what else they might skimp on.

I actually have three keyboards at my desk right now -- one with Cherry MX blues, one with Cherry MX browns, and a Model M. No way in hell would I ever write code without "w"s.



Whenever you need a character your keyboard won't produce - either because it's broken or because it's in a different language and you can't figure out how to get it, just google the character and copy/paste it. i.e. Google "double u"


Or just use the mouse to open your whatever "Character Map" program comes with your OS... which works when you're missing the same letters you'd need to "sound them out", or even with no keyboard at all. (Assuming you managed to log in.)


Try doing that when you sit down at a machine that has the language set to something you can't read :)


I actually like "for (;;) {}" as an idiom for an infinite loop (or at least, the terminating conditions are in the body rather than the loop construct itself.) It maybe stands out more than "while(true)", so readers can easily see what's going on. But maybe that's just a justification, and the real reason is that it looks clever because not everybody knows you can do that with a C-style for loop.


    #define ever (;;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: