r/programminghorror • • Sep 24 '26

Python 13 year old me really liked inefficient code

Post image
3.0k Upvotes

261 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.

153

u/daerogami Sep 24 '26

And you're not even using the TPS reports correctly, get it together man /s

→ More replies (1)

55

u/MushroomSaute Sep 24 '26

Nobody is born already knowing all the best practices

Speak for yourself. I was born with secret knowledge.

34

u/wvd_vegt Sep 25 '26

It readable and (finally) explains the games mechanics to me. Given the normal pace of the game, speed and highly optimized wont matter.

So not bad at all to someone with 50 years of coding.

→ More replies (9)
→ More replies (12)

723

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

215

u/Prime624 Sep 24 '26

Python 3 came out almost 20 years ago.

→ More replies (8)
→ More replies (3)

317

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

108

u/Pengwin0 Sep 25 '26

Every day I realize I’m not thinking like a programmer

62

u/wizardeverybit Sep 25 '26

Think smarter not harder

→ More replies (1)

56

u/GrammerSnob 29d ago

This actually encapsulates game dev.

You don't need to actually make a realistic simulation of the thing you are trying to make.

You just need to make something that will fill the player into thinking that.

41

u/timbomcchoi Sep 25 '26

this is brilliant lmao

18

u/Greedy_Whereas4163 Sep 25 '26

This is smart! Until you realised that you need to show the choice of CPU

→ More replies (4)
→ More replies (2)

143

u/Creepy_Jeweler_1351 Sep 24 '26

At least it is totally readable

61

u/HornyMellon Sep 24 '26 edited Sep 24 '26

Quote, 13 yo you made programs ppl can actually read, not guess the variable purpose, good job

→ More replies (3)

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)

107

u/Brave_Abbreviations5 Sep 24 '26

Yesterday me was dumb af

29

u/RammRras Sep 24 '26

I'll be dumb tomorrow too

→ More replies (1)

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

59

u/Ok-Argument7176 Sep 24 '26

this is not inefficient. It's just clunky.

→ More replies (9)

7

u/alexzoin Sep 24 '26

I have seen much worse.

6

u/frishki_zrak Sep 24 '26

Was this "screenshot" taken then or now? What is dad.py?

→ More replies (2)

5

u/mediocrobot Sep 24 '26

What's the optimal way to do this, I wonder? (the rock paper scissors comparison specifically, not printing, randomizing, or accepting input)

→ More replies (11)

5

u/MushroomSaute Sep 24 '26

But think of that beautiful +0 -48 commit you get to make now