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

1•baigy•24s ago

Putin Can No Longer Hide His Catastrophe

https://www.theatlantic.com/ideas/2026/05/putin-lost-control-russia/687269/
1•JumpCrisscross•1m ago•0 comments

The end of the internet's golden age

https://www.axios.com/2026/05/23/google-search-internet-social-media
1•1vuio0pswjnm7•2m ago•0 comments

Cargo Install Friend

https://crates.io/crates/friend
1•DavidCanHelp•5m ago•0 comments

Sleeping Beauty and Observer Multiplicity

https://zenodo.org/records/20145027
1•FreakyFish•10m ago•0 comments

Ebola Outbreak Now Third Largest Recorded and "Spreading Rapidly"

https://arstechnica.com/health/2026/05/ebola-outbreak-now-third-largest-recorded-and-spreading-ra...
1•Brajeshwar•13m ago•0 comments

Printf Is a Secret Virtual Machine – and a Giant Security Hole [video]

https://www.youtube.com/watch?v=kdnN0kk7MS0
1•senfiaj•16m ago•0 comments

Show HN: I built a site to watch, predct and prompt inject agents playing games

https://clankerfights.ai
1•DanMcInerney•18m ago•0 comments

Knowledge: You can just build your own AI feed to keep up, without the noise

https://github.com/raphaelsty/knowledge
1•raphaelty•19m ago•1 comments

Continual Harness: A reset-free self-improving harness for embodied agents

https://sethkarten.ai/continual-harness/
1•uniclaude•28m ago•0 comments

Let's try to build an apartment in NYC

https://friedkielbasa.substack.com/p/lets-try-to-build-an-apartment-in
3•fkozlowski•31m ago•0 comments

What I Actually Use Hermes and Obsidian For (Full Setup and Use Cases)

https://metedata.substack.com/p/013-my-hermes-and-obsidian-set-up
1•young_mete•34m ago•0 comments

HP QuickWeb, Singular and Pointless

https://gekk.info/articles/hp-quickweb.htm
2•HotGarbage•35m ago•0 comments

Open source Linux c2 inspired by void link C2

https://github.com/josephrw12/cortex-c2
1•josephrw12•35m ago•1 comments

The Surprising Origins of 'Left' and 'Right' in Politics

https://time.com/5673239/left-right-politics-origins/
2•thunderbong•38m ago•0 comments

Andy Matuschak: Apps and programming: two accidental tyrannies (MIT Talk) [video]

https://www.youtube.com/watch?v=ycyCGCtScdc
2•olejorgenb•41m ago•0 comments

Stop burning tokens on JSON maps – A 150-token spatial format for LLMs

https://ai-storycrafter.com/llsketch-editor.php
1•Xoraxx•41m ago•0 comments

The State of Texas vs. Meta Platforms, Inc. and WhatsApp, LLC [pdf]

https://www.texasattorneygeneral.gov/sites/default/files/images/press/WhatsApp%20Petition.pdf
1•plurby•49m ago•1 comments

Texas Woman files lawsuit after arrest for Facebook post about polluted water

https://www.fox4news.com/news/woman-arrested-facebook-post-concerning-trinidad-water-poisoning
10•SilverElfin•51m ago•0 comments

Google Betrayed the Web

https://www.machinesociety.ai/p/google-betrayed-the-web
3•mikelgan•52m ago•1 comments

To Understand AI, Think Like a Dragonfly

https://www.noemamag.com/to-understand-ai-think-like-a-dragonfly/
1•RickJWagner•52m ago•1 comments

The tech industry as a grass fire

https://nathanschneider.info/2026/05/the-tech-industry-as-a-grass-fire/
2•ntnsndr•56m ago•0 comments

Agentic AI token usage balloons cost at Microsoft, Meta, Amazon

https://www.tomshardware.com/tech-industry/artificial-intelligence/ai-cost-crisis-hits-tech-giant...
3•heresie-dabord•56m ago•1 comments

Lambda Soup – Functional HTML Scraping for OCaml

https://aantron.github.io/lambdasoup/
1•Tomte•57m ago•0 comments

Gradient Google icon redesign rolling out on Android and web

https://9to5google.com/2026/05/22/gradient-google-icon-redesign-web/
1•theanonymousone•58m ago•0 comments

Hardening against future module security issues with ModuleJail

https://linuxsecurity.com/features/linux-kernel-module-hardening-modulejail
1•thefreelantern•59m ago•0 comments

A World Without Apps

https://www.bigideainitiative.org/ideas/a-world-without-apps
3•sim04ful•1h ago•1 comments

Meditations in Color

https://meditationsincolor.com/colorists
1•pixelsymphony•1h ago•1 comments

New Attack "Megaladon" Compromises 5.5K+ GitHub Repos

https://www.theregister.com/security/2026/05/22/megalodon-chums-the-waters-in-55k-github-repo-poi...
4•theanonymousone•1h ago•0 comments

Polsia Raises $30M as Its AI Autonomously Runs 7,600 Businesses

https://noqta.tn/en/news/polsia-ai-autonomous-company-30m-funding-2026
2•Topology1•1h ago•0 comments