frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

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

Comments

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

My Blog Is Overengineered to the Point People Think It's a Static Site (2022)

https://xeiaso.net/talks/how-my-website-works/
1•Wingy•1m ago•0 comments

Ask HN: Is there a market for agentic scraping tools?

1•mxfeinberg•3m ago•0 comments

Hanako-San

https://en.wikipedia.org/wiki/Hanako-san
1•areoform•3m ago•0 comments

Ask HN: What are fundamental books on systems, system thinking, reliability?

1•dondraper36•3m ago•0 comments

Stop Killing Games in EU passed 1.000.000 signatures

https://www.msn.com/en-us/news/technology/stop-killing-games-reaches-1-million-signatures-as-players-continue-fight-for-game-preservation/ar-AA1HXsyd
1•aureliusm•4m ago•0 comments

Jan – Local AI Assistant

https://github.com/menloresearch/jan
1•indigodaddy•4m ago•0 comments

Fixing the Web? – Carson Gross [video]

https://www.youtube.com/watch?v=9NDkOehZUGs
1•todsacerdoti•4m ago•0 comments

Cod Have Been Shrinking for Decades, Scientists Say They've Solved Mystery

https://www.smithsonianmag.com/smart-news/these-cod-have-been-shrinking-dramatically-for-decades-now-scientists-say-theyve-solved-the-mystery-180986920/
1•littlexsparkee•10m ago•1 comments

Show HN: I built an multi-devices AI usage analytics app for Claude Code

https://roiai.fyi
1•fuzzyrock•11m ago•0 comments

How to create repositories in Artifactory with curl

https://www.zufallsheld.de/2025/06/30/til-how-to-create-artifactory-repos/
1•zufallsheld•12m ago•0 comments

Writing Modular Prompts

https://blog.adnansiddiqi.me/writing-modular-prompts/
1•pknerd•14m ago•0 comments

Show HN: Centenary Day – toolkit for healthy living (routines, meals, tracking)

https://centenary.day
1•arnasstucinskas•14m ago•0 comments

AI 'thinks' like a human – after training on 160 psychology studies

https://www.nature.com/articles/d41586-025-02095-8
2•rbanffy•14m ago•0 comments

I got rid of all my Neovim plugins

https://yobibyte.github.io/vim.html
2•Bogdanp•21m ago•0 comments

Show HN: Flaget – small 5kB CLI argument parser for Node.js

2•biodiscus•22m ago•1 comments

Cursive writing could become a requirement for students in Pa

https://www.phillyvoice.com/cursive-writing-requirements-pennsylvania-new-jersey/
1•geox•23m ago•0 comments

Recreating Early Colour Outside Broadcast [video]

https://www.youtube.com/watch?v=CztsTpgFOnU
1•mhh__•23m ago•0 comments

LLM-d: Disaggregated Serving northstar

https://docs.google.com/document/d/1FNN5snmipaTxEA1FGEeSH7Z_kEqskouKD1XYhVyTHr8/edit?tab=t.0
2•samber•24m ago•0 comments

A new law in Sweden makes it illegal to buy custom adult content

https://www.euronews.com/next/2025/06/22/takes-away-our-safest-option-adult-creators-react-to-law-banning-online-sex-purchases-in-s
6•diggan•25m ago•1 comments

The Mother of All Demos

https://en.wikipedia.org/wiki/The_Mother_of_All_Demos
1•taubek•27m ago•0 comments

KDE Plasma 6.4 has landed in OpenBSD

https://undeadly.org/cgi?action=article;sid=20250705081711
4•bradley_taunt•30m ago•0 comments

Proposal: GUI-first, text-based mechanical CAD inspired by software engineering

1•thinkmachyx•34m ago•2 comments

Show HN: Baml_vcr -Record your LLM calls and play them back during tests

https://github.com/gr-b/baml_vcr
1•grbsh•34m ago•0 comments

Kioxia CD9P Showing the Power of New BiCS Flash at HPE Discover 2025

https://www.servethehome.com/kioxia-cd9p-showing-the-power-of-new-bics-flash-at-hpe-discover-2025/
1•rbanffy•35m ago•0 comments

Overview of new technologies applied to BiCS FLASH generation 8

https://www.kioxia.com/en-jp/rd/technology/topics/topics-66.html
2•rbanffy•35m ago•1 comments

Predicting average IMDB movie ratings using text embeddings of movie metadata

https://minimaxir.com/2025/06/movie-embeddings/
1•minimaxir•38m ago•0 comments

AI winter is well on its way (2018)

https://blog.piekniewski.info/2018/05/28/ai-winter-is-well-on-its-way/
6•darkhorse13•42m ago•0 comments

Show HN: An AI tool that lets you interact with your terminal in plain English

https://github.com/Kaleab-Ayenew/vity
2•kalishayish•43m ago•0 comments

Let's vibe code a new programming language [video]

https://www.youtube.com/watch?v=_U3r9pS-Gms
1•ghuntley•44m ago•0 comments

The AI Coding Stack Developers Are Using to Save 20 Hours a Week (2025 Guide)

https://devtechinsights.com/ai-coding-stack-save-time-developers-2025/
2•devtechinsights•46m ago•1 comments