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

Financial Information for ICANN

https://www.icann.org/resources/pages/governance/financials-en
1•greyface-•43s ago•0 comments

Show HN: Replaced Neo4j with pure vector search for Graph RAG

https://github.com/zilliztech/vector-graph-rag
1•zhangchen•43s ago•0 comments

Why the Persian Gulf has more oil and gas than anywhere else on Earth

https://theconversation.com/why-the-persian-gulf-has-more-oil-and-gas-than-anywhere-else-on-earth...
1•pseudolus•1m ago•0 comments

Maine Is About to Become the First State to Ban New Data Centers

https://www.wsj.com/us-news/maine-data-center-ban-e768fb18
2•toomuchtodo•2m ago•0 comments

Sam Altman on Building the Future of AI [video]

https://forum.openai.com/public/videos/event-replay-sam-altman-on-building-the-future-of-ai-2026-...
1•erickhill•4m ago•0 comments

Phillips Machine

https://en.wikipedia.org/wiki/Phillips_Machine
2•curio_Pol_curio•8m ago•0 comments

Show HN: Mdstitch – NPM for Markdown Files

https://github.com/tannerjames711/mdstitch
1•tannerjames711•8m ago•0 comments

Bill Phillips used flowing water to model the economy

https://www.npr.org/sections/planet-money/2026/04/07/g-s1-116575/how-bill-phillips-used-flowing-w...
3•curio_Pol_curio•10m ago•0 comments

Visual Hallucinations in Psychedelics vs. Schizophrenia

https://psychedelirium.substack.com/p/pharmacology-vs-pathology-of-altered
1•yenniejun111•19m ago•0 comments

'This Is Just Not How the Human Race Should Operate,' Says US Senator

https://www.commondreams.org/news/chris-murphy-trump-threat
6•hkhn•22m ago•0 comments

OpenSource: Native screen recorder extension for Chrome

https://github.com/mbarlow/chrome-recorder
1•moo-jason•26m ago•1 comments

Larger and more instructable language models become less reliable

https://pmc.ncbi.nlm.nih.gov/articles/PMC11446866/
4•gmays•26m ago•0 comments

America: A Bet Worth Taking If You're Built for It

https://code2net.com/usa
2•xyz_ielh•34m ago•2 comments

Nodepad

https://www.nodepad.space/
2•skogstokig•35m ago•0 comments

Show HN: Arrow – A Simple Airdrop Clone

https://github.com/aabiji/arrow
1•aabiji•36m ago•0 comments

Brands Adopt 'No AI' Disclaimers to Stand Out Amid the Slop

https://www.wsj.com/cmo-today/brands-adopt-no-ai-disclaimers-to-stand-out-amid-the-slop-a92352af
4•bookofjoe•37m ago•2 comments

Insurers' $1T Buildup in Private Credit Is Leaving Regulators in Dust

https://www.wsj.com/finance/regulation/insurers-1-trillion-buildup-in-private-credit-is-leaving-r...
4•petethomas•42m ago•0 comments

Show HN: Redos-analyzer – static ReDoS detection and auto-fix for Python

https://github.com/HarshithReddy01/redos-analyzer
1•kingkongsatan•42m ago•0 comments

Artemis delivers some exceptional, high-quality photos of the Moon

https://arstechnica.com/space/2026/04/the-artemis-ii-mission-sends-back-stunning-images-of-the-fa...
4•jonbaer•43m ago•1 comments

InstaMed – Oral Dissolving Peptides with InstaRelease Technology

https://store.getinstamed.com/
1•evo_9•44m ago•0 comments

RNA barcodes enable high-speed mapping of connections in the brain

https://news.illinois.edu/rna-barcodes-enable-high-speed-mapping-of-connections-in-the-brain/
1•geox•45m ago•0 comments

He designed C++ to solve your code problems

https://stackoverflow.blog/2026/04/07/he-designed-c-to-solve-your-code-problems/
1•chrisaycock•49m ago•0 comments

Release Please

https://github.com/googleapis/release-please
1•b-man•52m ago•0 comments

Show HN: Omni Voice – AI Voice Cloning and Text-to-Speech Platform

https://omnivoice.app
2•danielmateo773•54m ago•0 comments

Training SOTA vulnerability discovery agents through RL

https://depthfirst.com/post/dfs-mini1-agent
2•growthgod•54m ago•0 comments

Personal Site Infrastructure, Diagrammed

https://www.coryd.dev/posts/2026/personal-site-infrastructure-diagrammed
1•cdrnsf•1h ago•0 comments

Apollo.io Acquires Pocus

https://www.morningstar.com/news/pr-newswire/20260319ne14558/apolloio-acquires-pocus-to-advance-i...
1•jenthoven•1h ago•0 comments

Drive9, a network drive with built-in semantic search

https://github.com/mem9-ai/drive9
1•jinqueeny•1h ago•0 comments

How Alive Can a Video Game Street Be?

https://www.youtube.com/watch?v=5wU4AB7Y2Kw
2•pippy360•1h ago•1 comments

Impact of 100% Adoption of AI Coding Agents by Non-Technical Team

https://www.kapwing.com/blog/how-we-achieved-100-adoption-of-ai-coding-agents/
2•jenthoven•1h ago•0 comments