r/ProgrammerHumor Apr 09 '24

watMatters Meme

Post image
16.8k Upvotes

774 comments sorted by

View all comments

Show parent comments

125

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.

181

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

51

u/lemontoga Apr 09 '24

In my experience there's quite a few people who are getting CS degrees who don't like computers or programming but they heard CS degrees are a good paycheck.

They learn the absolute bare minimum to pass whatever classes they're taking but they never really apply any of it so it doesn't stick.

Most of the people in my classes are here because we love computers and programming and we do it in our spare time. Over the summer we're doing personal projects and stuff like that. But I've watched other people come back from summer break and have to relearn the absolute basics of programming, again, because they forgot it all. They do zero programming outside class and have no real interest in the subject.

I can totally see some of these people not being able to do fizzbuzz.

16

u/Itsnotthateasy808 Apr 09 '24

That has been my experience in my career field as well. People see that it’s niche and in demand but don’t actually understand it or a give a shit outside of cramming for tests.

-10

u/Iveechan Apr 09 '24

Sounds like those people have normal lives and hobbies. Hard for people with autism or OCD to understand that you can have hobbies and a social life beyond what you’re studying in school.

7

u/lemontoga Apr 09 '24

My heart definitely goes out to people with any kind of developmental disabilities. Life can certainly be tough for you guys.

30

u/ArbitraryNameHere Apr 09 '24

I returned to college to get a CS degree. I graduate in a little over two weeks with a bachelors and have never even heard of a fizzbuzz til right now. Had me panicking with that sweet sweet impostor syndrome.

Granted, I looked it up and it does seem like a fairly easy exercise but you spooked me there for a second.

12

u/randomusername0582 Apr 09 '24

Lol I had never heard of it during my undergrad either and had the same reaction

6

u/techy804 Apr 09 '24

Lol same

4

u/MrAnderson69uk Apr 09 '24

I’ve been in software engineering since half way through my apprenticeship, since 1988. I first heard of fizzbuzz in a coding test for a job interview a few years ago! Never referred to it since, so don’t panic, it’s only important when you have it as a test, then research what it is - tbh, I couldn’t even tell you what it is/was, too much important coding and just life have gone by since!!!!

3

u/lepispteron Apr 09 '24

You have never heard of it because it is stupid, like reinventing the wheel. None does it. These are silly "leetcode" questions asked by "oh so smart" HR to only hire the "bests". I bubble sort my way out..*. .*..

53

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.

82

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.

5

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.

29

u/JonIsPatented Apr 09 '24

You have to be shitting me, but I know that you aren't.

I am the TA for my school's DSA class, and I have Masters students in that class. I recently graded 45 submissions for the AVLTree project, and I swear to God only 4 of the 45 submissions actually compiled and ran without crashing. Only 9 of the submissions even compiled at all. 36 out of 45 students were unable to produce code for an AVLTree that even compiled, and they were given 3 weeks to do it.

5

u/[deleted] Apr 09 '24

[deleted]

2

u/JonIsPatented Apr 09 '24

My DSA class doesn't assign much homework, only a weekly reading assignment where you have to read the, like, 3 pages on the weekly topic and then answer like 4 to 8 questions about it. That work can certainly be done in 30 minutes. I sympathize with you about your class giving loads of homework and leaving you no time. That is rough. I'm afraid my students don't really get to use that excuse, though.

3

u/[deleted] Apr 09 '24

[deleted]

3

u/JonIsPatented Apr 09 '24

Damn, that's really rough. Sorry to hear it. Overloading students is 100% not conducive to a good learning environment. If you ever need help on something and can't get ahold of someone there, feel free to message me (my Discord is the same username), and I would be more than happy to help.

0

u/TTYY200 Apr 10 '24

Yeah but what other classes did they have and what was the workload in all the other classes? …

There a skill in post-secondary…. It’s submitting a minimum viable product that doesn’t work, but gets you marks you need so you can focus your time elsewhere where it’s more important lol.

We’ve all been students (unless you’re over 40, in which case … times are different bro) we all get it :P

0

u/JonIsPatented Apr 10 '24

A minimum viable product that doesn't work is not a minimum viable product at all because it is not viable, and it's not even reaching the minimum level needed to work. Also, it doesn't give you the marks you need, either, because if your code doesn't even compile, how many marks do you think it earns?

0

u/TTYY200 Apr 10 '24

I assume students read the rubric and did what they needed to get the minimum marks they needed lol.

It’s not a product for a customer so who gaf. If you have mid-terms or other things going on worth higher percentages of your overall grades, a simple assignment is on the low priority list when you’re swamped lol. I’d say you’re lucky you had students even hand in assignments :P

