Welcome Back to Think Like A Programmer, where we break down complicated computer science concepts into bite-sized articles for you.
In today’s article we’ll be looking at
What are some of the advantages and disadvantages of using python as a programming language
How to set up your python environment and begin programming in Python.
So, without ado, let’s begin to start our python programming language journey ~
Why Python?
If you’re new to programming, you might be wondering to yourself why use python? In other words - among the million programming languages that are out there, why should we bother to use python.
In my opinion, there are two reasons for this
(1) It has a lot of libraries written for it
(2) It’s easy to interview in
» It has a lot of libraries
A programming language is easier to program in when it has a large variety of libraries that have been written for it. This enables you to do more as a programmer because you don’t need to spend your time worrying about implementing the basic stuff.
If you want to do machine learning, you’ve got Tensorflow or Pytorch which both have been optimised for GPUs. If you want to do web programming in python, you’ve got Django or fastAPI. If you want to do web3 programming, well you’ve got brownie and Ape right out of the box.
All it takes for us to take advantage of these fantastic libraries is
pip install <library name>
and we are done with the initial setup.
» It’s easy to interview in
I always use python to interview in.
This is because the type system is forgiving and the code reads like human pseudocode. Many basic operations such as allocating space, managing array sizes and operations like getting the length of an array are provided with easy functions.
Compare this to something like C++ ( Not a bad language, just not something I’d interview in ) where we get error messages like what we see below.