Readit News logoReadit News
hebejebelus · 3 months ago
OP, don't read this as a direct criticism of you.

I think the age of AI has really cheapened work like this. It's clear this library was vibe-coded; it's clear enough that the python version of the library originally posted yesterday was vibe-coded; I didn't look at the original library but it would shock me not at all that it was vibe-coded. Often just one or two commits and a functional library, emoji all over the readme, "Clean and easy-to-use API", etc.

In many ways this is pretty amazing. Only a few years ago it would have been a huge pain in the ass to come across some valuable library only for it to be locked in some language I didn't understand or wasn't working in at that moment. But in other ways, maybe it feels a bit "cheap" now to do `claude -p "port this library to $LANG, make sure it works, do a good job" and I'm not sure there's a ton of... accomplishment? craft? care? in it.

moshib · 3 months ago
At my $CORP job, I often see engineers enamored with creating new things. I completely understand the appeal -- it's fun to create something new, without preexisting constraints, with full ownership of the codebase.

However, the real challenge is what happens _later_, when the thing is done. Most people don't really think about maintenance, and move on to other things, making the thing they worked on stale and stagnant.

I think this applies here too: Vibe coding lets us create new _things_ quite easily, but we see value in places other than the sheer the existence of the project. We care about how the project is maintained, if it has a userbase, contributors, longevity. I think this is also part of why it feels so "cheap" and not genuine.

hebejebelus · 3 months ago
Yes, indeed. I think that's why I haven't published much code in the last years since I vibe-code everything I build now and I have essentially no intention to maintain it once it's 'working'
teiferer · 3 months ago
As an "AI" skeptic, let me ask an out-of-character question: Could such maintenance be automated or at least heavily simplified with coding agents? Looking over whether something breaks when gcc is upgraded, automatically updating if needed, updating best practices, automatically reproducing reported issues and proposing fixes ... too much of a dream?
tobyhinloopen · 3 months ago
AI also loves to explain what code does with stuff like this:

    // Check if sensor is available
    if (sensor.isAvailable()) {
      // Read current angle
      double angle = sensor.readAngle();
Which, to me, is a clear indicator of the author (being AI, I hope) not caring about code readability.

Aurelius108 · 3 months ago
Unfortunately staff engineers at my company will demand annoying comments like this so I don't think it's necessarily a sign of vibe coding
hackingonempty · 3 months ago
What if a human wrote all of the comments in the function first then wrote the code? Should they then delete the comments?
bapak · 3 months ago
I need to create an AI agent that comments on any PR when it finds useless comments
walthamstow · 3 months ago
I'm fighting this shit so hard at work every day, every PR review. The LLM writes comments like someone who can't read code is going to read it.
ofrzeta · 3 months ago
Yeah, it's typical for LLMs. A comment anti-pattern. I wonder if LLM explainability can deliver and answer on "why" they are doing it.
aa-jv · 3 months ago
I think its easy to criticise vibe-coded work, if you're into programming for the sake of programming.

But if you're into programming for the sake of the user, none of this matters.

For me, I appreciate the clean, complete documentation and code generated for use in this project - I see nothing wrong with it, its useful and functional, and I can easily integrate this library into an app I'm building to get the screen angle. From this perspective, for the sake of the user/developer, I'd say things were definitely improved over Plain Ol' Human Code™ ...

hebejebelus · 3 months ago
Ha, I'm not into programming for the sake of it. I vibe-code all the time now and don't think I've written a line of code by hand in over a year. I'm really not trying to criticise this library itself and I agree that in many ways it's quite good.

What I think I'm trying to say is that this specific kind of thing now takes everyone the same amount of time to create. It's "cheapened" this specific type of code. I'm not trying to say this particular library is bad or anything, just that converting some small library from one language to another no longer really holds much value, since essentially everyone can do exactly the same thing exactly the same way now, for the same time cost.

numpad0 · 3 months ago
There do seem to be some of young brilliant minds today taking "with AI you can be xxx" too literally, thinking the sole remaining distinction between them and all the rich geniuses in the world is willingness to prompt something. They're not incentivized to fix that skewed perceptions because they have nothing else to reinforce their self esteem and "LLM is AGI" is giving them the crutch they desperately need. They'll be hard to de-program when the time comes...
qq66 · 3 months ago
On the other hand, this library probably wouldn’t exist without vibe coding, and you might never have known that the lid angle is readable.
hebejebelus · 3 months ago
I think that's the thing I'm trying to say. _This_ library might not exist but anyone with an Anthropic account and the knowledge that there is a readable sensor can make it exist just as easily.
numpad0 · 3 months ago
This couldn't have existed until someone else done it manually in Python and posted here on HN. The author likely fed that code to Claude or free tier Gemini.
saagarjha · 3 months ago
Did you see the link to the repo that inspired this?
bapak · 3 months ago
> I'm not sure there's a ton of... accomplishment? craft? care? in it.

Who cares?

What's important is that now I have a useful library. The only complaint I'd give is that it might not be super optimized, but it's open source so you can instruct your agent to take it and optimize it for you :)

hebejebelus · 3 months ago
This is pretty much what I'm trying to get at. Why would you even begin with _this_ library when you also have an agent that can build precisely the thing you want with the abstractions, constraints, etc that you want? What value does _this_ library have, considering that it takes you _exactly_ as much time and effort to build your own?
MangoToupe · 3 months ago
Honest question, why bother publishing the code at all? Wouldn't it make more sense to publish the prompt?
krapp · 3 months ago
I mean, we're supposed to care? We're here on a forum of programmers and technical people ostensibly gathered because we want to satisfy our intellectual and technical curiosity.

Hacker News is already full of people too misanthropic and uncurious to engage with topics beyond the title. Now we don't even care about the art and science of programming. So why bother showing up? This place will be nothing but shitposting bots and self-promotion soon.

madduci · 3 months ago
And the Hungary Notation, typical of Win32 APIs?

Deleted Comment

boxed · 3 months ago
A class for no reason is a bit weird too. This is just not idiomatic C++.
tos1 · 3 months ago
Cool! I'm wondering why is the lid-opening angle a 16 bit value without any scaling? Can MacBooks be opened > 255°? :)

(https://github.com/ufoym/mac-angle/blob/main/angle.cpp#L186)

chippiewill · 3 months ago
It's a low level library, it's probably just the register on the sensor itself is 16bit so that's what gets propagated up to the OS.

The most I can reach on mine is 132deg

GranPC · 3 months ago
Technically yes - might have a bit of a hard time closing it back down tho.

Deleted Comment

mort96 · 3 months ago
The underlying system API is a u16. Do you propose that this library should add logic to clamp the value between 0 and 255? What would be the point in that?
bboygravity · 3 months ago
To save 1 byte in RAM for the 300MB electron app that will load this lib.
beardyw · 3 months ago
Maybe use the lid as a foot pedal in a driving simulator?