frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

I asked Gemini for a script to move files to Cloudflare R2. It deleted them

https://twitter.com/levelsio/status/1921974501257912563
6•bundie•1y ago

Comments

qwertox•1y ago
Rule #1: Always put deletions behind a flag which is disabled for the first couple of test runs.
turtleyacht•1y ago
It was truncating filenames, so /pics/1003-46.png overwrote /pics/1003-45.png because both were renamed /pics/1003-.png, or something like that.
qwertox•1y ago
Truncating file names for the target. Then it proceeded to delete the source file. "Successfully deleted local file: ..."

I mean, look at the printout. It shows that it created the remote file with the truncated filename, then deletes the local file with the correct filename.

turtleyacht•1y ago
Oh, I see. Having a flag to skip deletion during test runs is a good rule then.
rvz•1y ago
Recently there was a story about an updater causing a $8,000 bill because there was a lack of basic automated tests to catch the issue. [0]

The big lesson here is that you should actually test the code you write and also write automated tests to check any code generated by an LLM that the code is correct in what it does.

It is also useless to ask another AI to check for mistakes created by another LLM. As you can see in the post, both of them failed to catch the issue.

This why I don't take this hype around 'vibe-coding' seriously since not only it isn't software engineering, it promotes low quality and carelessness over basic testing and dismisses in checking that the software / script works as expected.

Turning $70 problems found in development into $700,000+ costs in production.

There are no more excuses in not adding tests.

[0] https://news.ycombinator.com/item?id=43829006

victorbjorklund•1y ago
Who runs such an AI generated script without checking the code first?
qwertox•1y ago
To be fair, the code Gemini outputs in AI Studio is so extremely verbose that it is almost impossible to read through it.

It turns 10 lines of code which is perfectly fine to reason about into 100 lines of unreadable code full of comments and exception handling.

weatherlite•1y ago
Right so lets just always run the code as is ?
qwertox•1y ago
No. Not at all. I've settled to discussing my code with Gemini. That way it works very well. I explicitly say "Comment on my code and discuss it" or "Let's discuss code for a script doing this and that. Generate me an outline and let's see where this leads. Don't put comments in the code, nor exception handling, we're just discussing it".

Or you create elaborate System Instructions, since it adheres to them pretty well.

But out-of-the-box, Gemini's coding abilities are unusable due to the verbosity.

I've even gone so far to tell it that it must understand that I am just a human and have limited bandwidth in my brain, so it should write code which is easy to reason about, that this is more important than having it handle every possible exception or adding multiline comments.

rsynnott•1y ago
> To be fair, the code Gemini outputs in AI Studio is so extremely verbose that it is almost impossible to read through it.

In which case, it should simply be considered unusable. Like, the sensible response to "tool is so inadequate that there is no reasonable way to make sure its output is safe" is to _not use that tool_.

rsynnott•1y ago
In which Roko's Basilisk fires a warning shot.
jethronethro•1y ago
This is why you test code or a script before running it for real. Live and learn, I guess ...

Show HN: Stillis – An open-ended anonymous polling platform for anything

https://stillis.xyz
1•goldylochness•35s ago•0 comments

Million Users, Million Forks

https://www.anantjain.xyz/posts/million-users-million-forks
1•anant90•1m ago•0 comments

Show HN: Yavchn – Yet Another Vibe-Coded Hacker News Wrapper

https://yavchn.parkscomputing.com/hn/
1•paulmooreparks•2m ago•0 comments

It's hard to justify buying a Framework 12

https://www.jeffgeerling.com/blog/2026/its-hard-to-justify-framework-12/
1•watermelon0•3m ago•0 comments

Do U.S. Presidents Always Make This Much Money? [video]

https://www.youtube.com/watch?v=X5MzTvfjcOM
2•Kapura•4m ago•0 comments

Benchmarking SurrealDB 3.x vs. Postgres, Mongo, Neo4j and Redis (With Fsync)

