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: Sax – Browser 3D telemetry and teleop for ROS 2 on low-bandwidth links

https://sa-x-core-ewl4.vercel.app/
1•Jibrin•31s ago•0 comments

Show HN: Thatplace – iOS/macOS app to remember the places you've been

https://apps.apple.com/us/app/thatplace-places-youve-been/id6799790351
1•bretwalker•1m ago•0 comments

Show HN: Eigenkit – write a quantum circuit once, run it on many back ends

https://github.com/eigenorbit/eigenkit
1•sarseniy•2m ago•0 comments

Show HN: See AI written Code in Git PRs and trace what your coding agents did

https://viewtower.ai/
2•dommar04•4m ago•1 comments

Show HN: Am I Productive – a Mac menu bar app that labels what you have open

https://wayansatya.com/am-i-productive/
1•0xwayan•5m ago•0 comments

Building a URL shortener designed for 1.2M requests per second

https://learnitmyway.com/url-shortener/
1•learnitmyway•6m ago•0 comments

US announces new tariff proposals on EU, China, and other trade partners

https://www.bbc.com/news/live/cqglr4708r85t
1•only_in_america•6m ago•0 comments

An AI Dark Age Looms. But There's Another Path

https://www.thefp.com/p/artificial-intelligence-dark-age-broken-institutions
1•fortran77•6m ago•1 comments

USAID Files

https://usaid.gov/%27https://www.usaid.gov/%27
1•nateb2022•8m ago•0 comments

Machine Help Comprehensive

1•nghidn•9m ago•0 comments

Shoppers Are Using AI Agents to Save Them from the 'Annoyance Economy'

https://www.bloomberg.com/news/articles/2026-11-25/amazon-jpmorgan-block-ai-agents-saving-consume...
1•mancerayder•9m ago•1 comments

New York Times warns photographers not to update Photoshop over AI features

https://www.theverge.com/ai-artificial-intelligence/1041227/the-new-york-times-warns-photographer...
1•bookofjoe•9m ago•2 comments

Anon.af: AI-free social network

https://anon.af/
1•greatlionlikeab•10m ago•0 comments

Show HN: I made a library that combines your devices' memory to train models

https://github.com/abdallah-swe/layerpool
4•abdallah-swe•10m ago•0 comments

I'm a 100x Engineer Now

https://veszelovszki.com/a/tpe/
1•napolux•10m ago•0 comments

Pope Francis's diary details spiritual battles, encounters with devil

https://www.cathstan.org/faith/pope-franciss-diary-details-spiritual-battles-encounters-with-devi...
1•RickJWagner•11m ago•0 comments

'Anflopic' bodes badly for OpenAI's IPO prospects

https://www.ft.com/content/1c62dcfe-826f-4638-a9ee-c3b3009bc45d
2•anon373839•11m ago•0 comments

Drowning in agent PRs? Build less, test more, review what matters

https://renatobudinich.com/drowning-in-agent-prs-build-less-test-more-review-what-matters/
1•bnh•11m ago•0 comments

Show HN: Longyan, a Chinese popup dictionary that picks meanings from context

https://longyan.app/
1•mapuchu•12m ago•0 comments

An exponential bound for sunflowers (proof of Erdős–Rado conjecture) [pdf]

https://github.com/openai/math/blob/main/preprints/An-exponential-bound-for-sunflowers-November-2...
1•acossta•13m ago•0 comments

Scrivea adds an AI assistant to classic Outlook, including POP and IMAP accounts

https://scrivea.fr/
1•anthony_lopez•14m ago•0 comments

"Fire your team, like we did"

https://torben-ai.com/
2•Rant423•16m ago•3 comments

Google Releases Cogentic Papers on Integer Factorization, Discrete Logs and More

https://github.com/google-research/google-research/tree/master/cogentic_research_papers
4•rgwohlbold•18m ago•1 comments

A Few Weirdo Fantasist Takes on AI

https://bottomfeeder.substack.com/p/a-few-weirdo-fantasist-takes-on-ai
2•baud147258•18m ago•0 comments

"Chip Gate" and the ongoing cover-up

https://weissmann.substack.com/p/chip-gate-and-the-ongoing-cover-up
3•chmaynard•18m ago•0 comments

Show HN: EMWaver – build and flash MCU firmware from just Chrome, no IDE

https://emwaver.ai
2•luisml77•20m ago•0 comments

CrowdGPT – Collaborative AI training using idle compute

https://www.crowdgpt.net/
3•Vxtzq•21m ago•1 comments

Faster CI with Orchestrated Pytest Workers

https://making.close.com/posts/faster-ci-with-orchestrated-pytest-workers/
2•alecr95•21m ago•0 comments

Show HN: I built a browser-based 2.5D voxel multiplayer shooter

https://qake.se
3•nergal•23m ago•1 comments

Benchmarking Infinite Table, MUI X, AG Grid and TanStack Table at 1M Rows

https://infinite-table.com/blog/2026/11/11/benchmarking-infinite-table-mui-x-ag-grid-and-tanstack...
2•radubrehar•23m ago•0 comments