Skip to content

Formal coding practices and a self-bootstrapping workflow

So this Christmas break, I've been trying to get a handle on making Claude Sonnet a better, more structured coder. It's been an interesting process. Came up with a few ideas on how to do it, about 60% of them have worked. This is positive.

At the moment, I'm trying to solve a problem with music data mining and research that I think is important. I'm working on building out a single purpose tool called Grimes.

When I'm done, it'll extract data and build a crunchy data model using JSON for every track, holding all of the melody and rhythm related compositional data.

For the data modelling side of things, I'm partially implementing the Crunchy 0.3.4 data modelling specification I wrote last week. This gives me some flexibility, and produces a compositional model that can be used for analysis or AI training.

It'll also output a really basic midi that contains a simple representation of the data that's being rendered. If sound repair is necessary to perform the analysis, it'll do it. It'll generate a series of files, and some basic reporting, along with a project log.

Like its namesake, it does one thing and only one thing, but it does it well.

And the whole thing runs on your GPU (no matter what kind), so it can be used on the million song corpus you just happen to have sitting around. I mean, how relatable is that? Doesn't everybody have literally a million songs sitting on their hard drive? Come on, what else is a 30 tb hard drive good for? I mean really.

Anyway, there are no user friendly tools for performing this kind of large scale data mining and analysis that's specifically designed for pop songs, and pop song derivatives, so I thought I would take the time to build one out.

The engineering process

Using Claude to do it. And like I said, staying organized and keeping the process consistent has been this really interesting puzzle.

To do it, I'm managing current stage by generating a document at the end of the session. To keep Claude's brain from melting at the complexity of it all, I developed a concept called "logic mapping" which covers the base critical details of code written in Go and Python. Go is better tool for this kind of application, because you can't accidentally create unused variables or imports. And if it doesn't work... it doesn't compile.

I did have to come up with a coding standard for Claude to make Go programming more like Python programming, but now that we're there, it's going fairly smoothly.

This entire app was written in a day.
I'm in the final stages of debugging it now.

This is all going to be a lot cleaner here next week when my agent bootstrap strategy comes online.