Script to Detect Slow USB-C Cables
Kaushik Gopal (via Hacker News):
You have a drawer full of USB cables. Half are junk that barely charge your phone. The other half transfer data at full speed. But which is which?
[…]
The script parses macOS’s
system_profiler SPUSBHostDataType
command, which produces a dense, hard-to-scan raw output[…][…]
The first version was a bash script I cobbled together with AI. It worked, but was a mess to maintain. Because I let AI take the wheel, even minor tweaks like changing output colors were difficult.
But then he asked Claude to rewrite it to be easier to maintain.
That’s the real story. Not the script, but how AI changes the calculus of what’s worth our time.
Previously:
- Vibe Coding
- USB-C Cables Comparison
- Avoid Overspending for iPhone 15 USB-C Cables and Chargers
- USB Simplifies Branding But Reintroduces Active Cables
- USBefuddled
- How Many Kinds of USB-C to USB-C Cables Are There?