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

An exhaustive review of design tool hover areas

https://tldraw.dev/blog/a-review-of-design-tool-hover-areas
1•steveruizok•41s ago•0 comments

Show HN: Putting AI in the loop for embedded dev

https://www.electronicsconsult.com/blog/ai-assisted-hardware-in-the-loop-for-embedded-linux
1•OOHehir•43s ago•0 comments

Show HN: Pave – CLI for Managing Path

https://github.com/microsoft/pave
2•cpendery•1m ago•0 comments

NASA building the first nuclear reactor-powered spacecraft. How will it work?

https://www.technologyreview.com/2026/04/14/1135848/nasa-nuclear-powered-spacecraft/
1•gnabgib•1m ago•0 comments

A simple test-time method that beats Claude Mythos on Terminal-Bench

https://llm-as-a-verifier.notion.site
1•jackykwok•1m ago•1 comments

Synctera acquires compliance startup Cable

https://www.axios.com/pro/fintech-deals/2026/04/14/synctera-compliance-startup-cable-acquisition
1•thatdrew•1m ago•0 comments

Can Michigan Become the U.S. Drone Capital?

https://www.nytimes.com/2026/04/14/business/michigan-drone-capital.html
1•rmason•2m ago•1 comments

AgentFM – A single Go binary that turns idle GPUs into a P2P AI grid

https://github.com/Agent-FM/agentfm-core
1•s4saif•3m ago•0 comments

Demoralize Your Teams Quickly and Efficiently with Micromanagement (2010)

https://www.stellman-greene.com/2010/11/29/demoralize-your-teams-quickly-and-efficiently-with-mic...
1•downbad_•5m ago•1 comments

Whop: The Gen-Z Platform That Wants to Be Your Bank, Broker and Business

https://www.forbes.com/sites/boazsobrado/2026/04/10/one-stop-whop-the-gen-z-platform-that-wants-t...
1•rmason•5m ago•0 comments

GitHub gave webhook secrets away in webhook call

1•time4tea•6m ago•0 comments

Mississippi is running out of liquor, and it's the state's fault

https://www.washingtonpost.com/nation/2026/04/12/mississippi-liquor-sales-breakdown/
1•paulpauper•7m ago•1 comments

Mamdani Plans to Open City-Owned Grocery Store in East Harlem

https://www.nytimes.com/2026/04/12/nyregion/mamdani-city-owned-grocery-store-la-marqueta.html
3•paulpauper•7m ago•0 comments

Moonsteading

https://marginalrevolution.com/marginalrevolution/2026/04/moonsteading.html
1•paulpauper•8m ago•0 comments

The Great Pyramid of Giza and the Speed of Light

https://www.johndcook.com/blog/2026/04/09/pyramid-speed-of-light/
1•ibobev•10m ago•0 comments

Why Is France Moving from Microsoft Windows to Linux

https://qazinform.com/news/why-is-france-moving-from-microsoft-windows-to-linux-8887c4
2•losgehts•12m ago•0 comments

Aadam Jacobs Collection at the Live Music Archive: Free Audio

https://archive.org/details/aadamjacobs
1•LaSombra•14m ago•0 comments

YouTube Device Partner Summit 2026

https://www.collabora.com/news-and-blog/news-and-events/youtube-device-partner-summit-2026.html
2•losgehts•16m ago•0 comments

Show HN: Speech to Calorie Tracker

https://github.com/crocsarecool/nutrition-app
1•raunaqvaisoha•18m ago•1 comments

Event Order

https://www.quirksmode.org/js/events_order.html#link4
1•aziaziazi•19m ago•0 comments

RGC-Basic Update: Easy, Modern Basic in the Browser Has Sprites Now

https://retrogamecoders.com/rgc-basic-update-april-2026/
1•ibobev•19m ago•0 comments

Amiga XSysInfo v0.6

https://github.com/reinauer/xSysInfo/releases/tag/release_v0.6
1•doener•19m ago•0 comments

Generalist AI Doesn't Scale

https://www.daemonology.net/blog/2024-04-06-Generalist-AI-doesnt-scale.html
1•colinhb•19m ago•0 comments

Show HN: Quant Job Market Visualizer

https://quant.kadoa.com/
1•hubraumhugo•19m ago•0 comments

Crates.io Trusted Publishing

https://crates.io/docs/trusted-publishing
1•jcbhmr•20m ago•0 comments

Online ZPL Viewer

https://labelary.com/viewer.html
1•gregsadetsky•20m ago•0 comments

Accessible Modals: How to Build Dialogs That Don't Trap or Exclude Users

https://getaccessguard.com/posts/accessible-modals-how-to-build-dialogs-that-dont-trap-confuse-or...
1•chille87•20m ago•0 comments

Trusted access for the next era of cyber defense

https://openai.com/index/scaling-trusted-access-for-cyber-defense/
2•surprisetalk•21m ago•0 comments

Competition is not bad, its only bad if you have raised a lot of money

https://docsalot.dev/blog/why-im-building-yet-another-docs-product
1•fazkan•21m ago•0 comments

TRSE Is Now in the Browser – No Install, No Setup, Just Retro Coding

https://retrogamecoders.com/trse-now-online/
1•ibobev•22m ago•0 comments