Chapter 9. Filling in the Gaps with the Adapter

Like most people who like to tinker with electronics, I have a box in my basement that is overflowing with little electronic gizmos. Near the top of the box is always my trusty USB-to-PS2 converter that lets me plug my new USB keyboard into that battered old Pentium 250 that I keep around for some reason. A little deeper is a layer of serial-to-parallel converters. The bottom strata of my box consist of all those little black power supply things.

All of these gadgets have one thing in common: They let me connect two devices that really want to talk to each other but can’t, because the pins do not line up or the sockets are the wrong size or the voltage coming from one is more than enough to send ...

Get Design Patterns in Ruby now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.