Before I get started I have a few question for you. When was the last time when you learnt something new from scratch? Do you remember how easy or difficult it was? You may have forgotten all the sweat and tears that was part of the process of learning a new skill. This is human nature. Learning something that requires new skills is always hard.
New synapses must be built and until then your brain will always try to stir your thinking to something you practiced in the past many times. You literally will re-wire your brain. Once you mastered the skill with a new mindset, you’ll never look at your tasks the same way again. You may be able to solve one task in one way today, but soon you will have 3-4 different methods and all of these will take you less time. Eventually.
So why is not everyone doing this already? Sounds too good to be true, right? There is an important period in your development, that you must go through. It’s the time when you are learning to use your new tools. The catch is, when you’re just starting writing code, it could take you longer to solve a task with a script than doing it manually once. You can take this for a fact. The good news is this is just temporary. It’s very tempting to go back to the good old manual methods, as it “feels” easier. But don’t be fooled by your brain saying “it’s too hard, I know something that worked well in the past”. Read further to find out what is THE BIG WIN.
the big win
Let’s take an example. There is a new vulnerability affecting certain network OS-es, so you need to gather all the software versions and count how many devices are running an insecure release at Make-Believe Networks. If you’re a “Traditional Network Engineer” you may need to log in to each devices, issue ‘show version’ and record this information on a spreadsheet, once that’s done, count the devices per version and record this info again. It takes let’s say two hours for you to do and you’d feel very tired and burnt out by the end of it.
However, you could write a script, that takes the two lists: devices and vulnerable OS versions. It’d log into each device, issues the ‘show version’ command, matches relevant information in the output with a regular expression, the it’d add this information to another list. Then you could extract the vulnerable devices and create two text files, one with all of your devices and another with the list of the nodes of interest. If you’re new to programming, it may take you three hours (150% longer than the manual method). You’d think about how you can break down the tasks that can be easily coded, what data structures to use. Check out how what parameters to use with methods. And sometimes you will realise that your original assumption was wrong and you have to start from scratch. However, the more you practice, you’ll naturally get better and it will take less and less time to write these little scripts.
Getting back to the example – you chose to gather the list manually and the ops team starts to upgrade them, but it takes a couple overnight maintenance. A few days later your boss walks to your desks for an urgent update as the internal auditors require the progress report today. You can’t get hold of the ops team’s relevant member as he is sleeping after a night shift and he didn’t share the updated spreadsheet. What are your options then? You can say, you can give the information to him in two hours, drop everything and cause delay for your other commitments or you could wake your colleague and get him to send you the info, but you may not be able to get hold of him.
Let’s see what happens if you’d have chosen to write the script in the first place. Tell him, you’d be able to give him the exact progress within 10 minutes, start the script, get a cup of nice coffee and by the time you’re back at your desk, the files are ready. Quick math on the numbers and email sent.
Think about this a bit more. The script saved you time in spite of the fact it took longer to prepare! 2 x manual work would have costed you 4 hours, but the script took 3 hours to write. You get an hour back and a cup of coffee as an extra. This is the BIG WIN.
Let’s compare the two situations:
|Using manual method:||When scripting:|
You may need to break commitments, cause inconvenience to others and invest time in tasks that do not provide you personal development.
You will be professional, provide accurate data quickly and enable yourself and others to do their jobs more efficiently. It gives you a great sense of achievement.
The details are made up, the actual time saving depends on hundreds of factors, but the overall idea does not change. The manual method does not scale.
You must never forget why you decided to get into network automation. You need a mission statement. It could be “I will save time on repetitive tasks to have more time to work on more interesting stuff” or “I will make my customers happy with a stable and consistent network”. You know what your pain-points are, you can easily put those into words.
My goal is:
“I never want to work on boring stuff again. I want to be challenged every day, be a true professional and help everyone around me the best I can.”
Please share your mission statement with me in the comments section, I’d love to hear what YOUR goal is.