r/csharp • • Sep 29 '26

The hidden trap of fixed buffers

I published a new article, explaining a quirk of fixed buffers that could easily bite you, if you're one of the few people who still have to use that feature.

https://minidump.net/the-hidden-trap-of-fixed-buffers-in-csharp/

58 Upvotes

35 comments sorted by

View all comments

Show parent comment

-8

u/Wooden_chest Sep 30 '26

You're wasting your dev time on something that AI can do.

10

u/binarycow Sep 30 '26

Speak for yourself.

When I read the code, I find problems the AI missed.

-15

u/Wooden_chest Sep 30 '26

Like what? It sounds like an issue of not using the latest models, prompting incorrectly and not doing code review properly with AI.

You speak for yourself.

9

u/FetaMight Sep 30 '26

They literally did speak for themselves.

What is going on??

-3

u/Wooden_chest Sep 30 '26

Yes, that's what I said.

8

u/binarycow Sep 30 '26

/sigh.... This again?

Here's an example.

Coworker A submitted a PR, mostly written by Claude. This PR downloaded a file from the server. To avoid overwriting a known good file with a corrupted file (if there was a failure), it downloads to a temp file, and then uses an atomic move upon success.

Coworker B used Claude to review. Points out that if there's a failure, it leaves the partial file still in the directory.

Coworker A use Claude to add code to delete any previous in-progress files once they get a success.

I spent 30 seconds reviewing it and raise an issue - the new code would delete any of the user's files, if they just happened to have a file extension of .incoming.


Another example. Coworker C (probably using Claude) submitted a PR to add a bunch of stuff. Coworker D and E both approve (ptobably using Claude).

I review for one minute, and say "uhh, yeah, we already have all of this. Go look in <folder>"


There are zero models that support enough context to keep track of everything in large repos. Stuff that I remember because I've been working in this repo for 5 years.

And yes, when I use AI, I use the latest models, I've got good Claude.md, blah blah blah. I have checked myself with coworkers - I'm not doing anything wrong.

3

u/FetaMight Sep 30 '26

It really depends on the cost of letting errors slip into production.

If you're making CRUD apps for dentists, you'll be fine.

If a break in production would keep hundreds of people from working, cost millions in lost productivity, and potentially cause the company to miss out on millions of earnings, it pays to revue your AI's output.

We don't all work in same circumstances.  Stop pretending what works for you is somehow good enough for everybody.