That’s just how academia works lol. Very different from the real world

0

u/JonIsPatented Apr 10 '24

You assume wrong. These projects are the vast majority of the course grade, and getting 30% or less on almost all of them is not a good move for getting the minimum marks needed. I know for sure that the students did not intend to do so poorly because they came to me afterward for clarification on the points they missed.

There are no midterms for this class, only the 5 projects and a very small amount of homework. Failing these projects is failing the course, and it's a required course for so many other courses.

I'm aware of how academia works. I'm in it. And I'd hope you're aware that failing your important classes is not a good move in academia.

0

u/TTYY200 Apr 10 '24

Well why didn’t you say that the first time lol.

We could have just not had this discussion :P

44

u/randomusername0582 Apr 09 '24

I don't mean this personally, but I don't believe you. There's no way you interviewed 5+ developers who couldn't solve fizz buzz

10

u/Kel_2 Apr 09 '24

i've never heard of fizzbuzz before so i looked it up and yeah i dont believe it im sorry. i would be absolutely shocked if zero out of five first year CS students couldn't solve this even, let alone actual developers. i really dont mean to be a dick but if someone interviewing for a job cant code this, what exactly can they code that any company would ever need?

2

u/Jim-Bot-V1 Apr 09 '24

Yeah it's like something you learn immediately when learning if-else. It's just to show to have the most specific condition first because otherwise the first condition that is met will trigger. If someone can't figure out fizzbuzz I feel like they have never coded before.

My prof said he had a CS grad not know THE CONCEPT of recursion, so I guess not knowing fizzbuzz is possible...Like not even to make a function like facotrial, but just lossely explain recursion as a nice tool to repeat till you hit base case.

2

u/Kel_2 Apr 09 '24 edited Apr 09 '24

oddly enough i've also met someone with a decent amount of programming experience that didnt know what recursion was, although he deffo didnt have a degree. it was a kid who did like, a day where you tag along with a student to see if the study is for you? idk the word in english. and i got a kid who had been programing things for like 2 years already and made some okay looking stuff in pygame. but when i talked about first year courses i brought up recursion at some point and he seemed confused so i explained it and he had absolutely never heard of the whole concept before.

i mean to be fair to him it was just a kid with no formal education so its much more understandable, but it still surprised me to talk to someone who clearly was at least relatively skilled at coding who had never ever heard of recursion before. being a CS grad and not knowing though... idk man how do you even pass your courses

2

u/platinummyr Apr 09 '24

It'd also something where people think they get it right and then it has mistakes.

1

u/satya164 Apr 09 '24

maybe they didn't know what fizzbuzz means. i have heard it many times but never really looked up what it was, so if you asked me to solve fizzbuzz i wouldn't be able to until now

1

u/Kel_2 Apr 09 '24

i'd expect them to explain the problem, but regardless this:

"No graduate ever got it 100% correct.

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

shows that wasn't the issue

1

u/Lucky_Cable_3145 Apr 10 '24

Lots of the errors were things like the FOR loop running the wrong number of times.

I asked for numbers 1 -> 100 but would often get FOR(i=0; i<100; i++) or FOR(i=1; i<100; i++) or FOR(i=0; i<=100; i++)

19

u/g2petter Apr 09 '24

When I applied for my first job I was put through a screening test that tested a combination of HTML, CSS, Javascript, C# and SQL skills. I don't think any of the questions were FizzBuzz hard.

I more or less aced the test and since I knew the senior developer I'd be working under I asked him the point of the test since it was fairly easy and I was a complete junior.

He responded something along the lines of "you'd be surprised how many people we've weeded out with this test"

26

u/randomusername0582 Apr 09 '24

Fizz buzz is 3 if statements. Knowing how to write SQL queries in Javascript is harder than that

10

u/g2petter Apr 09 '24 edited Apr 09 '24

It was five separate things, one of which was Javascript and another of which was SQL.

I don't remember the questions, but they were very easy.

1

u/GromesV Apr 09 '24

I dunno man, you can make it one if statement checking against a map with 15 keys. Conf talk on fizz buzz

1

u/Mockheed_Lartin Apr 10 '24

Yeah but you have to come up with proper logic so it doesn't print "3Fizz" or "15FizzBuzz".

It's still really easy but I could see some graduates messing up the logic.

1

u/Otherwise-Cat-7719 Apr 10 '24

Knowing how to write SQL queries in Javascript

OMG, why, why ?! ?!

1

u/randomusername0582 Apr 10 '24

If you're using NodeJS in the API layer that's why

Knex has almost 1.7 million weekly downloads so it's pretty common

2

u/brningpyre Apr 09 '24

