|Thomas Delrue on 13 Sep 2017 08:01:49 -0700|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: [PLUG] Why Can't Programmers.. Program?|
On Wednesday, September 13, 2017 10:47:25 AM EDT ronpguilmet wrote: >This is not New, but it is new to me. Apparently this is a programming >interview question to weed out applicants. It's called FizzBuzz. Write a >program that prints the numbers from 1 to 100. But for multiples of three >print "Fizz" instead of the number and for the multiples of five print >"Buzz". For numbers which are multiples of both three and five print >"FizzBuzz". https://blog.codinghorror.com/why-cant-programmers-program/ I'm going to make an ass of myself, but... #!/usr/bin/python i = 1; while (i <= 100): output = ""; if (i % 3 == 0): output += "Fizz"; if (i % 5 == 0): output += "Buzz"; if (output == ""): output = str(i); print(output); i += 1; I could do it in other languages as well, but this was the fastest and just off the top of my head... Developer interview questions are usually there to make the interviewER feel good and superior about themselves. They hardly ever actually ask things related to the job. As much as I dislike medium, I'll link to this funny read: "What if companies interviewed translators the way they interview coders?" https://medium.freecodecamp.org/welcome-to-the-software-interview-ee673bc5ef6 If you want to do a proper interview: give your candidate a problem you're actually trying to solve at the moment or one you've just recently solved in your day-to-day job. Tell them how long it should take them and send them home to work on it. Pay them for however long you told them it would/should take so that you don't make them feel like you're getting free labor out of them. Then have them come in some other time to walk you through their solution.
Description: This is a digitally signed message part.
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug