But I’m a Network Engineer!

We all know that network automation is setting the industry on fire. Scaling out talent via automation is the new drive for companies to maximize their investment in engineers.

Like many other network engineers, I leapt into the deep end of the pool to embrace the new trend. And, like many network engineers, I found myself drowning without understanding why. I tried Ansible, which seemed to present the friendliest (non-coder) entry point to the automation world.

What I found was that the documentation for Ansible was not intuitive for newcomers. My playbooks would fail with very little understanding of why. The error messages were obtuse. Put simply, I was beating my head against a wall to learn Ansible, investing a lot of time and energy.

I tried some other tools. Netmiko was next. Netmiko was easy to use! However, to use more than the very basics of the tool, you really need to know Python so you could make sense of the documentation and methods available.

I tried a little bit of everything at this point. I watched some videos of engineers who really excel at network automation and who were making it accessible to network engineers. Quality stuff, like John McGovern (IPvZero)’s videos on Youtube.

My problem was always the same, and it always came back to the same thing: I didn’t understand enough Python to really use these tools effectively. Ansible, Scrapli, Netmiko, Nornir, pretty much all the network automation tools are written in Python!

So, I figured it was time to stop spending lots of time and effort trying to learn each tool separately. Time to stop building a house upon the sand and start pouring a strong foundation.

Python Pro Bootcamp Time!

Throughout my career as a network engineer, I’ve tried to learn Python no less than six times now. I tried Python the Hard Way, I tried various “Intro to Python” courses on the usual training websites, and each time I struggled mightily with it because of the same reason: I was learning by rote, in a vacuum, either being told “just trust” that what I was doing would make sense later, or being given tasks to do in isolation that had no value.

Like networking, I feel like Python requires doing to cement the knowledge. I have interviewed CCNA candidates in the past who could easily spout off any factoid about OSPF from the book (did you know the administrative distance is 110?) but struggled to apply that knowledge to something useful (when will that become relevant when moving packets from Point A to B?)

That’s why I am in love with this course from the London App Brewery (and not only because, as a beer aficionado, I love the name). It’s structured as 100 days of lessons, to take you from zero Python knowledge all the way to app development, and, at Day 37, I can confirm that it is doing exactly that.

I found the course on sale at Udemy, but it’s also available on their website. “The Complete Python Pro Bootcamp for 2021” is an insane value. Currently it’s something like $12.99 USD. Take a look at some of the intermediate-level lessons I’m working on.

Hmm.. APIs? Where would I ever need to use Python skills around
interacting with APIs?.

These projects are real, applicable coding lessons with challenges. The instructor, Angela Yu, focuses on coding by challenge instead of simply walking you through how to do everything. The solutions are there (or, at least, her solutions, as with Python there are infinite cats as well as infinite ways to skin them), but the way the lessons are structured is important for someone truly looking to learn. It works like this:

  • Introduce new Python topic (Lists, Dictionaries, Tuples, Loops, APIs, etc.)
  • Present Project/Challenge to use this new knowledge
  • Give starter hints (or allow you to skip it for more challenge)
  • You, as the student, pause/stop and complete the challenge
  • Walk through her solution
  • Bonus: For the first part of the course, Angela gives extra suggestions on study habits and encouragement to keep the Python train moving

How Do I Actually DO It?

The strategy I usually take with the challenges is to try and resolve it however I can. What that means is that I take time to break down the challenge into its component pieces, figure out what I know (or just learned) to solve it, write code, test it, fail, write more code, and just get the challenge done even if I know it’s ugly. Then, I watch the solution, learn where I went wrong (or if I was right on the money), and assimilate any new knowledge. This has worked for 37 days now (as of this writing) and I hope it’ll keep working.

The reason I struggle on my own rather than watch the solution is there is no shortcut to learning. Python very much embodies the axiom of ‘Give someone a fish, they eat for a day, teach someone to fish, they eat for a lifetime”. The thought process of planning, executing and testing your own code can’t be cut short, because it builds the foundation of your understanding for every concept.

In this way Python is very much like network engineering. Knowing the AD of OSPF by reading it from a book is worthless if you don’t know where to apply that knowledge.

Do I Need to Stop and Learn This RIGHT NOW?

Never believe anyone who claims to know better than you do what your priorities should be. You should learn what is relevant to you, at a time you can put real effort into learning it. I rank things in this order myself:

  • Immediate Needs for Work: Something that expands on what you know/do already. These tends to be the project-based work of network engineers. Rarely do we take on projects with absolutely zero understanding of the underlying technology. Because of the importance/immediateness of this work, this consumes the lion’s share of the time we devote to learning.
  • Imminent Needs for Career/Work/Life: Usually we can sense what’s coming. This is the ‘Winds of Change’ type of learning to expand our comfort zones. This is often tangential but not directly related to your immediate needs. Learning these things are not less important, but they have a longer runway. Do it when you have time, and be consistent.
  • Career Goals/Planning Scaffold: Do you want to be where you are in five years? If you want to be somewhere else, identify the steps as well as start making a plan to devote small, incremental slices of time to get there. This is the ‘Plant a Tree, Grow Old in Its Shade’ type of learning. Devote smaller amounts of time to it but be unflinchingly consistent.

Great Advice, But What ACTION Can I Take to Start?

In my next post, I’ll cover how I set up my Python development box, which is probably easier than you think.


2 Comments

Daren Fulwell · March 4, 2021 at 11:35 am

My gut feel on this is that network engineering will always be needed (if only because we go layering more and more complexity on it right?) But we may need fewer folks at the pointy end of things, so maximise your operational relevance. Understand how to use APIs, become a network data scientist, and use your network knowledge in a wider context.

#100DaysofCode: Python Virtual Environment and GitHub | Carpe DMVPN · March 12, 2021 at 1:27 pm

[…] is the third post in a series focusing on #100DaysofCode. In the first post, I covered why network engineers should consider investing time and energy into Python. In the […]

Comments are closed.