Aasklemmy·Ask LemmybyAmon I'm trying to teach the significance of abstraction; anyone have Python spaghetti code examples?View original on lemmy.world8Comments7
ddroning_in_my_ears lemmy.worldidk if it's a good example but I got some code I wrote in highschool which is no doubt terrible lol5
ssem lemmy.blahaj.zone5Hide 5 repliesWhat are you trying to do with it? I have a python where everything is in main() and there are a lot of comments1
AAmon replylemmy.world4Hide 4 repliesi'm thinking of teaching some kids python and i'm struggling to figure out how to show the significance of paradigms other than procedural programming2
ssem replylemmy.blahaj.zone3Hide 3 repliesI'm pretty sure this code doesn't have any paradigms. Let me know. https://github.com/ph818/lastfmplaylistfinder2
AAmon replylemmy.world2Hide 2 repliesmmm it's not that bad actually i can kind of get what is going on in there2
ssem replylemmy.blahaj.zone1Hide 1 replyThanks -- 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.2
AAmon replylemmy.worldParadigms only really work when your code has to do enough things. It will come to you eventually1
idk if it's a good example but I got some code I wrote in highschool which is no doubt terrible lol
What are you trying to do with it? I have a python where everything is in main() and there are a lot of comments
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
I'm pretty sure this code doesn't have any paradigms. Let me know. https://github.com/ph818/lastfmplaylistfinder
mmm it's not that bad actually i can kind of get what is going on in there
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.
Paradigms only really work when your code has to do enough things. It will come to you eventually