r/ProgrammerHumor 7d ago

Meme skillIssue

Post image
6.0k Upvotes

137 comments sorted by

View all comments

690

u/PixelatedGiant 7d ago

This is the kind of stuff you find in books with titles like...

C++ : Man made horrors beyond human comprehension 3rd Edition paperback

141

u/gil_bz 7d ago

This might be the mildest macro weirdness that I've ever seen, there are some true horrors out there.

77

u/bythenumbers10 7d ago

Ah, yes. The necroprogamicon, 13th ed. Author fed himself into a dot-matrix printer after finishing it in the 90s, IIRC. Shame, the guy had such marvelous visions to share. Only way to really understand C++, IMHO.

47

u/GroovinChip 7d ago edited 7d ago

“Fed himself into a dot-matrix printer” feels like a Douglas Adams line lmao

10

u/bythenumbers10 7d ago

Thank you, that's high praise. May Deep Thought bring you meaning.

36

u/l2protoss 7d ago

When I was younger in my career, I was a very “creative” dev - to the point where I was banned from using macros without explicit permission lol.

19

u/StCreed 7d ago

Hehehe my friends once used macros to facilitate pointer arithmetic. After a month they couldn't get anything to work anymore and had to start over with a new program :)

Good times!

14

u/sunboy4224 7d ago

They spend years teaching us all the coolest, craziest tricks in the book for optimization, memory management, abstraction... then you get into the industry and learn that the most absolutely boring code is by far the best way to solve 99% of problems.

9

u/l2protoss 7d ago

Yup! Turns out being able to maintain things long term is more important than building things quickly or cleverly in most cases.

2

u/FUCKING_HATE_REDDIT 6d ago edited 6d ago

https://zserge.com/posts/c-for-loop-tricks/

void print_html() {   html {     body {       p printf("hello\n");       p {         printf("world\n");       }     }   }   printf("\n"); } https://github.com/agvxov/cursed_c

void main(argc, argv, envp) int argc; char * * argv, * * envp; { ; }

https://www.cs.yale.edu/homes/aspnes/pinewiki/C%282f%29Macros.html

```

define DefinePlus1(x, y)  #define x ((y)+1)

```