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•11mo ago

Comments

qwertox•11mo ago
Rule #1: Always put deletions behind a flag which is disabled for the first couple of test runs.
turtleyacht•11mo 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•11mo 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•11mo ago
Oh, I see. Having a flag to skip deletion during test runs is a good rule then.
rvz•11mo 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•11mo ago
Who runs such an AI generated script without checking the code first?
qwertox•11mo 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•11mo ago
Right so lets just always run the code as is ?
qwertox•11mo 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•11mo 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•11mo ago
In which Roko's Basilisk fires a warning shot.
jethronethro•11mo ago
This is why you test code or a script before running it for real. Live and learn, I guess ...

Profile guided compiler optimization leads to 47% lower p99.9 in Redpanda

https://www.redpanda.com/blog/supercharging-streaming-profile-guided-optimization
1•enether•1m ago•0 comments

Ask HN: When is Q-Day (Quantum Day) and are you ready?

1•roschdal•1m ago•0 comments

The Spreadsheet Was the Constitution

https://atelier.barish.me/projects/answerable-infrastructure/the-spreadsheet-was-the-constitution/
1•barishnamazov•1m ago•0 comments

Gesture's 10 DOF robotic hand [video]

https://www.youtube.com/watch?v=LPbB96fT_uw
1•SpyCoder77•2m ago•0 comments

Musk v. Altman today's live audio [video]

https://www.youtube.com/watch?v=eY7wda6U8sg
2•1vuio0pswjnm7•3m ago•0 comments

Boulton and Watt

https://boultonwatt.com/
1•gurjeet•3m ago•0 comments

Making Stripe 200x Faster

https://www.ramonverse.com/blog/faster-stripe
2•ramonga•5m ago•0 comments

Air pollution is associated with increased migraine activity

https://www.aan.com/PressRoom/Home/PressRelease/5333
1•rustoo•6m ago•0 comments

TomTom's route planner takes an unplanned detour into oblivion

https://www.theregister.com/personal-tech/2026/05/07/tomtoms-route-planner-takes-an-unplanned-det...
1•beardyw•6m ago•0 comments

Aesthetic Layout in LLM-Based Slide Generation via Verifiable Rewards

https://arxiv.org/abs/2604.22840
2•PaulHoule•6m ago•0 comments

Show HN: Serial – an open source RSS reader for YouTube

https://serial.tube/welcome
2•BagelsOverBread•7m ago•0 comments

Copyfail2

https://github.com/0xdeadbeefnetwork/Copy_Fail2-Electric_Boogaloo
2•sickthecat•7m ago•0 comments

Tell HN: Class action investigation into Google withholding Play developer funds

2•coffee_and_code•8m ago•0 comments

Arc at 3 Weeks (2001)

https://paulgraham.com/arcll1.html
1•tosh•9m ago•0 comments

AppWatch – Track Itch.io, Steam, App Store and Google Play in One Dashboard

https://appwatch.dev/
1•ranguita•10m ago•0 comments

Yarbo – Nat in My Back Yard

https://github.com/Bin4ry/yarbo-nat-in-my-back-yard
1•weaponize•10m ago•1 comments

Clio – Behavioral intelligence layer for managers in Gmail, Slack, and Calendar

https://cliocircle.com/
1•arielsanroj10•10m ago•0 comments

Agents need control flow, not more prompts

https://bsuh.bearblog.dev/agents-need-control-flow/
2•bsuh•10m ago•0 comments

The Rise and Fall of Snake Oil

https://www.historytoday.com/archive/history-matters/rise-and-fall-snake-oil
1•samizdis•11m ago•0 comments

Show HN: Shopify-to-WooCommerce Migration Plugin – Storefront GraphQL API

https://wordpress.org/plugins/laterreta-migrator-for-shopify/
1•ranguita•11m ago•0 comments

Building a Tax Conformance Kit

https://odeva.app/blog/building-a-tax-conformance-kit/
1•ramon156•13m ago•0 comments

Companies help parents try to pick their babies' traits. Experts are wary

https://www.npr.org/2026/05/06/nx-s1-5704317/genetic-embryo-screening
1•marojejian•13m ago•1 comments

Why LLM Outputs Need a Deterministic Evaluation Layer

https://avectic.com/engineering/deterministic-evaluation-layer
1•rkamykowski•13m ago•0 comments

One command, dispatches multiple models to handle the task, with its strength

https://github.com/agenvoy/Agenvoy
1•pardnchiu•14m ago•0 comments

Five architects of the AI economy explain where the wheels are coming off

https://techcrunch.com/2026/05/06/five-architects-of-the-ai-economy-explain-where-the-wheels-are-...
1•Brajeshwar•15m ago•0 comments

Show HN: Local-first long-term memory engine for AI agents·MCP/CLI· 100% local

https://github.com/misaelzapata/memoirs
2•misaelzapata•15m ago•0 comments

Local Python desktop automation – with AI, 15 triggers

https://codeonix.app/
1•hassananayi•16m ago•0 comments

Show HN: OTel native agent to instrument applications

https://otex.dev/
1•tiwarinitish86•17m ago•0 comments

Budgeting your hours instead of tracking them

https://get168.app/blog/on-the-budget-of-time
1•dudcks97•20m ago•2 comments

How we replaced ingress NGINX at Stack Overflow

https://stackoverflow.blog/2026/05/06/how-we-replaced-nginx-ingress-at-stack-overflow/
1•onatm•21m ago•0 comments