2 ms·
I wirewrapped electronics boards to pay my way through college. I would also lay out the chips on the board. I discovered that if I laid out the chips in certai
by WalterBright 4y ago
I wirewrapped electronics boards to pay my way through college. I would also lay out the chips on the board. I discovered that if I laid out the chips in certain patterns, the wires would also form certain patterns.
That way, I could easily tell if the wiring was off (the posts are .1" apart, and it is easy to get off by one).
With these patterns, I rarely had the board go to smoke testing with a wirewrap error in it. This made me popular with people who needed a board done.
I did this also with boards to be soldered. All the resistors were lined up the same way, the diodes all pointed the same way, the chips had the #1 pin in the same place, etc. It all made for patterns that made checking easy.
I once was talking to a tech at a high end audio store. He said you could tell the high end boards because the resistors all pointed the same way. Same thing. A constructor contractor told me a proxy for quality work is the screw slots were all at the same angle.
I use the same technique with software. I try to lay out the code so it forms a visual pattern, this makes it easy to check for errors. It's also why I don't use source code formatters, as they disrupt the patterns.
- galaxyLogic 4y agoIn source-code formatting vertical alignment is well-known pattern. Is there something else you're thinking of?
- KMag 4y agoIn my experience, when an auto-formatter re-wraps a line that gets a char or two too wide for your coding standard, it generally does an aesthetically poor job of it.
- makapuf 4y agoI just like when gofmt aligns items before and after the equal sign, and comments in a struct. It may sound frivolous, but it sparks joy and that's not to overlook !
- contingencies 4y agoInteresting comment. Note the resistor-same-way thing is mostly no longer applicable (due to the plethora of SMD components and their placement by machine). It remains useful for through-hole components such as large capacitors, however.
- WalterBright 4y agoAn example: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cparse.d#L2217 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cp...
- fuzzfactor 4y agoThat is beautifully done. I don't have to know the language to see that your code is built in a very orderly fashion and the components are intended to interact in a carefully-defined way. Not unlike a well-engineered circuit board.