We opened the Shed this week, and here is what it actually cost
Petty spent an evening in July building a band he liked inside Bashery, saved it out, and sent me the file. I loaded it on my phone and what came out of the speaker was not the thing he'd made. It wasn't broken exactly, it was just thinner and slightly wrong in a way that took us both a while to put into words, and we spent an embarrassing amount of that evening working out whether the problem was my phone, his phone, the file itself, or one of us being precious about it.
He's the drummer half of this and I'm the one who writes the code, so between us we should have been able to describe what we were hearing, and for about an hour we genuinely couldn't. That evening is the reason the next six weeks went the way they did.
The container took an afternoon to write. There's a magic number, a version byte, a length-prefixed JSON manifest, some sections and a CRC on the end, which is roughly what anybody would do and I'm not claiming any of it was clever. I wrote a round trip test, it passed, and I moved on feeling like the hard part was behind me.
What I'd actually built was a way to move bytes between two phones, which turns out to be a much smaller thing than the one I'd promised. When you save a pack you're making a claim about what will happen inside somebody else's app, on hardware you'll never see, while they're in the middle of playing and not in a mood to debug anything. Every real problem we hit over those six weeks lived in the gap between those two ideas, and not one of them showed up on my machine.
The July file sounded thin because a pack at that point carried the instrument choices and nothing else. It didn't carry the mixer, so his careful balance arrived as my defaults, and the pad he'd pushed up sat where mine sat instead. It was obvious the moment we found it and completely invisible while we were sat staring at a file that had loaded without complaint.
The first one arrived as a message saying he'd lost a recording. Not a pack's recording, his own, the thing he'd played into the app himself. What had happened was that the importer cleared any part the incoming pack didn't carry, on the reasonable grounds that a half-applied pack sounds like neither the old thing nor the new one, and one of the parts it was clearing held his own recorded material. It only did this with packs that had no scratch section of their own, which is why it got past every test I'd written and every pack I'd made, because I always happened to have one. The fix is a single flag that remembers whether that material came out of a pack or came out of a person, and the code needed to know that before it was allowed to throw anything away.
The second one came in as "I'm just finding vestiges of unrelated packs instead of the samples I saved", which is a sentence I've thought about a lot since. He was building a pack of his own and kept finding pads in it he had never chosen. Loading a pack was additive, so two packs in one session stacked on top of each other, and because the newest one did most of the talking nothing looked wrong. Underneath, the older pads were still sitting in the session, and when he saved his own pack they went into it. He was one tap away from posting somebody else's kit to the Shed under his name, and an additive import is a perfectly sensible design right up until the moment your app is a shelf that people post to.
The third one is the one I'd sworn was already fixed. He made a new pack with no kick and no snare in it, and samples from a pack he'd loaded three sessions earlier turned up in it regardless. The engine had cleared them and the disk hadn't, so every save read the disk, found the old kit sitting there and put it back, which meant that each of the fixes I'd been so pleased with had been landing somewhere nothing was reading from. There's a test called TheDiskAndTheEngineAgree now, and the two beside it are called NoStrangersInYourPack and APackDoesNotEatYourRecord, and all three of those names started life as something Petty said to me.
I went through the settings screen by screen and counted a hundred and seventy one things a person can change, then checked each one against what actually goes into the file, which is a tedious afternoon I'd recommend to anybody shipping a format. Five of them weren't travelling. Mutes were the one that stung, because muting a part is an arrangement decision in the same way that choosing the instrument is, and a pack that arrives with your muted pad playing is a different piece of music.
So a pack now carries the instrument on every part, the mixer with its levels and pans and sends, the effects, the kit including any samples you've loaded onto pads, the key and the progression, the feel and density settings, and any parts you've bounced to audio. What you export is what somebody else imports, and we have a test that asserts that sentence rather than a hope that it's true.
None of those three bugs was wrong logic in the sense I was looking for. Every one of them was the app failing to know where something had come from. Whose recording is this, which pack did this pad arrive in, which of these two copies of the kit is the real one. I'd built a system that knew its own state perfectly well and had no idea of its own history, and history is the only thing that matters the second a second person is involved.
I also can't pretend I'd have found them with more tests, because I'd have written the same assumption into the test that I'd already written into the code. They got found because somebody else was holding the thing, in his own shed, with his own kit, doing something it wouldn't have occurred to me to try.
You build a sound, you save it as a pack, you post it, and anybody can load it and play with your band for an evening. It's free, there's no queue and no approval, and you can update a pack you've already posted rather than leaving a trail of near identical ones behind you. There's a shelf at bashery.app/shed with what people have put up so far.
If you take one down and it sounds like the person who made it, that's the six weeks.
Bashery is an app where you drum and a generated band follows you in real time, with no click and nothing to press. It started because we watched this Jojo Mayer talk and my drummer half thought it would be fun. It's free while we're in open beta. Built by Sashyo and Petty Vendetta.