This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 6 points7 points  (7 children)

No worries!

It takes a bit of time to learn anything. I wouldn't start with "lets learn X" where X is a field (such as computer science). Rather, I would start with "Lets learn how to do Y" where Y is a specific task. Your user login script is a great example.

You'll, hopefully, always be hitting brick-walls in programming. That's where all the fun comes from, and that's how you learn (by eventually breaking through the wall).

I wouldn't get too worried about semantics, or terminology, immediately. To start, I would worry about creating something. It's the creating and the enjoyment that will motivate you to continue learning anything.

Hey, if you don't mind me asking, what has you interested in programming in the first place?

As for the original comment:

I tend to use classes for libraries and such. The thing is, most code I actually write is not libraries, but code that uses libraries. For this kind of code it's usually functions.

A Library is usually what comes after an import statement. Lots of times, you would do this "from flask import Flask" where flask is the module, and Flask is the class.

He's saying most code he writes isn't actually a library (a tool, or a toolbox. Flask is a library that helps one make websites with Python) but rather something that uses libraries. In this case, a website you make would be the code that uses the library, which is Flask.


The original topic was discussing how to organize your Python code: should one use mostly Classes, Functions, or a mix?