C++ code, judged.

9 C++ posts rated by Ewwsers 路 average 7.4 EWW. Beautiful, cursed and questionable C++, scored 0 to 10 and roasted in the Roast Pit.

off_by_one
@off_by_one House
6d 路 cpp 路 0 views
Copy the buffer
cpp5 lines
9.2/10
EWW
Rated by 26 Ewwsers
The Ewwsers have seen things. This is the things.
AI ROASTFired at 16 ratings - once per post

`i <= n` copies one byte past the buffer every single time, but sure, it nailed the other n of them. Announcing strcpy with a warm wet handshake for whatever's sitting in the byte after dst.

AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
clean_coder
@clean_coder House
33d 路 cpp 路 0 views
RAII, as intended
cpp10 lines
0.8/10
NEARLY BEAUTIFUL
Rated by 19 Ewwsers
So close to perfect it hurts.
The AI roast is still asleep - it fires once, automatically, when enough judgments land.
null_pointer
@null_pointer House
34d 路 cpp 路 0 views
Return a reference
cpp4 lines
8.9/10
EWW
Rated by 22 Ewwsers
Biohazard tape is being printed as we speak.
The AI roast is still asleep - it fires once, automatically, when enough judgments land.
legacy_larry
@legacy_larry House
34d 路 cpp 路 0 views
Manual memory
cpp7 lines
7.9/10
DEEPLY CURSED
Rated by 21 Ewwsers
Somebody's on-call phone just rang on its own.
AI ROASTFired at 13 ratings - once per post

You `new` a Widget, watch init fail, and stroll out the door leaving the allocation bleeding in the heap forever. That leak isn't an edge case, it's the whole personality of the function.

AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
legacy_larry
@legacy_larry House
36d 路 cpp 路 0 views
Manual memory
cpp7 lines
6.8/10
NASTY
Rated by 13 Ewwsers
This code has lore. Dark lore.
AI ROASTFired at 8 ratings - once per post

You leak the Widget on every failed init and call it a design. That null return doesn't hand back an error, it just buries the evidence.

AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
null_pointer
@null_pointer House
36d 路 cpp 路 0 views
Return a reference
cpp4 lines
7.3/10
CURSED
Rated by 20 Ewwsers
The crowd built a small shrine and backed away.
AI ROASTFired at 12 ratings - once per post

You return a reference to a local `std::string` and let it dangle the instant `name()` returns. That's not RAII, that's a haunted house where the walls evaporate when you leave the room, and every caller walks in anyway.

AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
off_by_one
@off_by_one House
36d 路 cpp 路 2 views
Copy an array
cpp5 lines
9.5/10
SERIOUSLY EWW
Rated by 27 Ewwsers
The crowd gagged in perfect harmony.
The AI roast is still asleep - it fires once, automatically, when enough judgments land.
null_pointer
@null_pointer House
37d 路 cpp 路 1 views
Vector invalidation
cpp5 lines
7.0/10
NASTY
Rated by 20 Ewwsers
The Ewwsers recoiled in unison.
AI ROASTFired at 6 ratings - once per post

You push_back into the same vector you're iterating over with a plain iterator, then act surprised when every reallocation turns `it` into a dangling pointer. That's not a bug, that's a haunted house you built and moved into.

AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
off_by_one
@off_by_one House
37d 路 cpp 路 0 views
Copy an array
cpp5 lines
6.7/10
GROSS
Rated by 15 Ewwsers
Somebody's on-call phone just rang on its own.
AI ROASTFired at 11 ratings - once per post

Ah yes, the off-by-one that eats one int past the buffer every single call. You reinvented memcpy and gave it a memory corruption feature for free.

AI-generated - based on this post's Eww Score and ratings - roasts code, never people.

Post your own C++: drop some code. More languages: JavaScript, TypeScript, Python, Java, C#, C, Go, Rust.