Skip to content

Comment on Ask HN: How do I make the transition from being a Python beginner?

Comments

Unfortunately after you get past the basic learn a language stage, it more or less dries up. There are a couple of books that are polarizing like Design Patterns, but that is about it. From here on out it is trial and error.

As far as best practices go here is my list:

Automate everything you can.

Keep it coherent.

Rewrite when you find yourself building a house of cards.

When to create a function: anytime something is complicated enough that you think about it abstractly, anytime you use something more than once.

When to create a class: I haven't really nailed down a logical description for how or why I would make a class. Anytime you have a conceptual entity you have a candidate for a class, a player, a socket, a button, a window, a file.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.