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

Now you can play retro Windows games too along with DOS on NostalgiaApp on a Mac

https://www.nostalgi.app/
1•jupe69•2m ago•0 comments

Unmasking the Creator of Bitcoin [audio]

https://www.nytimes.com/2026/04/09/podcasts/the-daily/satoshi-nakamoto-bitcoin-creator.html
1•doener•7m ago•0 comments

Huion Devices in the Desktop Stack

http://who-t.blogspot.com/2026/04/huion-devices-in-desktop-stack.html
2•JNRowe•8m ago•1 comments

"Wretches, Speak Evil of Me": Goethe and Schiller's Xenions (1896 Edition)

https://publicdomainreview.org/collection/xenions/
1•benbreen•10m ago•0 comments

The Shinkansen

https://www.worksinprogress.news/p/the-secret-behind-japans-railways
2•WillDaSilva•15m ago•0 comments

I built a product that allows you to generate a ad off of just a product url

https://cutagent.vercel.app/
1•rishidandu•18m ago•0 comments

Show HN: Tsplat – Render Gaussian Splats directly in your terminal

https://github.com/darshanmakwana412/tsplat
3•darshanmakwana•20m ago•0 comments

Why don't lighthouses look like this anymore? [video]

https://www.youtube.com/watch?v=WA0L5xznsKE
1•llimos•20m ago•1 comments

Can Claude Fly a Plane?

https://so.long.thanks.fish/can-claude-fly-a-plane/
20•casi•23m ago•9 comments

Australia closed all of its refineries

https://www.youtube.com/watch?v=Fu6xnDSZyHM
2•curio_Pol_curio•24m ago•1 comments

Distributed DuckDB Instance

https://github.com/citguru/openduck
8•citguru•24m ago•1 comments

Paul Craig Roberts: 3 ways greater Israel wrecked the peace talks

5•__patchbit__•26m ago•0 comments

Who Gets Guggenheims?

https://www.publicbooks.org/who-gets-guggenheims/
2•apollinaire•27m ago•0 comments

Paul Craig Roberts: 3 ways greater Israel wrecked the peace talks

https://www.youtube.com/watch?v=BW-OrMPa-5c
2•__patchbit__•30m ago•0 comments

Show HN: Burrow – Runtime Security for AI Agents

2•saranshrana•30m ago•0 comments

Ascend – open-source Job board and Claude AI prep plans for FAANG/YC interviews

https://github.com/RajuRoopani/ascend-ai
2•RajuRoopani01•32m ago•0 comments

Jack Dennis; American computer scientist

https://grokipedia.com/page/Jack_Dennis
1•__patchbit__•35m ago•0 comments

Zuckerbot is coming: Meta is building an AI version of Mark Zuckerberg

https://www.neowin.net/news/zuckerbot-is-coming-meta-is-reportedly-building-an-ai-version-of-mark...
1•bundie•36m ago•0 comments

Decluttering Projects You Can Do in Half an Hour or Less

https://www.nytimes.com/2024/04/12/well/live/organize-your-home-declutter.html
2•zacharyozer•37m ago•0 comments

Show HN: Pushduck – S3 uploads that run on Cloudflare Workers, no AWS SDK

2•abhay_ramesh•39m ago•0 comments

Filesystems: Btrfs

https://internals-for-interns.com/posts/btrfs-filesystem/
2•valyala•41m ago•0 comments

Flinku – I built a Firebase Dynamic Links replacement after the shutdown

https://www.flinku.dev/
1•luky_dev•43m ago•0 comments

IBM folds to Trump anti-DEI push, admits no misconduct but pays $17M penalty

https://arstechnica.com/tech-policy/2026/04/ibm-folds-to-trump-anti-dei-push-admits-no-misconduct...
4•Growtika•46m ago•0 comments

The "Bug" Heard 'Round the World [pdf]

https://www5.in.tum.de/~huckle/space_.pdf
1•danielovichdk•47m ago•0 comments

Roblox devs now need a subscription to share their games freely

https://devforum.roblox.com/t/new-publishing-requirements-evaluation-process-for-games/4573166
12•hallole•52m ago•3 comments

Show HN: SCP – A protocol that drops LLM API calls to zero in 60fps physics loop

https://github.com/srk0102/plexa
1•srk0102•53m ago•0 comments

Generative AI in Banking: Top Use Cases and Benefits

https://www.kellton.com/kellton-tech-blog/generative-ai-in-banking
1•johnjosephkt•55m ago•0 comments

Ask HN: LeetCode, anyone still doing it?

3•kwar13•57m ago•1 comments

DeepDive – Autonomous OSINT investigation tool with 3D graph

https://github.com/Sinndarkblade/deepdive
1•sinndarkblade•1h ago•1 comments

MOS tech 6502 8-bit microprocessor in pure SQL powered by Postgres

https://github.com/lasect/pg_6502
2•adunk•1h ago•0 comments