Live data from Hacker News

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

kau.sh

111–120 of 197 posts

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

#111
No, I don't get it. Firstly, the normal system command output is not hard to read, but secondly, this output doesn't list any of the capabilities of the cables, just the devices at the ends of them. Perhaps showing an example of the output when the device is plugged in through the wrong cable would have helped. Does the tool produce a similar warning to the system popup, that is "this cable and device are mismatched"?

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

#112

Two years ago, I wouldn’t have bothered with the rewrite, let alone creating the script in the first place. The friction was too high. Now, small utility scripts like this are almost free to build. This aligns with the hypothesis that we should see and lots lots of "personalized" or single purpose software if vibe coding works. This particular project is one example. Are there a ton more out there?

Are people not vibe coding lots of tiny things? I certainly am.

Last weekend I had a free hour and built two things while sat in a cafe:

- https://yourpolice.events, that creates a nice automated ICS feed for upcoming events from your local policing team.

- https://github.com/AndreasThinks/obsidian-timed-posts, an Obsidian plugin for "timed posts" (finish it in X minutes or it auto-deletes itself)

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

#113

Earlier quoted context omitted.

yeah sorry about that. I don't have access to a Linux/Windows machine. if I got a hold of the output and commands run, would gladly modify it.

fwiw, it would take 10 minutes to download a linux docker image and build it in go to test. The harder part is getting the information from a different API on Linux.

A Linux Docker image, probably doesn’t have any USB devices exposed to it-well, it depends on exactly how you run it, but e.g. if you use Docker Desktop for Mac, its embedded Linux VM doesn’t have any USB passthrough support. This is the kind of thing where a physical Linux host (laptop/desktop/NUC/RPi/etc) is much more straightforward than running Linux in a VM (or as a K8S pod in a datacenter somewhere)

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

#114
> Two years ago, I wouldn’t have bothered with the rewrite, let alone creating the script in the first place. The friction was too high. Now, small utility scripts like this are almost free to build.

adding to the theory that soon we gonna prefer to write, rather download ready-made code, because the friction is super low

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

#115

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 c…

> Generally speaking, it looks quite fragile

I have a usb to sata plugged in and it's labeled as [Problem].

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

#116

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

I have been planning to get either Witrn K2 or Power-Z KM003C. If just cable testing is enough, the Treedix one is probably good.

Related: If you are looking for cables, this guy has tested a bunch (mainly for charging capabilities) https://www.allthingsoneplace.com/usb-cables-1

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

#117
post #92

Earlier quoted context omitted.

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.

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

Is that case for this vibe-coded thing? https://news.ycombinator.com/item?id=45513562

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

#118

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.

The author literally says this is vibe-coded. You even quoted it. How the hell is this "Trojan horse"? Did the Greeks have a warning sign saying "soldiers inside" on their wooden horse?

Because it’s not in the title, and I personally prefer up-front warnings when generative “AI” is used in any context, whether it’s image slop or code slop

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

#119

i don't understand why do competent people need to mention that they vibe coded something.

For the same reason competent people need to mention that X utility was (re)written in Rust.

I would guess the reason there is opposite. Like code that even newcomer can safely edit.

But in general you are right. The article was for developers so mentioning the tool/language/etc. is relevant.

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

#120

> Go also has the unique ability to compile a cross-platform binary, which I can run on any machine. Huh? Is this true? I know Go makes cross-compiling trivial - I've tried it in the past, it's totally painless - but is it also able to make a "cross platform binary" (singular)? How would that work? Some kind of magic bytes combined with a wrapper file with binaries for multiple architectures?

Not what OP meant, but there's a project doing what you ask for: https://justine.lol/cosmopolitan/. It's quite interesting. :)
Post reply on HN