Approaching the Hands-on exercises

Naturally, there are many ways to go about the hands-on exercises, and we would like to give you a few tips here that may help you:

  1. Approach the exercises like you would approach a recipe, i.e. first read the entire task and exercise, then act (instead of starting to press buttons at every step of the way). This also includes looking at the code, instead of pasting it into your editor and typing the run command. Try to understand what the goals of the exercise is and what every line of the code or every command does before you carry it out. When you’re for example baking a chocolate cake it pays off to first read what to do, and put your ingredients and utensils out before you start. This way you will avoid still needing to find the eggs, split them, and beat them when you’re chocolate has already melted and starts to solidify again.  I did not come up with the recipe analogy by the way. 
  2. Read your error messages. Python’s error messages are generally quite informative, they specify the line that caused the error, along with some info about the type of error.
  3. Google is your friend. OK, sometimes you just can’t figure it out yourself, but you’re probably not the first one to run into this. Simply paste your code into Google and it’s very likely that some useful info comes back. This also works for other stuff you might want to find out, such as how to add extra features to your scripts or change the formatting of the output.
  4. If you find yourself having to return to Google at (almost) every error message, ask yourself whether you need to brush up on your UNIX or Python skills. We realise the command line is not that familiar to everyone of you, but this was the easiest way to set up these exercises whilst still giving you the freedom to choose to use your own machine or the lab computers. If necessary, spend some time going through the basics, this will pay off in the long run, even if you decide to never use Python or UNIX after this course again. The fact that you went through the motions of learning a new language, makes it easier to pick up new things in the future.
  5. The devil is in the details. Check spaces, commas, and parentheses.

Good luck!

About Lora Aroyo

I am Research Scientist at Google working in the area of Responsible AI specifically focussing on responsible data for AI. Previously, I was a full professor in Computer Science, head of the Web and Media Group, Department of Computer Science, VU University of Amsterdam, The Netherlands, where I was scientific coordinator of the EU Integrated Project: NoTube: Integration of Web and TV Data with the Help of Semantics, http://notube.tv Go to my web page for more details: http://lora-aroyo.org
This entry was posted in Tips. Bookmark the permalink.

Leave a comment