Live data from Hacker News

A macOS terminal command that tells you if your USB-C cable is bad

kau.sh

91–100 of 197 posts

Re: A macOS terminal command that tells you if your USB-C cable is bad

#92

Earlier quoted context omitted.

internally uses the same root command btw. in fact this recently changed for Tahoe (as the article mentions). started out as a shell script but switched to a go binary (which is what is linked).

I hope this doesn't become a trend. Moving it to go means you need to compile it before you run it, or blindly run an uninspected binary from some random guy It's not like the performance of this could have motivated it

I'll take the minimal hassle of having to compile a go program over a complex shell script that only the author understands (if that) any day.

Performance isn't everything; readability and maintainability matter too.

Re: A macOS terminal command that tells you if your USB-C cable is bad

#93

This is a vibe coding Trojan horse article. > That’s the real story. Not the script, but how AI changes the calculus of what’s worth our time. Looking at the github source code, I can instantly tell. It's also full of gotchas.

I'm not a go developer and this kind of thing is far from my area of expertise. Do you mind giving some examples?

As far as I can tell skimming the code, and as I said, without knowledge of Go or the domain, the "shape" of the code isn't bad. If I got any vibes (:))from it, it was lack of error handling and over reliance on exactly matching strings. Generally speaking, it looks quite fragile.

FWIW I don't think the conclusion is wrong. With limited knowledge he managed to build a useful program for himself to solve a problem he had. Without AI tools that wouldn't have happened.

Re: A macOS terminal command that tells you if your USB-C cable is bad

#94

I was looking for a USB cable tester (where I would plug in both ends of my cable and it would test it (power, data, ...). There are plenty for Ethernet, but none such ones for USB. Was I looking with the wrong keywords or such device does not exist? Note: I have a dongle that measures the power when inserted between the laptop and the charger, this is not what I am looking for

The reason is probably that anything faster than USB 2.0 (480 Mbit/s) and supporting power over 3A/60V will need to have an active marker, and to read that, you'll need something slightly more complex than a connection tester.

That said, these things do seem to exist at this point, as sibling comments have pointed out.

As an aside, it's a real shame devices with USB-C ports don't offer this out of the box. They need to be able to read the marker anyway for regular operation!

Re: A macOS terminal command that tells you if your USB-C cable is bad

#95

This is a vibe coding Trojan horse article. > That’s the real story. Not the script, but how AI changes the calculus of what’s worth our time. Looking at the github source code, I can instantly tell. It's also full of gotchas.

Ugh. I appreciate the tool and I suppose I can appreciate AI for making the barrier to entry for writing such a tool lower. I just don't like AI, and I will continue with my current software development practices and standards for production-grade code - code coverage, linting, manual code reviews, things like that.

At the same time though I'm at a point in my career where I'm cynical and thinking it really doesn't matter because whatever I build today will be gone in 5-10 years anyway (front-end mainly).

Re: A macOS terminal command that tells you if your USB-C cable is bad

#97
post #38

Imagine if we printed the capabilities on the cables, like we used to.

Capabilities are printed on the side of ethernet cables and the text printed on the cable rarely seems related to the actual capabilities of the ethernet plug. Some cat5e cables are rated for 1000mbps but will happily run 5000mbps or 2500mbps (because those standards came after the text on the cable was last updated), other "cat6" cables are scams and struggle achieving gigabit speeds without packet loss. Plus, it do…

USB cables push the boundaries of signal integrity hard enough that unless it's a 1 foot passive cable you're not really going to get any surprise speed boosts.

And when they upped the max voltage they didn't do it for preexisting cables, no matter what the design was.

> those features depend on compatibility from both sides of the plug

That's easy to understand. Cable supports (or doesn't support) device, it can't give new abilities to the device. It doesn't make labeling less valuable.

Re: A macOS terminal command that tells you if your USB-C cable is bad

#98
post #38

Imagine if we printed the capabilities on the cables, like we used to.

That would only confuse potential buyers. You have to design everyday products for non-technical people.

How could a max speed rating possibly be worse than a blank plug end?

Re: A macOS terminal command that tells you if your USB-C cable is bad

#99
post #5

It's more complicated than "this cable is good/bad". I had a suspicion about one of my cables for months, but just last week I confirmed it with a device that shows the volts/amps/watts/total kwh passing through it: I have a USB-C cable with orientation. Plugged in one way it transfers about 5x more power than the other way, and in the lower orientation it's low enough for the earbud case I use it with to not charge.

The audio community love this sort of thing and will pay top dollar for unidirectional cables. Reproducible data proving the claims could be worth millions.

Re: A macOS terminal command that tells you if your USB-C cable is bad

#100

Earlier quoted context omitted.

if the author knows what they're doing and understand the model of the code at least, i don't understand the reason mentioning that it was vibe coded. maybe declaring something is vibe coded removes part of the responsibility nowadays?

Someone once told me that their mistake wasn’t theirs, but rather it was ChatGPT being wrong. I think you have a good point about why people say it was vibe coded. It might also be because they want to join the trend -- without mentioning vibe coding, I don't think this tool would ever reach #1 on Hacker News.

HN guidelines say one shouldn't question whether another commenter has read TFA, so I won't do that. But TFA explains exactly why it was vibe coded, and exactly why they're mentioning that it was vibe coded, which is that that was the central point of TFA.
Post reply on HN