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

Tell HN: Fable guardrails trigger on random questions

1•nocoder•12m ago•0 comments

Show HN: Rules-free solo-only client for the Paperback tabletop game

https://wanderinghorse.net/gaming/paperback/solo.html
1•sgbeal•15m ago•0 comments

AI found a Linux root bug that was missed for 15 years

https://www.wired.com/story/security-news-this-week-ai-found-a-root-bug-in-linux-that-everyone-mi...
1•crowd51•22m ago•0 comments

The ancient Chinese way to cool homes (2023)

https://www.bbc.com/future/article/20230712-how-ancient-skywells-are-keeping-chinese-homes-cool
2•1659447091•25m ago•0 comments

DeepSeek developing its own AI chip, sources say

https://www.reuters.com/world/china/chinas-deepseek-developing-its-own-ai-chip-sources-say-2026-0...
3•theanonymousone•25m ago•0 comments

Show HN: Mindwalk – Replay coding-agent sessions on a 3D map of your codebase

https://github.com/cosmtrek/mindwalk
1•cosmtrek•28m ago•0 comments

An open letter to the Medici of intelligence

https://www.sov.vc/blog/the-next-frontier-sovereignty
1•abreckle•28m ago•0 comments

What Happens Inside DynamoDB When You Hit 3000 RCU on a Single Partition Key

https://medium.com/@yalovoy/what-happens-inside-dynamodb-when-you-hit-3000-rcu-on-a-single-partit...
1•zero-ground-445•28m ago•0 comments

Vinod Khosla to Buy Seattle Seahawks for $9.6B

https://www.sportico.com/business/team-sales/2026/seattle-seahawks-sale-vinod-khosla-owner-billio...
2•kpw94•30m ago•0 comments

Ask HN: How do you manage content for React-based websites?

1•admininistratos•32m ago•0 comments

Who cleans up after the vibe-coding party?

https://www.ft.com/content/cec8df9e-b43b-4cd1-8feb-c07e804e8d33
2•jweir•34m ago•1 comments

Boeing 737 window dislodged, passenger partially sucked out

https://www.reuters.com/business/ryanair-plane-makes-emergency-landing-greece-after-window-dislod...
2•smallnix•43m ago•0 comments

BSD Make Extravaganza

https://github.com/b-aaz/bmake-extravaganza
1•signa11•44m ago•0 comments

Where Tomorrow's Engineers Come From, Part 2: The Apprenticeship Problem

https://www.abovethertl.com/p/where-tomorrows-engineers-come-from-b71
2•rramadass•46m ago•1 comments

How Container Networking Works: Building a Bridge Network from Scratch

https://labs.iximiuz.com/tutorials/container-networking-from-scratch
1•signa11•48m ago•0 comments

Colleges have an education problem (2025)

https://12gramsofcarbon.com/p/colleges-have-an-education-problem
2•theahura•52m ago•0 comments

Show HN: Skiff, a frontier isochrone tuning simulation for sailboats

https://github.com/deepbluedynamics/skiff
4•kordlessagain•58m ago•1 comments

Alphaville LLC initiates coverage of SpaceX with Buy recommendation

https://www.ft.com/content/1344d22b-ee64-488d-bd02-170fe0c9de2b
2•imichael•58m ago•0 comments

Taste

https://katdispatch.bearblog.dev/on-taste/
2•JumpCrisscross•1h ago•0 comments

Cpp-Go-Zig-Odin: A series of small programs/tasks to compare

https://github.com/phillvancejr/Cpp-Go-Zig-Odin
1•ksec•1h ago•0 comments

UK Cybercrime Journal: Argos Account Takeover Fraud

https://blog.bushidotoken.net/2026/07/uk-cybercrime-journal-argos-account.html
1•diedose•1h ago•0 comments

Ask HN: Do your tests clear "If the tests pass, you cannot break the code" bar?

1•tristenharr•1h ago•1 comments

Show HN: AsyncFutures – A Ruby gem for asynchronous/concurrent code execution

https://rubygems.org/gems/async_futures/versions/0.1.2
1•eestrada•1h ago•0 comments

Proof of Concept for the recent Litematica path traversal bug which leads to RCE

https://github.com/AliensToEarth/litematica-rce
2•Cider9986•1h ago•0 comments

Built a tracker to estimate water wastage when talking to Claude

https://github.com/piyushkhemka/sip
1•piyushkhemka•1h ago•0 comments

BMW Warns of Unauthorized Production of 'Pirated' Cars in Russia

https://www.themoscowtimes.com/2026/07/11/bmw-warns-of-unauthorized-production-of-pirated-cars-in...
2•_____k•1h ago•0 comments

SK Hynix CEO: worst memory shortage in 2027, will persist beyond 2030

https://www.reuters.com/world/asia-pacific/sk-hynix-ceo-sees-worst-ever-memory-supply-shortage-20...
5•giuliomagnifico•1h ago•0 comments

Big Tech piles on $350B in debt to fuel AI data center race

https://www.latimes.com/business/story/2026-07-10/big-tech-piles-on-350-billion-in-debt-to-fuel-a...
5•1vuio0pswjnm7•1h ago•0 comments

Credit Sleeves Collapse Bubbles

https://medium.com/@mcgrathrpm/credit-sleeves-are-the-bubble-6c57a54b9cff
2•piyh•1h ago•0 comments

Can't Read Slop Anymore

https://blog.imraniqbal.org/cant-read-slop-anymore/
3•HotGarbage•1h ago•0 comments