in reply to The FizzBuzz Thing :(
Granted that what I've written is not elegant/compact/idiomatic, but just wanted to know if it's so bad that it justifies the weird expression on the interviewer's face?It's just a very simple, even primitive task, so your code should be equally simple (the KISS principle). If I were hiring someone, anything that's not along the lines of
wouldn't really be acceptable. It's not a test of programming skills, it's a test of common sense (IMO). I'm afraid your code fails it, and it doesn't even show off your programming chops (for reasons already covered by others).for ( 1 .. 100 ) { if ( ... ) { ... } else { ... } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: The FizzBuzz Thing :(
by Anonymous Monk on Dec 25, 2015 at 20:06 UTC | |
by Anonymous Monk on Dec 25, 2015 at 20:08 UTC | |
by Anonymous Monk on Dec 25, 2015 at 20:10 UTC | |
by Anonymous Monk on Dec 25, 2015 at 20:59 UTC |