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

Why Thermodynamics Rules Future Orbital Data Centers

https://spectrum.ieee.org/orbital-data-centers-heat
1•rbanffy•37s ago•0 comments

Google DeepMind is worried about when agents start to interact

https://www.technologyreview.com/2026/06/11/1138794/google-deepmind-is-worried-about-what-happens...
1•leopoldj•51s ago•0 comments

Show HN: 5dive – Run a Team of Claude Code Agents from Telegram

https://github.com/5dive-com/5dive
2•lodar•1m ago•0 comments

Show HN: GeoLeadScraper – Open-source Google Maps scraper (Chrome extension)

https://github.com/ozhehkovski/geoleadscraper
1•bizdata•2m ago•0 comments

DSF 2026 Fundraising Goals

https://www.djangoproject.com/weblog/2026/jun/10/dsf-2026-fundraising-goals/
1•petr25102018•2m ago•0 comments

Too-ly.eu – browser-based dev tools with no tracking, no login, EU-hosted

https://www.too-ly.eu/
1•quintoncarroll•2m ago•0 comments

Workers are spending over 6 hours a week botsitting' AI, fueling job frustration

https://www.businessinsider.com/botsitting-ai-hidden-human-labor-at-work-2026-6
2•ZeidJ•2m ago•0 comments

Show HN: Editxr – open-source WYSIWYG Markdown editor for the terminal

https://github.com/pixdeo/editxr
3•mromanuk•4m ago•0 comments

Hawkish GOP lawmaker Don Bacon says he was hacked by Russia

https://www.politico.com/live-updates/2026/06/10/congress/hawkish-gop-lawmaker-don-bacon-says-he-...
1•campuscodi•4m ago•0 comments

25.3% of Bitcoin sits at addresses with an exposed public key

https://chainquery.com/reports/quantum-exposure
3•granya•4m ago•0 comments

Homebrew 6.0.0

https://brew.sh/2026/06/11/homebrew-6.0.0/
3•mikemcquaid•5m ago•1 comments

Why adorable bees are emerging from this cemetery

https://grist.org/cities/why-millions-of-adorable-bees-are-emerging-from-this-cemetery/
1•speckx•5m ago•0 comments

Is Artificial General Intelligence Achievable?

1•hsnewman•6m ago•0 comments

Intelligence per Dollar

https://tomtunguz.com/tokens-per-result/
1•gmays•6m ago•0 comments

We chose code as the source of truth for AI-generated workflows

https://www.serval.com/serval-news/do-the-hard-things-always
1•emot•7m ago•0 comments

Europe 2031: What getting AI wrong means for us

https://europe2031.ai/
2•atlasunshrugged•7m ago•1 comments

How Kyoto Is Using Data to Fight Overtourism

https://www.youtube.com/watch?v=0Z74tlGUSG4
1•Akiko_Tsuka•8m ago•0 comments

Kasspian – An AI that tells you your business idea isn't good

https://kasspian.com
3•izhonline•11m ago•0 comments

The Compute Caoursel Spcx

https://askmelon.com/beta/articles/2026-06-09T1151-the-compute-carousel
2•alvations•12m ago•0 comments

Tiny Awards for Small Websites

https://tinyawards.net/
2•marvinborner•12m ago•0 comments

Cohere's First Model for Developers

https://cohere.com/blog/north-mini-code
2•hmokiguess•14m ago•0 comments

Show HN: Workplane – collaborative files for agents (and humans)

https://workplane.co
2•matanrak•14m ago•0 comments

Linux Lite 8.0 sheds Chrome, slims down, and finds its name fits better

https://www.theregister.com/os-platforms/2026/06/10/linux-lite-80-sheds-chrome-slims-down-and-fin...
1•rbanffy•14m ago•0 comments

Build Your Dream Home: Fable 5 vs. GPT-5 vs. Gemini

https://www.promptfrenzy.com/showdown/dream-home
1•spobin•14m ago•0 comments

Open Reproduction of DeepSeek-R1

https://github.com/huggingface/open-r1
2•yogthos•15m ago•0 comments

Flatiron is a fast columnar analytics library for Clojure

https://github.com/yogthos/flatiron
2•yogthos•15m ago•0 comments

Horizon Quantum announces Dublin as its second quantum computer testbed location

https://www.horizonquantum.com/resources/newsroom/horizon-quantum-announces-dublin-as-its-second-...
1•rbanffy•15m ago•0 comments

Space telescopes are now overwhelmed by satellite trails

https://phys.org/news/2026-06-space-telescopes-overwhelmed-satellite-trails.html
1•rbanffy•17m ago•0 comments

Long-term fertiliser solutions needed to avoid EU food shortages

https://www.euronews.com/my-europe/2026/06/10/long-term-fertiliser-solutions-needed-to-avoid-eu-f...
1•rawgabbit•18m ago•0 comments

SpaceX lists tomorrow at $1.75T. What would 100x require?

https://zozo123.github.io/spacex-thesis/
1•zozo123-IB•18m ago•1 comments