I bet many of you were waiting for this post. I completely understand why. Whenever I have a chat with a Network Engineer about network automation, the first word I hear in almost every case is Python!
Have you ever wondered why Python comes to your mind? Are you 100% sure that Python is the best you can choose? Read further and you’ll get my answers for these questions.
Let me tell you the most important message of this post:
network automation != Python
To get the full picture, please read STEP ZERO and STEP ONE first. You may think reading those would be a waste of time, but please re-consider as I believe you need to put things into perspective first. It will not take too long.
Let me bust one more thing here in the beginning:
programming != Python
So what’s Python then?
Let’s just turn it around a little bit. You are a NETWORK engineer. You have expert knowledge of network concepts such as routing, switching and protocols. When it comes to practicality you’ll configure specific devices, which may be Cisco, Juniper, HP, Arista and the list goes on. I didn’t say anything new and groundbreaking so far.
Which was harder? Understanding the fundamentals and truly grasp how OSPF or BGP works or learning the commands to configure device? For me the process looked like: large effort to understand concepts, then quickly pick up the commands even for multiple vendors.
Look at the table below and you can see how the frequently heard terms (such as programming and networking) relate to each other if we put them next to each other:
|Purpose||Interconnecting hosts||Solving people’s problems with the help of computers *|
* I was trying to find a great definition for “the purpose of programming” and surprisingly most of the sites just say “teach the computer what to do”, but that does not grasp it fully. I came up with my own, but if you find a better one please share with me in a comment or in the Contact page.
So now you see what Python really is: one of the tools to be able to solve problems.
Your most important task is to learn the basic concepts of programming. I am not saying that you must learn only theory in the beginning, not at all. But you need to learn the theory and then practice with your selected programming language. Once you mastered and truly embraced the concepts, picking up new languages will be a piece of cake, just like start working with a new vendor.
how to choose your first programming language?
Finally! After you understood how networking, programming relates to each other let’s talk for real now.
To learn the basic concepts, in my opinion, it does not matter which programming languages you learn first.
I bet you say: “Great. But I still need to pick one.”
So ask the following question: What problems do I want to solve with programming? We’re talking about network automation here. We need to examine what resources and tools are out there in 2017 for network automation.
- Plenty of libraries and frameworks have been written in Python. You can also add modules to most in Python, if you’d like to extend their capabilities.
- When we look at vendor APIs, you can call them easily from Python.
- There are plenty of Python based open source projects with large communities and frequent updates with bug fixes and new features.
- Python is well documented, more and more articles are published for network automation, so it’s likely you’ll find the answered for your questions as you learn.
A few examples:
Is Python the best language? No. Will you be able to solve all the problems and implement all your ideas with Python? No.
As a conclusion, I say Python is a good choice to start to learn for network automation in 2017. You might say: “This is what I was saying in the beginning!”. Yes, you’re right, however, now you understand ***why*** Python is a good choice. You are now confident, that’s one of the best languages to can get started with.
Is learning a programming language enough?
what shall I do now?
You’ll find plenty of resources about learning a programming language on the Internet and I’ll give you a few links below.
My aim in this blog post was not to teach you how to code. I wanted to put coding into perspective for you and give pointers what to consider when before open up that text editor or IDE. I hope this was useful.
Read the STEP THREE about learning git and managing your code.
Don’t miss out and stay motivated by subscribing to email alerts on the right hand side. (desktop browser).
Till next time…