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•11mo ago

Comments

qwertox•11mo ago
Rule #1: Always put deletions behind a flag which is disabled for the first couple of test runs.
turtleyacht•11mo 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•11mo 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•11mo ago
Oh, I see. Having a flag to skip deletion during test runs is a good rule then.
rvz•11mo 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•11mo ago
Who runs such an AI generated script without checking the code first?
qwertox•11mo 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•11mo ago
Right so lets just always run the code as is ?
qwertox•11mo 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•11mo 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•11mo ago
In which Roko's Basilisk fires a warning shot.
jethronethro•11mo ago
This is why you test code or a script before running it for real. Live and learn, I guess ...

I'm Using AI to Manage My Small Business

https://theautomatedoperator.substack.com/p/15-ways-im-using-ai-to-manage-my
1•idopmstuff•51s ago•0 comments

Mnist Neural Network Playground for 3blue1brown video

https://mnist.theory-a.com/
1•notShabu•1m ago•1 comments

Show HN: Homebutler – Nightly restore drills for your homelab backups

https://homebutler.dev/
1•swq115•1m ago•0 comments

A New Meditation for Strengthening Attention and Executive Control

https://medium.com/@LucCogZest/bsbm-a-multi-anchor-meditation-for-strengthening-attention-executi...
1•LucCogZest•2m ago•1 comments

Ad-Free Privacy Tool/Service Recommendations

https://www.privacyguides.org/en/tools/
1•Cider9986•2m ago•0 comments

I cataloged 500 vibe coding tools so you don't have to

1•AkshatT8•2m ago•0 comments

What to know about naval blockades as US starts patrols of the Strait of Hormuz

https://text.npr.org/nx-s1-5783870
1•mooreds•2m ago•0 comments

Caveman – why use many token when few do trick

https://github.com/JuliusBrussee/caveman/blob/main/README.md
1•kerblang•3m ago•0 comments

Clojure The Documentary, official film [video]

https://www.youtube.com/watch?v=Y24vK_QDLFg
1•bmillare•5m ago•0 comments

Women in Tech: Journeys, Grit, and the Future We're Building

https://www.harness.io/blog/women-in-tech-journeys-grit-and-the-future-were-building
1•mooreds•6m ago•0 comments

We gave an AI a 3 year retail lease and asked it to make a profit

https://andonlabs.com/blog/andon-market-launch
1•lukaspetersson•6m ago•0 comments

How to Outline Text (Badly, at First)

https://kellydornhaus.com/blog/font-outlines.html
1•furyofantares•7m ago•0 comments

Prt-Scan: AI-Powered GitHub Actions Supply Chain Attack

https://www.wiz.io/blog/six-accounts-one-actor-inside-the-prt-scan-supply-chain-campaign
1•speckx•7m ago•0 comments

Short Attention Span Theater

https://randsinrepose.com/archives/short-attention-span-theater/
1•mooreds•8m ago•0 comments

Bullet train upgrade brings 5G windows and noise-cancelling cabins to Japan

https://www.theregister.com/2026/04/16/jr_central_shinkansen_tech/
1•smurda•9m ago•0 comments

Saving Us from Ourselves?

https://leancrew.com/all-this/2026/03/saving-us-from-ourselves/
1•surprisetalk•10m ago•0 comments

Epicycles All the Way Down

https://www.strangeloopcanon.com/p/epicycles-all-the-way-down
1•surprisetalk•10m ago•0 comments

Synchronous Programming for Kids: A Manifesto [video]

https://www.youtube.com/watch?v=ESK695bHI5Q
1•surprisetalk•10m ago•0 comments

The Unix Executable as a Smalltalk Method [video]

https://www.youtube.com/watch?v=sZjPQ7vtLNA
1•surprisetalk•10m ago•0 comments

Dizzying Spiral Staircase with Single Guardrail Once Led to Top of Eiffel Tower

https://www.smithsonianmag.com/smart-news/a-dizzying-spiral-staircase-with-a-single-guardrail-onc...
1•bookofjoe•11m ago•0 comments

Ask HN: Why no insurance is fully transparent about how they handle each case?

2•julienreszka•11m ago•0 comments

Serious Weaknesses in the EU Age Verification App

https://twitter.com/intcyberdigest/status/2044762941019295772
1•gostsamo•12m ago•0 comments

DESI Completes Planned 3D Map of the Universe

https://newscenter.lbl.gov/2026/04/15/desi-completes-planned-3d-map-of-the-universe-and-continues...
1•ohjeez•13m ago•0 comments

What is audio visual entrainment? Science, benefits, and how it works

https://6th.tech/en/blog/audio-visual-entrainment
1•smanuel•13m ago•0 comments

Show HN: I built a free Mac app locker because AppLocker ($18) freezes Macs

https://github.com/dutkiewiczmaciej/MakLock
1•makmakapps•13m ago•0 comments

Making backwards- and forwards-compatible web programs (kbrecordzz)

http://kbrecordzz.com/2024/11/making-backwards--and-forwards-compatible-web-programs/
1•bollkalle•14m ago•0 comments

A Gentle Introduction to Mercury

https://bctnry.github.io/gentle-introduction-to-mercury/
2•PaulHoule•14m ago•1 comments

Cruise industry eyes nuclear to power a sustainable future

https://www.lr.org/en/knowledge/horizons/april-2026/cruise-industry-eyes-nuclear-to-power-a-susta...
1•mpweiher•15m ago•0 comments

Solve by Default

https://theengineersetlist.substack.com/p/solve-by-default
1•speckx•15m ago•0 comments

Warzone will be renamed to War.app

https://www.warzone.com/blog/index.php/2026/04/
2•wmlhwl•17m ago•0 comments