←back to thread

467 points 0x63_Problems | 1 comments | | HN request time: 0.205s | source
Show context
leptons ◴[] No.42138221[source]
I asked the AI to write me some code to get a list of all the objects in an S3 bucket. It returned some code that worked, it would no doubt be approved by most developers. But on further inspection I noticed that it would cause a bug if the bucket had more than 1000 objects because S3 only delivers 1000 max objects per request, and the API is paged, and the AI had no ability to understand this. So the AI's code would be buggy should the bucket contain more than 1000 objects, which is really, really easy to do with an S3 bucket.
replies(4): >>42138486 #>>42139105 #>>42139285 #>>42139303 #
1. justincormack ◴[] No.42139285[source]
Claude did the simple version by default but I asked it to support more than 1000 and it did it fine