Hacker News new | past | comments | ask | show | jobs | submit login

I recently interviewed a candidate with a degree in computer science. He was unable to explain to me how he would have implemented the Fibonacci sequence without chatGPT.

We never got to the question of recursive or iterative methods.

The most worrying thing is that the LLM were not very useful three years ago when he started university. So the situation is not going to improve.




This is just the world of interviewing though, it was the same a decade ago.

The reason we ask people to do fizzbuzz is often just to weed out the shocking number of people who cannot code at all.


Yep, I still can not understand how programmers unable to do fizzbuzz still have a sw engineer career. I have never worked with one like that, but I have seen so many of them on interviews.


I have seen IT consulting and service companies employ ‘developers’ who are barely capable of using software to generate views in a banking software package and unable to write a line of Java (which was the language used on the project).

When the client knows absolutely nothing about it and is not supported by someone competent, they end up employing just anyone.

This applies to both construction, IT and probably everthing.


Unless you're also a programmer, it's very difficult to judge someone else's programming ability. I've worked places where I was the only remotely-technical person there, and it would have been easy to fake it with enough confidence and few enough morals.


But it is. Some knowledge and questions are simply increasingly outdated. If the (correct) answer on how to implement Fibonacci is one LLM query away, then why bother knowing? Why should a modern day web developer be able to write assembly code, when that is simply abstracted away?

I think it will be a hot minute before nothing has to be known and all human knowledge is irrelevant, but, specially in CS, there is going to be a tremendous amount of rethinking to do, of what is actually important to know.


Not everyone does web dev. There are many jobs where it is necessary to have a vague idea of memory architecture.

LLM are very poor in areas such as real time and industrial automation, as there is very little data available for training.

Even if the LLM were good, we will always need someone to carry out tests, formal validation, etc.

Nobody want to get on a plane or in a car whose critical firmware has been written by an LLM and proofread by someone incapable of writing code (don't give ideas to Boeing ).

The question about Fibonacci is just a way of gently bringing up other topic.


My answer and example does not really care about the specifics.

I see nothing mention here as something that a human inherently needs to concern themselves with, because none of these things are things that humans inherently care about. CS as a discipline is a layer between what humans want and how to make computers do these things. If todays devs are so far detached from dealing with 1s and 0s (which is not at all how it obviously had to develop) why would any of the other parts you mention be forever necessary given enough artificial intelligence?

Sure, it's fun (as a discipline) for some of us, but humans inherently do not care about computer memory or testing. A good enough AI will abstract it away, to the degree that it is possible. And, I believe, it will also do a better job than any human ever did, because we are actually really, really bad at these things.


The answer on how to implement Fibonacci is so simple that it is used for coding interviews.

Any difficult problem will take the focus out of coding and into the problem itself.

See also fizz-buzz, which it is even simpler, and people still fail those interview questions.


Not outdated. If you know the answer on how to implement Fibonacci, you are doing it wrong. Inferring the answer from being told (or remembering) what is a Fibonacci number should be faster than asking an LLM or remembering it.


> Inferring the answer from being told (or remembering) what is a Fibonacci number should be faster than asking an LLM or remembering it.

Really?

If I were to rank the knowledge relevant to this task in terms of importance, or relevance to programming in general, I'd rank "remembering what a Fibonacci number is" at the very bottom.

Sure, it's probably important in some areas of math I'm not that familiar with. But between the fields of math and hard sciences I am familiar with, and programming as a profession, by far the biggest (if not the only) importance of Fibonacci sequence is in its recursive definition, particularly as the default introductory example of recursive computation. That's all - unless you believe in the mystic magic of the Golden Ratio nonsense, but that's another discussion entirely.

Myself, I remember what the definition is, because I involuntarily memorize trivia like this, and obviously because of Fibonacci's salad joke. But I wouldn't begrudge anyone in tech for not having that definition on speed-dial for immediate recall.


Already knowing the Fibonacci sequence isn't relevant:

> He was unable to explain to me how he would have implemented the Fibonacci sequence without chatGPT.

An appropriate answer could have been "First, I look up what the Fibonacci sequence is on Wikipedia..." The interviewee failed to come up with anything other than the chatbot, e.g. failed to even ask the interviewer for the definition of the sequence, or come up with an explaination for how they could look it up themselves.


I assume in an interview you can just ask for the definition. I don't think the interview is (should be) testing for your knowledge of the Fibonacci numbers, but rather your ability to recognize precisely the recursive definition and exploit it.


Why should my data science team know what 1+1 is, when they can use a calculator? It's unfair to disqualify a data scientist just for not knowing what 1+1 is, right?


the point is that it's an easy problem that basically demonstrates you know how to write a loop (or recursion), not the sequence itself


I’m 10 years in software and was never bothered to remember how to implement it the efficient way and I know many programmers who don’t know even the inefficient way but kick ass.

I once got that question in an interview for a small startup and told the interviewer: with all due respect what does that have to do with the job I’m going to do and we moved on to the next question (still passed).


You don’t need to memorize how to compute a Fibonacci number. If you are a barely competent programmer, you should be capable of figuring it out once someone tells you the definition.

If someone tells you not to do it recursively, you should be able to figure that out too.

Interview nerves might get in your way, but it’s not a trick question you need to memorize.


But I'm sure there would be some people that given the following question would not be able to produce any code by themselves:

"Let's implement a function to return us the Nth fibonnaci number.To get a fib (fibonacci) number you add the two previous numbers, so fib(N)=fib(N-1)+fib(N+2). The starting points are fib(0)=1 and fib(1)=1. Let's assume the N is never too big (no bigger than 20)."

And that's a problem if they can't solve it.

OTOH about 15 years ago I heard from a friend that interviewed candidates that some people couldn't even count all the instances of 'a' in a string. So in fact not much has changed, except that it's harder to spot these kind of people.


i’m around 10 years as well and i can’t even remember how the fibonacci sequence progress off hand. I’d have to wikipedia it to even get started.


There's nothing wrong with that. But once the interviewer tells you that the next number is the sum of the previous two, starting with 0 and 1, any programmer with a pulse should be good to go.


Well, I found these candidates long before ChatGPT


I interviewed a guy with a CCIE who couldnt detail what a port forward was. 3 years ago.


If some interviewer asked me what recursion was or how to implement it, I'd answer, and then ask them if they can think of a good use case for a duff's device.


Duff's device hasn't relevant for over 25+ years and there is no reason why anybody who learnt to program within the past 20 years should even know what it is, while recursion is still often the right answer.


That's a great question because there are 3 levels of answer: 1) I don't know what recursion is 2) This is what recursion is 3) This is what iteration is


