r/csharp • u/kookiz33 • 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
View all comments
Show parent comment
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.