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

Rust cargo vet, go vet.. meet PHP vet

https://github.com/laravel/vet
1•nunomaduro•31s ago•0 comments

Palantir, Nvidia curb AI model use over data fears

https://www.reuters.com/business/palantir-nvidia-curb-ai-model-use-over-data-fears-information-re...
1•tosh•47s ago•0 comments

Show HN: 100 Player Online Smash Bros

https://meleeroyale.com/
1•masterspy7•1m ago•0 comments

Micky Malka on Lessons from Backing the Best Founders in Fintech [video]

https://www.youtube.com/watch?v=CjLhd1WZwTE
1•wslh•2m ago•0 comments

Will Driverless Cars Increase Urban Densities?

https://ti.org/antiplanner/?p=24194
1•speckx•5m ago•0 comments

Everything You Should Know Before Buying Steam Frame

https://roadtovr.com/everything-you-should-know-steam-frame/
1•SLHamlet•7m ago•0 comments

Show HN: Ringee – Open-source human and AI calling

https://www.ringee.io
1•edison_•7m ago•1 comments

Why you can need Cloud Run Instances

https://www.reddit.com/r/googlecloud/comments/1wgb0uy/what_i_learned_about_cloud_run_instances/
1•minherz•7m ago•0 comments

The surprising amount of product thinking behind 'Delivering in 10 minutes'

https://aakritwrites.com/quick-commerce-eta-widget/
1•aakritpatel•8m ago•1 comments

No cities on the moon – there isn't enough water, scientists say (op-ed)

https://www.space.com/astronomy/moon/no-cities-on-the-moon-there-isnt-enough-water-scientists-say...
2•Anon84•8m ago•0 comments

China's Top Spy Chief Warns A.I. Is a Threat to Party Rule

https://www.nytimes.com/2026/09/14/world/asia/china-ai-security-risks-anthropic.html
1•pixelesque•9m ago•0 comments

Unison: A friendly programming language from the future

https://github.com/unisonweb/unison
1•sigalor•9m ago•0 comments

Pro Hacker v3.9.0: Real-World CVEs, Malware, and Incident Response Simulations

https://play.google.com/store/apps/details?id=com.gripxtech.prohacker&hl=en_US
1•gripxtech•12m ago•0 comments

Small Programming Tricks

https://will-keleher.com/posts/small-programming-tricks-matter/
2•theanonymousone•13m ago•0 comments

Machine Learning Reshapes Credit Scoring

https://cacm.acm.org/news/machine-learning-reshapes-credit-scoring/
1•visha1v•13m ago•0 comments

Contradish – AI Policy Consistency Checker

https://contradish.com/
1•michelejoseph•14m ago•0 comments

Porting Half-Life: Alyx to Steam Frame

https://www.digitalfoundry.net/features/porting-half-life-alyx-to-steam-frame-how-valves-engineer...
1•jakogut•14m ago•0 comments

Show HN: SayItFlow – On-device Mac dictation that unloads models when idle

https://github.com/innovatorved/sayItflow
2•innovatorved•14m ago•0 comments

Our first impressions of the GPT-Live-1 API for voice agents

https://thunderphone.com/blog/gpt-live-first-impressions
1•kolchinski•15m ago•0 comments

The Economics of Generative AI

https://tailwinds.substack.com/p/the-economics-of-generative-ai
3•Anon84•19m ago•1 comments

Police: No Evidence of Foul Play in Death of Nikolai Mushegian (2022)

https://decrypt.co/113602/makerdao-co-founder-death-nikolai-mushegian
1•CGMthrowaway•20m ago•0 comments

The Racing Will Continue Until the Beatings Commence

https://rheisen.me/blog/the-racing-will-continue-until-the-beatings-commence/
1•rheisen_•21m ago•1 comments

Google tests paying publishers for using its content in AI Mode and Gemini

https://searchengineland.com/google-tests-paying-publishers-for-using-its-content-in-ai-mode-ai-o...
2•thm•22m ago•0 comments

Robot Basketball

https://kevinkelly.substack.com/p/robot-basketball
1•thm•23m ago•0 comments

Security through obscurity is dead, and AI delivered the fatal blow

https://www.theregister.com/security/2026/09/13/security-through-obscurity-is-dead-and-ai-deliver...
5•abdelhousni•25m ago•1 comments

Libation: Liberate Your Library

https://getlibation.com/
1•Tomte•25m ago•0 comments

Backprop Alternative: Augmented Lagrangian Predictive Coding

https://pub.sakana.ai/pc-alm/
2•guld•25m ago•1 comments

macOS 27 Golden Gate Is Now Available for All Users

https://mrmacintosh.com/macos-27-golden-gate-is-now-available-for-all-users/
2•speckx•26m ago•0 comments

MetaFilter Discussion of "We must pace the frontier"

https://www.metafilter.com/214501/We-must-pace-the-frontier
2•giardini•26m ago•1 comments

Simulation Hypothesis

https://en.wikipedia.org/wiki/Simulation_hypothesis
1•chistev•26m ago•0 comments