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

Signal Problems

https://theanarchistlibrary.org/library/anonymous-signal-problems?v=1783347766
1•surprisetalk•53s ago•0 comments

What AI Sandboxing Means

https://kenhuangus.substack.com/p/the-untrusted-tenant-rethinking-infrastructure
1•ktrychon1•3m ago•0 comments

Can AI equalize political campaign ads – or will it remainfor spreading lies?

https://www.theguardian.com/technology/2026/jul/08/ai-ads-political-campaigns
1•beardyw•5m ago•1 comments

OpenBSD has a use-after-free allowing local privilege escalation to root

https://nvd.nist.gov/vuln/detail/cve-2026-57589
1•linggen•6m ago•0 comments

Jobanni – Job search without promoted listings

https://jobanni.com
1•jordinl•6m ago•0 comments

Anatomy of a $5 "Good Morning"

https://karanbansal.in/blog/good-morning-tax/
1•ingve•6m ago•0 comments

Welcome, Great App

https://www.indiehackers.com/post/welcome-loidws3eodNR1RKQZFXd
1•johnwod•8m ago•0 comments

Go library for AF_XDP send and receive packets at 10G line rate

https://github.com/atoonk/go-afxdp
1•bgpdude•8m ago•0 comments

What is a token and why does it cost so much? [video]

https://www.youtube.com/watch?v=-0HRzXk8vlk
1•linggen•8m ago•0 comments

Interaction Nets and Hardware

https://tendrils.co/background
1•marvinborner•8m ago•1 comments

Pascal would have thrown away his iPhone

https://www.joanwestenberg.com/p/pascal-would-have-thrown-away-his
1•spking•8m ago•0 comments

"Can We Make the Villain a White Guy?"

https://hollywoodgadfly.substack.com/p/can-we-make-the-villain-a-white-guy
4•kspacewalk2•9m ago•0 comments

HyWiki: Zero Markup Hypertext

https://www.chiply.dev/post-hyperbole-hywiki
1•engfan•10m ago•1 comments

A bug which affected only left handed users

https://shkspr.mobi/blog/2026/07/a-bug-which-only-affected-left-handed-users/
1•sixhobbits•10m ago•1 comments

AI agents accessing production database

1•Eapz_06•11m ago•0 comments

Show HN: Kettio – using ML to assume audience buying

https://kettio.com
1•smerrill2•11m ago•1 comments

Apple loses challenges against EU rules to curb Big Tech

https://www.reuters.com/world/eu-court-rejects-apples-challenge-against-eu-rules-reining-big-tech...
2•1vuio0pswjnm7•12m ago•0 comments

Self-generated hydrogel ejects bacterial cells for localized biofilm dispersion

https://www.nature.com/articles/s41564-026-02413-4
1•bookofjoe•12m ago•0 comments

Cloudflare Meerkat - Globally distributed consensus

https://blog.cloudflare.com/meerkat-introduction/
4•bobnamob•13m ago•0 comments

Before Sputnik: The Mystery Lights That Refuse to Die

https://www.liberationtimes.com/home/before-sputnik-the-mystery-lights-that-refuse-to-die
1•nsavage•13m ago•0 comments

Eternal Terminal v7.0.0

https://github.com/MisterTea/EternalTerminal/releases/tag/et-v7.0.0
1•darcien•15m ago•1 comments

CSS is simple, stop making it hard

https://blog.brixit.nl/css-is-simple-stop-making-it-hard/
1•surprisetalk•16m ago•0 comments

A Heterogeneous System-on-Chip with an 83 GFLOp/s, 1.2 TFLOp/s/W

https://ieeexplore.ieee.org/document/11523040
1•rbanffy•16m ago•0 comments

Seven Studies on Letting LLMs Edit Trees

https://www.lightningjar.com/blog/stable-ids-are-all-you-need
1•kevinpeckham•20m ago•0 comments

Tiny data centre used to heat public swimming pool

https://www.bbc.com/news/technology-64939558
15•breitling•20m ago•7 comments

Show HN: Pug.sh – open-source product analytics

https://pug.sh/
3•BajajScooter•24m ago•0 comments

Should we stop using the word "Responsive" for design?

https://www.andreaverlicchi.eu/blog/should-we-stop-using-the-word-responsive-for-design/
1•speckx•24m ago•0 comments

Dopamine is about wanting, not liking

https://theneuroreview.com/posts/dopamine-doesnt-do-what-you-think.html
2•CameronKade•24m ago•0 comments

Show HN: Pennen, a handwriting-only journal for iPad and Apple Pencil

https://pennen.ir.studio/
1•IshaanRawat•25m ago•0 comments

Show HN: Tab-da, a keyboard-first Chrome extension for people with too many tabs

https://www.thirdculture.app/tab-da/
1•bardi•25m ago•0 comments