· entry 7 of A software factory builds a media server

Four resets, two days, 37,000 lines of code

So far: 235 messages from me · about 20 h of my time · 1,253 agent-hours · about 161 € · 53,000 SLOC*

Nine days ago this media server was a plan. Tonight it is 53,000 lines of code, and more than 2,400 automated tests pass on Linux and on a Mac. 37,000 of those lines came in the last two days, when I gave the factory four saved OpenAI resets.

How much is 53,000 lines? A figure often quoted in the industry is 10 to 50 finished lines a day per developer. At the top of that range this is about five years of one senior engineer. Call it one year to be careful, and it is still a year of work, landed and tested, in nine days. It cost about 161 € of AI subscriptions and 20 hours of my time. I find that amazing.

Lines are a crude measure, and nobody reads this code. The tests are what make it count.

What has landed

  • Video playback. HAP, HAP Alpha and HAP Q, with our own decoder, checked pixel by pixel against a reference and run on real graphics cards on Linux, Mac and Windows.
  • Projection mapping. A 3D model, each projector fitted to it by matching points, and the picture warped onto it. The core is in the server. The tool I tried it with on a real job yesterday is still a prototype.
  • Video walls. One very wide file played across many servers, each reading only its own slice.
  • Show control. OSC, Art-Net, sACN, MIDI and timecode, mapped to show commands, and a calendar for scheduled shows.
  • Game engines. Godot scenes driven from the timeline and cues, their pictures in the server’s output, and the last frame held if the engine stalls.
  • Windows. It builds, passes its tests and plays the test show.
  • Output checks. A rig captures the server’s own outputs over HDMI and compares them with what was sent, bit for bit.
  • Running unattended. The first parts, a system service, monitoring and storage for a site.

The mapping workbench on Linux. A 3D model of a building on a dark stage, with glowing mapping content on its walls, windows and columns, and the outline of the left projector's beam reaching it from the lower left.

The mapping workbench running on Linux, with a building and content the factory made for testing.

Next, it gets eyes

The factory can already see its own pictures. It has never seen them on a wall.

That is the next step. Warping and blending fit several projectors onto one surface so that the seams disappear. Today it is slow, careful work, usually done by eye, one point at a time. I want the factory to do it with a camera. It already checks every pixel it sends out. With a camera on the wall it can check light on a real surface the same way, and keep adjusting until the seams are gone.

It started on a simulated wall today. The real wall needs projectors, two at least, as soon as I can get them.

That was the sprint. The resets are spent, and the factory is back on leftovers. Unless I start paying for more, it slows to a walk, and so does this log. The next entry comes when something new works.

Nine days ago this was a plan. Now it needs a wall, a camera and a budget.

* SLOC: source lines of code. The server’s own code only; tests, comments and blank lines are not counted.