frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

Comments

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

Show HN: AnyVali – Validation library that works the same across 10 languages

https://anyvali.com/
1•mrinc•1m ago•0 comments

GPL-compliant reasonable legal notices and author attributions

https://www.fsf.org/blogs/community/gpl-compliant-legal-notices-author-attributions
1•Tomte•3m ago•0 comments

You're right to be anxious about AI: This is how much we are building

https://www.dumky.net/posts/youre-right-to-be-anxious-about-ai-this-is-how-much-we-are-building/
2•dmkii•14m ago•2 comments

Mathematical methods and human thought in the age of AI

https://terrytao.wordpress.com/2026/03/29/mathematical-methods-and-human-thought-in-the-age-of-ai/
1•jjgreen•16m ago•0 comments

Swift SDK for Android

https://www.swift.org/documentation/articles/swift-sdk-for-android-getting-started.html
1•devy•22m ago•0 comments

Polygraphs have major flaws. Are there better options?

https://undark.org/2026/03/25/lie-detection-polygraph-accuracy/
2•Tijana329•26m ago•0 comments

Stripe Is Down

https://downdetector.fr/en/status/stripe/
6•pinter69•28m ago•0 comments

Show HN: IsDisposable – Open-source disposable email detection (160K+ domains)

https://www.npmjs.com/package/@isdisposable/js
1•junaidshaukat•28m ago•0 comments

Mistral raises $830M to build Nvidia-powered AI centres in Europe

https://www.ft.com/content/229f4f59-d518-4e00-abd6-5a5b727cd2aa
2•macleginn•28m ago•2 comments

Show HN: I'm a Happy Engineer [video]

https://www.youtube.com/watch?v=f1a_MRLibqU
1•denysvitali•31m ago•0 comments

How to Survive in the Tech industry in 2026

https://blog.phuaxueyong.com/post/2026-03-23-how-to-survive-tech-in-2026/
6•xueyongg•36m ago•1 comments

How Can Universities Value-Add Their Alumni?

https://blog.phuaxueyong.com/post/2025-06-27-university-role-in-alumni-engagement/
2•xueyongg•37m ago•0 comments

The CTO's Burden: Building What the World Doesn't See

https://blog.phuaxueyong.com/post/2025-04-29-questions-for-cto/
1•xueyongg•37m ago•0 comments

Show HN: Travel app that replaces trip research with a 30s briefing (TestFlight)

https://globallybased.com
2•ilyagruzhevski•38m ago•0 comments

Sad Story of Soviet Compact Disc Players

https://sovietrock.com/mediums/cd/sad-story-of-soviet-compact-disc-players/
2•thenthenthen•41m ago•0 comments

Credential Broker for Agents (CB4A)

https://datatracker.ietf.org/doc/draft-hartman-credential-broker-4-agents/
1•jruohonen•43m ago•0 comments

We tricked 1M+ bots and hackers with our honeypot

https://github.com/BlessedRebuS/Krawl
2•blessedrebus•44m ago•1 comments

Every Package You Install Can Read Your Secrets

https://www.eliranturgeman.com/2026/03/28/supply-chain-attacks/
1•gsky•45m ago•1 comments

Copilot Adverts in Pull Requests

https://github.com/search
2•tomwphillips•45m ago•3 comments

Show HN: A curated list of plugins,themes, agents,projects, for OpenCode

https://github.com/awesome-opencode/awesome-opencode
3•ishqdehlvi•55m ago•0 comments

Yahoo turns to AI-powered answer engine Scout to lead back to online search

https://isp.netscape.com/tech/story/0001/20260327/a9ec7ff0f7af72662b6d98ddd9c5280d
2•Imustaskforhelp•56m ago•1 comments

The Missing Equation of Quantum Biology

https://sectio-aurea-q.github.io/emc2-of-quantum-biology.html
2•sectio-aurea-q•1h ago•0 comments

Show HN: Veil – A Minimal Neovim GUI for macOS with Metal Rendering

https://github.com/rainux/Veil
5•rainux•1h ago•0 comments

Show HN: AI scared me into building a career risk scorer (careerrisk.ee)

https://careerrisk.ee/
4•Equitis•1h ago•2 comments

Selling to AI Agents

https://mattgiustwilliamson.substack.com/p/selling-to-ai-agents
4•MattSWilliamson•1h ago•3 comments

Introduction to Gaussian Splats [video]

https://www.youtube.com/watch?v=X8yRlA7jqEQ
2•Khaine•1h ago•0 comments

Google's Larry Page Won the Bidding War for DeepMind

https://www.wsj.com/tech/ai/deepmind-google-demis-hassabis-5bd6de54
2•yihongs•1h ago•0 comments

Ask HN: Who needs contributors? (March 2026)

5•Kathan2651•1h ago•0 comments

Show HN: TermCanvas – An infinite canvas for your terminals

https://github.com/blueberrycongee/termcanvas
2•blueberrycongee•1h ago•0 comments

Hamilton-Jacobi-Bellman Equation: Reinforcement Learning and Diffusion Models

https://dani2442.github.io/posts/continuous-rl/
18•sebzuddas•1h ago•5 comments