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

The IPv6 Mess (2002)

https://cr.yp.to/djbdns/ipv6mess.html
1•tgma•1m ago•0 comments

Tell HN: Using Telegram as an indexed system for geo-notes

1•migelo•2m ago•0 comments

Ask HN: Who is your favourite Entrepreneur/Visionary?

1•wasimsk•3m ago•0 comments

European civil servants are being forced off WhatsApp

https://www.politico.eu/article/european-civil-servants-new-messaging-services/
2•ZacnyLos•6m ago•0 comments

Online age checks are coming in Europe

https://www.politico.eu/article/online-age-checks-are-coming-europe-children-social-media/
1•ZacnyLos•7m ago•0 comments

Can you steal $10k from a locked iPhone? [video]

https://www.youtube.com/watch?v=PPJ6NJkmDAo
1•ProfDreamer•9m ago•0 comments

GraphQL vs. REST: 18 Claims Fact-Checked with Primary Sources

https://wundergraph.com/blog/fact-checking-graphql-vs-rest
1•jensneuse•11m ago•1 comments

Has the Era of the Mega-Layoff Arrived?

https://www.wsj.com/business/has-the-era-of-the-mega-layoff-arrived-928f061d
1•erehweb•11m ago•0 comments

A premium infrastructure layer for hotels and event booking

https://cooveb-organizers-waitlist-gules.vercel.app/
1•sshinde•14m ago•0 comments

CERN Joins the OpenSearch Software Foundation as an Associate Member

https://opensearch.org/blog/cern-joins-the-opensearch-software-foundation/
1•Lunar5227•21m ago•0 comments

Show HN: Robust alternative to OpenClaw

https://github.com/opentalon/opentalon
3•opak•24m ago•0 comments

More Communities Like This?

1•ayorke•25m ago•0 comments

Show HN: Job Scraper for LinkedIn

https://chromewebstore.google.com/detail/job-scraper-for-linkedin/kkafipickfibnamoijjgamklecmmbbmf
1•qwikhost•26m ago•0 comments

Show HN: Agent Armor, a Rust runtime that enforces policies on AI agent actions

https://github.com/EdoardoBambini/Agent-Armor-Iaga
3•edoardobambini-•30m ago•2 comments

Coming Soon: Things That Matter in AI

https://www.technologyreview.com/2026/04/14/1135298/coming-soon-10-things-that-matter-in-ai-right...
1•joozio•30m ago•0 comments

AI Tremor-Print: Biometric Identification System

https://github.com/peterretief/biometric
1•peter_retief•31m ago•1 comments

Allbirds stock sees a wild surge of 582% on pivot from sneakers to AI

https://www.businessinsider.com/allbirds-stock-price-ai-newbird-gpus-compute-gpuaas-bird-shoes-20...
1•outlore•31m ago•0 comments

RIP Pull Requests (2005-2026)

https://www.latent.space/p/ainews-rip-pull-requests-2005-2026
1•swyx•33m ago•0 comments

JIT Compilers and Cache Coherency

https://joelsiks.com/posts/jit-compilers-and-cache-coherency/
2•joelsiks•39m ago•0 comments

AI Eyebrow Filter: Try Eyebrow Editor Online – AILab Tools

https://www.ailabtools.com/eyebrow-filter
1•minimk•41m ago•0 comments

EU age verification app ready as Europe moves to curb kids' social media access

https://www.reuters.com/world/eu-age-verification-app-ready-europe-moves-curb-childrens-social-me...
2•taubek•47m ago•0 comments

A Black-Box Contract Engine for Agentic Software Development

https://github.com/elmacnifico/dojo
1•feedyourhead•52m ago•0 comments

Lovable vs. Bolt vs. Replit: who's leaking the most Supabase data?

https://securityscanner.dev/blog/lovable-vs-bolt-vs-replit-rls
4•slederer•53m ago•0 comments

Leonardo, Borgia, and Machiavelli: A Fateful Collusion

https://www.historytoday.com/archive/leonardo-borgia-and-machiavelli-fateful-collusion
1•apollinaire•54m ago•0 comments

Eustella: We reinvent ChatGPT for Europeans, with OpenClaw in mind

https://eustella.com
1•doener•56m ago•1 comments

The Elegant Laminar Flow of Moroccan Tea [video]

https://www.youtube.com/watch?v=rB5jpFHq06w
1•user070223•59m ago•1 comments

From Idea to Deployed App: Full Laravel Workflow with LaraCopilot

https://laracopilot.com/blog/idea-to-deployed-app/
1•laracopilotai•1h ago•0 comments

I made an MVP in one day

https://diegolopez.dev/2026/04/15/i-made-an-mvp-in-one-day/
2•diegolopd•1h ago•0 comments

AI Data Residency: When Cloud APIs Don't Meet Your Compliance Requirements

https://substack.com/home/post/p-194377303
1•morleymedia•1h ago•0 comments

The New Window

1•claudecarlyle•1h ago•0 comments