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•12mo ago

Comments

qwertox•12mo ago
Rule #1: Always put deletions behind a flag which is disabled for the first couple of test runs.
turtleyacht•12mo 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•12mo 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•12mo ago
Oh, I see. Having a flag to skip deletion during test runs is a good rule then.
rvz•12mo 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•12mo ago
Who runs such an AI generated script without checking the code first?
qwertox•12mo 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•12mo ago
Right so lets just always run the code as is ?
qwertox•12mo 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•12mo 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•12mo ago
In which Roko's Basilisk fires a warning shot.
jethronethro•12mo ago
This is why you test code or a script before running it for real. Live and learn, I guess ...

PyTorch DevLog

https://docs.pytorch.org/devlogs/
1•matt_d•38s ago•0 comments

Lie-to-Children

https://en.wikipedia.org/wiki/Lie-to-children
1•o4c•12m ago•0 comments

I reverse engineered macOS to disable built-in display

https://frankster0542.gumroad.com/l/saafi
1•fkusiapp•21m ago•0 comments

Ask HN: How much does Gemini API cost for a simple n8n workflow?

1•Meld5792•30m ago•0 comments

MCP server that gives a forensic verdict on biopharma catalyst plays

https://github.com/yesc97/biopharma-catalyst-mcp
1•yesc97•33m ago•0 comments

Addressing GitHub's recent availability issues

https://github.blog/news-insights/company-news/addressing-githubs-recent-availability-issues-2/
2•mvdtnz•49m ago•2 comments

Plenty of Hours in the Day

https://www.wsj.com/arts-culture/books/big-time-review-plenty-of-hours-in-the-day-d3744c1a
1•lxm•49m ago•0 comments

Show HN: Kheeper, a registry designed for bootable images

https://kheeper.com/
2•areed•53m ago•0 comments

Trump's Border Spending Spurs Boom in AI-Infused Surveillance

https://www.wsj.com/tech/trumps-border-spending-spurs-boom-in-ai-infused-surveillance-4714521b
3•lxm•59m ago•0 comments

America the Undammed

https://www.nytimes.com/2026/05/07/climate/america-the-undammed.html
1•lxm•1h ago•0 comments

University student arrested in Taiwan for radio hack that halted high speed rail

https://www.rtl-sdr.com/student-arrested-in-taiwan-for-using-sdr-and-handheld-radios-to-halt-four...
1•bsgamble•1h ago•0 comments

SmartScreen warnings triggered after migration from EOC. EV certs affected too

https://github.com/Azure/artifact-signing-action/issues/128
1•polywickstudio•1h ago•2 comments

Open Source Volunteer Opportunities

https://ossvolunteers.com/
1•pabs3•1h ago•0 comments

SVG Frame-by-Frame Animation Generator

https://github.com/Emasoft/svg2fbf
2•beepill•1h ago•1 comments

The Bottom-Up Building of a Language for Subleq with Text Macros

https://coe.psu.ac.th/ad/subleq/
2•ADavison2560•1h ago•0 comments

The Greatest Shot in Television: James Burke Had One Chance to Nail This Scene

https://www.openculture.com/2024/10/the-greatest-shot-in-television.html
31•susam•1h ago•7 comments

Copilot Builder enables welding with AI

https://www.millerwelds.com/products/copilot-builder-with-blue-iq-powered-by-novai
1•DarkContinent•1h ago•0 comments

University Claims Withholding Water from Data Center 'Unlawfully Discriminatory'

https://www.404media.co/university-claims-withholding-water-from-nuclear-weapons-data-center-is-u...
1•adrienne•1h ago•0 comments

I Got Tired of Rewriting Prompts So I Built This

https://github.com/Ademking/SkillPrompts
2•ademking•1h ago•0 comments

Trusted Computing Frequently Asked Questions (2003)

https://www.cl.cam.ac.uk/archive/rja14/tcpa-faq-1.0.html
1•userbinator•1h ago•0 comments

SzPredict – open seizure prediction benchmark (all 6 baselines fail)

https://github.com/hyperreal-ai/SzPredict
1•hyperreal-ai•1h ago•0 comments

Remove/replace links pointing to GNOME Calendar, and update branding

https://gitlab.com/linuxmint/pins/mint/gnome-calendar/-/work_items/1
2•prathamtharwani•1h ago•0 comments

Singapore Foreign Minister to Keynote AI Engineer Singapore

https://old.reddit.com/r/singapore/comments/1t97tnx/vivian_balakrishnan_vibe_coded_an_ai_second_b...
1•doppp•1h ago•0 comments

Making cross-platform SIMD code pleasant

https://bkaradzic.github.io/posts/typeless-simd/
1•RUI-0517•1h ago•0 comments

Today Is World Password Day

https://itnerd.blog/2026/05/07/today-is-world-password-day-2/
2•mooreds•1h ago•0 comments

BSides Austin Is on Hold

https://bsidesaustin.com/
2•bean-weevil•1h ago•0 comments

Recursive Multi-Agent Systems

https://recursivemas.github.io/
1•jonbaer•1h ago•0 comments

What can singing mice say about human speech?

https://phys.org/news/2026-05-mice-human-speech.html
1•gmays•1h ago•0 comments

Ask HN: How have you spent time outside work for the past couple of weeks?

2•alex77456•1h ago•1 comments

Up in Smoke

https://thebaffler.com/odds-and-ends/the-profession-that-does-not-exist-symposium
2•NaOH•1h ago•0 comments