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

Show HN: I made Pokémon but with real animals in the real world

https://apps.apple.com/gb/app/animalis-game/id6762081213
1•robert-whiteley•2m ago•0 comments

AWO – Run Claude and Codex in isolated Git worktrees

https://github.com/ystepanoff/awo
1•ystepanoff•4m ago•0 comments

Europe Learnt to Love Subsidies

https://www.ft.com/content/b3e968c3-9089-417b-9757-95020eb0f469
1•JumpCrisscross•4m ago•0 comments

Japan's New Hypersonic Engine Could Make 2-Hour Flights to the US a Reality

https://www.bgr.com/2178211/japan-hypersonic-engine-ramjet-2-hour-flights-to-us/
1•rmason•6m ago•0 comments

Step in Tine: Forking Processes in Functional Choreographies

https://arxiv.org/abs/2605.23031
1•ahsillyme•8m ago•0 comments

Norway's 2 petabytes of Huawei flash storage and LLM training

https://www.blocksandfiles.com/flash/2026/05/22/norways-2-petabytes-of-huawei-flash-storage-and-l...
4•rbanffy•12m ago•0 comments

IronCore Project – Cloud Native Infrastructure Management

https://ironcore.dev/
1•ofrzeta•13m ago•0 comments

Kay Nishi and the Meeting That Started MS-DOS

https://nemanjatrifunovic.substack.com/p/kay-nishi-and-the-meeting-that-started
1•rbanffy•13m ago•0 comments

Staggering dip in US tourism is a troubling sign for the future

https://www.cnn.com/2026/05/25/travel/analysis-tourism-fewer-international-visitors-2025-vis
2•ndr42•13m ago•0 comments

4-Way QR Code with No Moving Parts

https://mstdn.social/@isziaui/116636531415929535
1•zingerlio•13m ago•0 comments

Spalding Gray segment from Swimming to Cambodia (1987) [video]

https://www.youtube.com/watch?v=GViDEo081f4
2•marysminefnuf•14m ago•0 comments

Drone breaks world speed record with 453 MPH in test run

https://www.tomshardware.com/tech-industry/drone-breaks-world-speed-record-with-453-mph-in-test-r...
2•rmason•14m ago•0 comments

Nix's Substituter List Is Not a Routing Table

https://notashelf.dev/posts/nix-cache-proxy
1•birdculture•15m ago•0 comments

Kelly Johnson, Skunk Works and the Days When America Did the Biggest Things

https://www.corememory.com/p/kelly-johnson-skunk-works-impossible-factory-josh-dean
1•areoform•17m ago•0 comments

Hawaii just found a way around Citizens United. Other states are following

https://www.ms.now/ali-velshi/watch/hawaii-just-found-a-way-around-citizens-united-other-states-a...
2•xyst•17m ago•1 comments

Hitachi Ltd, Part II – By Bradford Morgan White

https://www.abortretry.fail/p/hitachi-ltd-part-ii
1•rbanffy•18m ago•0 comments

Show HN: Tussup.com – TikTok for Debates

https://tussup.com
1•frantzarty•19m ago•0 comments

Japanese security guard finds fame as designer of duct tape signs

https://www.reuters.com/world/asia-pacific/japanese-security-guard-finds-fame-designer-duct-tape-...
1•e2e4•22m ago•0 comments

Show HN: HypeCheck – I built a tool that fact-checks supplement marketing

https://hypecheck.io/
1•dannykim32•26m ago•0 comments

Producthunt Alternative but with a Viral Twist

https://startuplaunchpage.com
1•vnyarongi•26m ago•0 comments

What are all those pins for? (2009)

https://www.reenigne.org/blog/what-are-all-those-pins-for/
1•prayerie•27m ago•0 comments

Show HN: Aquifer – a control plane for agentic API traffic

https://github.com/rjpruitt16/aquifer
1•rjpruitt16•27m ago•0 comments

Iran's president orders reopening of international internet access

https://www.reuters.com/world/middle-east/irans-president-orders-reopening-international-internet...
2•geox•28m ago•0 comments

Ask HN: What small engineering habits compound the most over time?

1•praneetbrar•29m ago•0 comments

Mastodon Isn't Just a Replacement for Twitter (2022)

https://www.noemamag.com/mastodon-isnt-just-a-replacement-for-twitter/
2•cdrnsf•29m ago•1 comments

Free AI APIs – Build Anything with Pollinations

https://pollinations.aivaded.com
1•godsbee•33m ago•0 comments

Detecting and removing dangerous secrets on workstations before Shai-Hulud does

https://recyclebin.zip/posts/2026-05-25-secret-scanning-fleet-bagel/
3•gepeto42•34m ago•0 comments

DeepSeek seems to be leaking random user chat history

https://breakingvibe.dev/news/deepseek-leaking-user-chat-history
1•jklmnopqrstuvw•35m ago•0 comments

On-premises for legal is not a good business

https://robertkarl.net/blog/2026/May/25/on-premises-for-legal-is-not-a-good-business.html
1•robertkarl•35m ago•1 comments

Ferrari Luce Reveal [video]

https://www.youtube.com/watch?v=kSFl4iE1-y8
2•simonebrunozzi•35m ago•1 comments