Fizzbuzz and programmer competence

You can talk about almost anything that you want to on this board.

Moderator: Moderators

User avatar
koitsu
Posts: 4218
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Fizzbuzz and programmer competence

Post by koitsu » Mon Nov 24, 2014 10:42 pm

I'll just leave this here.
Attachments
kUizTX1.png

lidnariq
Posts: 10256
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Fizzbuzz and programmer competence

Post by lidnariq » Mon Nov 24, 2014 10:44 pm

There's nothing quite like bogosort.

Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: Fizzbuzz and programmer competence

Post by Sik » Tue Nov 25, 2014 3:11 am

I almost spit out my tea (literally, I was just drinking tea when I saw randomSort).

User avatar
Bregalad
Posts: 8008
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: Fizzbuzz and programmer competence

Post by Bregalad » Tue Nov 25, 2014 1:39 pm

But optimization without profiling first is itself a bad practice.
I voiced my opinion about this in a 6502.org forum post, so I'll just refer to it.
Besides, not using modulo for solving fizzbuzz is not only an optimisation, but also common sense. If the goal of the interviewer would be to see the candidate's familiarity with modulo, he won't be seeing it from me, because I am am not likely modulo to solve this kind of problem.
When it comes to interviewing candidates, ask them real-world questions, i.e. practical things, not hypothetical.
Yeah, not only this is more useful to the company so they actually hire the people who are the most suited for the job, but it's also more useful for the unhired people, so that they have a better why they were rejected, and what they should do to improve and learn for next job positions. But for some reason, in capitalism economy, companies just tend to be a$$holes and don't take seriously their roles of feeding the population anymore, since all other alternatives to capitalism around the world are virtually extinct and there is no need to promote it anymore. (Communist china (and other Asian satellite countries) is no longer a communist country, it's just a huge slave reserve for capitalist countries)

tepples
Posts: 22281
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Fizzbuzz and programmer competence

Post by tepples » Tue Nov 25, 2014 1:46 pm

I agree with your post on 6502.org. But "profiling first" can be taken in a broad sense. For example, say you tried an algorithm or data structure in a previous project and found it too slow, and then you decided against using it in a similar circumstance in a later project. In that case, you "profiled first".

User avatar
Light-Dark
Posts: 54
Joined: Sun Dec 08, 2013 9:53 pm
Location: Canada

Re: Fizzbuzz and programmer competence

Post by Light-Dark » Tue Nov 25, 2014 8:23 pm

Bregalad wrote: But for some reason, in capitalism economy, companies just tend to be a$$holes and don't take seriously their roles of feeding the population anymore, since all other alternatives to capitalism around the world are virtually extinct and there is no need to promote it anymore. (Communist china (and other Asian satellite countries) is no longer a communist country, it's just a huge slave reserve for capitalist countries)
And one day the western workers and the exploited Chinese and other exploited peoples will be pissed off with their industrial masters apathy and disconnect and hopefully stage a proper revolution in their now educated and now industrialized nation. The other socialist revolutions arguably dilapidated because they took place in then underdeveloped and largely agrarian nations where the peasantry wasn't well educated and the urban working class wasn't very large like it was in the slums of Europe where Socialism originated from and the leaders of the respective revolutions had therefore little faith in the masses and never, in at least Lenin's case, released power back to the workers councils (or Soviets). Sorry for derailing :oops: this topic really fascinates me being part Eastern European.

psycopathicteen
Posts: 2980
Joined: Wed May 19, 2010 6:12 pm

Re: Fizzbuzz and programmer competence

Post by psycopathicteen » Wed Nov 26, 2014 12:27 am

Bregalad wrote:
But optimization without profiling first is itself a bad practice.
I voiced my opinion about this in a 6502.org forum post, so I'll just refer to it.
Besides, not using modulo for solving fizzbuzz is not only an optimisation, but also common sense. If the goal of the interviewer would be to see the candidate's familiarity with modulo, he won't be seeing it from me, because I am am not likely modulo to solve this kind of problem.
Here is a better one-linear.

Avoid small optimizations, say, 97% of the time. If your program runs too slow, just redo 97% of it.

Post Reply