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

Show HN: Historical daily weather for any US ZIP code Python Package

https://github.com/gojiplus/get-weather-data
1•neehao•2m ago•0 comments

Who Wins as Intelligence Commodifies?

https://www.strangeloopcanon.com/p/who-wins-as-intelligence-commodifies
1•abrbhat•4m ago•0 comments

IncSFS: Incremental Full-Sparse Flow-Sensitive Pointer Analysis for C/C++

https://arxiv.org/abs/2608.24391
1•matt_d•4m ago•0 comments

Show HN: Simple Fax Sending Website

https://www.perpagefax.com/
1•engintekin•6m ago•0 comments

Show HN: MLSentinel – monitor ML models and catch failures early

https://www.mlsentinel.dev/
1•drdoom_2007•7m ago•0 comments

XBlade 25.1.17 competes directly with Wayland's sandboxing, exceeding parity

https://git.sr.ht/~bhyvxe/xblade
1•icmpkitty•8m ago•0 comments

Qwen/Qwen3.8-Flash-Next · Hugging Face

https://huggingface.co/Qwen/Qwen3.8-Flash-Next
1•manojbajaj95•9m ago•0 comments

Row over weight of half a loaf leaves German baker with €15,000 bill

https://www.euronews.com/my-europe/2026/08/26/row-over-weight-of-half-a-loaf-leaves-german-baker-...
1•throwaway2037•9m ago•0 comments

1,000 missing after catastrophic floods caused by a glacial collapse

https://apnews.com/article/climate-change-nepal-tibet-glacier-collapse-floods-61b592d428e4631add3...
2•geox•10m ago•0 comments

Show HN: Stellamap, live 3D map of the solar system with real spacecrafts

https://www.stellamap.net
1•alecavaz•15m ago•0 comments

A Nice, Simple Product

https://magic984128.substack.com/p/a-different-way-to-look-at-a-photo
1•magic520•20m ago•0 comments

Other People – Neil Gaiman

https://xpressenglish.com/our-stories/other-people/
1•barry-cotter•22m ago•0 comments

Show HN: AI chat app build specifically for kids (howcomet.com)

https://howcomet.com/
1•hkbarton•23m ago•0 comments

Don't Let LLMs Play Telephone with Your Ideas

https://blog.yfzhou.fyi/posts/prompt/
2•crazylogger•23m ago•0 comments

A one sentence skill for ASD STE 100 – 58% cheaper with similar eval scores

https://whoislewys.com/blog/2026/08/20/simpler-english/
1•whoislewys_1•24m ago•0 comments

Jira and Confluence Are Both Down

https://jira-software.status.atlassian.com/incidents/jv8mdjyh9cn7
4•thelibrarian•30m ago•2 comments

A scooter is cheating, a cargo bike is rude, the car is fine

https://maxmautner.com/2026/08/25/scooter-is-cheating.html
2•mslate•33m ago•0 comments

Why LLMs Can't Play Chess

https://www.nicowesterdale.com/blog/why-llms-cant-play-chess
1•andsoitis•37m ago•0 comments

Google's Sergey Brin: You'll ride in robot cars within 5 years (2012)

https://www.cnet.com/science/googles-sergey-brin-youll-ride-in-robot-cars-within-5-years/
3•andsoitis•38m ago•1 comments

The Absolute Pleasure of Tim Curry

https://www.theatlantic.com/ideas/2026/08/tim-curry-tribute/688422/
3•fortran77•41m ago•2 comments

Further Ensuring Affordable Beef for the American Consumer

https://www.whitehouse.gov/presidential-actions/2026/08/further-ensuring-affordable-beef-for-the-...
1•big_toast•42m ago•0 comments

Show HN: I Designed a 3D-Printed Laminar Flow Nozzle

https://smysnk.com/blog/3d-printed-laminar-flow-nozzle-design
1•smysnk•44m ago•0 comments

Llwdc – Direct-to-fan storefront for tracks, stems, and sound packs

https://llwdc.com
2•sectapod•46m ago•0 comments

Xkcd: Trade

https://xkcd.com/3290/
3•Garbage•46m ago•0 comments

Show HN: Zetken CI/CD Studio

https://zetken.com/
2•BolatM•50m ago•0 comments

Is Stupidity Strength?(2019)

https://srconstantin.github.io/2019/10/29/is-stupidity-strength-3.html
1•num42•55m ago•0 comments

Wall Street turns on scrambling Treasury Secretary: 'Damage has been done'

https://www.msn.com/en-us/money/general/wall-street-turns-on-scrambling-trump-cabinet-member-dama...
1•petethomas•56m ago•0 comments

Interviewing in the Age of AI

https://www.dein.fr/posts/2026-05-28-interviewing-in-the-age-of-ai
2•fagnerbrack•57m ago•0 comments

Safe kernels are fast kernels: tile-rs next to Mojo 1.0

https://yijunyu.github.io/tile-rs-vs-mojo.html
1•yijunyu•1h ago•0 comments

Can Self-Hosting Be Simple?

https://tedium.co/2026/08/26/self-hosting-third-place-strategy/
2•pentagrama•1h ago•0 comments