Finally had a productive day! I made it through about 2.5 courses on Pluralsight and am starting to get a good feel for the basics of Python. I still have a ways to go, but the foundation is there. A few notes I took:
- Python code doesn’t have to live in a class; self is similar to this; No formal construct for override; Everything is public, no protected/private
- A couple editor notes of VS Code vs PhCharm:
- PyCharm has a nice “override” hint in the editor that Code doesn’t show
- When there are unresolved references, PyCharm tells you. Code doesn’t.
- In one of the classes I took, the instructor showed a code structure like this:
When I ran it set up like that, I got an error that the app couldn’t find the student module (which was imported in app.py). I had to move student.py into the webapp folder for things to work, like this:
Maybe a Python version thing, or something for me to learn about setting up a project structure.
- I used virtual environments before so I was looking forward to learning more. One class I took used virtualenv and another used venv. Not sure which one is preferred or what the difference is.
- Traditional code formatting uses four spaces for indentation. I’m not sure if VS Code defaults to four spaces per tab but I’ll have to look into that.
I was happy to make some good progress and not deal with any non-training issues and I look forward to taking more advanced courses and start working on a real project. I have a pet project in mind but I may also find something out there I can contribute to and get my feet wet (I’m looking at you, Tommy!) That will wrap this series of blog posts, although I may jump back in and post things as I learn more.