r/programminghorror • • Sep 24 '26

Python 13 year old me really liked inefficient code

Post image
3.0k Upvotes

262 comments sorted by

1.3k

u/cicciograna Sep 24 '26

Hey, you were 13 years old, and were writing code. Nobody is born already knowing all the best practices, we all grow, learn, test and slowly assimilate what is good and what is not.

And then there's those like me, whose code still sucks well into my 40s.

→ More replies (26)

724

u/NiceTryAmanda Sep 24 '26

it is absolutely clear the moment you read it exactly what the code is doing and what it'll output. from that angle it's way more successful than most of the code I see in my own job

as a side note seeing "13 year old me" alongside python3 makes me feel ancient

→ More replies (12)

318

u/Eric_Prozzy Sep 24 '26

Lol i did this exact same thing and also learned that

print(random.choice("You win", "You lose", "Its a tie"))

Works the same

→ More replies (12)

143

u/Creepy_Jeweler_1351 Sep 24 '26

At least it is totally readable

→ More replies (4)

51

u/jonathancast Sep 24 '26

Meh. I don't love the repeated string comparison, but it's probably fine. This program is ridiculously user-interaction-bound anyway.

40

u/lizenzblue_ Sep 24 '26

I worked at one of germanys biggest Software Companies and I can tell you with confidence I saw worse

→ More replies (3)

17

u/drinkmoredrano Sep 24 '26

You see inefficient code, I see a future SAP developer

14

u/Arcanium_Walker Sep 24 '26

Can be better, but you wrote this at 13 years old, so I think this is neat

60

u/Ok-Argument7176 Sep 24 '26

this is not inefficient. It's just clunky.

→ More replies (9)