Probably best to leave YandereDev's code out of the training data.
- 21 lines of Go
- no 3rd party dependencies
https://github.com/smol-env/smoleasier to add and customize stuff when you start from a small base
think of it as your starter dough
all with the same zero 3rd party dependencies approach
also want to do clojure, unfortunately it looks like java does not come with json support out of the box
Clojure has clojure.data.json (https://clojure.github.io/data.json/), should be easy to use albeit not blazing fast exactly, doesn't really matter here though. Otherwise, you could use Babashka, comes with Cheshire (and others) out of the box.
I like the babashka angle!
but the runtimes are everywhere
and a smol agent /w no 3rd party dependencies is probably a good option to have in a pinch
It's not a technical problem, if you steer the LLMs enough and actually review what they do, you can build proper and clean software with them.
It's an offline coding grader. It works well: You ask for a new module, LLM starts spitting out bloated crap, the code score goes down. LLM keep looping until code score is back up.
Not a substitute for human code review, but keeps things within tight guard rails.
I wonder if it just ends up in reward-hacking, or if it actually substantially changes the quality of the code.
Are these static analysis metrics enough on their own to cause a substantial improvement?
I tried setting some constraints as part of my system instruction prompt to prevent God file creation, and it did end up breaking files up, but it would often just create a new type of mess and do it needlessly.
Without the model doing additional reasoning and search for alternative approaches that were better fitted on top as it was doing this file splitting, it didn't actually seem to improve quality at all.
So I'm curious to know if this would just result in more of that, or if it would actually result in different choices. Because there's more to code maintenance than just splitting things up into modules, etc. Like the main part of it that I suspect will not be captured is the part of thinking about the big picture, brainstorming multiple architectural approaches, and reasoning through the best one.
I notice the LLM reasoning things like: "The maintainability score went down, let me look.... I see I've duplicated existing code which already exists in this module...I see this logic could be consolidated".
I have noticed file splitting is a strategy to improve the "score".
In my experience, I've been doing more the architectural guidance. There is also a rules engine which I have not used, but looks pretty interesting:
``` [constraints] max_cycles = 0 max_coupling = "B" max_cc = 25 no_god_files = true
[[layers]] name = "core" paths = ["src/core/"] order = 0
[[layers]] name = "app" paths = ["src/app/"] order = 2
[[boundaries]] from = "src/app/" to = "src/core/internal/" reason = "App must not depend on core internals" ```
Pft. Over multiple cases?
I've seen 1000 lines inside a single if-block. The clause was always true. I was not able to break that thing up in my time at that company.
Human wrote that nonsense.
Thing is, the app was pretty successful despite all the stuff wrong with the code. And this success is why I've been bullish on GenAI code itself, even though I'm also bearish on AI companies being able to profit from that.
It has lots of utility. Very broad… but not the best for a lot of things. It will be a ubiquitous tool. Outcomes will depend heavily on the quality of the mechanic unless you’re tightening a bolt on your fence gate.
I guess it depends on the model you're trying to use, but seems most of them prefer smaller codebases, they work a lot better with less code, which kind of makes sense. With that in mind, I'd probably aim for something way smaller to bootstrap a self-improving agent. Then I'd use this "Prime Agent" as an example to my self-improving agent for what it should not evolve to.