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

<LoginWithChatGPT /> – Unofficial login to personal ChatGPT subscription

https://twitter.com/saviomartin7/status/2070531441415602469
1•saviomartin•58s ago•0 comments

Reckoning with the Political Economy of AI

https://arxiv.org/abs/2604.16106
1•andyjohnson0•2m ago•1 comments

NYT slams Microsoft for building copyright-infringing supercomputer for OpenAI

https://arstechnica.com/tech-policy/2026/06/microsoft-built-supercomputer-to-help-openai-infringe...
1•01-_-•2m ago•0 comments

'Edited' human embryos reveal secrets of our development–and fuel ethical debate

https://www.nature.com/articles/d41586-026-02027-0
1•bookofjoe•4m ago•1 comments

Full duration single-engine static fire test of Starship 40

https://twitter.com/spacex/status/2070482358369763674
1•ivewonyoung•5m ago•0 comments

How to Design Search for a Database

https://bonsai.io/blog/how-to-design-search-for-a-database/
1•binarymax•6m ago•0 comments

Show HN: Statey – the database your AI shares across every chat, over MCP

https://www.statey.ai
1•scottwillman•6m ago•0 comments

Perplexity's Brain Is a Context Graph. That's the Point

https://hydradb.com/blog/perplexity-brain-context-graph
1•manveerc•7m ago•0 comments

Open Letter to Compassionate, Left-Leaning, AI-Hating, Animal-Loving Meat Eaters

https://brennan.day/an-open-letter-to-compassionate-left-leaning-ai-hating-animal-loving-meat-eat...
1•speckx•7m ago•0 comments

Posthog's marketing budget in 2026 (with actual $ figures)

https://posthog.com/founders/actual-marketing-budget-2026
1•herbertl•10m ago•0 comments

MirrorCode: What's the largest software project AI can complete on its own?

https://epoch.ai/MirrorCode
2•tadamcz•10m ago•1 comments

Reed-Solomon for OCR: error correction for messy printed codes

https://github.com/chasangchual/reed-solomon-for-ocr
1•chasangchual•13m ago•0 comments

Aircraft crashes into Beijing's tallest skyscraper, triggering evacuations

https://www.dailymail.com/news/article-15932611/Aircraft-crashes-Beijings-tallest-skyscraper-trig...
1•Bender•14m ago•0 comments

DuckDuckGo, Unable to Resist AI's Pull, Mistakenly Claims Trump Died of Rabies

https://gizmodo.com/duckduckgo-unable-to-resist-the-pull-of-ai-mistakenly-claims-trump-died-of-ra...
1•gnabgib•15m ago•0 comments

PHP and TypeScript Types Comparison

https://gitlab.com/-/snippets/6005114
1•DPDmancul•15m ago•0 comments

Smart lock maker Level has been gutted and its founders are out

https://www.theverge.com/tech/957802/level-lock-layoffs-assa-abloy-kwikset-smart-lock-cloud
1•teepo•15m ago•0 comments

Chronic Pain: The Science of Unlearning Pain

https://www.zeit.de/gesundheit/2025-11/chronic-pain-causes-treatments-pain-perception-english
3•Tomte•16m ago•1 comments

PlayStation Is Deleting 551 Movies from Customers' Accounts

https://kotaku.com/playstation-store-movies-digital-studio-canal-terminator-2000711013
2•ortusdux•18m ago•0 comments

US auto regulators want to kill robotaxi brake pedals

https://www.theregister.com/offbeat/2026/06/26/us-auto-regulators-want-to-kill-robotaxi-brake-ped...
1•Bender•19m ago•0 comments

Yen's decline makes perfect sense to some analysts

https://www.japantimes.co.jp/business/2026/06/26/markets/sticky-weak-yen-june/
2•mikhael•19m ago•0 comments

Microsoft extends Windows 10 security updates to 2027

https://arstechnica.com/gadgets/2026/06/microsoft-adds-another-year-to-windows-10-extended-update...
1•Lihh27•19m ago•0 comments

The Atari Lynx Story [video]

https://www.youtube.com/watch?v=RcjbMCRErz4
2•thm•19m ago•0 comments

Amazon Q flaw let booby-trapped Git repos execute code, swipe cloud creds

https://www.theregister.com/cyber-crime/2026/06/26/amazon-q-flaw-let-booby-trapped-git-repos-exec...
3•Bender•20m ago•0 comments

Monoids

https://en.wikipedia.org/wiki/Monoid
2•caminanteblanco•21m ago•0 comments

Atlas: Open-source deep research harness

https://steel.dev/blog/atlas-sdk
2•nkko•22m ago•0 comments

The Illusion of Ownership – It's yours until it isn't

https://yashgarg.dev/posts/the-illusion-of-ownership/
2•speckx•23m ago•0 comments

Venezuela quake: Devastation is urgent warning for California

https://www.latimes.com/world-nation/story/2026-06-24/venezuela-earthquake-staggering-destruction...
3•karlzt•25m ago•0 comments

The FIFA World Cup, and Investor Attention in the U.S. Stock Market

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6970502
2•paulpauper•25m ago•0 comments

The View from 93: A Music Critic Reviews Himself

https://bernardholland.org/words/the-view-from-93
2•paulpauper•25m ago•0 comments

Israel Asked Facebook to Censor Iran War Content, Internal Documents Show

https://theintercept.com/2026/06/18/israel-facebook-censor-content-moderation-iran-war/
20•Jimmc414•25m ago•2 comments