From: Robert Dober Date: 2007-06-05T22:04:49+09:00 Subject: Re: FizzBuzz (#126) On 6/5/07, Paul Novak wrote: > On Jun 5, 6:01 am, "spoo...@gmail.com" wrote: > > I disagree. I challenged several of my coworkers to solve FizzBuzz a > > few weeks ago. All of the solutions were pretty much the same except > > the one from our lead DBA. He solved the problem in a stored > > procedure without using a cursor. It was exceptionally clever and > > totally horrific at the same time. We gave him the "Most > > Inappropriate Use of Set Theory" award. > > > > On Jun 1, 10:08 am, Paul Novak wrote: > > > > > > > > > I do not think there is a lot of room for cleverness in the FizzBuzz > > > problem. (Actually, I hope I am wrong and we see lots more > > > suggestions for Extra Fun like Peter's.) My understanding is that > > > FizzBuzz was intended to screen out candidates that could *not* come > > > up with working code in a few minutes. > > > > > Regards, > > > > > Paul. > > As the last few days have shown, there *are* clever ways of solving > FizzBuzz. However, IMHO, there are very few that would be appropriate > for the stated scenario of a job interview. > > My tendency would be to create the simplest thing that could possibly > work in clear and readable and maintainable code. After all, > employers want someone who is smart, but also want someone who gets > things done efficiently. Possibly, with just the right interviewer, I > might discus various solutions pros and cons, which might be optimized > for particular scenarios, etc. > > Maybe I just haven't interviewed the right sort of employers that > would appreciate such creativity... > > Regards, > > Paul. > > > Actually I feel that somehow - sorry I have said this before, but I am not sure it was heard ;) - this is about a job, yes but with R u b y. And if I were to hire a Ruby programmer and the guy just writes some Java/C/Perl/OCaml or whatever code, expressed in Ruby, will I take him? So whatever is said about simple and maintainable and psychological impact for sure is clever stuff coming from experience I am lacking. But many of you are forgetting the R u b y part nonetheless. Cheers Robert -- You see things; and you say Why? But I dream things that never were; and I say Why not? -- George Bernard Shaw