The line connected to everything except the thing I wanted
How the connection system in Sketrix came about: out of frustration with someone else's tool, through hundreds of edge cases, to the point where the tool for drawing wires became pointless.
What it does → Schematic editorBefore Sketrix existed, I tried drawing my schematics in a free program. No cost, runs on the Mac, sounded good enough.
I never got comfortable with it. That wasn’t the program’s fault, plenty of people work with it happily. It was that I had years of industrial design work in my fingers. There you don’t draw a wire, you place a symbol and the connection is there. Here I had to stop and think about how to make each single connection happen. At some point I closed the window.
That stayed in the back of my head when I started building Sketrix. If I’m building my own thing, connecting has to be passive. You draw the schematic the way you think, and the software makes the connection without being asked.
Looking the same is not working the same
Visually the result is what you get in the big packages. Two symbols, a line between them. The difference is in who draws the line.
Every symbol in Sketrix has connection points, and each one faces a direction. When two of them look at each other, same axis, opposite directions, they connect. Drop a corner onto an existing wire and the wire splits there, with both halves still hanging together. And before you even click, a dashed preview shows you what is about to happen.
That’s three rules. Written down they fit in three sentences. While I was building it I had no idea what I was doing, and everything that happens between those three rules is what taught me.
Hundreds of edge cases, and every one of them fought back
I didn’t know what an edge case was back then. I learned by walking into every single one.
Symbols crossed each other out. Wires stuck to places I had already fixed three times. Twenty symbols in a row connected however they felt like, not how I wanted them to. That damn line connected to everything nearby except the thing I actually wanted to connect. Every fix produced two new problems.
That was the point where I seriously considered dropping the whole thing.
Instead I spent two weeks rebuilding, without a single new feature. No visible progress, just foundation. After that it started working.
Small steps, over months
The actual build happened before the first commit Sketrix has. When I put the project under version control, the first entry says “MVP, 95 percent” and connecting already worked. What came after is still the larger part of the work.
February brought junction dots on T-pieces, following the standard’s model. The file holding the connection logic got split twice because it grew too big. April brought things I would never have thought of: that a vertical connection point blocks a connection it has nothing to do with. That a T-piece prevents a crossing sitting next to it.
Today there are 23 files and around 7,200 lines for connecting alone. Of the 3,074 commits in the project, every seventeenth one touches wires. And there are eight test files holding 141 tests that do nothing but check whether the right things connect.
The moment I knew it would hold was a different one. In March I removed the “add wire” tool from the interface Sketrix exposes to AI. The thing worked perfectly well, it just had nothing left to do. Place the symbols and you get the wires with them.
And now
I built all of this with no system, no plan, no idea what I was doing. Today I would put the same thing up in a fraction of the time, because I have the structures and I know where it hurts.
Right now I’m smoothing it out. Connecting works, but there are leftovers hanging off it from back when I didn’t know better. You can see a few of them. Most you can’t.
The bug with the sticky wires sat in there on purpose for a long time. While I was working on something else entirely, it showed me which elements hang together and how. This rebuild is where it finally goes out. It lasted longer than planned.
Martin