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

Skyra: One interface, three methods, a hashmap, and a graph that grows a brain

https://github.com/skyraOS/skyra
1•skanz•1m ago•0 comments

The Internet is not dead

https://blog.woblick.dev/en/2026/the-internet-is-not-dead/
1•Kovah•1m ago•0 comments

Two EA-18 fighter jets collide at Mountain Home airshow, pilots ejected safely

https://idahonews.com/news/local/two-f-18-fighter-jets-have-crashed-during-an-airshow-at-mountain...
1•ChrisArchitect•3m ago•0 comments

Peter G. Neumann, Who Warned of Computer Security Risks, Dies at 93

https://www.nytimes.com/2026/05/17/obituaries/peter-g-neumann-dead.html
3•rdl•5m ago•1 comments

Killing a `Cow` made my JSON formatter 42% faster

https://jacobasper.com/blog/killing-a-cow-made-my-json-formatter-42-percent-faster/
1•linolevan•5m ago•0 comments

Free 3D Mockup Video for Apps and Websites

https://www.freemockup.video/
1•buildwithdeni•6m ago•0 comments

GenCAD

https://gencad.github.io/
2•dagenix•8m ago•0 comments

Man vs. Machine [Live]

https://twitter.com/figure_robot/status/2056057735444394142
1•punnerud•9m ago•0 comments

Simpson's Paradox and the Hot Hand in Basketball (1995)

https://fermatslibrary.com/s/simpsons-paradox-and-the-hot-hand-in-basketball#email-newsletter
1•downbad_•17m ago•0 comments

Japan Team Successfully Test Engine for Mach 5 Aircraft, Eyeing 2HR Trip to US

https://mainichi.jp/english/articles/20260511/p2a/00m/0sc/015000c
2•karakoram•20m ago•0 comments

Show HN: Automated QA, Performance Tracking

https://malleon.io
1•godelshalt•22m ago•0 comments

LightInk: Solar E-ink smartwatch with LoRa and GPS lasts 10 months on one charge

https://www.notebookcheck.net/LightInk-E-ink-smartwatch-with-solar-LoRa-and-GPS-lasts-10-months-o...
1•HardwareLust•22m ago•0 comments

Linux 7.1-rc4 Released With Many Fixes

https://www.phoronix.com/news/Linux-7.1-rc4-Released
1•doener•23m ago•0 comments

In Defense of Operation Market Garden

https://secretaryrofdefenserock.substack.com/p/in-defense-of-operation-market-garden
1•baud147258•24m ago•0 comments

An AI Hate Wave Is Here

https://www.axios.com/2026/05/17/ai-backlash-polling-sentiment
3•karakoram•25m ago•2 comments

Microsoft is retiring Teams' Together Mode

https://www.theverge.com/tech/932215/microsoft-teams-together-mode
1•adunk•27m ago•0 comments

AI Is Starving for PDFs

https://mkotlikov.substack.com/p/your-ai-is-starving-for-pdfs
2•mkotlikov•28m ago•0 comments

Prolog Coding Horror

https://www.metalevel.at/prolog/horror
4•RohanAdwankar•33m ago•0 comments

We Lost Our Imagination

https://onatm.dev/2026/05/17/we-lost-our-imagination/
4•onatm•36m ago•2 comments

Looks like someone forgot to register this domain edwardgallrein.com – oopsie

https://replit.com/
1•ryanmerket•36m ago•0 comments

Dwarkesh in the Datacenter

https://marginalrevolution.com/marginalrevolution/2026/05/dwarkesh-in-the-datacenter.html
1•paulpauper•41m ago•0 comments

A New Kind of Family-Separation Crisis

https://www.theatlantic.com/politics/2026/05/honduras-deportations-without-children/687153/
1•paulpauper•41m ago•0 comments

My Son's Math Homework Is Essentially Just Pokémon

https://www.theatlantic.com/technology/2026/05/homework-video-games-ed-tech/687198/
1•paulpauper•42m ago•0 comments

Ask HN: Why aren't more people worried about AI impersonation in code reviews?

2•eranation•44m ago•1 comments

Release PiClaw v2.4.0 – The Infosphere · rcarmo/piclaw

https://github.com/rcarmo/piclaw/releases/tag/v2.4.0
1•rcarmo•45m ago•0 comments

Artificial Intelligence and Grade Inflation

https://cshe.berkeley.edu/publications/artificial-intelligence-and-grade-inflation-cshe-higher-ed...
1•ChrisArchitect•46m ago•0 comments

Rcarmo/iOS-terax-AI: Personal fork of Terax for integration with iOS-Linux-kit

https://github.com/rcarmo/ios-terax-ai
1•rcarmo•46m ago•0 comments

Outbound

https://store.steampowered.com/app/2681030/Outbound/
1•doener•47m ago•0 comments

FTC tells platforms to comply with Take It Down Act by May 19

https://www.ftc.gov/news-events/news/press-releases/2026/05/ftc-chairman-ferguson-advises-compani...
2•p_stuart82•50m ago•0 comments

The Arch Lie [video]

https://www.youtube.com/watch?v=nemkacOX8-w
1•grigio•52m ago•0 comments