in Learning, Reflection

Learning Log: Week of 5/8/17

Note: This post appeared on my Hugo website and was originally published on 05/11/2017. I wanted to transfer and archive some of my previous content. This is also the post where I figured out how to properly do syntax highlighting with Hugo!


Week of 5/8/17

This week I’ve really committed to diving deeply into Python. I’ve been writing the Programming Minecraft youth course for Digital Harbor Foundation and I’ve become extremely inspired to level up my own Python knowledge. The core of our youth course is writing Python to interact and hack the Minecraft environment. The inspiration for this was based on some Minecraft hacking we did during the Picademy training session last August. I immediately thought that this could be a great method to teach Python to youth. Instead of developing our course to be focused on Raspberry Pi, I’ve been developing it to run on Minecraft EDU. There was lots of weird server hacking that I needed to do to get the (excellent) Minecraft Python API to work with Minecraft EDU, but that’s a totally different post!

Anyway, the main subject of this particular post is Python. So let’s dive in!

Diving Deep Into Python

Once I become interested in a topic I become rather obsessively immersed in it. I’ve always approached learning a new skill in this way, whether it be learning a new instrument, new software, or a new language. I’ve discovered that this method is most effective for me when I compare and contrast the topic being studied with any previous reference point that I have. As I sought to deepen my Python skill I constantly compared and contrasted it with other languages that I’m familiar with, particularly JavaScript. I recently read a great article called Python for JavaScript Developers by Mario Pabon that made me think about how my familiarity and comfort with JavaScript can inform my Python development. One of the points in this article is about how there’s not a lot of “quick start” Python guides for programmers who are already solid in computational thinking/programming fundamentals. His article provided a nice starting point. While I’m not new to Python, I found that I could relate to many of his points.

Where to Start?

When learning new things I find value in going through beginner tutorials and practicing introductory concepts to solidify my foundation. I find this especially useful as I’m researching and writing content for youth and educators. I devour and practice as much information as possible before developing our courses in that hope that the more familiar and confident I am in my basic skill knowledge, the clearer I’ll be able to convey information for a beginner audience. This leads to a near relentless pursuit of the subject I’m studying, as is the case currently with Python.

This week alone I’ve started listening to an episode each day of the Talk Python to Me podcast. They have an excellent archive of episodes covering a wide range of topics. I’ve also been going through lessons from both beginner and intermediate Python courses on both Lynda and Pluralsight. I’ve had a Lynda membership for about a year and a half and I can definitely recommend it. I signed up to Pluralsight this week after being greatly impressed by their catalog, particularly with Python and JavaScript. One other Pluralsight feature that I found extremely helpful in this current pursuit is their personal skill assessment. I took the tests for JavaScript, NodeJS, and Python as well as some others. I actually scored the highest on the Python test, even though I’d say that I have less direct Python experience. I think that this speaks to the accessibility and readability of Python.

I’ve used this benchmark as a way to drive my learning. As of now, my studies are primarily focused on ways that I can build my own comfort with the fundamentals so that the projects and lessons I create can be as clear as possible. As a result, most of the projects and programs I’m writing are focused on either solidifying basic concepts or interacting with Minecraft. I already have some ideas for some applications and projects that will take my Python skill to the next level.

Concepts I Like Most

One thing I actually like a lot about Python (especially for beginners) is the emphasis on whitespace. The strictness of the 4 space indentation (and the errors that result from deviating) are extremely helpful for building good habits for writing readable code. This is something I can greatly appreciate as someone who has helped youth troubleshoot and debug code that isn’t consistently formatted. Building in these best practices from the beginning (and in an enforced way) results in readable, clear code. I know that there’s lots of discussion about Python being Zen-like and placing lots of importance on writing elegant code, and I now definitely have a deeper appreciation for these claims.

I also really like how for loops in Python behave like a streamlined version of forEach in JavaScript. Starting to comfortably use forEach boosted my JavaScript programming confidence; it was a personal milestone for me. However, I found that I loved the way that this is handled in Python. I’m currently interested in lots of text and string manipulations and I love being able to quickly write something like this to perform actions on source text:

This is a rather trivial example, but I found it awesome that strings are objects in Python and that I could perform the above action so quickly and elegantly. Speaking of elegant string manipulation, I love the string interpolation present in .format(). When I started using ES6, one of the main features I loved was the support for string interpolation instead of having to always concatenate. Since this is something I’ve come to love, I was thrilled that I could write something like this in Python:

I’ve integrated string formatting into many of the Programming Minecraft lessons because I think that this is one of (many) Python strengths.

Anyway, I’m going to pause this for now. I may come back and write more, but the main takeaway is that I’m immersed in Python and the more that I study and practice, the more I’ve come to appreciate the power, flexibility, and beginner friendliness of the language.

Let me know what you think

Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.