Sunday, October 12, 2025

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:

Comments RSS · Twitter · Mastodon

Leave a Comment