Amon@lemmy.world to Ask Lemmy@lemmy.world · 19 days agoI'm trying to teach the significance of abstraction; anyone have Python spaghetti code examples?message-squaremessage-square7fedilinkarrow-up18
arrow-up18message-squareI'm trying to teach the significance of abstraction; anyone have Python spaghetti code examples?Amon@lemmy.world to Ask Lemmy@lemmy.world · 19 days agomessage-square7fedilink
minus-squaresem@lemmy.blahaj.zonelinkfedilinkarrow-up1·edit-214 days agoWhat are you trying to do with it? I have a python where everything is in main() and there are a lot of comments
minus-squareAmon@lemmy.worldOPlinkfedilinkarrow-up2·14 days agoi’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
minus-squaresem@lemmy.blahaj.zonelinkfedilinkarrow-up2·13 days agoI’m pretty sure this code doesn’t have any paradigms. Let me know. https://github.com/ph818/lastfmplaylistfinder
minus-squareAmon@lemmy.worldOPlinkfedilinkarrow-up2·13 days agommm it’s not that bad actually i can kind of get what is going on in there
minus-squaresem@lemmy.blahaj.zonelinkfedilinkarrow-up2·13 days agoThanks – 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.
minus-squareAmon@lemmy.worldOPlinkfedilinkarrow-up1·13 days agoParadigms only really work when your code has to do enough things. It will come to you eventually
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