Python Beginners tips

Python Beginners tips:

Hey guys, what’s up so in this article I’m just discussing about six things that came to my mind that trip up beginners and the reason why I’m making this article.

With my Python tutorial series and it’s got a few hundred thousand views over the last year and a lot of beginners they always asked the same questions, so I think the six items here I mean like I said it kind of immediately jumped out at me, I’m sure I’m missing other things, but I’m just going to go ahead and jump into the list all right.

Virtual Environment:

This blows people’s Mind. Many of my tutorials skip over these except advanced.

Virtual environment this is so hard to explain to people why you would need to do this because they don’t understand packages, they don’t understand virtual environments, and they don’t even understand how Python is installed on a machine or how Python is used to execute Python code like none of that makes any sense, so when you’re trying to explain how to set up virtual environments and things like that when they’re first getting started it always just like it’s almost impossible for somebody that hasn’t been in this game for you know a while, I mean six months or more probably for them to even be able to start to grasp.

However, you know some of the stuff like virtual environment and why we always use it so that is something that I personally try to gloss over when I’m trying to do Python tutorials and things because I just feel like it you know people aren’t ready for that and eventually we’ll be prepared for all this stuff. Right now like you know as a beginner definitely virtual environment just go ahead and have one Python installation and just use your pip install and don’t worry about virtual environments or anything that’s my advice.

Path:

This only applies to window users, but has to be the worst offender on the list of newbies.

For absolute beginners the next one is path and this one only applies to Windows, so this is probably like the single worst thing that I’ve had to deal with because a lot of Python developers especially newbie’s are using Windows and in Python works fine on Windows, but when you’re installing Python it used to be that Python didn’t actually edit your path settings and you would always have to do that manually and that was still a problem dating back you know even all the way back to when I was first getting into Python and then like with some of the later three series of Python there started to be this option that you could check during the install to say hey I had Python to my path, but anyway if people didn’t check that box python wouldn’t run, Windows wouldn’t know how to execute a Python program and like nothing works and they get immediately frustrated like and they’re not even at step one and they’re already like frustrated with the entire process so yeah path is something that has tripped up a lot of Windows Python developers for a long time.

 

Unit Testing:

Beginners should not worry about unit testing inside of their first few months.

Unit testing and this is something that I would say beginners should also gloss over because they’re going to have a tough time understanding how unit tests even work or even understanding you know necessary things like encapsulation and you know how accurate your true unit test should behave in a unit test versus a regression test things like that a lot of that stuff doesn’t make any sense to newbie’s and beginners and really the only beginners that have to know what kind of thing are the beginners that do land a job you know fresh out of college something like that that’s where they immediately need to start looking in the unit testing and how they can start writing unit tests for their code because that’s something they will have to do day to day it’s it so it’s a mandatory requirement of the job so I’d say you know as soon as people can feasibly get into unit testing that’s great but immediately right out of the gate it’s really not something that most people should.

IDE:

Beginners with python never seem to know which editor to use…IDLE,pycharm, Komodo, Visual studio code

 

IDE and indeed you could probably say IDE versus a text editor some people know about the two differences there, but there are differences between an IDE which stands for the integrated development environment and a text editor.

With IDE so like there is much there’s a lot of great solutions like with my Python tutorial series I always use Visual Studio code because it’s free in the Python extension for it is like it’s really it’s effortless for me to be able to set up a debug environment and it’s free now pycharm is kind of the leader with python ide s, and it’s been that way for a while that’s made by the JetBrains people and anyway there are other editors out there that you can use including the actual you know Visual Studio product or not even just Visual Studio code, however, there’s a lot of different editors that’s usually a tripping point for people because they want to know okay what is the best editor well there is no such thing as like the best editor and that stuff changes your a year and people’s preference that plays a lot into that so it’s one of those things where a beginner expects to have somebody hold their hand and tell them exactly what they should be using we’re like and that’s just not something that Python people do really and or really any developer I mean if there are specific languages like C sharp really we’re like Visual Studio is the like the de facto or the standard but with Python there isn’t really like a definite front and running standard for IDE s I would say papaya Tron is probably the closest thing to that.

OO or Procedural:

Most beginner tutorials teach python in a very straightforward procedural way. Once these young developers realize python can be object-oriented as well, it’s like finding out there is no Santa.

The next one is object-oriented or procedural I should say versus procedural so those are two different ways of actually writing computer code object-oriented programming came about what like that 80’s it was probably even way beyond  becoming like a common thing in the 80s into the 90s when you had you know Java which was fully object-oriented and c-sharp or an infrastructure .

 

So with Python, things get confusing because when you start off with Python it is almost always hello world examples and everything is always done procedurally whereas like if you find in c-sharp like you cannot have a procedural way of doing a hello world you have to do a fully object-oriented you know console. Write line things like that you have to have an actual program with a primary starting point things like that we’re Python you have you don’t know you don’t have to so you could just write a script that is self-contained in one file and just execute that script manually, and it’s straightforward to do, and that’s why Python is a great first language to teach people but then somewhere along the lines when you want to develop a Django, or you know an Instagram code base or anything significant with Python that’s when you’re going to start building classes.

Moreover, you have to start looking at class inheritance and things like that and and that’s where people’s mind gets blown and I have like an equation here way or an anecdote basically where it’s like it’s like finding out that there’s no Santa, so you learn this procedural way of doing something and then realize that there’s an opposite way and in a way that’s much more hard for newbies to wrap their minds around why we have object-oriented programming but it’s it takes time to get into that, and for Python it’s one of those unique languages that can be both procedural and object-oriented, so eventually you’re going to have that Santa moment.

 

Linting:

Just don’t worry about these:

 

Linting this one is also driving me crazy lately because a lot of the editors like Visual Studio code with its Python extension like it’s expecting you to have Python linting extensions installed as well and for the most part people have to worry about linting like I’ve never worried about linting in any of my personal projects because I I don’t have multiple people in my code base now linting is all it is a set of rules that say hey when we have Python names I want you know I want to use this formatting or something like that I want to use them you have to camel casing and there could be rules that are set on okay I just named the class something with all under case and I need to have that be Pascal casing or something like that well linting you define the rules and then it just runs and it kind of watches the code as it’s being written and it will provide little squigglies under the lines of code that don’t match up to your liting rules what linting is it’s great for getting a bunch of different developers that write code in a bunch of different ways all writing code the same way under a you know a unified set of of instructions that’s usually passed down through you know the person in charge of the project or you know the most senior dev that’s assigned to the project but that said like linting is not something that any beginner developer needs to worry about especially with Python and indefinitely if I could update my tutorial series to reflect the way Visual Studio code is just to where it’s always like suggesting linking and all this stuff like I wish they could just turn that off but anyway guys that’s my list man these are the six things that they trip up newbie developers and Python all the time it seems like alright guys take care have a good day bye.

All software development github,html5,CSS database and there’s a lot more courses and they’re adding query is all the time so make sure you guys give them a look once again the link is in the description tab below thanks guys have a good day bye

Leave a Reply

Your email address will not be published. Required fields are marked *