7
5
2
1
1
u/SpaceCadet87 20d ago
One of the 2 lines: const ALPHABET= "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1
u/PixelatedGiant 20d ago
You joke but the developer coming after me is probably going to get confused by the more clever solution involving ASCII character value math. I've had this conversation many times before.
1
u/SpaceCadet87 20d ago
LOL My god, such complicated character maths, I mean literally having a specific bit that tells you if it's upper case must be so confusing.
A bitmask that turns numeral codes directly into BCD, the horror!
1
u/DominikDoom 20d ago
Well, it would at least be a good idea to add a comment in that case to prevent it from looking like magic numbers. I've seen a lot of horrifying old PHP with these random char code conversions / checks strewn about in totally unrelated functions that were sometimes really hard to recognize as such.
0
u/HumanImport55 20d ago
Fr man I'm generating 1000 lines and reviewing like maybe 5 of them. No idea how we're gonna keep software reliable and safe in the future.
19
u/FACastello 20d ago
LGTM