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

JetBlue flight hit drone while approaching JFK airport, FAA says

https://www.reuters.com/world/us/jetblue-flight-hit-drone-while-approaching-jfk-airport-faa-says-...
1•jofzar•17s ago•0 comments

Show HN: Lighting fast writing app on Mac with powerful table functions

https://org-notes-mac.netlify.app
1•unparadise•2m ago•0 comments

The OWASP Agentic Security Initiative Top: A Practical Developer Guide

https://agentsafelabs.com/blog/the-owasp-agentic-security-initiative-top-10-a-practical-developer...
1•waqarjaved•3m ago•0 comments

Exploring PDP-1 Lisp (1960)

https://obsolescence.dev/pdp1-lisp-introduction.html
3•ozymandiax•3m ago•0 comments

Letos: Create, edit, browse SQLite databases. Formerly known as SQLiteStudio

https://letos.org/
2•thunderbong•4m ago•0 comments

GameBoy Emulator on E-Ink [video]

https://www.youtube.com/watch?v=oPbOK90aJEo
2•toomim•5m ago•0 comments

Tau – Learn how coding agents are built

https://twotimespi.dev
2•lemming•9m ago•0 comments

Show HN: Embeddable Cumulative Crates Download History

https://cratesdownloadhistory.undivisible.dev/
2•undivisible•9m ago•0 comments

Show HN: PDF Insight – local-first AI that sorts your PDFs on-device

https://pdf-insight.com/
2•jacoblav•12m ago•0 comments

Getting the B.l.o.a.t. (Best liver of all time)

https://sull1van.com/best-liver-of-all-time
2•s3p•16m ago•0 comments

Foray – AI that generates a complete business blueprint and stress-tests ur idea

https://www.getforay.ai/
2•foray-ai•16m ago•0 comments

Memory Safe Context Switching (longjmp, setjmp) in Fil-C

https://fil-c.org/context_switches
3•modeless•22m ago•0 comments

'News' Site Keeps Hallucinating EFF Staffers

https://www.eff.org/deeplinks/2026/06/news-site-keeps-hallucinating-eff-staffers
3•speckx•22m ago•1 comments

Large language models and the textual nude

https://plus.flux.community/p/large-language-models-and-the-textual
3•milosstich•24m ago•0 comments

TPG boss to enter guilty plea and seek leniency

https://www.afr.com/companies/financial-services/tpg-boss-to-enter-guilty-plea-and-seek-leniency-...
2•Alien1Being•25m ago•0 comments

Chinese Hedge Funds Warn the AI 'Super Bubble' Is Ready to Burst

https://www.bloomberg.com/news/articles/2026-06-26/chinese-hedge-funds-warn-the-ai-super-bubble-i...
2•cdrnsf•25m ago•0 comments

Tidal Says It Won't Pay Royalties for AI-Generated Music

https://www.404media.co/tidal-says-it-wont-pay-royalties-for-ai-generated-music/
3•cdrnsf•26m ago•3 comments

Show HN: AMA2, messenger built for AI agent

https://ama2.me/
1•ejhooooon•27m ago•0 comments

Devin Fusion: Frontier Performance at 35% Lower Cost

https://cognition.com/blog/devin-fusion#examples-of-sidekick-in-action
2•qainsights•29m ago•0 comments

LongCat-2.0, a large-scale MoE model with 1.6T total and 48B Active

https://longcat.chat/blog/longcat-2.0/
2•benjiro29•30m ago•0 comments

What any website can see about you

https://mysysinfo.com
3•rajsuper123•39m ago•0 comments

Show HN: Dribble – an open-source AI IDE for databases

https://github.com/azhakhan/dribble
2•ayazhan•43m ago•0 comments

Same Product, Same Store, but on Instacart, Prices Might Differ

https://www.nytimes.com/2025/12/09/business/instacart-algorithmic-pricing.html
3•airhangerf15•54m ago•0 comments

Open Memory Protocol – One Memory Store for Claude, ChatGPT, Curso

https://github.com/SMJAI/open-memory-protocol
4•soji_mathew•55m ago•0 comments

Show HN: A temporal engine for dual calendar synchronization (50k years)

https://jolly-lab-1d2f.cherlokrobin.workers.dev/
2•Cherlokrobin•56m ago•1 comments

Linux Antiquity

https://github.com/diinki/linux-antiquity
2•igmn•1h ago•1 comments

Self hosting the modern AI stack could be the way forward

https://github.com/raiyanyahya/llmaker
5•sleepynoodle•1h ago•0 comments

The Impossibility of Mitigating AI Jailbreaks

https://reliable-ai.review/posts/2026-05-priviledge_erosion/
3•NickySlicks•1h ago•0 comments

Show HN: A Firewall for AI agents with auditing

https://github.com/beebeeVB/trajeckt/
2•beebeeVB•1h ago•0 comments

Show HN: Yocto/BitBake skills that make AI agents check official docs

https://github.com/Higangssh/yocto-agent-skills
3•swq115•1h ago•0 comments