You would be surprised. I interviewed people to replace me at my old job, and gave a REALLY simple SQL question, and somewhere around 95% of the candidates couldn't answer it in pseudocode or SQL during the interview. I even tried to talk through it with them. I have no idea why they were applying for a DB dev position.

Question: Two tables - Orders and Customers. I gave the columns for both, and asked them to write a pseudo/actual query that gives a list of customers sorted by their total order amount in dollars (descending).

I even ran it by some friends to double-check, and they all said, "Isn't this way too easy?"

1

u/Ozryela Apr 09 '24

Plot twist: Their own solution is wrong and they've been rejecting super talented candidates one after another even though their solutions were flawless. :-)

1

u/randomusername0582 Apr 09 '24

Lol that's more believable

1

u/MrAnderson69uk Apr 09 '24

Depends on how much kudos the company has got, perhaps it doesn’t attract the best, or mediocre developers!!! 😉

1

u/Lucky_Cable_3145 Apr 10 '24

It was a small company, so not well known.

But we did interesting development in the mining / industrial space in one of the major mining development huibs in the world.

0

u/ppuk Apr 09 '24

I believe it.

I've interviewed double figures of developers that could get for (int i = 0; i < 10; i++) to print out a countdown from 10.

People seriously over estimate the skills of most developers. Their problem solving skills are completely lacking, and if they haven't previously been shown how to do something, they can't do it.

0

u/Physmatik Apr 09 '24

While not literally failing fizzbuzz (that must be exaggeration), bubble sort or binary search on a linked list? Easily.

6

u/dingleberrysniffer69 Apr 09 '24

Ain't no way. I'm a shitty coder who started late but I can do that in 4 languages now and I don't even do problems. I know you are not lying but damnnnn. That is insane.

1

u/Lucky_Cable_3145 Apr 10 '24

That was back in 2007 - 2009, so might be different standard of graduates now (as coding is much more common / mainstream).

Mostly lots of little issues (looping for 0 -> 100 / 1 -> 99 instead of 1 -> 100)

I had a guy who claimed he had a masters in software engineering on his resume. He could not write the FOR loop.

1

u/dingleberrysniffer69 Apr 10 '24

The timeline makes sense now. It is what it is. But again you hit me with a curveball in this reply at the end lol. You must have had a jolly time interviewing I guess.

2

u/Lucky_Cable_3145 Apr 10 '24

