Why You Should Learn Python First

This is not a discussion on how to hack or program with python, it’s a discussion on why I personally chose python as my first programming language.

I’m not a developer, I’ve never written a program from source code to production. So when I started looking for a language to jump into I wanted something that could be used a stepping stone for lower level languages.

I chose python simply because I wanted to learn programming logic first, and syntax second. For those of you unfamiliar with those terms logic is how a program runs. It’s the decision making progress that determine what comes next and is derived of conditional statements such as if, if not, else, or’s etc. It’s the heart of any programming language and is usually the measure that separates good programmers from bad ones.

Syntax is how a program is written, it’s the way a language looks and reads/writes. Essentially syntax is programming grammar. Unlike grammar in the English language (Which I admit to being poor at) programs will NOT work unless you get the syntax exactly correct.

Logic is basically universal amongst all programs and to me is the difficult part while syntax can vary. This is exactly why I wanted to learn the logic first, once you understand how programming works you can kind of look at any program and pick it apart.

For example, in Java you would program:

public class HelloWorld

{

public static void main (String[] args)

{

System.out.println(“Hello, World!”);

}

}



but in python 3 you would type:



print(“Hello, world!”)



As you can see these two look very different, but they do the same thing. They print “Hello, world!” to standard out. As you can see Java has quite a bit going on compared to python but there are similarities behind each of the languages. The string “Hello, World!” that is printed to standard out is encased within quotes, and you call a function to print within each language. System.out.println() in Java and print() in python3. As you begin to learn more about functions, modules, libraries, variable declaration, objects, data structures and so on you will find that the similarities are even more apparent and your ability to decode them will expand. This is why many people can program or work in several languages.

As you saw from the above example python is a very compact and concise language. If you combine the large community, human readable syntax, powerful libraries and tutorial quantities its an easy choice to see why I started with python.

I did not learn from one resource and I bounced around between several sites and books. While I am not fluent in python I offer this bit of advice. Stick with it, programming is difficult. Its easily the most difficult thing I’ve ever had to learn in my life. I found that even though I struggle with learning concepts and logic after a while my mind adapts and and I begin to understand concepts that used to give me a lot of trouble. So stick with it.

If you’re interested in python I recommend learning from the following resources in the following order. Note: I did not use these resources linearly, but I did get a good way through each one before moving on.