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

India's Assam faces worst floods in years

https://www.bbc.com/news/articles/cqlx61p3wz0o
1•saikatsg•1m ago•0 comments

Terminal Themes, and the Rabbit Hole That Produced Them

https://williamzujkowski.github.io/posts/2026-07-19-oklch-terminal-themes/
1•speckx•1m ago•0 comments

How did The Shawshank Redemption become the highest rated #1 movie on IMDB?

https://old.reddit.com/r/NoStupidQuestions/comments/1v8pm2x/comment/p07p4ri/
3•thunderbong•1m ago•0 comments

An open source library for rendering and editing slides in chat apps

https://www.blockslides.com/
2•Mojmalik•1m ago•0 comments

ClickCannon: Building a Tool for Benchmarking ClickHouse

https://clickhouse.com/blog/building-clickcannon-a-tool-for-benchmark-clickhouse
2•mikeshi42•3m ago•0 comments

Discovering Cryptographic Weaknesses with Claude

https://www.anthropic.com/research/discovering-cryptographic-weaknesses
3•gslin•3m ago•0 comments

I Built a Calendar App Kids Control – Even Parents Can't Access It

https://github.com/mihirshaikbugs/kid-compass
2•mihirshaik•4m ago•0 comments

Ads in Software Are Like Stickers on Laptops

https://daringfireball.net/2026/07/ads_in_software_are_like_stickers_on_laptops
1•Brajeshwar•4m ago•0 comments

CryptanalysisBench: Can LLMs Do Cryptanalysis?

https://arxiv.org/abs/2607.18538
2•rvz•6m ago•0 comments

Designing With AI on a budget as an engineer: Google+ChatGPT

https://www.kcoleman.me/2026/06/11/designing-with-ai-indie.html
2•speckx•7m ago•0 comments

Wikimedia Foundation declines to voluntarily recognise the union

https://wikimediafoundation.org/news/2026/07/27/statement-cwa-recognition-request/
2•ravenical•8m ago•0 comments

Anthropic A.I. Model Finds Flaws in Tough-to-Crack Encryption Algorithms

https://www.nytimes.com/2026/07/28/us/politics/anthropic-ai-encryption-security-aes.html
3•edsimpson•9m ago•0 comments

Children, sponsors arrested by ICE after tips from US child migrant

https://www.reuters.com/legal/government/thousands-children-sponsors-arrested-by-ice-after-tips-u...
3•tartoran•11m ago•1 comments

Scientific computing in the age of agentic AI

https://openai.com/index/scientific-computing-agentic-ai/
4•mfiguiere•12m ago•0 comments

Steel Bank Common Lisp version 2.6.7

https://sbcl.org/all-news.html?2.6.7
3•tmtvl•13m ago•0 comments

I Tried Coding My Own Graphics Library

https://www.youtube.com/watch?v=_JGMgpyCTsY
2•linggen•15m ago•0 comments

Setup a Simple, Self-Hosted Web Server with OpenBSD

https://btxx.org/posts/self-hosted-openbsd/
3•linggen•15m ago•0 comments

A personalized scam [AI-enabled] is coming for you

https://www.washingtonpost.com/opinions/2026/07/28/ai-is-gaining-ability-personalize-cyberattacks...
2•Calvin02•16m ago•1 comments

Magnolia Search

https://marginalia-search.com/
2•axiomdata316•16m ago•0 comments

Lessons in Networking from Fighting Games [video]

https://www.youtube.com/watch?v=7jb0FOcImdg
1•buildwrangler•17m ago•0 comments

Giant Concentric Rings Discovered in the Atmosphere of Venus

https://www.sciencealert.com/giant-concentric-rings-discovered-in-the-atmosphere-of-venus
3•geox•18m ago•0 comments

Protesting Flock, Arizona Man Presents Plan to Surveil Government Officials

https://www.404media.co/casa-grande-arizona-flock-city-council/
3•pavel_lishin•19m ago•1 comments

WOFF 1.0: a milestone on W3C's journey of fonts on the web

https://www.w3.org/blog/2026/woff-1-0-a-milestone-on-w3cs-journey-of-fonts-on-the-web/
2•hn_acker•20m ago•0 comments

Coding Tools MCP (v0.2.2):Give any AI chat or agent a pair of hands on your code

https://github.com/xyTom/coding-tools-mcp
2•xytom•21m ago•0 comments

I vibe-coded a travel app in a weekend, security scan found 8 critical flaws

https://github.com/KrazyKulsum/trip-together-planner-21/tree/main
3•kulsumshannan•21m ago•0 comments

Stuck agents: coverage, capacity, or me

https://saheb.github.io/blog/posts/stuck-agents-coverage-capacity-or-me/
1•saheb37•23m ago•0 comments

The Download: OpenAI's predictable hack, and an AI stock sell-off

https://www.technologyreview.com/2026/07/28/1140868/the-download-openai-hack-ai-stock-sell-off/
1•joozio•23m ago•0 comments

Bots Took over Our Lives

https://www.newyorker.com/culture/the-lede/how-bots-took-over-our-lives
1•Brajeshwar•24m ago•0 comments

I Learned Floot and Perfai Security over One Weekend and Built a Real Estate App

https://github.com/wahidmmadiha/Homescope/tree/main
2•madihamwahid•24m ago•0 comments

Plan your running and lifting training weeks in seconds

https://polyvalent.fit/
1•luckylokman•25m ago•1 comments