frontpage.
newsnewestaskshowjobs

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

Concentrate: LLM Gateway

https://concentrate.ai
1•handfuloflight•2m ago•0 comments

Sakana Fugu-Cyber

https://sakana.ai/fugu-cyber-release/
1•ilreb•5m ago•0 comments

Show HN: Hospital Price Watch: Transparent, Shoppable Hospital Prices

https://hospitalpricewatch.com/
1•brad12345•5m ago•1 comments

Ramp Router

https://ramp.com/router/
1•handfuloflight•5m ago•0 comments

Show HN: AI meeting notes – no bot, insights and answers from your files (BYOK)

https://getaiassist.app/
1•rfigueror1•6m ago•0 comments

How Cursor Rebuilt Its Terraform Workflow with Masterpoint

https://masterpoint.io/case-studies/cursor/
1•mooreds•7m ago•0 comments

New Chrome plugin automates Reddit conversations

https://subsnipe.thomasunise.com/
2•is_dev_active•11m ago•0 comments

Ten-year-old butterfly researcher finds memories can be inherited

https://www.upworthy.com/ten-year-old-butterfly-researcher-discovers-that-memories-an-be-passed-d...
2•MaysonL•12m ago•0 comments

Freerange: Static fit checks for ordinary TypeScript layout code

https://github.com/chenglou/freerange
1•handfuloflight•19m ago•0 comments

British Standard – "Preparation of a liquor of tea for use in sensory tests" [pdf]

https://www.teahong.com/wp-content/uploads/2022/03/bs-6008-or-iso-3103.pdf
1•gregsadetsky•21m ago•0 comments

Homeric Question

https://en.wikipedia.org/wiki/Homeric_Question
3•thunderbong•31m ago•0 comments

Eye Tracking on Your Cellphone

https://gazecapture.csail.mit.edu/
2•soupspaces•32m ago•0 comments

Expect More Data Center Moratoriums – and Slower Growth

https://www.bloomberg.com/opinion/articles/2026-07-20/new-york-data-center-moratorium-friction-sl...
1•petethomas•33m ago•0 comments

Industrial DevOps

https://itrevolution.com/product/industrial-devops-book/
1•firesteelrain•35m ago•0 comments

Absurdity and hypocrisy in war, Celine [pdf]

https://neoalchemist.wordpress.com/wp-content/uploads/2012/06/louis-ferdinand-celine-journey-to-t...
1•DaveZale•43m ago•0 comments

Anthropic's Landmark $1.5B Copyright Settlement Is Approved

https://techcrunch.com/2026/07/20/anthropics-landmark-1-5b-copyright-settlement-is-approved/
2•golly_ned•52m ago•2 comments

The Rise (and Fall?) Of Palantir [video]

https://www.youtube.com/watch?v=SfGUzSYEqY0
2•figmert•56m ago•0 comments

Official Package Registry of Veryl

https://veryl-lang.org/blog/official-package-registry/
2•dalance•57m ago•2 comments

Cairn|personal finance your own AI can read over MCP, read-only by construction

https://cairn.nnnsightnnn.com/dashboard
2•kautryii•59m ago•0 comments

Sharon Stone on Quitting Weed

https://variety.com/2026/film/columns/sharon-stone-quitting-weed-stopping-stroke-medication-like-...
4•andsoitis•1h ago•2 comments

Show HN: How to Get a Fable CoT for the Jacobian Conjecture Refutation

4•SonOfLilit•1h ago•0 comments

Show HN: I made email signatures less boring

https://esigna.app
4•rodgetech•1h ago•6 comments

Emily Wilson on Translations and Language (Ep. 63)

https://conversationswithtyler.com/episodes/emily-wilson/
2•paulpauper•1h ago•1 comments

How To Choose A Subproblem

https://millicosm.substack.com/p/how-to-choose-a-subproblem
5•paulpauper•1h ago•0 comments

On Being a Conservative

https://casssunstein.substack.com/p/on-being-a-conservative
3•paulpauper•1h ago•0 comments

OneCLI Is Live on the 1Password Marketplace

https://onecli.sh/blog/onecli-1password-marketplace
3•Jonathanfishner•1h ago•0 comments

Turning robot video into training-ready data

https://www.eventual.ai/blog/announcing-daft-physical-ai
1•DISCURSIVE•1h ago•0 comments

Show HN: AI Secretary – Stop checking your phone "just in case"

https://github.com/mathigatti/telegram-ai-secretary
1•mathigatti•1h ago•0 comments

Show HN: Yaml2json.com, YAML/JSON converter that runs in the browser

https://yaml2json.com
1•zacattack8•1h ago•1 comments

Generative Bionics launches Gene.01 ahead of shipyard welding trials

https://runtimewire.com/article/generative-bionics-gene01-tactile-humanoid-shipyard-trials
1•ryanmerket•1h ago•0 comments