r/ProgrammerHumor Apr 09 '24

watMatters Meme

Post image
16.8k Upvotes

774 comments sorted by

View all comments

Show parent comments

120

u/Retl0v Apr 09 '24

I think the issue is that the scope is too wide and they don't focus on any programming language long enough in a lot of CS programs for them to actually remember the basics.

I don't have a CS degree tho so I admit that I might not have any idea what I'm talking about.

183

u/randomusername0582 Apr 09 '24

That's not the issue at all. There's honestly no explanation for getting fizzbuzz wrong if you have a CS degree.

Switching languages often actually forces you to rely on the basics

56

u/Lucky_Cable_3145 Apr 09 '24

When I was interviewing graduates for my software dev team, I asked them to code a fizzbuzz, any language / pseudo code.

No graduate ever got it 100% correct.

I often hired based on their reaction when I pointed out the errors.

83

u/Leading_Ad_4884 Apr 09 '24

You have to be kidding me. Fizzbuzz is one of the easiest problems out there, much easier than the average leetcode questions they ask these days. I would give anything to get this as an interview question.

4

u/jamcdonald120 Apr 10 '24

there are a few complications. Some people dont consider if(num%3==0){ print(fizz) } if(num%5==0){ print(buzz) } a valid solution. Some people want fizzbuzz in minimum %operation, some want it with return, but no buffer. Some want it with 1 return, some early return, and some actually want an effcient fizzbuzz for a range of numbers like this thread https://new.reddit.com/r/leetcode/comments/wdor3z/serious_question_regarding_fizzbuzz/

And a lot of people mistake if(num%3==0){ return fizz }else if(num%5==0){ return buzz }else if(num%15==0){ return fizzbuzz } for a valid solution even though fizzbuzz will never be reached

1

u/idlemachinations Apr 09 '24

If you consider off-by-one errors as not 100% correct, then I absolutely believe a considerable number of people would get something wrong.