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

Artist with no technical experience stumbles upon the next generation of LLMs

1•itakechops•3m ago•0 comments

Carbon: An open-source DNA foundation model 275× faster than prior art

https://huggingface.co/spaces/HuggingFaceBio/carbon-demo
1•victormustar•4m ago•0 comments

Cities: Skylines Uses a Stock-Market Analogy to Influence Gameplay

http://jkm.dev/posts/cities-skylines-trading-market/
2•birdculture•7m ago•0 comments

How Big Tech is harnessing the data of Indian factory workers to train robots

https://scroll.in/article/1092960/how-big-tech-is-harnessing-the-data-of-indian-factory-workers-t...
1•theletterf•8m ago•0 comments

Goodbye ChatGPT

https://alexieidingli.medium.com/goodbye-chatgpt-a60bcf6b7c5b
2•andsoitis•10m ago•1 comments

Bolt CEO let go of his HR team for creating problems that didn't exist

https://fortune.com/2026/05/19/bolt-ceo-ryan-breslow-cut-hr-department-causing-problems-fintech-s...
1•e2e4•12m ago•2 comments

Honeybee venom and melittin suppress growth in breast cancer (2020)

https://pubmed.ncbi.nlm.nih.gov/32923684/
1•blumomo•14m ago•0 comments

The Sky Heist

https://www.skyheist.me/
1•clivehays•24m ago•0 comments

Ask HN: How to make a mono-repo AI-Ready?

1•kasnaka•29m ago•0 comments

Velocipedia

https://www.gianlucagimini.it/portfolio-item/velocipedia/
2•vintagedave•31m ago•0 comments

PostgreSQL backup tool gets some backup of its own

https://www.theregister.com/databases/2026/05/20/postgresql-backup-tool-gets-some-backup-of-its-o...
2•jjgreen•34m ago•0 comments

Public have more fear than hope on AI and future of work, study finds

https://www.kcl.ac.uk/news/one-in-five-britons-think-ai-will-create-civil-unrest-study-finds
4•geox•36m ago•1 comments

Coding Slow Is Smooth, Coding Smooth Is Fast

https://daily.tinyprojects.dev/207
1•tinyprojects•37m ago•1 comments

Show HN: Kreuzberg Cloud – ultra fast content intelligence – in public beta

https://kreuzberg.dev
3•nhirschfeld•38m ago•4 comments

Show HN: Widget Cast – Video Widgets for Your iPhone and Apple Watch

1•kingofspain•42m ago•0 comments

Elevated radiation levels detected on Russian drone debris

https://unn.ua/en/news/elevated-radiation-levels-detected-on-russian-drone-debris-striking-elemen...
4•defly•44m ago•0 comments

The Fallacy of Levelized Cost and the Politics of Demand

https://systemsthinkingcollection.substack.com/p/sustainable-energy
2•InputName•50m ago•0 comments

Google Antigravity 2.0

https://antigravity.google/blog/introducing-google-antigravity-2-0
2•haizhung•51m ago•0 comments

The weird, wild story of humanity's obsession with gold

https://www.economist.com/culture/2026/05/14/the-weird-wild-story-of-humanitys-obsession-with-gold
2•andsoitis•53m ago•0 comments

Watch RT Live Anywhere in the World

https://rtlive.ru
2•dorkel•57m ago•0 comments

Pay Attention – Jon Haidt's Commencement Address at NYU

https://www.theatlantic.com/ideas/2026/05/nyu-jonathan-haidt-commencement-speech/687168/
2•gladuz•58m ago•0 comments

Blood Pumping Mechanism of the Hoof

https://horses.extension.org/blood-pumping-mechanism-of-the-hoof/
2•thunderbong•59m ago•0 comments

Show HN: Agent thread – Share claude code and codex sessions as public links

https://agent-thread.com
1•pixxxel•59m ago•0 comments

Optimizing Your PowerShell $Profile

https://devblogs.microsoft.com/powershell/optimizing-your-profile/
2•ankitg12•59m ago•0 comments

"An (important) message from Infomaniak's founder"

7•netfortius•1h ago•1 comments

Google is rolling out its redesigned Workspace app icons

https://www.theverge.com/tech/932417/google-gmail-docs-cal-sheets-workspace-icon-redesign
2•xanthine•1h ago•2 comments

I Decided to Leave Mistral

https://twitter.com/Briviagra/status/2056975510731698188
2•defly•1h ago•2 comments

A small revolt against bloated software

https://www.f-rello.com/manifesto
2•karstenb•1h ago•0 comments

Proposal: Surface=Laterite

https://wiki.openstreetmap.org/wiki/Proposal:Surface%3Dlaterite
1•altilunium•1h ago•0 comments

Ask HN: Sorry, what Was FiveThirtyEight?

2•gagdiez•1h ago•2 comments