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•11mo ago

Comments

qwertox•11mo ago
Rule #1: Always put deletions behind a flag which is disabled for the first couple of test runs.
turtleyacht•11mo 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•11mo 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•11mo ago
Oh, I see. Having a flag to skip deletion during test runs is a good rule then.
rvz•11mo 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•11mo ago
Who runs such an AI generated script without checking the code first?
qwertox•11mo 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•11mo ago
Right so lets just always run the code as is ?
qwertox•11mo 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•11mo 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•11mo ago
In which Roko's Basilisk fires a warning shot.
jethronethro•11mo ago
This is why you test code or a script before running it for real. Live and learn, I guess ...

Moodle – open-source Learning Management System

https://moodle.org/
1•10000truths•39s ago•0 comments

British reporter gets personal YouTube account blocked

https://twitter.com/edconwaysky/status/2052349717489537472
1•jarym•2m ago•1 comments

Nintendo announces price increases for Nintendo Switch 2

https://www.nintendo.co.jp/corporate/release/en/2026/260508.html
1•razorbeamz•2m ago•0 comments

YouTube TimeWatcher – See where your YouTube time goes

https://youtubetimewatcher.com/
2•stacyz•4m ago•0 comments

At 100, Attenborough's Voice Is a Lesson in Wonder and Planetary Stewardship

https://time.com/article/2026/05/07/david-attenborough-100-birthday-prince-harry/
3•yreg•10m ago•0 comments

JSON Schema (Jsonschema)

https://datatracker.ietf.org/wg/jsonschema/about/
2•BerislavLopac•10m ago•0 comments

Museum of the Human Web

https://museum.parallel.ai/introduction?era=modern
2•kristopolous•10m ago•0 comments

TranscriptFormer: A generative cell atlas across 1.5B years of evolution

https://www.science.org/doi/10.1126/science.aec8514
2•tkaraletsos•10m ago•0 comments

Influenza a (H1N1) (2009)

https://www.bunniestudios.com/blog/2009/on-influenza-a/
2•downbad_•10m ago•1 comments

The room, not the words in it. My AI harness

https://blog.imjackofitall.com/posts/2026-04-28/
3•imjackofitall•12m ago•0 comments

Why I'm giving up on Facebook (2017)

http://blog.afandian.com/2017/01/why-i-am-giving-up-on-facebook/
6•chistev•12m ago•1 comments

Tesla Recalls Cybertruck Because Wheels May Fall Off

https://www.kbb.com/car-news/tesla-recalls-cybertruck-because-wheels-may-fall-off/
2•bjhess•14m ago•0 comments

Pitchfork: A devilishly good process manager for developers

https://pitchfork.en.dev/
2•thunderbong•20m ago•0 comments

AI-Native Hedge Funds Are Possible and Profitable Just Not the Next Unicorn

https://podium-finance.com/blog/ai-native-hedge-funds-and-yc
2•nlpnerd•21m ago•0 comments

Four sites. Four ways money was leaving the table

https://noemica.io/blog/four-ways-money-leaves-the-table
2•SebastianSosa•21m ago•0 comments

Auth Proxy Injection for LLMs

https://www.grepular.com/Auth_Proxy_Injection_for_LLMs
2•mike-cardwell•22m ago•0 comments

A Simple Ld_preload Tutorial

https://catonmat.net/simple-ld-preload-tutorial
1•gurjeet•26m ago•0 comments

Why the Future of AI Depends on Smaller Models

https://jeevan.life/posts/why-the-future-of-ai-depends-on-smaller-models.html
2•lroe•27m ago•0 comments

The agent principal-agent problem

https://crawshaw.io/blog/agent-principal-agent
1•bumbledraven•29m ago•0 comments

Show HN: Sfera – sliding puzzle in curved space (open-sourced)

https://github.com/bntre/Sfera
1•bntr•29m ago•0 comments

SubQ: Sub-quadratic LLM built for 12M-token reasoning

https://subq.ai/
3•anujbans•32m ago•0 comments

Camera

https://online-camera.com
2•ent101•36m ago•0 comments

KDE Plasma 6.7 to Provide a Better Experience for CPU-Based Rendering

https://www.phoronix.com/news/KDE-Plasma-Faster-WL-SHM
3•doener•38m ago•0 comments

Live Global Hantavirus Outbreak Tracker

https://hantavirusmap.com
3•N19PEDL2•39m ago•0 comments

Interviewing/Applying to YC

1•chanlee514•43m ago•0 comments

I tried the viral 'jaw release' fascial massage

https://www.thetimes.com/life-style/health-fitness/article/jaw-release-facial-massage-v7rmgqsb9
3•petethomas•43m ago•0 comments

Ask HN: Who Uses a todo.txt?

3•mikenikles•44m ago•1 comments

Why does AI like goblins and Japan so much?

https://english.elpais.com/technology/2026-05-07/why-does-ai-like-goblins-and-japan-so-much.html
4•geox•44m ago•0 comments

Dirty Frag: Universal Linux LPE

https://github.com/V4bel/dirtyfrag
1•danaris•48m ago•0 comments

Root-based Android app backup tool powered by Restic

https://github.com/hddq/restoid
1•anotherevan•51m ago•0 comments