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

Which AI Prompt Wrote This Line? Going Beyond Git Blame

https://getorigin.io/blog/session-page-commit-page-ai-blame
1•AssistantatGetO•45s ago•0 comments

So Who Wrote the Book of Mormon? Machine Learning Redux

https://goflaw.substack.com/p/so-who-wrote-the-book-of-mormon-machine
1•rbaatlaw•48s ago•0 comments

I built a swimmable underwater world in one 97 KB HTML file with Fable 5.2

https://www.reddit.com/r/ClaudeAI/comments/1xw376f/i_built_a_swimmable_underwater_world_in_one_97...
1•erickhill•1m ago•0 comments

Gallup survey: A median of 33% of young people use AI for companionship [pdf]

https://www.gallup.com/file/analytics/716519/BCH_Gallup-Digital-Life-Insights_Report.pdf
1•jawiggins•1m ago•0 comments

A proposal to prevent mass security incidents like Lovable's

https://skape.run/blog/secure-by-default
1•trestacos•1m ago•0 comments

Show HN: Maplibre-gl-pie-charts – WebGL pie charts for MapLibre and Mapbox

https://github.com/zwang-geog/maplibre-gl-pie-charts
1•zifanw9•2m ago•0 comments

Show HN: Cloudish – Cloud for agents to deploy containers themselves

https://www.cloudish.ai/
1•javierluraschi•3m ago•0 comments

The MisAnthropic Statement

https://misanthropicstatement.com/
1•leftouterjoins•3m ago•0 comments

Is AI a bicycle for the mind, or a car?

https://twitter.com/kouhxp/status/2123096768996892959
3•mrkn1•5m ago•0 comments

Show HN: TypingCompiler – Practice typing with real code snippets

https://www.typingcompiler.com/test?title=Rust%3A%20Custom%20Fibonacci%20Iterator
1•girouetten21•5m ago•0 comments

Show HN: Mastra Factory, the open-source software factory we use to build Mastra

4•codekarate•5m ago•0 comments

Building collaborative editing in EmDash CMS

https://emdashcms.com/blog/how-we-built-collaborative-editing
1•noah_pham•5m ago•0 comments

Shwcs – A reviewed catalog of B2B software, agencies and services

https://shwcs.site/en
1•andrevallee•6m ago•0 comments

Pikuma: Fundamentals of Computer Science and Mathematics

https://pikuma.com/
2•gurjeet•6m ago•0 comments

William Shatner "Sings" 'Rocket Man' (1978) [video]

https://www.youtube.com/watch?v=8wI4jMxveyI
1•Anon84•7m ago•0 comments

Julia 1.13 brings REPL improvements and more

https://lwn.net/Articles/1108153/
2•leephillips•8m ago•0 comments

Tuios

https://tuios.dev
1•vnzvrt•8m ago•0 comments

PyBot message board – the largest open dataset of swarm dynamics

https://huggingface.co/spaces/HuggingFaceSwarms/pybot-msgboard
1•lewtun•9m ago•0 comments

Cyber Attacks/ Network Outages have become a norm now

https://www.csis.org/programs/strategic-technologies-program/significant-cyber-incidents
1•mastaanshaik•10m ago•2 comments

Historical sociology of neural network research (1991)

https://era.ed.ac.uk/items/db7c1acb-a8a5-4b14-8874-f1138e6751b8
2•theanonymousone•10m ago•0 comments

Evening Atlas

https://willjobs.com/evening-atlas/
2•NickDouglas•11m ago•0 comments

The Cognitive Case for Play in Technical Work

https://www.joekarlsson.com/blog/cognitive-case-for-play-in-technical-work/
1•joekarlsson•11m ago•0 comments

Everything After Code, as Code

https://www.pulumi.com/blog/everything-after-code-as-code/
2•cnunciato•12m ago•0 comments

Wayfinder: Frontier-Level Code Search at a Fraction of the Cost

https://blog.voyageai.com/2026/11/18/wayfinder-code-search/
2•emschwartz•13m ago•0 comments

Principles of good design (Dieter Rams)

https://designmanifestos.org/dieter-rams-ten-principles-for-good-design/
3•mrkn1•16m ago•2 comments

M.C. Escher's Art Creates Mathematical Worlds

https://www.quantamagazine.org/how-m-c-eschers-art-creates-bizarre-mathematical-worlds-20261118/
3•baruchel•17m ago•0 comments

"Anthropic Is Not a Safe AI Company" – Coalition Challenges Anthropic Safety

https://www.businesswire.com/news/home/20261118974464/en/Anthropic-is-Not-a-Safe-AI-Company---Bro...
4•sshah03•17m ago•1 comments

Show HN: Can an AI Agent Bypass Your Website Security?

https://assess.poh.org/
5•timshell•18m ago•0 comments

Cerebras Systems Inc. (CBRS): Hot Garbage [pdf]

https://culperresearch.com/wp-content/uploads/2026/10/Culper_CBRS_10-28-2026.pdf
3•Betelbuddy•19m ago•0 comments

Jensen Huang Tweets

https://daringfireball.net/linked/2026/11/18/huang-tweets
3•chmaynard•19m ago•0 comments