I like the large-company version with baroque OO/Java appendages hanging off of everything. Those flourishes make it feel safer and more reassuring, I guess.
The math PhD one seemed possibly unfair. It looked more like something that would come from a CS PhD who did his thesis in PL.
It's hard to judge what the right solution would look like. You could go many careers without ever having a real reason to write that function outside of an interview. Fibonacci numbers occasionally come about as a by-product of doing something interesting and useful; in cases where they would be interesting in and of themselves, you would probably be using a library or language, like Mathematica, that would have that built-in.
Although the large-company version looks overwhelming to an onlooker, it actually starts from a simple version and then keeps growing as more bugs and compatibility issues are reported. Hilarious though!
Don't forget the tests of each. The startup's tests are all commented out because they failed at some point or another, the large company's tests are five times as long as the actual code they test, and all other categories consist of the stubs provided by the IDE.
[+] [-] mtdewcmu|12 years ago|reply
The math PhD one seemed possibly unfair. It looked more like something that would come from a CS PhD who did his thesis in PL.
It's hard to judge what the right solution would look like. You could go many careers without ever having a real reason to write that function outside of an interview. Fibonacci numbers occasionally come about as a by-product of doing something interesting and useful; in cases where they would be interesting in and of themselves, you would probably be using a library or language, like Mathematica, that would have that built-in.
[+] [-] prateekj|12 years ago|reply
[+] [-] xux|12 years ago|reply
Killed it. This is hilarious.
[+] [-] prateekj|12 years ago|reply
[+] [-] jfasi|12 years ago|reply
[+] [-] Buge|12 years ago|reply
[+] [-] oakwhiz|12 years ago|reply
[+] [-] vezzy-fnord|12 years ago|reply
[+] [-] angersock|12 years ago|reply
[+] [-] debal|12 years ago|reply
[deleted]