Live data from Hacker News

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

kau.sh

101–110 of 197 posts

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

#101

Earlier quoted context omitted.

I wouldn’t be surprised if it’s actually a plus in the eyes of possible new employers these days.

vibe coding in my understanding is losing/confusing the mental model of your codebase, you don't know what is what and what is where. i haven't found a term to define "competently coding with ai as the interface".

I agree. But management types bedazzled by AI probably see these kids as the future leaders of our profession.

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

#102

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

is it worth it for everything? if you need a bash script that takes some input and produces some output. Does it matter if it's from an AI? It has to get through code review, the person who made it has to read through it before code review so they don't look like an ass.

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

#103

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

What do you mean "testing" it, reading hardcoded data from e-marker chip, or really test it?

The later would require multi-thousands dollar machine.

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

#104

Earlier quoted context omitted.

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

is it worth it for everything? if you need a bash script that takes some input and produces some output. Does it matter if it's from an AI? It has to get through code review, the person who made it has to read through it before code review so they don't look like an ass.

yeah recently I needed a script to ingest individual json files into an sqlite db. I could have spent half the day writing, or asked an AI to write it and spend 10 minutes checking the data in the DB is correct.

There are plenty of non critical aspects that can be drastically accelerated, but also plenty of places where I know I don't want to use today's models to do the work.

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

#105
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.

well, if you listen to audio you would not want the audio to accidentally get confused and head back to where it came from halfway down the cable right?

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

#106
post #38

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

We used to what ? Back in the day there are countless cables with no printing. Sometime the only way to know if they are 3.0 or not if checking if they have blue connector.

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

#107
> 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?

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

#108

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?

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

#109

Vibe coding. Producing code without considering how we should approach the problem. Without thinking where exactly is the problem. This is like Electron, all over again. Of 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.

And why should they care what's going on ?

Do you care about your binary code inside your application, or what exactly happen, in silicon level, when you write "printf("Hello World")" ?

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

#110

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…

There's a lot about it that isn't great. It treats Go like a scripting language, it's got no structure (1000+ lines in a single file), nothing is documented, the models are flat, no methods, it hard codes lots of strings, even the flags are string comparisons instead of using the proper tool, regex compiles and use inlined, limited device support based on some pre-configured, hard-coded strings, some assumptions made on storage device speeds based on its device name: nvme=fast, hdd=slow, etc.

On the whole, it might work for now, but it'll need recompiling for new devices, and is a mess to maintain if any of the structure of the data changes.

If a junior in my team asked me to review this, they'd be starting again; if anyone above junior PRd it, they'd be fired.

Post reply on HN