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

The CDP Is the AI

https://www.jacquescorbytuech.com/writing/cdp-ai
1•iamacyborg•1m ago•0 comments

Majorana 2: Microsoft's new quantum chip

https://news.microsoft.com/source/features/innovation/majorana-2-microsoft-discovery-agentic-ai/
2•mgh2•1m ago•0 comments

RSS is back AI agents are reading it

https://julienreszka.com/blog/rss-is-back-ai-agents-are-reading-it/
1•julienreszka•2m ago•0 comments

Y Combinator Requests for Startups, 2008–2026

https://hoodasaurabh.github.io/yc-requests-for-startups/
1•hooda•6m ago•0 comments

Free Pascal – Advanced open source Pascal compiler

https://www.freepascal.org/
2•reconnecting•6m ago•0 comments

The terrifying reality of Wi-Fi sensing [video]

https://www.youtube.com/watch?v=oBDX_dPvq4A
1•gozzoo•8m ago•0 comments

Session-Aware Agentic Routing: Continuity-Aware Model Selection for Long-Horizon

https://vllm.ai/blog/2026-06-02-session-aware-agentic-routing
1•matt_d•8m ago•0 comments

I built a React and MDX workspace so AI agents stop generating giant HTML files

https://github.com/quan0715/open-press
1•quan0715•9m ago•0 comments

Cooklang – A Recipe Markup Language

https://cooklang.org
1•emerongi•9m ago•1 comments

Show HN: Jolli AI – Local-First AI Memory for Claude Code, Codex, and Gemini CLI

https://www.jolli.ai
1•keoni45•9m ago•0 comments

African Trypanosomiasis

https://en.wikipedia.org/wiki/African_trypanosomiasis
1•OsrsNeedsf2P•9m ago•0 comments

Real-time and low-latency quantum error correction with superconducting qubits

https://www.nature.com/articles/s41467-026-73331-6
1•bookofjoe•11m ago•0 comments

Riscrithm (v1.1) – An intuitive RISC-V assembler and optimizer written in Go

https://github.com/ghetea-patrick/riscrithm/releases/tag/v1.1.0
1•patrick-ghetea•12m ago•1 comments

Uber caps employee AI spending after blowing through budget in four months

https://techcrunch.com/2026/06/02/uber-caps-employee-ai-spending-after-blowing-through-budget-in-...
4•notfried•12m ago•1 comments

MacBook Neo Outsold Every Other Mac in Its Debut Quarter

https://www.macrumors.com/2026/06/02/macbook-neo-outsold-every-other-mac/
2•mgh2•16m ago•0 comments

Can Chainguard Save Open-Source Software from Mythos? Can Anyone?

https://devops.com/can-chainguard-save-open-source-software-from-mythos-can-anyone/
1•CrankyBear•16m ago•0 comments

Fruit Walls: Urban Farming in the 1600s

https://solar.lowtechmagazine.com/2015/12/fruit-walls-urban-farming-in-the-1600s/
1•DamonHD•17m ago•0 comments

The AI Trap We're Walking Into

https://unvoid.substack.com/p/the-ai-trap-were-walking-into
1•0asa•20m ago•0 comments

Branchless Quicksort faster than std:sort and pdqsort with C and C++ API

https://tiki.li/blog/blqsort
1•birdculture•21m ago•0 comments

Microsoft Execution Containers (MXC)

https://github.com/microsoft/mxc
1•nor0x•21m ago•0 comments

Recovering Eric Graham's 1987 Amiga Juggler raytracer source code

https://alphapixeldev.com/recovering-eric-grahams-1987-amiga-juggler-raytracer-source-code/
1•doener•22m ago•0 comments

Russia Ships Most Oil Since 2022 as Drones Strike Refineries

https://www.bloomberg.com/news/articles/2026-06-02/russia-gushes-crude-exports-as-drone-strikes-h...
1•speckx•22m ago•0 comments

Who Paid the Piper?

https://en.wikipedia.org/wiki/Who_Paid_the_Piper%3F
2•simonebrunozzi•24m ago•0 comments

My thoughts after using Clojure for about a month

https://www.acdw.net/clojure/
2•speckx•25m ago•0 comments

AI Budget Is Growing. Your Returns Aren't

https://www.bain.com/insights/your-ai-budget-is-growing-your-returns-arent-heres-why/
1•jameslk•25m ago•0 comments

Angular jasmine unit tests are harder to code/maintain than the actual feature

2•GamingAtWork•26m ago•0 comments

New college grads are doing better than the vibes suggest

https://www.vox.com/future-perfect/490383/college-graduation-artificial-intelligence-2026-jobs-labor
1•dabinat•26m ago•0 comments

Project Tapestry: The Path to Frontier Sovereign AI

https://thealliance.ai/blog/project-tapestry-the-path-to-frontier-sovereign-ai
1•AI_Alliance•27m ago•0 comments

Show HN: Clor – give your agent claws

https://clor.com/
4•jacobgold•28m ago•1 comments

Seven states sue US for paying $1B to make TotalEnergies exit wind power

https://www.ft.com/content/d4f25b34-ce45-4321-a4ee-cb5879f7a57a
4•JumpCrisscross•28m ago•0 comments