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

MacBook Neo: Review (Basic Apple Guy)

https://basicappleguy.com/basicappleblog/macbook-neo-review
1•frizlab•45s ago•0 comments

A simple messenger build for Agent-2-Agent communication and discovery

https://www.agentmessenger.io/
1•pixelsebi•3m ago•1 comments

Got personal financial, medical data you'd like to keep private? Good luck

https://news.harvard.edu/gazette/story/2026/04/got-personal-financial-medical-data-youd-like-to-k...
1•gnabgib•5m ago•0 comments

Making the invisible audible: Building an OpenXR experience for ocean protection

https://www.collabora.com/news-and-blog/blog/2026/04/22/making-the-invisible-audible-building-an-...
1•losgehts•5m ago•0 comments

Scalable CLI – an official command line for the Scalable Capital broker

https://github.com/ScalableCapital/scalable-cli
1•michidk•6m ago•0 comments

Subpixel Text Encoding/Font

https://www.msarnoff.org/millitext/
1•gurjeet•7m ago•0 comments

Stop publishing conference videos (2022)

https://www.notcheckmark.com/2022/11/stop-publishing-conference-videos/
1•Tomte•7m ago•0 comments

SkillGuard – scan agent skills for prompt injection payloads

https://github.com/obielin/skillguard
1•arabking•7m ago•1 comments

Itron Project

https://en.wikipedia.org/wiki/ITRON_project
1•doener•7m ago•0 comments

Hey, it's Earth Day today

2•burnt-resistor•8m ago•1 comments

We Are All Playing Politics at Work

https://idiallo.com/blog/we-are-playing-politics
3•firefoxd•8m ago•0 comments

Dryos

https://en.wikipedia.org/wiki/DRYOS
1•doener•9m ago•0 comments

SpaceX developing Golden Dome software

https://www.bloomberg.com/news/articles/2026-04-22/spacex-tapped-for-industry-group-developing-go...
3•infinitewars•10m ago•0 comments

OpenAI demos cyber-focused GPT to governments, who secures the model itself?

https://www.axios.com/2026/04/22/openai-gpt-cyber-government-meeting
1•Almured•10m ago•1 comments

Agents with Taste – How to transfer taste into an AI

https://emilkowal.ski/ui/agents-with-taste
2•emilkowalski•10m ago•0 comments

They will force you, open source maintainers, to drink the gasoline

https://www.notcheckmark.com/2026/04/you-will-drink-the-gasoline/
1•withzombies•13m ago•0 comments

Don't Use RLS in Supabase

https://www.paralect.com/stack/dont-use-rls-in-supabase
1•igorkrasnik•14m ago•0 comments

Ok, What actually uses Rust?

https://blog.goose.love
2•mellosouls•19m ago•1 comments

Let's enable MFA for all Ruby gems

https://thoughtbot.com/blog/lets-enable-mfa-for-all-ruby-gems
1•thunderbong•21m ago•0 comments

Open-Source contributions do not help

1•PerchunPak•22m ago•3 comments

New study compares growing corn for energy to solar production. It's no contest

https://www.anthropocenemagazine.org/2025/04/new-study-compares-growing-corn-for-energy-to-solar-...
2•dotcoma•22m ago•1 comments

Show HN: macOS VMs to let you agents run wild

https://ghostvm.org/
1•CarolineWang•23m ago•0 comments

You Need MLOps: When CI/CD for Machine Learning Becomes Mandatory

https://blog.ateljevagabond.se/posts/why-you-need-mlops/
1•dr_linux•23m ago•0 comments

Show HN: Ghost Pepper Meet local meeting transcription and diarization

https://matthartman.github.io/ghost-pepper/
1•MattHart88•24m ago•1 comments

Freelancers Not Delivering

2•sushrut1058•25m ago•2 comments

500 AI prompts scored across 8 quality dimensions. None passed

https://promptqualityscore.com/blog/500-ai-prompts
2•onchainintel•25m ago•0 comments

Twenty: The open alternative to Salesforce, designed for AI

https://github.com/twentyhq/twenty
3•thunderbong•26m ago•1 comments

Brick Farm Simplifies X API

https://buy.stripe.com/dRm5kD4y4eIo3skfSKb7y02
1•Quantumfields•26m ago•0 comments

The invisible engineering behind Lambda's network

https://www.allthingsdistributed.com/2026/04/the-invisible-engineering-behind-lambdas-network.html
2•mjb•29m ago•0 comments

It's None of Your Business

https://docs.eventsourcingdb.io/blog/2026/04/23/its-none-of-your-business/
3•goloroden•29m ago•0 comments