r/badcode • • Jun 09 '20

c++ EA published their Command&Conquer Code on github. This is my favorite part so far.

Post image
1.6k Upvotes

36 comments sorted by

View all comments

Show parent comments

5

u/KernowRoger Jun 09 '20

But why call it magic number and not like connectionId?

9

u/locuester Jun 09 '20 edited Jun 09 '20

ConnectionId would imply usefulness to someone debugging. Magic number makes it clear that it’s used as a [magic number](https://en.m.wikipedia.org/wiki/Magic_number_(programming))

2

u/TheSpiffySpaceman Jun 09 '20

I think the last parenthesis of your URL escaped the URL formatting...

3

u/locuester Jun 09 '20

Thx. Fixed.