5 Lessons Learned: Google’s Crash Course On Python
I already knew some of the basics of python when I audited this course. But, I was able to see better how it could be used in the following:
- Shrinking hours worth of work into seconds.
- Eliminating operator errors.
- Freeing up time to work on the more important tasks.
I even applied the things I’ve learned to automate some of my tasks at work. That said, besides relearning how to code, here are the nuggets I’ve gained from taking Crash Course on Python taught by Google:
The simple concepts can be used in powerful ways
Think of a spoon. It’s purpose is to shovel food from a plate to your mouth. However, it can also be used for other things besides eating. It can become a used as a weapon, a tool to scratch a lottery ticket, an instrument to play drum beats, a contraption to draw lines in the sand, etc.
The programming tools in this course are like the analogy above. The instructor gives simple examples on how to use them, but you’ll see how powerful they can be when you get to the exercises.
Dividing and Conquering is a Common Theme
I didn’t understand how some of the starter code worked. In turn, I didn’t know how to go about doing the exercises.
The fix? Divide and conquer.
I learned from the book, 5 Elements of Effective Thinking, that world-class problem solvers don’t take on a complex problem head on. They find a subset of that problem and then crush it.
So, that’s what I did.
Instead of looking at the starter code of an exercise as a whole, I investigated each piece – variables, loops, functions, etc. – to see how they worked individually. Then, I was able to understand what I had to do next.
How did I do this? By deconstructing the code.
Deconstructing the Code In Your Own Machine Helps You Understand the Problem Better.
Look at the example code below:
There were two things about this code that took me aback:
- Tuples. I find them to be weird. It’s probably because I never used them while learning Java in college (which was like a decade ago). So, line 4 was iffy to me.
- The weird for loop syntax on line 5 looks pretty complicated.
So, I extracted each of those lines of code, played around with them in my own machine, and eventually figured out how they work.
Side note: The exercise above is a fun one to solve. Try it out.
Short Breaks Help You Solve the Challenge Exercises
Going down the rabbit hole can be fun, but it can also be an unnecessary time waster. You could follow a line of thinking only to find out you took the wrong path 3 hours later.
The fix is to take short breaks and detach yourself from the problem. There were a lot of times when I was stuck on a problem for an hour and was able to solve it only after taking a 10 minute walk. If I would’ve gone for a walk after 20 minutes of trying to solve the problem, I probably would have saved myself 30 minutes.
You Won’t Fully Retain Some Of the Concepts (And that’s okay)
I wished I could tell you that all the knowledge I’ve learned stays in my head forever. Unfortunately, I still have to google some of the syntax that I rarely use; the weird for loop I’ve shown before is an example.
But, that’s fine. I’ve heard that most coders are on the same boat. Programming languages get updated and new libraries come out all the time anyway, so googling how to use them is part of the game.
So, there’s no point beating yourself over when you forget how to use some of the tools in python. Documentations are available online to help you when it’s time to use them.
This course is geared towards future IT professionals, but the knowledge gained can be used in other disciplines. Plus, the instructor was fun, which made the class enjoyable. It’s considered an introductory course, but you can use the skills to solve complex problems at work.