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

StumbleTV: Chat Roulette but for Exposed Webcams

https://stumbletv.alectrocute.workers.dev/c/2e6ff336f1235cc1
1•arm32•51s ago•0 comments

The millionaires tax was pitched as a $2B revenue source. It's blown past that

https://www.bostonglobe.com/2026/05/25/metro/millionaires-tax-massachusetts/
1•ceejayoz•3m ago•0 comments

Delaware court upholds voting by companies in small town's election

https://www.reuters.com/legal/government/delaware-court-upholds-voting-by-companies-small-towns-e...
1•anigbrowl•4m ago•0 comments

Poll: Would you allow a first generation plumber robot in your home?

1•Bender•12m ago•1 comments

Amazon Strikes $6B Deal with Snowflake for Agentic Computing Chips

https://www.wsj.com/tech/amazon-strikes-6-billion-deal-with-snowflake-for-its-agentic-computing-c...
1•jpau•13m ago•0 comments

Breaking Rust

https://en.wikipedia.org/wiki/Breaking_Rust
1•petethomas•15m ago•0 comments

Agents can sign up for Composio

https://composio.dev/blog/your-agents-can-signup-for-composio
1•mooreds•16m ago•0 comments

Xania Monet

https://en.wikipedia.org/wiki/Xania_Monet
1•petethomas•17m ago•0 comments

Agent Security Is a Systems Problem

https://arxiv.org/abs/2605.18991
1•yakkomajuri•20m ago•0 comments

Attrition: The Chinese Family Collapse

https://www.strategypage.com/htmw/htatrit/articles/2026052754034.aspx
1•skmurphy•20m ago•1 comments

The Authorization Paradox: Who Has the Keys to Your AI? [video]

https://www.youtube.com/watch?v=5UUpxgcGKXk
1•mooreds•22m ago•0 comments

GitMo – Auto sync your local project files to GitHub while you work.

https://github.com/KyleBenzle/GitMo/tree/main
1•WWIII_Historian•25m ago•0 comments

Ansel: Complete Pipeline Overhaul

https://ansel.photos/en/news/complete-pipeline-overhaul/
1•neucoas•30m ago•0 comments

Dutch block US takeover of Solvinity as against public interest

https://www.reuters.com/technology/dutch-government-block-takeover-cloud-services-company-solvini...
3•rectang•36m ago•1 comments

Show HN: Liiists, a Markdown-first, iOS and CLI list app

https://github.com/djt53/liiists
1•dtingle•36m ago•0 comments

What Will Happen When the AI Barons Give Back?

https://www.nytimes.com/2026/05/27/opinion/ai-philanthropy-charity.html
1•berkeleyjunk•39m ago•0 comments

You Should Not Update Your Dependencies

https://www.mendral.com/blog/you-should-not-update
7•OlivierCG•40m ago•0 comments

Atom Exhaustion Is Not a Footgun. It's One Third of Our CVEs

https://www.erlef.org/blog/eef/atom-exhaustion
1•croottree•40m ago•0 comments

A non-coding coding agent

https://zserge.com/posts/socreates/
1•croottree•41m ago•0 comments

OpenDisplay – open standard for e-paper screens

https://opendisplay.org/
2•balloob•44m ago•0 comments

Building the Future of Accessible Tech: Inside Uvilox AI

https://uvilox-aiwebsite.pages.dev/
1•Pallav123•46m ago•0 comments

Monome at Twenty

https://monome.org/twenty
2•robenkleene•46m ago•0 comments

Monome at 20: memories of the grid, in pictures

https://cdm.link/monome-at-20-memories-of-the-grid-in-pictures/
1•robenkleene•46m ago•0 comments

Did Newton know that force is mass times acceleration?

https://hsm.stackexchange.com/questions/19441/did-newton-know-that-force-is-mass-times-acceleration
2•kristianp•51m ago•0 comments

Am I a Bad Friend?

https://drobinin.com/posts/am-i-a-bad-friend/
2•valzevul•51m ago•0 comments

Balcony solar could help fight rising US utility costs

https://www.theguardian.com/environment/2026/may/27/balcony-solar-panels-rising-utility-costs
3•ottoboney•52m ago•0 comments

Ask HN: How to live life before AGI

3•atleastoptimal•53m ago•5 comments

German child killer Magnus Gaefgen awarded damages (2011)

https://www.bbc.com/news/world-europe-14408657
1•petethomas•54m ago•0 comments

FBI Arrests CIA Official with $40M in Gold Bars in His Home

https://www.nytimes.com/2026/05/27/us/politics/fbi-arrest-cia-official-gold-bars.html
9•cwwc•59m ago•2 comments

Google Engineer Charged with Insider Trading on Polymarket

https://finance.yahoo.com/markets/crypto/articles/google-engineer-charged-insider-trading-2109041...
2•1vuio0pswjnm7•1h ago•0 comments