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

Where Enterprises Are Adopting AI

https://a16z.com/where-enterprises-are-actually-adopting-ai/
1•wslh•13s ago•0 comments

Apple's Mac Mini Went Viral. Why Can't You Buy One?

https://www.wsj.com/tech/personal-tech/apple-mac-mini-supply-3e7a7509
1•Anon84•1m ago•0 comments

Beyond Demo Day: Sorting and Value Added in Startup Accelerators

https://www.nber.org/papers/w35063
1•john_horton•1m ago•0 comments

Oil prices plunge as Iran says Strait of Hormuz 'open' during ceasefire

https://www.bbc.com/news/articles/ckg045z73z1o
2•geox•2m ago•0 comments

Hyperscalers have already outspent most famous US megaprojects

https://twitter.com/finmoorhouse/status/2044933442236776794
1•nowflux•3m ago•0 comments

Writing string.h functions using string instructions in asm x86-64

https://pmasschelier.github.io/x86_64_strings/
1•thaisstein•3m ago•0 comments

The Mystery of Rennes-Le-Château, Part 4: Non-Fiction Meets Fiction

https://www.filfre.net/2026/04/the-mystery-of-rennes-le-chateau-part-4-non-fiction-meets-fiction/
1•doppp•4m ago•0 comments

Probabilistic Record Linkage Using Pretrained Text Embeddings

https://www.cambridge.org/core/journals/political-analysis/article/probabilistic-record-linkage-u...
1•cowartc•4m ago•0 comments

I'm Coding by Hand

https://miguelconner.substack.com/p/im-coding-by-hand
1•evakhoury•6m ago•0 comments

The Instant Copy Trap Makes AI Creativity Impossible

https://tombedor.dev/creativity/
1•jjfoooo4•7m ago•0 comments

Your AI excitement is someone's AI apprehension

https://metedata.substack.com/p/007-your-ai-excitement-is-someones
1•young_mete•7m ago•0 comments

Why do dLLMs tend to collapse in RL

https://twitter.com/sheriyuo/status/2044305629813321742
1•gmays•8m ago•0 comments

Favcreator.com – Ranking the Best OnlyFans Creators

https://favcreator.com
1•favcreator•8m ago•1 comments

Why every SaaS app is becoming a chat bar

https://metedata.substack.com/p/006-the-chat-bar-isnt-lazy-design
1•young_mete•8m ago•1 comments

Show HN: I built a keyword research tool that doesn't require $99/month

https://kwverdit.com
1•cedric-hsu•10m ago•0 comments

Running a Minecraft Server and More on a 1960s Univac Computer

https://farlow.dev/2026/04/17/running-a-minecraft-server-and-more-on-a-1960s-univac-computer
1•farlow•10m ago•0 comments

My New Microphone! [video]

https://www.youtube.com/watch?v=iRThyHhhTdg
1•opengrass•11m ago•0 comments

Why are residential proxy providers charging per GB?

1•maxalbarello•11m ago•0 comments

Show HN: I made a anonymous gallery / Anti Social Media

https://galleryanonima.com/
1•filipfilm1978•11m ago•0 comments

I built on-device-only architecture for Mac utilities (and why it matters)

https://saneapps.com
1•SaneApps•12m ago•1 comments

Detecting DOSBox from Within the Box

https://datagirl.xyz/posts/dos_inside_the_box.html
2•atan2•13m ago•0 comments

The Allbirds Pivot Is a Terrible Idea... Right?

https://www.theatlantic.com/newsletters/2026/04/allbirds-ai-stocks-sneakers/686835/
1•fortran77•13m ago•0 comments

Recent advances push Big Tech closer to the Q-Day danger zone

https://arstechnica.com/security/2026/04/while-some-big-tech-players-accelerate-pqc-readiness-oth...
1•Brajeshwar•14m ago•0 comments

U+237C ⍼ Right angle with downwards Zig-zag arrow

https://ionathan.ch/2022/04/09/angzarr.html
1•CharlesW•15m ago•0 comments

WordPress had two supply chain attacks in one week. Same structural gap.

https://decodedreport.substack.com/p/43-of-the-internet-runs-wordpress
1•tejakusireddy•15m ago•1 comments

Congress extends controversial surveillance powers for 10 days

https://www.npr.org/2026/04/17/nx-s1-5788573/house-extends-surveillance-powers-for-10-days
2•speckx•19m ago•0 comments

Chinese carmaker patents voice-controlled 'in-vehicle toilet'

https://www.bbc.com/news/articles/c1l92yv4mydo
1•andy99•21m ago•0 comments

Universal INCOME via check is best way to deal with unemployment caused by AI

https://xcancel.com/elonmusk/status/2044990537145753894#m
4•stefap2•22m ago•3 comments

I built a server security system with AI – come break it

https://hyveguard.com
1•DirtRonin•24m ago•0 comments

ParseBench: Document Parsing Benchmark for AI Agents

https://github.com/run-llama/ParseBench
1•firasd•25m ago•0 comments