Disclaimer: This post may contain affiliate Links. If you decide to buy any product, I’ll receive a small commission, at no extra cost to you.
I have wanted to learn Python for quite a while, having seen some of the interesting things that you can do with it, see this book for more details. But I never found the time. Being a Masters Computer Science student, I’ve focused my time on learning the languages required for my degree. Everything else fell by the wayside. But today was different. Today I learnt Python. I am in no way claiming that I am now an expert in Python. But I have definitely gotten to grips with the syntax, and am able to write some working programs.

I’m currently in the middle of my Master’s thesis, so this wouldn’t be a time I would expect to be learning a new programming language. But fate had other ideas! Over the last few days, and discussions with my supervisor, I realised that part of my project would be best written in Python. Being midway through my project, I needed to learn Python fast! So I thought I’d share my experience of learning a new programming language in a short period of time, and describe some realisations I had along the way!
I am very fortunate that as I’m doing my master’s thesis I control my own schedule. This allowed me to spend an entire day immersing myself into a new language which I realise isn’t always a possibility for everyone. If your aim is to learn a language quickly, then it will be necessary to dedicate a large portion of time to it. If time is not an issue, then learning a little bit at a time, repeating this often is a great method to keep a language fresh in your mind.
In order to learn quickly, I went to a source that I know and am comfortable with: Codecademy. I have used Codecademy several times. Learning how to properly use Git for version control, as well brushing up on HTML and CSS. I know that Codecademy provides content in a good learning style for me, which is really key with learning something quickly. Some of the things I really like about Codecademy are:
- They have a really great integrated development environment (IDE). This makes it so simple to start, as there is no need to download any compilers or software to start coding.
- They keep track of your progress. This allows you to dip in and out of learning, making sure you can always come back to the right place.
- They keep you motivated by splitting the language into small steps and have frequent repetitions to re-enforce syntax and logic.
It is important to find the best learning style for you, which can take some time and a lot of trial and error. But once you find it, you’ll be winning!
Another key factor in my learning a new programming language quickly, is already knowing a programming language. I have spent a lot of time over the last year coding in Java and C. Having the logical skills already in place, and understanding the logic of coding helped massively in learning Python so quickly. For the most part, the syntax is the only real thing to learn, if you already know a programming language. Learning the first language is definitely the hardest part, especially if the languages are quite similar.
Why Python was easier for me to learn:
Python was relatively easy to learn due to the similarities to the languages I already knew, C and Java. As I said previously, it is much easier to learn a language if you already know one, and even easier if you know two! The first language is definitely the hardest to learn, especially if you choose to learn C like I did! So if you’re about to learn your first language, take it slow. Don’t rush things, because you will hit a wall and burn out!One of the way Python is similar to Java is the fact that it is an object-oriented language. This means that you manipulate objects, described in a class, with functions called methods. These classes are very similar between Java and Python:
public class Animal{
String Name;
String noise;
Animal(name, noise){
this.name = name;
this.noise = noise;
}
}
class Animal():
def __init__(self, name, noise):
self.name = name
self.noise = noise
Issues I faced:
I have spent the last 6 months coding almost completely in Java. I don’t have to think of some of the syntax, it just happens automatically. One of the hardest parts of learning and writing Python was adjusting to the new syntax. I have programmed myself to end every line of code with a semi-colon, and putting {curly braces} around each block of code. Neither of these occur in Python and this was a big adjustment for me to make. Python is a dynamically typed language, whereas I have previously learnt statically typed languages. This means that you do not need to declare anything or use data types. It also means that you can assign a variable to an integer and then later assign it to a string.Another large difference is the fact that whitespace is important in Python. Python uses this whitespace to decide when a block of code has ended, rather than a bracket. This makes the code look uniform and easy to read. This wasn’t a massive issue for me, as I like to ident my code consistently. But it is definitely a noticeable difference!
def printnumber(n):
print n
printnumber(3)
I really enjoyed learning Python, and it’s definitely something I am going to pursue after my thesis is submitted! It was interesting learning a new language so quickly. I loved learning new little quirks of languages I’ve not experienced before such as having an else statement for a while loop and using anonymous functions!
Which language did you find the easiest to pick up? And what are you looking forward to learning next?