Live data from Hacker News

Claude wrote a functional NES emulator using my engine's API

carimbo.games

61–70 of 95 posts

Re: Claude wrote a functional NES emulator using my engine's API

#61

Earlier quoted context omitted.

Claude Opus 4.5 will routinely test its own code before handing it off to you, even with zero instruction to do so.

One commercial equivalent to the project I work on, called ProTools (a DAW), has a test "harness" that took 6 people more than a year to write and takes more than a week to execute. Last month, I made a minor change to our own code and verified that it worked (it did!). Earlier this week, I was notified of an entirely different workflow that had been broken by the change I had made. The only sort of automated testing…

> access to a testing system that allows it to inject mouse events into a running instance of our application

FWIW that's precisely what https://pptr.dev is all about. To your broader point though designing a good harness itself remains very challenging and requires to actually understand what value for user, software architecture (to e.g. bypass user interaction and test the API first), etc.

Re: Claude wrote a functional NES emulator using my engine's API

#63
post #51

Earlier quoted context omitted.

Or maybe clone the comments from where it cloned the source.

Meh. No human has written the horrors llm produces. At least I am yet to see codebase like that. Let me attempt a theatrical reenactment: // Use buffer that is large enough to hold any possible value. Avoid using JSON configuration, this optimizes codebase and prevents possible security exploits! size_t len = 32; // this function does not call "sort" utility using shell anymore, but instead uses optimized library fun…

I'm guessing "it" is Gemini here? Claude rarely adds comments at that level.

Re: Claude wrote a functional NES emulator using my engine's API

#64
post #58
post #23

Earlier quoted context omitted.

If you let it, Claude Code will write a comment for almost every single line of code.

Even if you try to get them to not, they will still overcomment the code. Or at least overcomment it from the perspective of a human. From the perspective of the LLM, I suspect the comments are necessary for it to be able to get the code output correct.

It's also a discoverability tool. If the code has good docstrings and decent naming for functions/variables it's a lot easier for the LLM to find the correct places to edit.

Re: Claude wrote a functional NES emulator using my engine's API

#65

Earlier quoted context omitted.

That's not how software development works. Folks think, they write code, they do their own localized evaluation and testing, then they commit and then the rest of the (down|up)stream process begins. LLM's skip over the "actually verify that the code I just wrote does what I intended it to" step. Granted, most humans don't do this step as thoroughly and carefully as would be desirable (sometimes through laziness, some…

> LLM's skip over the "actually verify that the code I just wrote does what I intended it to" step. I'm not sure where this idea comes from. Just instruct it to write and run unit tests and document as it goes. All of the ones I've used will happily do so. You still have to verify that the unit tests are valid, but that's still far less work than skipping them or writing the code/tests yourself.

I disagree it's less work. It just carte blanche rewrites tests. I've seen it rewrite and rewrite tests to the point of undermining the original test intention. So now instead of intentionally writing code and a new unit test, I need to intentionally go and review EVERY unit test it touched. Every. Time.

It also doesn't necessarily rewrite documentation as implementation changes. I've seen documentation code rot happen within the same coding session.

Re: Claude wrote a functional NES emulator using my engine's API

#66
post #15
post #3

It’s a shame that the source code isn’t commented and documented more. At the very least, I would see it being helpful to add some documentation for every CPU op code being emulated.

Forbidding LLM to write comments and docstrings (preferrably enforced by build and commit hook) is one of the best "hacks" for using that thing. LLM cannot help itself but emit poisonous comments.

And since it's vibe coded, no one knows what the opcodes are. LLM won't remember. Human has no comments. Human can't trust post-hoc LLM-generated comments because they're poisonous.

Re: Claude wrote a functional NES emulator using my engine's API

#67
post #14

Who care what it did. What did you learn? To live is to learn.

When I consider the utility of a hammer, my first priority is to ask what the hammer can teach me.

You ask what you learned building the house. The hammer hits the nails.

Re: Claude wrote a functional NES emulator using my engine's API

#68
post #20

Earlier quoted context omitted.

There are NES emulators aplenty, the only value in writing a new one is pedagogic, for the writer. This endeavor had negative net value.

It demonstrated the capabilities of an AI to a potentially on-the-fence audience while giving the author experience using the new tools/environment. That's solid value. I also just find it really cool to see that an AI did this.

Yeah, it shows the AI is not capable of writing maintainable projects. I'm off the fence. And its cool you find it cool, but reducing the problem space to that of a toy project makes it so much less impressive as to be trivially ignorable.

The new LLM (pattern recognizer/matcher) is not a good tool

Re: Claude wrote a functional NES emulator using my engine's API

#69
post #15

Earlier quoted context omitted.

Forbidding LLM to write comments and docstrings (preferrably enforced by build and commit hook) is one of the best "hacks" for using that thing. LLM cannot help itself but emit poisonous comments.

Or maybe clone the comments from where it cloned the source.

I used to worry that using LLMs to code would let them use my code and train on my hard work. Then I realised how bad my code is, so I'm probably singlehandedly holding off an agi catastrophe.
Post reply on HN