Planet Banshee: from the great minds of our community

December 16, 2016

Dwayne Crooks on learning Python efficiently

Dwayne Crooks wrote a fabulous blog post this week with his advice on learning Python efficiently.

Being a year into my journey, I couldn’t agree with him more. He lists five mistakes that hamper our ability to learn efficiently. Below I’ve listed his five mistakes with where I am in my journey in italics.

  1. Reading a book cover to cover. I strongly agree with this one. This was the first mistake I made a year ago when I decided I wanted to learn Python. I bought Think Python and Learning Python and quickly realized I am not the type of learner who can learn from reading and trying to follow along.
  2. Diving in without a plan. Check! Yes, I have a plan. I know what I want to build. Whew.
  3. Failing to narrow your scope. I think I’m ok on this one? Let’s just quote this one in full from Mr. Crooks:

    Having clear boundaries makes it easy to decide whether or not a new resource is worth your time. That’s why learning Python by trying to build something in it is a great way to go. You’d realize how much of Python you don’t need to know in order to accomplish any one task. You’ll find that the more you narrow your scope at the beginning, the more you’ll learn and the faster you’ll progress.

    The challenge for me in understanding this one, is if you’re new to Python, how do you know where to draw the boundaries? When I get stuck, I revisit some of the classes I’ve taken or search Stack Overflow. I quickly realize how much I don’t know when I find a new way to do something or come across something related but that I don’t need. But knowing what I want to build probably expands my scope instead of narrowing it.

  4. Trying to learn 2 (or more) things at the same time. I’m being very careful with this one. I want to have a prototype of my application working before I move on to my next class, Python for Entrepreneurs, which will teach me how to build my application using Pyramid. The course will also cover CSS, Bootstrap and more web technologies. Where I’m struggling though is on my prototype – do I just build the prototype or do I try and learn some basic SQL, which is what the web app version will need? My head has been in the right spot on this one as I’ve tried to avoid learning SQL up until now.
  5. Spending too much time studying before you have experience doing. Mr. Crooks hits this one on the head and is basically describing me: Because we’re afraid to fail, we want to know what we’re doing before we ever try. So we spend a lot of time learning before ever trying to apply any of it. I’m wired to be a “learner” and do a deep dive into anything before I pull the trigger. Whether it’s a ton of research before buying a new TV or learning a new skill, this describes me well. But I think I’m ok on this one. If you were to look through my Github repo for nflpool (please don’t), you would see a mishmash of Python. There’s probably 25 files in my repo that is basically just a scratchpad for me trying to figure out how to parse JSON or trying to write a for loop to get the results I need. There’s nothing Pythonic in there (yet). For example, I’m not using functions like I should. But once I get the different pieces working, I’ll refactor it the right way. You can argue whether I should be starting it right or not, but I’m diving in and trying to figure it out piece by piece. You have to start somewhere…

Mr. Crooks then goes on and shares his five steps to get started. I’m happy to see I’m on the right track.

December 04, 2016

One Year of Python

It was Black Friday of 2015. O’Reilly put on a sale of their programming ebooks and I was finally ready to take the plunge and learn Python. I bought three books:

I then signed up for a Coursera class, Python for Everybody, taught by Dr. Charles Severance and started the class. I was ready to do this. I needed a hobby. I had a problem to solve.

Then real life got in the way. A few months earlier, we started building a new house. In January it was time to sell our house, which meant hours of work. Then in February, we moved.

I put learning Python on the back burner. Before I knew it, it was July, and another six months had gone by. It was now fantasy football season and that was the problem I had to solve. I needed a program that would keep track of all football statistics and standings and automatically calculate each player’s points. It was time.

I re-started the Coursera course and spent the time. I was easily spending twenty hours a week reading the course materials, watching the videos and doing the homework.

I confirmed what I knew about myself: I learn best by doing, not just reading or watching videos. The books I had bought were helpful, but just sitting down and reading them, trying to follow along and do the exercises was difficult. Python for Everybody on Coursera was great.

I finished that and moved on to Python Jumpstart by Building 10 Apps by Michael Kennedy, which I had purchased in early 2016 via a Kickstarter campaign. I’m almost done with that a year after I started this journey.

Learning to code in Python is hard. I don’t have a background in computer science and with some of the concepts that the books and courses teach I just don’t have the base knowledge necessary. This sometimes makes it harder and takes longer to understand the concepts. I’m lucky that my wife has worked professionally as a programmer in multiple languages, including Java and SQL. But I drive her crazy when I ask her questions about concepts I clearly don’t understand. I use the wrong terminology or fail to grasp what I’ve been taught.

I don’t know how much I’ve retained from the classes and books. I’m trying to build my application in parallel with my learning. I’m convinced the only way I’m going to learn is to build something, which is a piece of advice most often found online for people aspiring to learn programming. I’m constantly hitting up Google and Stack Overflow when I get stuck. I’ll copy bits and pieces of code from these search results and I’m always doubting whether I understand what I’m copying. I’ve signed up for multiple newsletters and bookmarked dozens of websites with articles on how to learn, code snippets, programming challenges and more. I’m overwhelmed with the concepts I’m learning and I know I don’t understand, let alone use, these concepts.

But I’m going to keep trying. The only way I’ll learn is by building something. The code will be ugly. It will break. And I’ll keep updating it until it works and as I learn more, I’ll make it more elegant.

Here’s to another year.