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

The first framework that can post train DeepSeek V4-pro on a single-node?

2•timxzz•2m ago•1 comments

Typst with Pandoc: A Modern, Fast Alternative to (Xe)LaTeX for PDF Generation

https://slhck.info/software/2025/10/25/typst-pdf-generation-xelatex-alternative.html
1•ankitg12•3m ago•0 comments

How to declare taxes in Germany as an App Developer

https://mertbulan.com/2026/05/28/how-to-declare-taxes-in-germany-as-an-app-developer/
1•mertbio•7m ago•0 comments

Repo Prompt's Next Chapter

https://repoprompt.com/blog/repo-prompt-next-chapter/
1•doppp•10m ago•0 comments

A joke about a Google Form became a private couples' intimacy tool

https://sexualsync.io/presentation#2
1•SVI•11m ago•0 comments

Canadian Nuclear FAQ

https://www.nuclearfaq.ca/
1•leonidasrup•11m ago•0 comments

Minutes journalist accuses CBS News of penalizing her

https://www.theguardian.com/media/2026/may/27/60-minutes-sharyn-alfonsi
1•pjmlp•12m ago•0 comments

Snooze: Run a Command at a Particular Time

https://github.com/leahneukirchen/snooze
1•thunderbong•13m ago•0 comments

The Pope Grasps the Limits of AI

https://www.theatlantic.com/ideas/2026/05/pope-leo-ai-catholic-church/687298/
1•rbanffy•16m ago•0 comments

Former Google and Apple Researchers Launch a Startup to Build AI's Missing Feed

https://www.wired.com/story/ex-google-apple-ai-researchers-want-to-make-ai-that-gets-smarter-as-y...
1•joozio•16m ago•0 comments

Wix to cut 1k jobs in largest layoff round in company history

https://www.calcalistech.com/ctechnews/article/b1oebi11xge
4•doppp•25m ago•0 comments

S.F. startup Webflow announces abrupt round of layoffs

https://www.sfchronicle.com/tech/article/webflow-layoffs-tech-san-francisco-22279561.php
4•doppp•25m ago•0 comments

Optimizing Our ML Feature Store: Cutting Compute Costs

https://kayhan.dev/posts/015-optimizing-ml-feature-store-cutting-compute-costs/
1•keynha•27m ago•0 comments

Rust Will Save Linux from AI, Says Greg Kroah-Hartman

https://linux.slashdot.org/story/26/05/27/208203/rust-will-save-linux-from-ai-says-greg-kroah-har...
2•fork-bomber•30m ago•0 comments

The Lone Lisp Heap

https://www.matheusmoreira.com/articles/lone-lisp-heap
1•matheusmoreira•42m ago•0 comments

Australia launches $2B lawsuit over PFAS 'forever chemicals'

https://www.rnz.co.nz/news/world/596604/australia-launches-massive-2b-lawsuit-over-pfas-forever-c...
1•colinprince•44m ago•0 comments

A Eureka machine that thinks like nature and explores what AI cannot

https://iisc.ac.in/a-eureka-machine-that-thinks-like-nature-and-explores-what-ai-cannot/
3•kunalsin9h•44m ago•0 comments

Japan, South Korea and Taiwan are suffering industrial rot

https://www.economist.com/finance-and-economics/2026/05/27/japan-south-korea-and-taiwan-are-suffe...
1•jnord•46m ago•1 comments

Predicting the 2026 World Cup: Can Anyone Stop Spain?

https://dtai.cs.kuleuven.be/sports/blog/predicting-the-2026-world-cup:-can-anyone-stop-spain/
1•fvankers•54m ago•0 comments

Musk's cut to USAID have made the Ebola outbreak worse

https://www.dw.com/en/ebola-central-africa-us-aid-cuts-uganda-drc-who-vaccines/a-77233437
8•camillomiller•54m ago•0 comments

Can Intel Save America?

https://www.thefp.com/p/can-intel-save-america
1•jazzdev•57m ago•0 comments

SlimTide Exploding in 2026: Viral Weight Management Trend

https://finance.yahoo.com/sectors/healthcare/articles/slimtide-capsules-exploding-2026-slim-19370...
1•farqnaht•59m ago•0 comments

1-Click RCE in Flowise (CVE-2026-40933)

https://www.obsidiansecurity.com/blog/when-is-stdio-mcp-actually-a-vulnerability
1•13ph03nix•1h ago•0 comments

Dispatches from the possibly last days of human relevance

https://scottaaronson.blog/?p=9782
1•gone35•1h ago•0 comments

Don't Delegate the Joy of Building to AI

https://bacist.com/joy-of-building/
2•baCist•1h ago•3 comments

Websites have a new way to spy on visitors: analyzing their SSD activity

https://arstechnica.com/security/2026/05/websites-have-a-new-way-to-spy-on-visitors-analyzing-the...
5•XzetaU8•1h ago•2 comments

Where is API tooling lacking?

1•dhruv3006•1h ago•1 comments

Omniclip: Open-source, powerful video editor right in the browser

https://github.com/omni-media/omniclip
1•maxloh•1h ago•0 comments

Halted ARM64 Port Work

https://github.com/rcarmo/haiku-arm64-build
1•rcarmo•1h ago•0 comments

I Stopped Designing Forms for Only Humans

https://www.indiehackers.com/post/i-stopped-designing-forms-for-only-humans-893ed23599
1•Lovanut•1h ago•0 comments