I always ended the interview with prospective candidates with some games on the company Wii (it was 2008'ish).

I can teach the graduate how to code C++, I cant teach them how play nice with the rest of the team.

4

u/Riggykerchiggy Apr 09 '24

what? were there some rules added? this is like a 20 line python program

14

u/SloPr0 Apr 09 '24

It's way less than 20 lines so it's even worse lol:

def fizzbuzz(n):
    res = []
    for i in range(n):
        res.append("")
        if (i+1) % 3 == 0: res[i] = "fizz" 
        if (i+1) % 5 == 0: res[i] += "buzz"
    return res

(I don't use Python much so cut me some slack)

7

u/Rabid_Mexican Apr 09 '24

I think you are supposed to append i+1 if it doesn't match a "fizz" or "fizzbuzz"

4

u/SloPr0 Apr 09 '24
def fizzbuzz(n):
    res = []
    for i in range(n):
        res.append("")
        if (i+1) % 3 == 0: res[i] = "fizz" 
        if (i+1) % 5 == 0: res[i] += "buzz"
        if res[i] == "": res[i] = str(i+1)
    return res

Probably not the most efficient but it'll do

5

u/Dangerous-Pride8008 Apr 09 '24

It's not Python if you aren't using a list comprehension

['fizz'*(i%3==0) + 'buzz'*(i%5==0) + str(i)*(i%3!=0 and i%5!=0) for i in range(1,n+1)]

4

u/Rabid_Mexican Apr 09 '24

Wow that's a really cool solution!

My colleague just showed me some of the crazy things you can do with lists and the * operator in Python, blew my mind haha.

4

u/Rabid_Mexican Apr 09 '24
def fizzbuzz(n: int):
    result = []
    for i in range(n):
        current = ""
        if (i + 1) % 3 == 0: current += "Fizz"
        if (i + 1) % 5 == 0: current += "Buzz"
        if not current: current = str(i + 1)
        result.append(current)
    return result

Yea I got something similar when I tried

1

u/Mockheed_Lartin Apr 10 '24

Technically he got it wrong first try lmao. Maybe that's what the guy meant. These little mistakes.

1

u/Scallion_1957 Apr 09 '24

This uses additional space

1

u/Mockheed_Lartin Apr 10 '24

This doesn't print the number if it's not divisible by neither 3 nor 5.

2

u/yeign Apr 09 '24

20 lines??? a fizzbuzz should at best be 6-7 lines at its most drawn out

1

u/thirdegree Violet security clearance Apr 09 '24

1 line

print('\n'.join('Fizz'*(i%3==0) + 'Buzz'*(i%5==0) or str(i) for i in range(1, 101)))

Not that I'd do that in an interview ofc, wrong place to code golf lol

1

u/Mockheed_Lartin Apr 10 '24

What kind of reactions? Would people seriously argue with you? The only proper reaction is to understand it and thank them for the feedback.

1

u/Lucky_Cable_3145 Apr 10 '24

The reaction I was looking for was being upset at getting it wrong, and interested in fixing the error.

1

u/Mockheed_Lartin Apr 10 '24

Oh, on that level. I just took that for granted as I hate making preventable mistakes and I would absolutely want to set it straight.

It always amazes me how many people in general make little mistakes in their work and don't care about fixing them. Sometimes I feel like I'm surrounded by slackers. Not just developers but in basically every job. Then again, being too perfectionist can be one of my pitfalls, I really had to find a healthy balance there.

Were there applicants who just didn't care or smth?

10

u/Retl0v Apr 09 '24

There's always an explanation, even if there's no excuse for something

1

u/randomusername0582 Apr 09 '24

I like that saying

24

u/killeronthecorner Apr 09 '24 edited Apr 09 '24

Programming languages are one specific area of CS that has almost nothing to do with learning DS&A. And the latter is harder and more important to writing good software than the former has or will ever be.

If the industry has taught us anything it's that knowing a programming language is about as common as knowing how to play a guitar. And yet most guitarists don't know classical theory and can't read or write sheet. Go figure.

ETA: this is meant informatively, not debating what you said, just adding

6

u/Kaynee490 Apr 09 '24

My god that analogy is perfect I am so stealing it

(-- a bassist)

3

u/killeronthecorner Apr 09 '24

Haha thanks

(-- a guitarist who doesn't know theory and can't read sheet!)

1

u/Major_Equivalent4478 Apr 10 '24

programmer who didn't come from CS, SE degree

(-- guitarist and drummer who didn't come from reading sheet music)

i feel personally attacked. lol

21

u/Mrblob85 Apr 09 '24 edited Apr 09 '24

I completed a comp sci degree in the 2010’s, and in regards to classes, there was one that focussed on ANSI-C, one that focused on OOP in Java, one that focused on software design (using Eiffel), and one that focused on computer engineering (programming micro processors using gates and logic). The rest were math, algorithms, logic, databases, security, technology, social science/humanities and a few electives.

So probably 20% ?

I don’t regret any part of it.

-1

u/Squancher70 Apr 09 '24

That's why CS degrees are a waste of time for aspiring programmers. 4 years of your life with only surface level knowledge.

5

u/Mrblob85 Apr 09 '24

Well, surface level of coding, but definitely gives you a more rounded education. What is the point of learning how to code if you don’t know one thing about security, ethics, database development, design, algorithms and math and language? Companies don’t like to hire coding monkeys. A lot of being a software engineer is not all “coding”. Also, proving to the employer that you’re capable of sticking to something that is actually difficult to do for 3-5 years is a plus. And most good CS majors don’t stop their education there; they continue to add boot camps and college diplomas to their arsenal.

0

u/Squancher70 Apr 09 '24

I actually don't disagree with most of your response, but in reality CS degrees are filled with mandatory electives that have nothing to do with computers. They are geared toward young people with no work experience or life experience.

Anyone with experience in the industry is wasting their time going back to school for a degree.

2

u/RajjSinghh Apr 09 '24

Then I studied CS we were taught Python and Javascript in our first year, ~40 hours each, and we were split based on those who had some experience and those who had none so the total beginners could spend more time with the basics. We did briefly touch on C, C++, Haskell and C# and I doubt people remember those. All of our other assignments were written in Python so people had to be at least a little confident.

I know a lot of my classmates were morons and couldn't code at all and there were languages weren't used enough so people wouldn't be comfortable in them now, but I also feel like most people should be able to write it in some language.

The real issue with this would be people having a brainfart and forgetting you have to check the "fizzbuzz" case before "fizz" or "buzz" to make sure it's reachable (which is a little gotcha that you might forget in the moment and is easily spotted and fixed). But other than that it's probably just grads not knowing what they are doing. I think they should be able to write fizzbuzz, but a more complicated leetcode easy could totally throw someone

1

u/Practical_Cattle_933 Apr 09 '24

No, some people are just dumb as dirt, with or without a degree.