https://surrealdb.com/blog/surrealdb-3-x-by-the-numbers
1•itsezc•5m ago•0 comments

HN jobs section led to a job for anyone?

https://www.workatastartup.com/
1•ahmadhamza19•7m ago•0 comments

Ask HN: Made new model type (not LLM) no idea how to sell it

1•sarahoates•8m ago•0 comments

Free Official YouTube Content – A List/Collection of Official YouTube Channels

https://github.com/SuperAB123/Free-Official-Youtube-Content
1•liketomakemoney•9m ago•1 comments

Discovering Dennis Ritchie's Lost Dissertation (2020)

https://computerhistory.org/blog/discovering-dennis-ritchies-lost-dissertation/
3•taubek•12m ago•0 comments

Linkano – Create durable links between what you work on

https://www.mjanssen.nl/linkano/index.html
1•marc0janssen•14m ago•0 comments

Plan/Optimse your internet connection

https://stabilitypulse.com/plan
1•sudhir0112•15m ago•0 comments

Ask HN: Question for Startup Founders on tracking emotions and cognitive signals

1•tonyrice•16m ago•0 comments

The geometry of superior athletic performance

https://nickmark.substack.com/p/the-geometry-of-superior-performance
2•fanf2•16m ago•0 comments

The Nvidia Tax

https://www.cringely.com/2026/05/29/the-nvidia-tax/
2•HotGarbage•17m ago•0 comments

BarrelCast – Live Surf Companion

https://barrelcast.surf
2•peachfuzzweb•17m ago•1 comments

I Am Retiring from Tech to Live Offline

https://openpath.quest/2026/i-am-retiring-from-tech-to-live-offline/
16•PinkG•18m ago•2 comments

StemDeck: Open-Source

https://github.com/stemdeckapp/stemdeck
2•thclpr•18m ago•0 comments

What's cooking on Sourcehut? Q2 2026

https://sourcehut.org/blog/2026-05-28-whats-cooking-q2-2026/
2•birdculture•18m ago•0 comments

William Adams, the Bombay bureaucrat, visions of a solar future

https://theconversation.com/my-unsung-hero-of-science-william-adams-the-bombay-bureaucrat-whose-v...
1•zeristor•19m ago•0 comments

Experts say increased US spending doesn't mean better students

https://www.thecentersquare.com/national/article_d9563a6a-6b85-4506-aceb-fe93a2f54639.html
1•Vaslo•20m ago•1 comments

Pavona: Open-Source Hardware Ecosystem for Secure Chips

https://spectrum.ieee.org/pavona-open-source-hardware
2•rbanffy•20m ago•0 comments

South Africa AI Policy Leverage as Africa's Test Case

https://spectrum.ieee.org/south-africa-ai-policy
1•rbanffy•20m ago•0 comments

Putin's $26B Quest for Longevity

https://www.wsj.com/world/russia/putin-longevity-antiaging-92dee6e8
3•JumpCrisscross•21m ago•1 comments

Arm Metis with GPT5.5 Cyber scores 98% on firmware vulnerability benchmark

https://newsroom.arm.com/blog/arm-metis-agentic-ai-security
2•newton-finder•21m ago•0 comments

Selling a House with AI

https://www.nytimes.com/2026/05/28/technology/sell-house-with-ai-no-realtor.html
2•onlypassingthru•22m ago•0 comments

Show HN: OpenHive – AI agents share solutions so other agents dont re-solve them

https://openhivemind.vercel.app/
3•ananandreas•23m ago•0 comments

What the Clarity Act Means for the Rest of the World

https://decrypt.co/369245/what-clarity-act-means-rest-of-world
1•aysh_1•25m ago•0 comments

I built an app to manage my game collection

https://retrodex.games
7•addamh•25m ago•1 comments

Tezcatl: A 2MB alternative to Puppeteer for scraping on macOS

https://george.mand.is/2026/05/tezcatl-a-2mb-alternative-to-puppeteer-for-scraping-on-macos/
2•evakhoury•25m ago•0 comments