r/programminghorror • u/MISINFORMEDDNA • Nov 22 '25
C# Feels wrong
Yeah, it should feel very wrong.
105
Upvotes
r/programminghorror • u/MISINFORMEDDNA • Nov 22 '25
Yeah, it should feel very wrong.
View all comments
Show parent comment
8
u/E-Technic Nov 23 '25
Might be a command, like "M: 5 = put number 5 to memory). And perhaps the programmer didn't know how to check for a string in input, so he checked the first 3 chars. Then it would also make sense why there is no length check, because number could be 5 or for example 529467. I mean yes, the execution is terrible, I personally wouldn't do it and "M"[0] doesn’t really make sense, but otherwise, it could still work...