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

Function Composition from C++17 to C++23

https://freshsources.com/code-capsules/composing-functions/
1•chuckallison•1m ago•1 comments

Show HN: Kaupang – a push-based deploy CLI, now with a drag-and-drop builder

https://github.com/kaupang-dev/kaupang
1•witnz•1m ago•0 comments

The engineering practices Claude Code and Codex use to improve AI agents

https://www.andrewjesson.com/blog/the-engineering-practices-claude-code-and-codex-use-to-improve-...
1•anndvision•1m ago•0 comments

Git worktrees – why should I use them?

https://github.blog/ai-and-ml/github-copilot/what-are-git-worktrees-and-why-should-i-use-them/
1•onnnon•1m ago•0 comments

Databricks Iceberg Support Has a Catch. It's Called Unity Catalog

https://www.onehouse.ai/blog/databricks-iceberg-support-has-a-catch-its-called-unity-catalog
1•LexSiga•3m ago•0 comments

Show HN: Yet Another News Reader

https://boomerang-news.com
1•messel•3m ago•0 comments

GitHub Action to grade OpenAPI schema quality (A–F) and catch breaking changes

https://github.com/marketplace/actions/typemorph-schema-check
1•jop00004•5m ago•0 comments

Lords urgent question on the suspension of Anthropic's AI models [video]

https://www.youtube.com/watch?v=1Dw_k_Bs95A
1•haritha-j•6m ago•0 comments

HPE Discover 2026 Keynote Coverage

https://www.servethehome.com/hpe-discover-2026-keynote-coverage/
1•ksec•7m ago•1 comments

CLI AI Tool Laucher

https://github.com/tjbmoose09/ai-tool-launcher
1•tjbmoose09•8m ago•1 comments

Show HN: Multiplayer Space Game

https://voidhorizon.net
1•messel•10m ago•0 comments

Writing an echo server in libev and C++ (2011)

https://www.skitoy.com/posts/writing-an-echo-server-in-libev-and-c/
1•mooreds•10m ago•0 comments

Using the stars and paddles, indigenous Taiwanese recreate risky sea journey

https://www.cnn.com/2026/06/17/asia/taiwan-indigenous-paddle-philippines-intl-hnk
1•mooreds•11m ago•0 comments

El Niño is here, so what does it mean?

https://text.npr.org/g-s1-128448
1•mooreds•11m ago•0 comments

What is a data semantic layer?

https://getbruin.com/blog/what-is-a-semantic-layer/
1•arsalann•11m ago•0 comments

"How dare we use something like that..." – Why generative AI artwork is a no...

https://www.gamesindustry.biz/how-dare-we-use-something-like-that-on-someones-dream-why-generativ...
1•dude250711•12m ago•0 comments

Private Tap-to-Pay

https://walt.is
1•627467•13m ago•0 comments

Denmark desperately needs more inequality

https://world.hey.com/dhh/denmark-desperately-needs-more-inequality-8e84a8d0
3•peterspath•13m ago•0 comments

How to make LVT politically doable

https://wilsoniumite.com/2026/06/17/how-to-make-lvt-politically-doable/
2•Wilsoniumite•13m ago•0 comments

Show HN: Noject – menubar app to stop drive ejections on macOS

https://scaleninja.com/noject/
2•rohityadavcloud•14m ago•0 comments

Cosmodial Sky Atlas

https://frankforce.com/cosmodial-sky-atlas/
1•surprisetalk•15m ago•0 comments

Behind Python: The Languages That Power AI

https://arxiv.org/abs/2606.18141
1•runningmike•15m ago•1 comments

Don't Stack Weaknesses

https://staysaasy.com/startups/2026/06/15/stacked-weaknesses.html
1•RyeCombinator•16m ago•0 comments

Cockroaches scurry around with pieces of bacterial genomes

https://arstechnica.com/science/2026/06/cockroaches-scurry-around-with-thousands-of-pieces-of-bac...
1•haeseong•17m ago•0 comments

Show HN: OpenC6 BIOS – A PC-like bare-metal bootloader and OS for ESP32-C6

https://github.com/Rompass/openc6-bios
2•Rompass•17m ago•0 comments

Certain Ultra-processed Foods more Addictive than Others

https://www.cnn.com/2026/06/17/health/addictive-ultraprocessed-foods-wellness
1•jakzurr•18m ago•1 comments

A generic tragedy: Why PHP's Generics vote failed

https://tempestphp.com/blog/a-generic-tragedy
2•nvahalik•18m ago•0 comments

Sixty percent of US consumers say 'AI' in brand messaging is a turnoff

https://wpvip.com/future-of-the-web-2026/
25•thm•19m ago•4 comments

Pandas for Reproducible Data Analysis

https://arxiv.org/abs/2606.14924v1[pdf]
1•runningmike•25m ago•1 comments

PHP Through a Screen Reader: Small Syntax Choices That Matter

https://thephp.foundation/blog/2026/06/16/php-through-a-screen-reader-small-syntax-choices-that-m...
2•MrVandemar•25m ago•0 comments