Live data from Hacker News

Testing GPT 4's code-writing capabilities with some real world problems

tylerglaiel.substack.com

591–600 of 677 posts

Re: Testing GPT 4's code-writing capabilities with some real world problems

#591
post #71

Earlier quoted context omitted.

> Not once was programming something that was a time sink. Can you please expound on that? Do you mean not hard as in comparison to something else?

I think all it shows is that GP has never worked on complicated problems that require anything more than gluing libraries together.

I have built plenty of complicated things that were much more than glue. Even for those, coding was far from a bottleneck. Because coding is easy.

In fact, all the complicated software anecdotes I could give were things that ChatGPT wouldn't even touch. In the realm of design and scaling and fault tolerance and other such things.

Re: Testing GPT 4's code-writing capabilities with some real world problems

#592

Earlier quoted context omitted.

It's astonishing to see the goalposts move so quickly. The cope of "well, okay, it can do that, but that's not even the hard part!" when just a year ago this entire product was almost unimaginable.

I'm impressed. But I want it to be better, so I don't have to spend so much time coding and can trust it to give me good code so I can offload a lot of my efforts on to it. Right now I have to check and verify or go back and forth with prompts so much I almost would have been better off writing the damn code in the first place. Meanwhile I've got a backlog of about 100 personal projects I've never gotten around to ma…

Do you find AI to be good with art generation? I can't use any of the art in the projects that I do without extensive inefficient editing since the stuff it spits out isn't how a human would draw.

It's good for concept browsing, but not much more for me at the moment.

Re: Testing GPT 4's code-writing capabilities with some real world problems

#593
post #126

Earlier quoted context omitted.

>Then I asked it to write unit tests for the code, and it confidently started writing correct-looking code that would take the same input and expect the correct output, but just stopped in the middle. One of two things. First ask it to continue. Sometimes it just stops half way thru code foe whatever reason. The other possibility is you filled up the token context window. Not much you can do but wait for the 32k mode…

I asked it to continue twice after the first failure. Every time it failed in about the same point. Might've filled up some mysterious limit in the model. I didn't really need the unit tests anyway, but I wanted to try if it could do it :)

"Please continue without explanation." Usually works for me.

Re: Testing GPT 4's code-writing capabilities with some real world problems

#594
post #189

Earlier quoted context omitted.

I have the same feeling, people are very concentrated on the ability of this AI generators to create working code from super specific and well formed prompts. When in reality, figuring out what the prompt should be accounts for 80% of the job.

don't fall into this mental trap. you can get into recursion quite easily here, and figuring out what to prompt can start from simple general questions - and there is no need for a developer at all, aside from the current limitations of copy/paste/run workflow has to be done manually

Everyone's focused on writing code - is the code even needed when a good enough AI exists? How many of us are writing code to extract 10% more efficiency out of humans, if they go so do we.

Also if software development does survive, it's going to look very attractive to all the other unemployed people.

Re: Testing GPT 4's code-writing capabilities with some real world problems

#595

Earlier quoted context omitted.

Are hallucination is a systemic for-ever problem that will not be solved, mitigated or in akne other way rendered inconsequential? Also, having conversations about things you don't understand with a machine, where you don't have to keep up social decorum and can ask the dumbest questions should help a lot with improving the decision making of non-technical personel

> having conversations about things you don't understand with a machine, where you don't have to keep up social decorum and can ask the dumbest questions should help a lot with improving the decision making of non-technical personel This sales manager didn't know that neither he - nor his customer - properly understand the product until he was specifically called out on it (by me, as it happens. At least the boss lau…

"Speaker Coach - now with AI" isn't that far-fetched, given Microsoft's relationship with OpenAI and how quickly they did the same with Bing/how hard they're now pushing it

https://support.microsoft.com/en-au/office/suggestions-from-...

Re: Testing GPT 4's code-writing capabilities with some real world problems

#596
"I think ChatGPT is just kind of bullshitting at this point."

This line sums up the entire problem with these tools for anything concrete, like analyzing input data, writing code, producing a series of particular facts, data analysis etc. Much of it can be right, but whatever isn't makes the whole output useless. You'll spend as much time checking its work as producing it yourself.

Re: Testing GPT 4's code-writing capabilities with some real world problems

#597
post #10
post #8

In before all the comments about how “most code is trivial” or “most programming is stuff that already exists” or “you’re missing the point look how it’s getting better”. I really am in awe of how much work people seem willing to do to justify this as revolutionary and programmers as infantile, and also why they do that. It’s fascinating. Thinking back to my first job out of college as a solid entry level programmer.…

Have you seen this video? https://www.youtube.com/watch?v=9QZlQMpNk-M I think the author is onto something – while AI might not be able to program per se, it can certainly be handed a code snippet and then use its huge corpus of Internet Learning™ to tell you things about it, code that looks like it, and ways (people on the Internet think) it might be solved better. In that sense, it isn't replacing the programmer; i…

