4 ms·
Can you FizzBuzz? If so, you're experienced enough to get a job as a developer. I am always so surprised when I hear that, and have a difficult time believing
by kyro 16y ago
Can you FizzBuzz? If so, you're experienced enough to get a job as a developer.
I am always so surprised when I hear that, and have a difficult time believing that's true. With only an extremely beginner's level understanding of Python, I can solve FizzBuzz. Can I get a dev job?
- patio11 16y agoThis would put you ahead of literally half of software engineers at or below my level of seniority at least one Japanese megacorp. While I have very little experience with working in the United States, anecdotally, many programmers can't program there, either.
- SHOwnsYou 16y agoI've always wondered -- is the reason people can't do fizzbuzz because a lack of understanding of modulus or because they can't comprehend the problem? I know modulus isn't necessary, but I can see someone not doing the problem if the solution they are turning in is in a less elegant way.
- patio11 16y agoFizzBuzz comes from a game for six to eight year olds, who also don't understand modulus. That's part of the reason it is such a great problem: they fact that you realize "Hey, this is a whole lot easier with modulus" demonstrates that you can reason abstractly. You certainly don't need a mod operator to make it work -- if you're capable of writing a function, you can write divides_evenly_by_3(int number) using facts that every fourth grader knows. If you prefer, you can substitute a similar problem which doesn't require even fourth grade math. Here's one: write a program which calculates the sum of all numbers between 1 and 1,000 whose digits sum up to 7. Or write a program which takes this post as input and tells me what the 3rd most common letter used was.
- PakG1 16y agoThat's true enough. But fact is, if someone's ignorant of modulus, I'd say that's scary. Knowing modulus doesn't necessarily demonstrate you have a great grasp of programming. But I think not knowing modulus demonstrates that there's a higher probability you know very little. And fact is, FizzBuzz also filters out all the people who know modulus, but can't figure it out anyway. You definitely don't want those people.
- paulnelligan 16y agoI didn't realise that some programmers didn't know modulus ... really??
- BrandonM 16y ago> write a program which calculates the sum of all numbers between 1 and 1,000 whose digits sum up to 7 My Python answer: sum(x for x in xrange(2, 1000) if sum(int(y) for y in str(x)) == 7) # 9324 Anyone have improvements on that? (I used the range (1, 1000) as opposed to [1, 1000], but it doesn't make a difference since the edge values don't have digits that sum to 7.)
- kenjackson 16y agoThere are a lot of micro improvements you can do to this. For example, after you find sum() == 7, you can increment x by 9 (since the largest digit in the ones column can be 7, and this takes a deficit of two digits to get back to the rollover -- and then 7 more to get a sum of 7 again). And frankly I'm not sure if its faster to convert to string and back to int, or if it would be better to just use modulo arithmitic to get the values associated with the ones/tens/hundreds. In any case, what you have is certainly readable though.
- BrandonM 16y agoI mainly meant "improve" in terms of conciseness and readability. I didn't see any need for optimization because the snippet runs instantly: $ time python -c "print sum(x for x in xrange(2, 1000) if sum(int(y) for y in str(x)) == 7)" 9324 real 0m0.138s user 0m0.012s sys 0m0.012s
- scorpioxy 16y agoReally? Is it that bad? I didn't know what fizzbuzz is until I read about it on wikipedia. But I frequently run into "web developers" that don't how sessions work or how cookies work and don't understand what CSS does. But i figured it was just these guys who give programmers a bad name. I had no idea it was really that bad and extends to the basics of programming.
- julsonl 16y agoProbably not in a hot new startup, but there might be some obscure company somewhere that would need some code monkeys...
- ahi 16y agoI've been doing a lot of job hunting lately. There are a ton of crappy jobs out there for php/java code monkeys. If you can solve FizzBuzz you can get the job, though you might not want to. Python and other more fashionable languages tend to be the choice of more sophisticated teams with higher standards. Simply put, a beginner's level understanding of PHP will get you a php code monkey job. A beginner's level understanding of Python along with an understanding of fundamentals can get you a dev job. edit: definitely broad strokes
- benmccann 16y agoIt's surprising how bad many developers are. We had a candidate in the other day who was struggling with a problem, so we kept making it easier until finally we asked him to "write some code to tell me if the input string consists only of the letter 'a'". When he got that wrong, the interview was over. Not to pick too much on this guy, because I really enjoyed talking with him, but it was a good reminder of how the rest of the world worked before I got a job with people that actually care about and are good at their craft.
- ryanwaggoner 16y agoWhat?! Wait, was this an interview for Google? How did this guy get to this stage? I've always assumed I probably couldn't get an interview at Google, but geez...
- benmccann 16y agoYeah, I would love to know how he got that far as well. It's definitely not a normal occurrence for people to get onsite interviews and then bomb like that. Everyone that I've interviewed up until this point was pretty decent even if they weren't ultimately extended an offer.
- bitwize 16y agoI'm very sorry, but I have to laugh at this. That's like the SNL Celebrity Jeopardy skit where for the Final Jeopardy round an exasperated-to-the-breaking-point Trebek deploys a deliberately extremely easy question at the celebrities such as "write any letter" and they still find a way to mess it up. And no, I don't feel sorry for people like this. Despite their glaring incompetence they still manage to snow people into hiring them. Some of them easily make $500,000/year and up if they remora themselves to the underbelly of a large company and emit horrible VB code.
- elxrr 16y agoSimilar scenario for me, I'm also surprised.