Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I had a candidate, last week, that was using ChatGPT during a technical coding interview.

So, he managed to find perfect answers to the most difficult parts of the exercise in 30 seconds, and then struggled for 30 minutes, with my help, on getting the print right.

Of course, I used a slightly modified version of well known problems like "Fizzbuzz" and other stuff, mostly as a quick start to get into the real engineering challenge. It explains why ChatGPT was absolutely unable to finish the exercise. During the interview, it acts a a good filter. If it last 3 minutes, fine, no signal ; but if someone is struggling on it for half the interview time, it's a clear "No".

I haven't check if the candidate was invited to later rounds, but considering my negative review I think he was rejected.

I'm afraid these tools are not going to help you when things really matter :)



I think there are a few edge cases where this could still be useful. I put myself as an example, I have been working as a backend engineer for more than 12 years and I still get very nervous in any interview. I struggle with a simple fib(n) function because my brain sabotages me. But I could happily talk about system design, microservices, or API resilience without problems.


I have a collection of one-liners by now which any developer could explain easily, but which ChatGPT-3.5, ChatGPT-4.0 and Bing's AI all get wrong in the same way. I think they all learned from a wrong SO explanation somewhere.

I'll part with one:

    Explain in detail what resolve is in this code:

    const promise = new Promise((resolve) => resolve(3));

    Assume I'm unfamiliar with callbacks or promises.
All three AIs will incorrectly state in their very first sentence that resolve is passed to the promise constructor as an argument.

There's also some technologies for which they can't write correct code (they'll hallucinate their API), but any software dev could when given their documentation.


Anthropics Claude is better, I'd say...:

The resolve function here is a callback function that is passed to the Promise constructor. It is called the executor function.

A Promise represents the eventual completion (or failure) of an asynchronous operation. The resolve callback is used to mark the successful completion of the asynchronous operation inside the promise.

So in this specific code, the promise is resolved immediately with the value 3. Basically it creates a Promise that is already completed with a value of 3.

To understand this more generically:

The Promise constructor takes an executor function which contains the asynchronous operation. This executor function has two parameters:

resolve: A function to call when the asynchronous operation completes successfully. It passes the result to the next then handler. reject: A function to call when the asynchronous operation fails. It passes the error to the next catch handler. The then and catch methods on a promise are used to handle the resolved or rejected state of the promise.

For example: promise.then((result) => console.log(result)) // Logs 3

So in summary, the resolve function resolves the promise and passes a value to the next promise handler, marking the successful completion of the asynchronous operation.

Does that help explain the resolve callback? Let me know if you have any other questions!


Nope. Also already wrong with the first sentence, just like the three other AIs.

> The resolve function here is a callback function that is passed to the Promise constructor. It is called the executor function.

Correct answer: The resolve function here is a callback function that is an argument to the executor function, which is passed to the Promise constructor.

The "resolve" function is not passed to the Promise constructor (resolve is not the executor function), but every AI seems to think so. They typically correct themselves if you point it out.


I got the right answer by asking GPT-4 to pretend it is a highly skilled senior software engineer and to write its thought process down step by step.


I could not explain the code and I have been developing for years... I asked ChatGPT and I feel I have better understanding of it now.


That's a question for someone who claims to have experience with modern JS development/promises.

Don't trust ChatGPT's explanation in any case.


I work with modern javascript though I would by no means call me an expert on it. Rarely do I have to work with promises in such details.


That has to feel so awesome to reject these wannabe posers. Please please please tell us more :)


This blatant cheating should result in an instant 1 year ban from interviewing at company.




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

Search: