Hacker News new | ask | show | jobs
by Jach 4944 days ago
I'm still having a hard time following... Maybe you could give a specific example of a problem that modules bypass? Is it just simply the idea of modules and the annoyance of having your code in multiple places and naive tutorials wanting to put everything in classes when you just want to solve one problem you thought was pretty simple?

For PyGame, I wouldn't say it's that essential, but there's a tendency for most tutorials to classify everything when often there's no reason to. The amount of OOP knowledge needed is very basic and following the simple examples is a great way to learn OOP in the first place. But I remember feeling frustrated with all the indirection and namespacing (part of the "module" frustration you had perhaps?) when I first looked at Python, having come previously from PHP. "pygame.display.set_mode() is dumb, why can't I just type make_screen()?"

1 comments

If I had more time I could gladly try to find all tutorials I'm targeting at, this ain't targeted at the book mentioned in the story, that one I haven't tried. The thing I personally found hard is that these OOP and modules things come up in many tutorials in general, not all, I can see that both OOP and using modules instead of rewritting stuff that's already made is good, but I don't think that's the way to go for beginner's, BASIC is much better at that.