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

Comments

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

Lego raises age limit to 100 for David Attenborough's birthday

https://www.instagram.com/p/DYCw8KIlaDJ/
1•Brajeshwar•2m ago•1 comments

AI Act Article 50 transparency rules. Heading for another cookie consent moment?

https://digital-strategy.ec.europa.eu/en/library/draft-guidelines-implementation-transparency-obl...
2•nilen•10m ago•0 comments

Simpler Agent Orchestration WTF

https://alokit.substack.com/p/the-number-nobody-runs-before-building
1•avikalp•11m ago•1 comments

Foo on You, Asparagirl! (2002)

http://esr.ibiblio.org/?p=112
2•jruohonen•15m ago•0 comments

Show HN: I Organized the WAR.GOV/UFO Files

https://hypergrid.systems/site/
2•keepamovin•15m ago•0 comments

Open-source Express.js dev panel for routes and request logs

https://www.npmjs.com/package/express-dev-panel
1•dvsxdev•18m ago•0 comments

Engineering as Humanity's Highest Achievement

https://walkingtheworld.substack.com/p/engineering-as-humanitys-highest
1•hermitcrab•23m ago•0 comments

Three Cultures of Math

https://rkirov.github.io/posts/three-cultures-of-math/
1•mathgenius•25m ago•0 comments

Chess.com produces 3500 ton of CO2 in air for loading JavaScript bundles

https://www.chess.com/
1•emifo3•27m ago•4 comments

Mlx-serve – run LLMs natively on your Mac

https://ddalcu.github.io/mlx-serve/
1•wrxd•28m ago•0 comments

Outlook on Windows silently scales your email by 1.5×

http://picmel.com/blog/outlook-dpi-scaling-bug
1•rudixworld•29m ago•0 comments

Show HN: Query years of HN discussions and comments as a knowledge graph

https://github.com/hash-anu/lightrag-snkv
1•swaminarayan•30m ago•0 comments

AI cost optimization tool "distillfast.com"

2•ashuashpawar•38m ago•2 comments

UtaForth – 303-byte 16-bit Forth in pure Netwide Assembler

https://github.com/Fuwn/UtaForth
2•irdc•42m ago•1 comments

LLMs Won't Replace Programming Languages

https://mech-lang.org/post/2025-01-09-programming-chatgpt/
1•tosh•43m ago•0 comments

Rotten Dot Com

https://www.theparisreview.org/blog/2026/05/06/rotten-dot-com/
30•lordgrenville•51m ago•14 comments

Machine Learning Offers Faster, More Reliable Analysis of Fermi Surfaces

https://www.tus.ac.jp/en/mediarelations/archive/20260417_0478.html
1•rustoo•52m ago•0 comments

Arm, the UK and Apple

https://thechipletter.substack.com/p/arm-the-uk-and-apple
2•klelatti•53m ago•0 comments

LLMorphism: When humans come to see themselves as language models

https://arxiv.org/abs/2605.05419
2•okey•54m ago•0 comments

Real signals or artificial stereotypes? Adventures with a cultural Copilot

https://kucharski.substack.com/p/real-signals-or-artificial-stereotypes
2•ceejayoz•1h ago•0 comments

In a quest to becoming AI independent

https://adlrocha.substack.com/p/adlrocha-in-a-quest-to-becoming-ai
5•adlrocha•1h ago•1 comments

Show HN: Tinyblok – publishes conditioned sensor data to NATS from an ESP32

https://github.com/lexvicacom/tinyblok
2•alexjreid•1h ago•0 comments

RISC-V Serial Debug Protocol Specification (Draft)

https://gitlab.com/lauterbach/riscv-rsdp-spec
2•jonesjohnson•1h ago•0 comments

Gen Z Resentment Toward AI Grows as Adoption Stagnates and Workplace Fears Mount

https://www.waltonfamilyfoundation.org/about-us/newsroom/gen-z-resentment-toward-ai-grows-as-adop...
5•mgh2•1h ago•0 comments

Eve

https://witheve.com/
3•tosh•1h ago•0 comments

Infinitary Logic

https://en.wikipedia.org/wiki/Infinitary_logic
2•soupspaces•1h ago•0 comments

DMA: A Community Hackerspace in Seattle

https://dma.space
1•bleeperblooper•1h ago•0 comments

Cursor CVE-2026-26268: Hidden Git hooks RCE via agents autonomous Git operations

https://nvd.nist.gov/vuln/detail/CVE-2026-26268
3•Armor1AI•1h ago•0 comments

JavaScript Tail Call Optimization in ES2015: Unimplemented and Stack Issues

https://blog.gaborkoos.com/posts/2026-05-09-Your-Recursion-Is-Lying-to-You/
1•birdculture•1h ago•0 comments

A Day in the Life of an "Enshittificator" (Norwegian Consumer Council) [video]

https://www.youtube.com/watch?v=T4Upf_B9RLQ
2•marojejian•1h ago•0 comments