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

Comments

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

Go tests probably don't need a mocking library

https://rednafi.com/go/mocking-libraries-bleh/
1•AlexeyBelov•8s ago•0 comments

Saudi Arabia ordered to pay £3M to London dissident over Pegasus spying

https://www.theguardian.com/world/2026/jan/26/saudi-arabia-ordered-pay-london-dissident-pegasus-s...
1•chrisjj•1m ago•0 comments

Cop-assisted extortion of DWI arrestees in New Mexico include getting them drunk

https://reason.com/2026/01/23/cop-assisted-extortion-of-dwi-arrestees-in-new-mexico-included-gett...
2•leephillips•2m ago•0 comments

Common Sense

https://en.wikipedia.org/wiki/Common_Sense
1•emmabruns•3m ago•0 comments

ICE follows starkly different playbooks in red and blue states

https://www.cnn.com/2025/08/05/us/immigration-arrests-community-ice-invs
3•rbanffy•4m ago•2 comments

Windows 11's Patch Tuesday nightmare gets worse

https://www.windowscentral.com/microsoft/windows-11/windows-11s-botched-patch-tuesday-update-nigh...
2•01-_-•4m ago•0 comments

ESA Meerkat Asteroid Guard: a monitoring service for imminent impactors

https://arxiv.org/abs/2601.13323
1•belter•5m ago•0 comments

Ask HN: How do you balance clarity vs speed in communication?

1•simon-rebbins•6m ago•1 comments

OracleGPT: Thought Experiment on an AI Powered Executive

https://senteguard.com/blog/#post-7fYcaQrAcfsldmSb7zVM
1•djwide•6m ago•1 comments

An Afghan entrepreneur turned sanctions into a $60M-per-month aid platform

https://thebitgazette.com/afghanistans-quiet-crypto-breakthrough-in-aid/
1•campusninja•6m ago•0 comments

Women's skepticism toward AI: The role of risk orientation and risk exposure

https://academic.oup.com/pnasnexus/article/5/1/pgaf399/8429563?login=false
1•PaulHoule•7m ago•0 comments

AI will not replace software engineers (hopefully)

https://medium.com/@sig.segv/ai-will-not-replace-software-engineers-hopefully-84c4f8fc94c0
3•fwef64•7m ago•0 comments

The Essence of Frigidity

https://computer.rip/2026-01-25-the-essence-of-frigidity.html
1•Brajeshwar•7m ago•0 comments

Graphic tip: rounded rectangle borders (2006)

https://web.archive.org/web/20110302165328/http://www.artofadambetts.com/weblog/2006/08/graphic-t...
1•lelandfe•9m ago•0 comments

An unsolved question in sleep science

https://www.autodidacts.io/long-sleep-duration-and-mortality/
1•surprisetalk•9m ago•0 comments

Exams Are Everything in China

https://andrewbatson.com/2025/10/18/exams-are-everything-in-china/
3•surprisetalk•9m ago•0 comments

Thinkism

https://kevinkelly.substack.com/p/thinkism
1•surprisetalk•9m ago•0 comments

Interview with Yayimhere

https://esoteric.codes/blog/yayimhere-interview
1•surprisetalk•9m ago•0 comments

Clairtone's high-end hi-fi system was prized by celebrities and musicians

https://spectrum.ieee.org/project-g-stereo
2•pseudolus•10m ago•0 comments

When Music Stopped Mattering: How optimizing for attention broke everything

https://linernotesxr.substack.com/p/when-music-stopped-mattering
1•unicorn_cowboy•10m ago•1 comments

OSS ChatGPT WebUI – 530 Models, MCP, Tools, Gemini RAG, Image/Audio Gen

https://llmspy.org/docs/v3
2•mythz•11m ago•0 comments

Escorian.com: match with political candidates based on ideologies

https://escorian.com/demo/
2•underlinePasta•13m ago•0 comments

My answers to the questions I posed about porting open source code with LLMs

https://simonwillison.net/2026/Jan/11/answers/
1•zoobab•13m ago•0 comments

I Want to Use LLMs in 2026

https://soap.coffee/~lthms/posts/how-i-want-to-use-llms-in-2026.html
1•speckx•15m ago•0 comments

Apple AirTag

https://www.apple.com/airtag/
1•tosh•17m ago•0 comments

New-wave reactors: The face of an American nuclear Renaissance. Experts alarmed

https://www.cnn.com/2026/01/22/climate/small-nuclear-reactors-smrs-holtec-kairos
1•smurda•17m ago•0 comments

My first contribution to the jj project

https://pauladamsmith.com/blog/2026/01/my-first-contribution-to-the-jj-project.html
1•ibobev•17m ago•0 comments

Considering Strictly Monotonic Time

https://matklad.github.io/2026/01/23/strictly-monotonic-time.html
1•ibobev•17m ago•0 comments

Web app to send files to devices on your Tailscale network

https://github.com/peterwald/traildrop-me
1•peterwald•17m ago•0 comments

Optimizing Python Scripts with AI

https://lemire.me/blog/2026/01/25/optimizing-python-scripts-with-ai/
1•ibobev•18m ago•0 comments