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

Learn SQL Once, Use It for 30 Years

https://fagnerbrack.com/learn-sql-once-use-it-for-30-years-9aceb0bdee03
1•karakoram•1m ago•0 comments

NowServingTO – Zero-DB restaurant tracker using city open data

https://nowservingto.com/
1•Joshua_Opolko•2m ago•0 comments

DDS Vibe Academy – 49 free AI coding classes (12 new masterclasses this week)

https://ddsboston.com/pages/dds-vibe-academy
1•robert_dds•2m ago•0 comments

Story Points: Explicit, Honest, Predictable. Already In Use.

https://bastrich.tech/story-points/
1•karakoram•2m ago•0 comments

They call it stupid hot for a reason: Heat muddles animal brains

https://arstechnica.com/science/2026/05/they-call-it-stupid-hot-for-a-reason-heat-muddles-animal-...
1•Qadriq•2m ago•1 comments

I built a free cross platform music/podcast/audiobook sharing app iOS/Android

https://mtshare.net
1•macsmax•7m ago•1 comments

AI guardrails stripped from Meta and Google models in minutes

https://www.ft.com/content/5630ed79-a263-41ed-9a1a-321617ae310e
1•bookofjoe•8m ago•1 comments

Disagreeing with Google, Postgres, Future Problems – Mike Stonebraker

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

The Biggest Problem in Investing (By Ben Felix) [video]

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

Deflock hits 100k ALPRs Mapped in USA

https://deflock.org/
5•pilingual•13m ago•0 comments

Why AI safety researchers should consider a contract research manager position

https://www.lesswrong.com/posts/MjFArZa85KydKdivh/why-ai-safety-researchers-should-consider-a-con...
3•joozio•13m ago•0 comments

OpenJarvis: Personal AI, on Personal Devices

https://github.com/open-jarvis/OpenJarvis
3•simonpure•14m ago•0 comments

Meta launches Instagram, Facebook, and WhatsApp subscriptions

https://techcrunch.com/2026/05/27/meta-officially-launches-instagram-facebook-and-whatsapp-subscr...
2•tambourine_man•15m ago•0 comments

Cancer Progress: More Than You Wanted to Know (2018)

https://slatestarcodex.com/2018/08/01/cancer-progress-much-more-than-you-wanted-to-know/
1•downbad_•16m ago•0 comments

Polyhedral Compilation in MLIR

https://sajidzubair.substack.com/p/polyhedral-compilation-in-mlir
1•matt_d•17m ago•0 comments

Viking Lander Biological Experiments

https://en.wikipedia.org/wiki/Viking_lander_biological_experiments
1•root-parent•20m ago•0 comments

Fibbo: A modern, fast and universal note-taking app running on every device

https://codeberg.org/Nifou/fibbo
1•maxloh•21m ago•0 comments

Turning AI chatbot pages into malware delivery platforms

https://pushsecurity.com/blog/llmshare-malvertising-campaign
1•redbell•23m ago•0 comments

United flight forced to turn around because of a Bluetooth speaker name

https://www.theverge.com/transportation/940486/united-flight-236-bluetooth-speaker-name-bomb
1•droidjj•24m ago•1 comments

NudgeQuote (stops contractors from leaving money in unanswered estimates)

https://nudgequote.com/
1•erichensley•25m ago•0 comments

PewDiePie's AI Workspace

https://pewdiepie-archdaemon.github.io/odysseus/
2•r0xsh•25m ago•0 comments

Show HN: Deliberate – log what your agent rejected, not just what it ran

https://www.deliberate.dev/
2•garysmith1234•26m ago•0 comments

Genetics of Transparent Worms, Supertasters and Cancer

https://www.quantamagazine.org/cori-bargmann-on-the-genetics-of-transparent-worms-supertasters-an...
1•bookofjoe•28m ago•0 comments

I found a seashell in the middle of the desert

https://github.com/Hawzen/I-found-a-seashell-in-the-middle-of-the-desert
1•SVI•29m ago•0 comments

A dynamic programming algorithm for the traveling salesman problem (1993)

https://dl.acm.org/doi/abs/10.1145/173834.173835
1•tosh•30m ago•0 comments

Arctic food chain hit as tipping point passed

https://www.ed.ac.uk/news/arctic-food-chain-hit-as-tipping-point-passed
1•littlexsparkee•30m ago•0 comments

Remote-cmd – Python CLI for SSH server management without the Ansible overhead

https://github.com/Vae-Scrooge/remote-cmd
1•Vae-Scrooge•34m ago•0 comments

$100 to a Debian Developer who can get Fresh Editor into Trixie

5•jph•37m ago•0 comments

Encrypted Client Hello Doesn't Help With Privacy

https://blog.miloslavhomer.cz/encrypted-client-hello/
2•ArcHound•38m ago•1 comments

Commands Aren't Just Events in Reverse

https://docs.eventsourcingdb.io/blog/2026/06/01/commands-arent-just-events-in-reverse/
1•goloroden•38m ago•0 comments