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

Know what bitrate your audio is

https://whatsmybitrate.com/
1•RedShift1•2m ago•0 comments

What I Learned Building Evaluations for Coding Agents

https://dblc.fyi/blog/a-retrospective-on-ai-evaluations/
1•dava96•4m ago•0 comments

Masullo on the Riemann Hypothesis

https://johncarlosbaez.wordpress.com/2026/11/22/masullo-on-the-riemann-hypothesis/
1•xiaoyu2006•6m ago•0 comments

Host Your Own Services with FreeBSD: PgAdmin4

https://www.mimar.rs/blog/host-your-own-services-with-freebsd-pgadmin4
1•pacija•6m ago•0 comments

As a kid, I didn't have a monster in my attic, I had a LAN

https://www.pcgamer.com/games/as-a-kid-i-didnt-have-a-monster-in-my-attic-i-had-a-lan/
1•Brajeshwar•9m ago•0 comments

Confident predictions and verdicts about AI, and what happened next [video]

https://www.youtube.com/watch?v=_Zzv15cwG1A
1•iamanatom•12m ago•0 comments

Show HN: HomeBrain – Your private cloud box, local agent. Data stays on Device

https://www.homebrain.house
2•oalterg•12m ago•1 comments

Solving NYT's Pips Puzzle (2025)

https://healeycodes.com/solving-nyt-pips-puzzle
1•vismit2000•18m ago•0 comments

Gerhard Gentzen

https://en.wikipedia.org/wiki/Gerhard_Gentzen
1•KingOfCoders•18m ago•0 comments

Ask HN: Where the company's employees launch the tools that Claude created

1•vmuhammadsaid20•18m ago•0 comments

Loisium: An Autonomous Ecosystem for Software

https://loisium.dev/
1•clinexaadmin•20m ago•0 comments

Show HN: Reworked blog on how computers work from scratch

https://dinank.dev/posts/between-wall-and-first-fetch.html
2•daynum•21m ago•0 comments

How lakeFS Outperformed Mountpoint for Amazon S3 on MLPerf Storage

https://lakefs.io/blog/s3-fuse-mount-performance-lakefs-mount/
1•forthelastime•22m ago•0 comments

Overpass QL EBNF Grammar

https://github.com/b1tw153/overpass-ebnf
1•altilunium•27m ago•0 comments

Temenos jBC Banking Language Documentation

https://jbc-lang.org
2•begoon•28m ago•0 comments

AI People Are Extremely Rich

https://www.noahpinion.blog/p/ai-people-are-very-very-very-very
2•A_D_E_P_T•30m ago•0 comments

Chinese Postman Problem

https://en.wikipedia.org/wiki/Chinese_postman_problem
2•vismit2000•33m ago•0 comments

MBK Moves to Take Japan's Wacom Private in $900M Deal

https://en.sedaily.com/business/2026/11/21/mbk-moves-to-take-japans-wacom-private-in-900-million-...
2•mariuz•34m ago•0 comments

Wellness and Body Image

https://www.lbbc.org/about-breast-cancer/wellness-body-image
1•RobertGRodrigue•37m ago•0 comments

Name Constraint vs. CN / DNS matching issues

https://github.com/openssl/openssl/issues/33890
1•taubek•38m ago•0 comments

Show HN: Agent Doctor – let domain experts tune your agent without code changes

https://theagentdoctor.com/
4•neurlap•49m ago•0 comments

Scientists Discover New and Horrible Eagle-Based Way Our Ancestors Died

https://www.404media.co/scientists-discover-new-and-horrible-eagle-based-way-our-ancestors-died/
3•Brajeshwar•53m ago•0 comments

An anti-slavery sugar bowl (2024)

https://www.vam.ac.uk/blog/museum-life/an-anti-slavery-sugar-bowl
3•leonry•53m ago•0 comments

Thermal Mass

https://en.wikipedia.org/wiki/Thermal_mass
1•tosh•58m ago•0 comments

BepiColombo reaches Mercury after eight-year odyssey

https://www.nature.com/articles/d41586-026-03803-8
2•tannhaeuser•58m ago•0 comments

Lumissil and BMW run power line communication on Gen6 pack

https://www.automotiveworld.com/news/lumissil-and-bmw-run-power-line-communication-on-gen6-pack/
1•plun9•59m ago•0 comments

View from the Top: Craig Federighi (2019) [video]

https://www.youtube.com/watch?v=43sjym5ZS68
2•Austin_Conlon•1h ago•0 comments

The World of Legacy IT Systems

https://spectrum.ieee.org/inside-hidden-world-legacy-it-systems
2•o_-_o•1h ago•0 comments

Lean Explained with TypeScript

https://gruhn.me/blog/2026-08-29/
4•fagnerbrack•1h ago•0 comments

Ahsan Hadi: PostgreSQL 19 Is Here: Worth the Wait

https://www.pgedge.com/blog/postgresql-19-is-here-worth-the-wait
7•omegaSigma95•1h ago•1 comments