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

ChatGPT is already chipping away at my Google searches. I'm more and more just starting there for coding related questions.

I've had chatgpt help me with the following just this week among other things.

- solved a complex issue with scaling and transformations using pixijs upon providing a code example. The solution was 99% there and saved me hours of debugging.

- refactored JavaScript to the async/await pattern

- simplified a complex nested logic in c# with citations

- scaffolded a MySQL create table statement upon providing several c# classes. Again saved me the tedious steps of typing them out.




I asked ChatGPT to decode a Diameter header in Java (RFC 6733 Section 3).

It supplied this :

    // Parse the Diameter header
    ByteBuffer buffer = ByteBuffer.wrap(message);
    int version = buffer.get() & 0xff;
    int flags = buffer.get() & 0xff;
    int length = buffer.getShort() & 0xffff;
First problem, it's version, length, flags. Second problem, length is 24 bits, not 16. Third, 24 bits unsigned won't fit in a Java int (which is signed). Then there is the extra masking, which isn't a bug but is (I'm reasonably sure) unnecessary.

That's 3 sneaky bugs in 4 lines of code, and it didn't even try to parse the rest of the header.

I'm impressed that it produces _anything_, but it's dangerous to trust.

ChatGPT is as reliable a source as any friend in a pub after 3 beers. It is definite in its answer, convincing with its phrasing and more than likely misremembering something it overheard on the radio while driving to work.

When I tried re-prompting, it produced more complicated, just as incorrect code.


Same here. Worked on a lazy list in js for mobile. The component had a nasty array lookup every scroll event. I asked chatgpt if it could optimize the lookup algorithm. I suggested me to implement a binary search solution including the code itself. It worked immediately. I would have taken me probably a day to come up with something similar. I also asked chatgpt to minimize my code including all method names , variables etc. Unfortunately the output of chatgpt is limited to x characters. 200kb of text isnt possible. But it is able to minimize. You can even ask to uglify the code by using animal names or street names in London.


type "continue" after the initial output and chatgpt should continue printing out the answer


ChatGPT struggled to tell me how to pin the bottom of a div to the bottom of its parent when scrolling (like a chat window does). It gave me the first thing that I tried (which is wrong). Eventually I figured it out, then confronted ChatGPT about it and it insisted on the wrong answer, and blithely dismissed the correct answer.


Sounds like it's ready to be promoted to architect.


I've been trying to get ChatGPT to solve pretty basic calculus questions and it is often either totally wrong or wrong in some tiny detail. I got into an argument over dimensional analysis a few weeks ago where it felt like it was gaslighting me.


I find ChatGPT very often hallucinates things and then tries to gaslight me when I present the correct answer. I wonder where it got this habit from.


I like chatgpt for programming but I don't like the sound of using a language model for math. I rather use Wolfram alpha


programming and math are the same thing


In the same way as building bridges and math are the same thing. There is some overlap, but not much for the every day tasks. If you want to build something completely new and unprecedented, you will need a lot more math, but still it will only get you so far


An AI struggling with CSS might be the best evidence of intelligence :)


It passed the Turing test since it suggested the thing I already tried


Can you use ChatGPT without a phone number yet? I thought about signing up a while ago but don't see a reason they need my phone number. Popular VOIP numbers don't work either.


> don't see a reason they need my phone number

Apparently it costs OpenAI a couple cents per prompt. So I assume this is an attempt to limit spam to keep costs down.


How did you do #1) ? I am curious. Did you past the code and ask GPT to analyze it ?


Yep, provided as much detail as possible with code samples. Pretty much as if you were emailing someone for help.


I've been using it and Google in parallel and have find it generally helpful, but I've had multiple instances where ChatGPT completely made up new library functions. Same for others I've talked to.


I asked many questions and it usually fail to answer the tougher or very specific situational ones.


Give some examples?

I use ChatGPT for 200-300 queries per day and it’s astonishingly accurate.

I’ll double check with Google if I’m unsure but it’s almost always been correct.


I've found that if you give it pairs of "Why..." questions it'll happily argue both sides of the coin ("Why is X better than Y", "Why is Y better than X"). But in giving me justifications, it gives me fodder for further traditional searches. I don't trust it to give me a correct answer, but I do trust it to define the problem space a bit.


You're typing out 300 queries to ChatGPT every day?!


Asked it a situation with examples where I’d use type erasure in swift. It looked good but was a mesh mash off various related things




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

Search: