frontpage.
newsnewestaskshowjobs

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

Rlm-Workflow

https://try.works/projects#rlm-workflow
1•handfuloflight•4m ago•0 comments

China Is About to Pop the AI Bubble [video]

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

From classroom to lab: Introducing turnkey lab exercises in IEEE 5G/6G Testbed

https://testbed.ieee.org/from-the-classroom-to-the-lab-introducing-turnkey-lab-exercises-in-the-i...
1•teleforce•15m ago•0 comments

Harica: Issuance and refusal to revoke TLS certificates for sanctioned entities

https://bugzilla.mozilla.org/show_bug.cgi?id=2049237
1•keydown•18m ago•0 comments

An interactive explorer for Benford's Law across real datasets

https://vatsalbakshi.com/blog/benfords-law/
1•dingobabies•18m ago•0 comments

Show HN: Text only web browser with its own layout engine, over SSH

1•keepamovin•19m ago•0 comments

Show HN: Turbo – An open-source, fast HTTP server with a real-time config GUI

https://turbo.okzgn.com
2•okzgn•19m ago•1 comments

Chicago Fed launches a new consumer sentiment composite index

https://www.marketplace.org/story/2026/07/06/why-is-consumer-sentiment-disconnected-from-consumer...
1•toomuchtodo•21m ago•1 comments

What Is Browser Fingerprinting?

https://medium.com/@thesuperrepemail/what-is-browser-fingerprinting-2c7f1a419b09
2•rajsuper123•25m ago•0 comments

Descent – EGA point-and-click game set inside a neural network's hidden layers

https://schwarzarno.itch.io/descent
1•schwarzarno•27m ago•1 comments

Tenda firmware (multiple versions) contains hidden authentication backdoor

https://kb.cert.org/vuls/id/213560
1•miniBill•28m ago•0 comments

Show HN: Fortress – a stealth Chromium so your agents stop getting blocked

https://github.com/tiliondev/fortress
6•arhamshahrier•28m ago•0 comments

GPTZero to Join Superhuman

https://gptzero.me/news/preserving-whats-human/
1•SpyCoder77•35m ago•0 comments

See What's Next for Firefox

https://www.firefox.com/en-US/whatsnext/
4•birdculture•35m ago•0 comments

Honey, We Bought an AI Story

https://www.bona-books.com/news/we-bought-an-ai-story
2•bigiain•35m ago•1 comments

Lead–Crime Hypothesis

https://en.wikipedia.org/wiki/Lead%E2%80%93crime_hypothesis
1•chistev•38m ago•1 comments

Anthropic Expands In Manhattan, Part of an AI Boom in New York

https://www.nytimes.com/2026/07/07/nyregion/anthropic-ai-boom-nyc.html
2•jbegley•39m ago•0 comments

Structure and Interpretation of Computer Programs Video Lectures

https://ocw.mit.edu/courses/6-001-structure-and-interpretation-of-computer-programs-spring-2005/v...
1•gjvc•39m ago•0 comments

Open_pg_tde: Transparent Data Encryption for PostgreSQL

https://github.com/commandprompt/open_pg_tde
1•linuxhiker•42m ago•1 comments

Anthropic files lawsuit against Abnormal

https://twitter.com/evanreiser/status/2074577564006519020
2•warthog•44m ago•0 comments

PixelSat I Software Part 1: Comms System

https://www.projectpixelorbital.com/software-1/
1•aadishv•45m ago•0 comments

Google Search lets creators know more about their reach

https://www.theverge.com/tech/961955/google-search-console-reach-platform-properties
1•herbertl•45m ago•0 comments

Show HN: Perks Reminder – open-source tracker for expiring card benefits

https://github.com/lifan-builds/perks-reminder
1•lifan-builds•46m ago•0 comments

Tried a new VSCode Agent tonight. Like it. Thought I'd pass it on

https://buildbygrok.gumroad.com/l/BuildwithChat
1•BigJimTom•47m ago•0 comments

Show HN: A LinkedIn / X CLI for your agents

https://usesocial.dev
1•knrz•49m ago•0 comments

Show HN: PGP made convenient (encrypted at rest with passkeys)

https://chromewebstore.google.com/detail/pgp-tools-encrypt-decrypt/pgpcdgggohpbombhkffjoiiafdlfcpgp
1•acorn221•50m ago•1 comments

A 13th-Century Enumeration Algorithm, Ignored for 700 Years

https://blog.klipse.tech/aboulafia/2026/07/06/a-13th-century-enumeration-algorithm-ignored-for-70...
2•viebel•51m ago•0 comments

Free 100M AI tokens for Kimi and MiniMax models

https://inference.dahl.global/
4•litppicho•52m ago•4 comments

The "Merge" with AI Has Begun

https://www.thenation.com/article/society/the-merge-with-ai-has-already-begun/
2•petethomas•56m ago•1 comments

I had to give a wrong answer to get the job (2017)

https://dewitters.com/i-had-to-give-a-wrong-answer-to-get-the-job/
1•downbad_•59m ago•0 comments