How to start with Python: The easy way
Imagine a small suburban village in Norway. Little blue houses with crooked roofs. It is winter, snow gently falls from the sky colored in all the hues of ash. It is getting pitch dark and freezing cold, but inside the house you feel warmth and comfort or as we say in Norway ‘koselig’ (Norwegian word describing the coziness of natural fire and home atmosphere).
It was a regular day in 2016 and I was living in Trondheim, doing my Masters in Geoscience. I was preparing for my exams and I thought: “Gosh, I need a break!”. I sensed, if I start watching the Game of Thrones now, none of my exams would result in remarkable grades. I needed something else. But what? Luckily enough I was leaving in a house with Simen, who was getting his degree in Cybernetics (Simen, if you read this: Thanks, man!). I shared my struggles with him and he proposed that I study Python. I thought: “Why on Earth would I study programming - I don’t need it”. But then I figured: “Why not?! I would not feel guilty for learning a new skill, because it is useful and in the same time I would keep my brain active and concentrated”.
Therefore the guide how did I start with Python:
Learn Python 2 on Codeacademy
I have started with a great free class Learn Python 2 on Codeacademy. They structure lessons as small interactive pieces made with sole purpose to teach you a single skill and challenge your creativity and algorithmic thinking. It took me a week to complete all of the lessons, studying several hours a day. After the course I obtained some ideas about Python’s syntax, algorithm design and how to utilize programming in the real life. But it was not enough for me. I wanted more!
Learn Python 2 Course [Courtesy to Codeacademy]
Intro to Computer Sciences on Udacity
I wanted to get better understanding of computer science principles, that is why I started a substantial course in Foundations of Computer Sciences from Udacity. I enjoyed the way this online university structures their courses: you will have a perfectly balanced mixture of video lectures, popping up quizzes and programming exercises. After the completion of the course you may get a solid understanding of programming principles as well as extended understanding of Python. Essentially that would be enough to start any project or application you want.
Intro to Computer Science Course [Courtesy to Udacity]
Intro to Data Analysis on Udacity
If you remember, 2016 was the year when everyone started to talk about Data Science and Machine Learning. And here came the realization: “Wow, I am actually doing Data Science NOW!”.
By that time I successfully passed the exams and moved to a perfect white sandy beach on the coast of Indian Ocean. I have inhabited a nice little bungalow in Goa, and gosh, I was super enthusiastic about programming. I said: “OK, Google: How do I go deeper in Data Science?”.
The answer came immediately: Intro to Data Analysis. The next message I have received was: “Your Internet connection is lost”.
When I finally found working Wi-Fi, I just downloaded the whole course and studied it offline. This material gave me what was missing: practical experience with Jupyter Notebook, Pandas and NumPy libraries (it is beyond the scope of this article, but trust me, it is great!). Now I was able to process any Big Data I wanted and show the results of my experiments in a nice and handy graphs, plots and carefully crafted cells in the Notebook.
Intro to Data Analysis Course [Courtesy to Udacity]
Chose a project and try to execute on it on your own
Meanwhile, one month of learning Python has passed and I realized that I actually had a lot of my own data to analyse. I was eager to try my brand new set of skills in a real life, thus I started to plot the data for my Master thesis and… I had no idea how to. Oh, boy. That was frustrating. I sat in front of the laptop, peeling my eyes into black screen with colorful letters on it for quite a some time.
Open Source Communities are the key
Since we live in a global world I was not the only one struggling. On the contrary there is an entire Open Source community at your disposal - Stackoverflow (great forum with user friendly interface and very friendly people). The only what is required by you is to find the same questions that someone already asked and voila - you got your problem fixed!
Quickly enough I found answers to my questions and was finally able to plot the data faster and prettier then in Excel. For the first time in my life I had actual control over my plots and the way I present it to others.
Stackoverflow [Courtesy to Stackoverflow]
What did I got with Python
I am using Python almost every day in the scope of my work as Geoscientist (notice that three years ago the whole concept of Python in Geoscience seemed rather obsolete) and I got to present my scripts and programs on the international conferences. I am quite happy with the results. What started like a small talk on the kitchen with Simen, in fact was a life transforming experience that changed the way I think and the scope of the work i do. At this point I knew that there was no return. My life just wouldn't be the same as before.
My Python way
Learn Python 2 on Codeacademy, than complete Intro to Computer Sciences and Intro to Data Analysis on Udacity, choose a project of your own, try to execute on it, if you struggle go and ask for help on Stackoverflow.
I admit that there is a great variety of classes, lectures, books and exercises in the Internet. Some of this resources may be more efficient, targeted and easier to learn from. But this framework worked for me, it set me on the right path of Python, Data Science and Machine Learning! Hope it will work for you too!
What do you think?
With Nordic greetings, Artemii
P.S.: I would like to thank Artem and Fredrik for tracking down my typos, and Julia for helping me with the editing.
Thanks, Artemii! A good friend (A geoscientist) whom I had just told I was taking my first steps in python (from codeacademy, would you believe it?!) Recommended your post. I find here practical guides on what-and-what to do as I advance. Although, I need mine to add to developing competence in the Food and Beverages industry, I will nonetheless follow your recommendations. If they helped you, they could help me too! Grazie mille! Gerald
Katie Rosemond
Good effort Artemii. Useful post.
That worked out well, finally:) You got a cool idea and did a nice job:)