The IT world is full of cliches and misnomers that run the gamut of everything from the ever-more-nebulous "It's in the cloud" to real world examples of "If it isn't broken, don't fix it". There is one cliche that I heard 25 years ago when I got into this business that has stuck with me all these years and has remained true. In this industry, if you are not learning you are dying. To this day I don't know if I have heard a more true statement. None of us want to die off in our chosen profession but the problem is that our chosen field is so vast how do you know what to learn? And even when you do figure out a topic to learn, how do you figure out where to start?

These are the questions I was muttering to myself a few years ago when I decided to start learning Python. Whenever I teach a class I get the exact same questions from students, so we're not alone in this angst. Let me share a little about my story. I took some programming classes in college. These classes were the reason I got into networking, so I would never have to try and write code ever again! But the world is cruel and programmability and DevOps have creeped into even the realm of the network administrator.

Once my initial reluctance was shoved aside I went the route that I had always gone when learning new things, be it a new vendor operating system, hardware platform or technology, pick up a book and read. I now have an extensive Python library (OK, bad pun) of books that I have either started reading and they were so complex I am not sure what I learned, or finished reading but were so simple that I'm not sure what I learned. In addition, what I was learning was being outdated at a rate faster than I could read it.

 

The next route I tried was to take a course in Python. The course by Rice University and Coursera was fantastic and is still offered here (https://www.coursera.org/learn/interactive-python-1). In the course you learn the basics of Python while building some classic video games like Pong and Asteroids. While this got me more familiar with the language, structure and syntax of Python I was still lost as to how this applied to my day to day job of network administration. I was learning, but what I was learning was just not applicable to how I wanted to use it. Imagine you have a shiny new widget that you brought back from the hardware store. You are excited to use your shiny new tool to build things, but you have literally no projects to work on. That was me with Python. I had this tool, but I didn't have anywhere to use it yet. I ended up frustrated and just moved on.

The game changer came for me when a friend and I started playing with the original ACI software. The UI was clunky, confusing and not at all intuitive. But it had an API you could poke with Python. So we decided to come up with a CLI friendly way to configure ACI using the ACI Python SDK (Cobra) as an easier method for those old school command line warriors out there like myself. We now had a problem to solve, and that was what missing in my attempts to learn Python before. The result was a POC for customer that was a menu driven confguration tool for ACI. The coding was a trainwreck, it had no error handling and the formatting was all over the place, but it worked. Kind of. I learned more during that 1 week POC development about Python than in the previous year of actively trying to learn it.

A few days ago Jake VanderPlas tweeted this out:

Jake VanderPlas @jakevdp
My advice on learning Python:

Don't set out to "learn Python". Choose a problem you're interested in and learn to solve it with Python.

This is the advice I was missing when I set out to learn Python. It was all about the tool but no application. What we hope to bring you in this Lumos blog are not only the tools, but the experience behind how and where to apply these tools to your network. That combination has been key for our group and we hope you will find that it works for you as well.

 

Matt Locknane

Consulting Services Engineer (CSE)

CCIE DC #49118

Go to top