Why? It looks like a reasonable interview question.


I suppose it depends on the position, but if your company is building CRUD apps with Postgres and you're asking candidates about Fibonacci, you're wasting both your time and, more importantly, the candidate's time.

Instead, you're better off focusing on relevant topics like SQL, testing, refactoring, and soft skills.

These "clever" questions are pointless. They either serve to stroke the interviewer’s ego: "Look, I know this CS 101 problem because I just looked it up!", or to create a false image of brilliance: "Everyone here can invert binary trees!"


I don't think the point of the question is "do you even know wha fibonacci sequence is?". If candidate didn't know what exactly it is, I have no problem with that. If I explained to him simply the nature of the sequence and he couldn't code it, I wouldn't expect him to be a worthy addition to the team. Recursion is everywhere, SQL, UI, refactoring, data processing, etc.

But I agree you can hire a shitty programmer, because his soft skills are amazing. I worked with people that wouldn't contribute much to the code, but created a culture and improved processes in the company. But you should be aware that you are not hiring for a coding position then.


> They either serve to stroke the interviewer’s ego

that's why i'd ask about duff's device. I often admit i am no programmer or developer, here on HN, and that's true. I've only ever implemented recursion when it's part of the pattern or when "learning" a language.

my understanding is that recursion is great for tight, small loops, where you need to do say 0<n<10 loops. But if you can't guarantee the tight loop every time, i.e., if it is a dynamic part of business logic or whatever, then you run the risk of blowing up the stack, or heap, or whatever it is. I don't remember which, and i could look it up; but my point is most developers don't need to know if the stack is at risk rather than the heap if your recursive call ends up being called a lot of times.

But i really would ask about duff's; me and a friend came up with a use for duff's device maybe 2005 or 2006, and tested it, and published it as part of a forum argument; but i am curious if anyone else could "come up with one" or "remember one" that isn't the "de-facto duff's device demonstration".




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: