4 ms·
> The best interview question that will never die: "What's the weirdest bug you debugged? What made it weird?" @ChatGPT: Give me three sample answers to the fo
by netfortius 4y ago
> The best interview question that will never die: "What's the weirdest bug you debugged? What made it weird?"
@ChatGPT: Give me three sample answers to the following questions related to <insert your interview language> programming: "What`s
the weirdest bug you debugged? What made it weird?"
- CamperBob2 4y ago"One time, I was working on a project where the UI kept freezing when a certain button was pressed. I spent hours debugging the code, but couldn't figure out what was causing the problem. Eventually, I discovered that the button's event handler was accidentally triggering an infinite loop that was consuming all the CPU resources, causing the UI to freeze. It was a weird bug because the symptoms were not immediately obvious and it took a lot of digging to uncover the root cause. I once spent an entire day trying to figure out why my code was behaving erratically when processing a certain data file. It turns out that the file had some hidden control characters in it that were causing my program to misinterpret the data. The bug was weird because I had never encountered a situation where hidden characters were causing issues before. One time, I was working on a codebase that had been written by multiple developers over a long period of time. I was debugging a particularly tricky issue where certain data was being lost between different parts of the system. After a lot of investigation, I discovered that one of the earlier developers had implemented a workaround for a different issue that involved storing data in a global variable that was being accidentally cleared by another part of the code. It was a weird bug because it was caused by a seemingly innocuous change that had been made months earlier and was difficult to trace back to its origin." Welp, we're boned
- alex_sf 4y agoI mean the first and the third aren't great. So, 33% chance of being boned.
- deleted 4y ago[deleted]
- josephg 4y agoOne weird thing about ChatGPT is that it consistently feels like a B+ student, at everything you ask it. Its never top of the class, but its answers seem skilled enough to get by. I've seen this asking about my own field (CRDTs), asking it to write comedy sketches, and with some of the academics I know asking it the sort of essay students they'd ask their students. I wonder if its somehow doing this on purpose - like if its pitching its answers to be the most "middle of the pack" from all of its training data.
- hathawsh 4y agoThe quality of its answers improve significantly when you give it feedback and ask it to revise. It's eerie!
- smoe 4y agoInteresting. Played around with that kind of prompt a bit and asked follow up questions on the answers as one would in a interview. The answers to those were all very vague and almost "evasive". And within 1-2 follow-ups it started to contradict itself.
- hathawsh 4y agoI feel like I could have written that. Did ChatGPT copy old blog posts of mine? ;-)
- hgsgm 4y agoPlease don't put blockquotes in code blocks.
- CamperBob2 4y agoPlease ask dang (or, I suppose, pg) to implement features that were table stakes in the BBS scene in 1985. Come to think of it, ChatGPT could probably do the job mostly by itself, given the right prompt.
- deleted 4y ago[deleted]