Learning Data Science Online Without an Instructor: Tips and Tricks
By: Rebecca Sealfon
Tags: Python, Data Science, Beginners Guide, Debugging, Programming

For learning data science, one option is to order and go through an on-demand Data Science course without an instructor. These courses are far easier on your budget than a conventional instructor-led coding boot camp, let alone an accredited computer science degree. Like other technical career preparation courses, you’ll get plenty of opportunities to practice. Without intensively practicing, there is no way to gain the experience to become a professional.

In a more expensive course, you might have an instructor or a teaching assistant whose office hours you can visit when you’re stuck. Your instructor might also give you a professional reference for your first technical job. However, after a certain point, there is only so much hand-holding you will have. At some point, you are the one expected to lead your teammates on the job, and no one is there for you. You’ll need to learn how to rely on other resources, so why not save the money and be more independent from the start?

From the first, get the extra preparation

The first thing you need to do, probably before you write a line of code, is to learn to read the programming language documentation and the textbooks. You are probably in the best position if you learn Python, which is an especially popular and versatile programming language. Familiarity with the documentation can give you a feel for how to write Python and what the language will and will not do. The core Python language has extensive official documentation and tutorials. So do the specialized Data Science and other Python libraries taught in most Python-based Data Science courses, such as NumPy and pandas.

A programming library is a reusable set of programming commands, with a defined interface to enable this set of commands to be used in a program. The core Python language is available in all Python programs, and other libraries can be specially added.

Image from www.python.org on Wikipedia

Utilize search engines

Now here’s a mini-exercise. Can you find the documentation of the latest stable versions of the core Python language and of the two libraries mentioned here, NumPy and pandas? Hint: Search engines are your friend. The answer to this exercise is given at the end of this blog post.

When your code does not work, another tip is to read the error messages you receive. Part of your error message should be common to a variety of other error messages, and part should be a distinct phrase. Take the part that is distinct and copy/paste it into a search engine. You might want to put it in quotes, to search for the consecutive phrase rather than the non-consecutive words. This will hone your search down to web pages where your specific error, and its fix, is discussed. Sometimes these web pages do not have a fix but have clues you can also search for. Tracing the clues is part of learning how to code.

Pinpoint the cause of any problems

The program may also not give an explicit error, but may still not be behaving how you want. You need to think about the problem line of code by line of code, to pinpoint the specific commands you will need to change. One of the first programming commands you will learn is how to print out lines of text onto your screen. Add these commands to the program, after each line or so, to verify the lines of code in your program are running the correct number of times.

Photo by Kevin Canlas on Unsplash

In Python, you may also be creating something called a variable. A variable is a value stored in a specific location in memory and given a name. When you refer to the name of the variable, you can access its value. Variables are very important in most programs for storing and sharing information. And as you run the program, you can specify how the variable’s value changes. When you test your program by printing out the line of code, you can include the value of the variable to double-check that this value has changed to what you want.

Python also offers standard tools, such as pdb, to debug — which means fix — your code using a similar approach. Another exercise, with the answer given at the end of this post, is to find the documentation of pdb. Using these types of print and debug commands will give you a fine-scale view of how your program is working. Once you have fixed your program’s issues, removing the lines of code used for debugging is one step in cleaning up your code.

Don’t give up

If you want to overcome most programming obstacles, you need practice. Even so, you can be stuck for hours or days at times, unable to figure out how to fix an issue with your program. This struggle is normal. It is part of learning to code. Just make sure you set aside a good bloc of coding time at least a few days a week, ideally in a routine, and eliminate distractions. Even with a designated course instructor, you will probably face this type of struggle and you should first extensively try the methods described above. It is important to get efficient at searching for the issue yourself, even if this feels painful and cumbersome at first.

Taking a self-paced online course definitely requires an extra dose of personal discipline. From time to time, you may well need someone else to give you that extra pair of eyes or even that extra bit of accountability. And sometimes, coding is actually lonely. If you need more human interaction than this post describes, there are still many ways to get it.

This article was originally published in the blog of INE, a technical training provider, here:

Answers to exercises