MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/c1zxl9/deleted_by_user/ergrzx2/
r/badcode • u/[deleted] • Jun 18 '19
[removed]
92 comments sorted by
View all comments
Show parent comment
8
How is this bad?
8 u/HopelessPonderer Jun 18 '19 Pre-generating uppercase and lowercase versions of the entire string instead of converting each character one at a time. Granted it's not the ugliest code imaginable, at least it looks neat at a glance. 1 u/[deleted] Jun 18 '19 Op said it was a mistake lol 0 u/[deleted] Jun 18 '19 Would better beif a%2 == 0 then print down[a] 2 u/dreamer_soul Jun 18 '19 Oh damn I misread the title
Pre-generating uppercase and lowercase versions of the entire string instead of converting each character one at a time. Granted it's not the ugliest code imaginable, at least it looks neat at a glance.
1 u/[deleted] Jun 18 '19 Op said it was a mistake lol 0 u/[deleted] Jun 18 '19 Would better beif a%2 == 0 then print down[a]
1
Op said it was a mistake lol
0
Would better be
if a%2 == 0 then print down[a]
2
Oh damn I misread the title
View all comments
Show parent comment
8
u/[deleted] Jun 18 '19
How is this bad?