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

We Have Learned Nothing

https://colossus.com/article/we-have-learned-nothing-startup-pundits/
1•lukestevens•24s ago•0 comments

The SDLC Is Dead

https://boristane.com/blog/the-software-development-lifecycle-is-dead/
1•appwiz•3m ago•1 comments

Confer is bringing foundational AI privacy to Meta

https://confer.to/blog/2026/03/encrypted-meta/
1•justcommenting•4m ago•1 comments

Billy.sh – a local AI coding assistant for the terminal

https://github.com/jd4rider/billy-app
1•jd4rider•4m ago•0 comments

Upgrading to Kubernetes 1.35?

https://randomwrites.com/foundations/02-Cgroups-Deep-Dive
1•mutahirs•9m ago•0 comments

US Postal Service expects to run out of cash in a year

https://abc7.com/post/us-postal-service-expects-run-cash-year-help-congress-postmaster-says/18730...
2•lxm•13m ago•0 comments

Why Tech Giants Are Ditching the Power Grid

https://www.nytimes.com/interactive/2026/03/18/business/energy-environment/data-center-energy-gas...
1•mmooss•14m ago•0 comments

I Choose Ruby on Rails in the AI Coding Era

https://jessewaites.com/blog/post/why-i-choose-ruby-on-rails-in-the-ai-coding-era/
1•cylo•16m ago•0 comments

The Robotic Tortoise and the Robotic Hare

https://tomtunguz.com/local-vs-cloud-speed/
1•dataminer•17m ago•0 comments

One Hundred Years in the U.S. Stock Markets

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6438198
1•salkahfi•20m ago•0 comments

US national debt surges past $39T just weeks into war in Iran

https://apnews.com/article/us-national-deficit-hits-39-million-6ff73495bae701b5c009d3da5515ca3a
3•SilverElfin•20m ago•3 comments

I built a memory AI that talks and learns

https://play.google.com/store/apps/details?id=com.n3xg3n.chatbot&hl=en_US
1•bennyv1211•22m ago•0 comments

Show HN: We built an AI judge for a live hackathon, then red-teamed it

https://basicscandal.github.io/arbiter/
1•theoradical•22m ago•0 comments

Next-Generation Water Satellite Maps Seafloor from Space

https://www.jpl.nasa.gov/news/next-generation-water-satellite-maps-seafloor-from-space/
1•thunderbong•28m ago•0 comments

A sufficiently detailed spec is code

https://haskellforall.com/2026/03/a-sufficiently-detailed-spec-is-code
2•signa11•30m ago•0 comments

Cook: A simple CLI for orchestrating Claude Code

https://rjcorwin.github.io/cook/
7•staticvar•33m ago•0 comments

Forest loss can make watersheds 'leakier,' global study suggests

https://phys.org/news/2026-02-forest-loss-watersheds-leakier-global.html
2•PaulHoule•37m ago•0 comments

Afroman prevails in defamation trial over songs about police raid on his home

https://www.washingtonpost.com/national-security/2026/03/18/afroman-lawsuit-deputies-raid-ohio/
3•busymom0•39m ago•1 comments

Ghost Leg Lottery

https://en.wikipedia.org/wiki/Ghost_leg
1•tdeck•40m ago•0 comments

Strategic Leadership Is Lacking, Not Trust

https://garrickvanburen.com/strategic-leadership-is-lacking-not-trust/
1•garrickvanburen•40m ago•0 comments

China's aluminium smelters embark on green long march

https://www.ft.com/content/1e6e531f-b383-4404-9acf-79db8d9c6c00
1•toomuchtodo•51m ago•1 comments

Show HN: Fitness MCP

https://getfast.ai/claude-connector
5•tmulc18•53m ago•0 comments

Genome modelling and design across all domains of life with Evo 2

https://www.nature.com/articles/s41586-026-10176-5
1•salutis•56m ago•0 comments

SumatraPDF 3.6 Released

https://www.sumatrapdfreader.org/docs/Version-history#3-6-2026-03-17
2•clavis•56m ago•0 comments

Rede (small networks of LLM bots)

https://github.com/maxmetcalfe/rede
1•mmetcalfe•58m ago•0 comments

The Era of Compounding Language

https://benoitessiambre.com/compound.html
1•BenoitEssiambre•59m ago•0 comments

There Will Be Bundling (2025)

https://healthapiguy.substack.com/p/there-will-be-bundling
2•toomuchtodo•59m ago•0 comments

Traffic safety improvements frequently die by popular vote

https://www.fastcompany.com/91505393/traffic-safety-improvements-frequently-die-popular-vote-time...
3•oftenwrong•1h ago•0 comments

Qatabase – Learn SQL and Python with visual execution tools

https://qatabase.com
3•praveenpolu•1h ago•0 comments

AI Recruiters Read This First

https://indexme.dev
1•codyyyyliu•1h ago•0 comments