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?
A macOS terminal command that tells you if your USB-C cable is bad
31–40 of 197 posts
Re: A macOS terminal command that tells you if your USB-C cable is bad
#32Earlier 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.
Is it really vibe coding if you’re testing it on the target machine? ;)
Re: A macOS terminal command that tells you if your USB-C cable is bad
#33Of course I don't have any problems with the author writing the tool, because everyone should write what the heck they want and how they want it. But seeing it gets popular tells me that people have no idea what's going on.
Re: A macOS terminal command that tells you if your USB-C cable is bad
#34It'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.
Wait what. I thought half the point of usb c was to not rely on orientation. Is there any way to check this other than experiment? My "solution" so far has been to not buy cheap cables and just hope I get quality in return.
Well sure, a standards-compliant cable will work in either orientation, but it's always possible for some but not all of the pins or wires to break.
Re: A macOS terminal command that tells you if your USB-C cable is bad
#35Earlier quoted context omitted.
Wait what. I thought half the point of usb c was to not rely on orientation. Is there any way to check this other than experiment? My "solution" so far has been to not buy cheap cables and just hope I get quality in return.
I think that I have a specific cable-device-orientation that is broken. Meaning, I think a particular USB C cable won't charge my phone if it's plugged in 'backwards'. I always assumed that USB C cables use different pins depending on orientation, and that some pins on the cable wore down. Maybe that's what happened here?
Re: A macOS terminal command that tells you if your USB-C cable is bad
#36> The script parses macOS’s system_profiler SPUSBHostDataType2 command, which produces a dense, hard-to-scan raw output I couldn’t find source (the link in the article points to a GitHub repo of a user’s home directory. I hope for them it doesn’t contain secrets), but on my system, system_profiler -json produces json output. From that text, it doesn’t seem they used that.
Correct. But you didn't see that the source was one level up in the directory tree from the untrustworthy binary blob? * https://github.com/kaushikgopal/dotfiles/blob/master/bin/usb... Presumably there is a sensible way to do this in go by calling an API and getting the original machine-readable data rather than shelling out to run an entire sub-process for a command-line command and parsing its human-readable (even…
No, silly me. Shortly searched for a src directory, but of course, should have searched for a bin directory, as that’s where vibe coding stores sources /s.
Re: A macOS terminal command that tells you if your USB-C cable is bad
#37Cross compiling is not unique to golang. It does make it pretty easy though.
Re: A macOS terminal command that tells you if your USB-C cable is bad
#38Re: A macOS terminal command that tells you if your USB-C cable is bad
#39Imagine if we printed the capabilities on the cables, like we used to.
Re: A macOS terminal command that tells you if your USB-C cable is bad
#40Earlier 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.