c/asklemmy · by amon@lemmy.world · 1yI'm trying to teach the significance of abstraction; anyone have Python spaghetti code examples? 8 points · 7 comments · view on lemmy.world
7 Comments
droning_in_my_ears@lemmy.world · 5 pts · 1y
idk if it's a good example but I got some code I wrote in highschool which is no doubt terrible lol
sem@lemmy.blahaj.zone · 1 pts · 1y
What are you trying to do with it? I have a python where everything is in main() and there are a lot of comments
amon@lemmy.world · 2 pts · 1y
i'm thinking of teaching some kids python and i'm struggling to figure out how to show the significance of paradigms other than procedural programming
sem@lemmy.blahaj.zone · 2 pts · 1y
I'm pretty sure this code doesn't have any paradigms. Let me know. https://github.com/ph818/lastfmplaylistfinder
amon@lemmy.world · 2 pts · 1y
mmm it's not that bad actually i can kind of get what is going on in there
sem@lemmy.blahaj.zone · 2 pts · 1y
Thanks -- I've never been able to wrap my head around object oriented programming -- it has always made more sense to me to treat the program like a script, but I think I need to learn to understand the oop paradigm if I want to make progress.
amon@lemmy.world · 1 pts · 1y
Paradigms only really work when your code has to do enough things. It will come to you eventually