I spent this afternoon asking ChatGPT (3.5 not 4) to help me query AWS resources into a csv. It gave me a 90% correct answer but made up a native csv output option. When I told it that option didn't exist it got almost sassy insisting it was correct. Eventually it gave me a closer answer using json and jq after I prodded it.

I had a similar experience asking it to write an API client. It wrote something very plausible but just concocted an endpoint that looked real but didn't exist.

Re: Testing GPT 4's code-writing capabilities with some real world problems

#598

Earlier quoted context omitted.

While I think there's truth to what you say, I'd also point our that workers in many pre-automated industries with an "artisan" approach also considered themselves irreplaceable because they figured, correctly, that nobody could build a machine with the capability of reproducing their workflow, with all its inherent uncertainty, flexibility and diverse physical and mental skills. What they failed to predict was that…

Iteration and integration, the tasks which take most of at least my time as a developer, could fade significantly - or become automated themselves. We won't have understanding of our code, similar to how we don't understand the machine language being generated by our compilers now. We will be using our intuition about GPT to bring into being fully designed and integrated systems with 10 paragraphs at the prompt. Whic…

I don’t understand the high level language to machine language comparison with AI. HLL to machine language is translation. We hardcode things. This literal translates to this thing. Machine language has it own mind (figuratively) and it’s not doing translation. It can put some silly bug by misunderstanding the requirements which may cause a billion dollar software meltdown. And who is going to be responsible for that?

The more black box programming becomes the more dumb human programmer gets. There will be stagnation. There won’t be any new “design patterns”.

Re: Testing GPT 4's code-writing capabilities with some real world problems

#599

Earlier quoted context omitted.

For me, its mostly that I have used GPT-3.5 a little for programming C++, and I wasnt impressed. For one, it made horrible, glaring mistakes (like defining extern functions which dont exist, using functions which are specific to a platform im not using, etc.), stuff beginners would do. It also decided to sneak in little issues, such as off-by-one errors (calling write() with a buffer and a size that is off by one in…

My thoughts exactly. There are so many non-CRUD complex disciplines involving programming such as signal processing, robotics, control theory, scientific computation to name a few, the current version, at least, of GPT is not even close to being a good supplement, let alone a substitute. But then I remember I'm on HN where the technical pinnacle of programming is Backend and DevOps.

Yup. It kept suggesting me properties in flyway (Java lib) which doesn’t exist. It actually threw me of the track and I made a mental note of programming without GPT.

Re: Testing GPT 4's code-writing capabilities with some real world problems

#600

Earlier quoted context omitted.

This is perhaps one of the most impressive responses I've read. It truly seems like there is some reasoning happening. I don't understand how this can be the output of a generative LLM.

> It truly seems like there is some reasoning happening. I don't understand how this can be the output of a generative LLM Right - this seeming "cognition" is exactly what's so spooky about the whole thing. Here's what spooked me out from yesterday: https://news.ycombinator.com/item?id=35167685 - specifically how it determines the divide-by-zero error in this code: https://whatdoesthiscodedo.com/g/6a8f359 ...which de…

In the same vein, I was playing around with its ability to annotate code with explanations of the changing constraints on different variables (I thought this was a good proxy for deeper understanding of code).

I asked it to write a moderately complex algorithm, and it chose to write a function to compute the Pollard's Rho algorithm.

Then, with a few example comments to show what I meant, I asked it to annotate the code to show how the constraints on the variable changed as each line was executed.

This was its output:

  # n : an integer n > 3, no upper limit
  # seed : an optional integer parameter (default = 1) for the polynomial function
  # pollards_rho(n, seed) : an integer or nil, representing a non-trivial factor of n, or nil if the algorithm fails to find a factor

  def pollards_rho(n, seed = 1)
  return n if n 
end

This is not actually the most impressive thing I've seen it do, but it illustrates that, even if GPT doesn't "really understand" code, it can emulate understanding to an impressive level. I'd go further and say that it opens up new questions as to what understanding actually means.

One personal "woah" moment was asking it to write some unit tests for a simple 2d game GPT and I wrote together. One function, "create_area" took a 2d array of characters (representing a map) and four integers representing coordinates, and a tile type. (The purpose being to create a rectangular area of the desired tile on the map according to the passed coordinates.)

GPT-4 successfully figured out how to write a unit test: it created a 5x5 array of ROCK tiles, passed it to create_area with the coordinates 1, 1 and 3, 3, and successfully figured out what the output should look like, even writing a fairly concise test to check the output (modified) 5x5 array. This was an eyebrow-raising moment for me: it made clear that GPT really does emulate some kind of "computation" internally, though quite possibly in some abstracted form. The geometric nature of this problem stuck out to me: a human can "see" a 2d array as a rectangular grid, and might realise the function carved out a smaller rectangle from that grid, but I never expected to see a computer (let alone a language model) figure it out. Interesting times, indeed.

Post reply on HN