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

Agent-First Authentication and Authorization

https://clawmem.ai/blog/agent-first-authentication-and-authorization/
1•hazel1225•4m ago•0 comments

The mechanics of the IPO process (explained by a former Reddit CEO)

https://twitter.com/i/status/2063389455550218646
1•Michelangelo11•4m ago•0 comments

Beyond MitM: The Rising Danger of Adversary-in-the-Middle Attacks

https://blog.barracuda.com/2025/10/02/beyond-mitm-rising-danger-adversary-middle-attacks
1•walletdrainer•6m ago•0 comments

Unpatched Firefox focus universal XSS 0day poc released

https://twitter.com/i/status/2064119366669435379
1•notRobot•7m ago•0 comments

Soft scrolling on framebuffer consoles – with GPM Handling

https://archives.gentoo.org/gentoo-user/aZt1xIVGbaMAIFBG@MAC.fritz.box/
1•M95D•9m ago•1 comments

A clipboard manager that lives at the top of macOS

https://cliperx.com/
2•xizhechan•10m ago•1 comments

The Nerdy Escorts Cashing in on Silicon Valley's AI Boom

https://www.forbes.com/sites/annatong/2026/06/07/the-nerdy-escorts-cashing-in-on-silicon-valleys-...
1•Michelangelo11•16m ago•0 comments

Plastron: A spreadsheet you grow into an app, in one index.html

https://plastron.ca
2•rheohile10•22m ago•1 comments

SpaceX plans $55B investment to make A.I. chips

https://www.nytimes.com/2026/05/07/business/spacex-chips-terafab.html
2•andsoitis•23m ago•1 comments

Ask HN: Feeling FOMO re: SpaceX, Anthropic, OpenAI IPOs and the future of tech

1•mradek•27m ago•3 comments

Does a token buy you more or less now than it did a few months ago?

https://bigspin.ai/resources/the-decline-of-token-level-purchasing-power
1•pretext•27m ago•1 comments

Facebook is paying people overseas promoting Alberta separatism

https://www.cbc.ca/news/canada/facebook-overseas-alberta-separtism-9.7223966
3•vrganj•29m ago•0 comments

Productivity Effects Across Generations of AI Coding Tools

http://muratbuffalo.blogspot.com/2026/06/writing-code-vs-shipping-code.html
1•ingve•35m ago•0 comments

A game's homemade crypto fell to a DIY supercomputer

https://www.ud2.rip/blog/towerunite/
1•vmfunc•38m ago•0 comments

Siri AI for iPhones and iPads will be delayed indefinitely in the EU

https://www.engadget.com/2189932/siri-ai-for-iphones-and-ipads-will-be-delayed-indefinitely-in-th...
1•adwmayer•39m ago•0 comments

QuillOS: The only Swift-first OS after macOS

https://quillOS.cloud/
1•ljlolel•41m ago•2 comments

Do Better Research with NotebookLM

https://blog.google/innovation-and-ai/products/notebooklm/better-research-notebooklm/
1•nkko•45m ago•0 comments

Is There a Link Between Listening to Music and Mental Health?

https://www.aesthetics.mpg.de/en/newsroom/news/news-article/article/is-there-a-link-between-liste...
1•XzetaU8•46m ago•0 comments

SpaceX CFO telecom analyst discuss

https://twitter.com/elonmusk/status/2064196509780893957
1•__patchbit__•49m ago•0 comments

Suprised to see the open data sources on internet

1•akd29121988•50m ago•0 comments

Stop Asking Claude to Agree with You

https://www.questionpro.com/engineering/engineering/developer%20tools/ai%20&%20machine%20learning...
1•skyDoesWork38•57m ago•0 comments

NASA's X-59 Aircraft Flies Supersonic for First Time

https://www.nasa.gov/aeronautics/x-59-first-supersonic-flight/
3•divbzero•1h ago•0 comments

SpaceX offers details on orbital data center satellites

https://spacenews.com/spacex-offers-details-on-orbital-data-center-satellites/
3•MrBuddyCasino•1h ago•2 comments

Show HN: I created an app to copy OTP from Google Voice to your macOS Clipboard

https://github.com/ptrinh/Notiful
1•ptrinh•1h ago•0 comments

iPhone almost like a birth control device, fertility rates falling after 2007

https://www.indiatoday.in/technology/news/story/iphone-almost-like-a-birth-control-device-fertili...
2•rustoo•1h ago•1 comments

Ask HN: Do you need go-to-market strategy at early stage?

1•2ero_wf•1h ago•0 comments

Built to benefit everyone: our plan By Sam Altman and Jakub Pachocki

https://openai.com/index/built-to-benefit-everyone-our-plan/
1•echan00•1h ago•1 comments

Show HN: Clawcall – give your self-hosted OpenClaw agent inbound phone calls

https://github.com/CODEANDTRUST/clawcall
2•pakbry•1h ago•0 comments

L'Affaire Siloxane

https://mceglowski.substack.com/p/laffaire-siloxane
1•idlewords•1h ago•0 comments

Make Something Wonderful

https://joshuawold.com/make-something-wonderful/
1•ethanplant•1h ago•0 comments