Long-form posts on Python network automation, AI in operations, and what's worth your time. Read them on the blog, or join the community to get them in your inbox.
Fresh off the glow of Network Automation Forum's AutoCon 5 in Munich, Germany, I had planned on writing about the event, the people, the lessons learned, you know, the usual conference recap. But I changed my mind. Why? Because the New York Knicks just won the championship after a 53-year drought. As a lifelong basketball fan, I remember clipping newspaper articles about Magic Johnson and Larry Bird after my dad finished reading the paper. As a newly immigrated 13-year-old kid, I learned how t
Read post →Introduction: Use generator to save overhead when reading large text files. This is a quick note to help with reducing the memory overhead when reading large text files. I run into a problem where I need to process large text files between a few hundred MB to a few GB in size and the traditional way of loading the file into memory is significantly slowing down the computer. Sometimes the computer became unresponsive when the file is being loaded. After searching and experiment a bit, the Pytho
Read post →Introduction: Why motivation alone is not enough, read on to find out what ultimately worked for me. You see it all the time, best-selling books, speakers, TED Talks, all aim to give you the motivation you need to go out and conquer the world. They say that we are only limited by our own imagination, if we dream it we will achieve it. There are lots of amazing talks and books that can help us to get the motivation we need to get fit, work hard, and achieve the impossible. "All our dreams can c
Read post →Introduction: Stand for Justice #BlackLivesMatter. I started writing blogs almost a decade ago in 2011, mainly about technology, but sometimes also about fun little things like shoes and basketball. One thing I like about technology is its binary nature, it either works or it doesn't; a packet needs to arrive in whole or it is clearly broken. This suits me because there is little controversy about understanding a piece of technology or fixing something that is broken. I stay in the lane that I
Read post →Introduction: Quick introduction to eXtensible Markup Language (XML), Data Object Model (DOM), and their usage in Python. The subject of working with XML and DOM comes up quite often in network engineering when we start to work with data structure and automation. Usually, this is in the context of understanding and making use of pieces of information we received in the XML format and we need to transfer the information in a programming language, such as Python, to make the data useful. This is
Read post →Introduction: New Course on Packet Pushers Ignition I am happy to announce the latest collaboration course with Packet Pushers on their Ignition platform. The course is titled "Practical Python Lessons for Networking": Course: https://ignition.packetpushers.net/courses/practical-python-lessons-for-networking/ Ignition: https://ignition.packetpushers.net/ Here is a high-level overview of the course: * Python 3 virtual environment * Use Nornir library to query network devices for state * U
Read post →Introduction: Python doctest module example. Python doctest module is a way to test simple Python functions via the interactive shell output. It simply searches through a set of text, such as docstring, and looks for what appears to be interactive Python sessions, and executes those sessions to compare the output. It is a pretty low overhead way to provide testing without writing separate tests using unittest or the pytest framework. Let's see an example. We wrote the following function in doc
Read post →Introduction: My notes on installing Cisco CML2.0 on ESXi 6.7 I have used Cisco Virtual Internet Routing Lab (VIRL) pretty extensively as a sandbox lab in my books and classes. I like the fact that it contains all the Cisco images as a bundle, from legacy IOSv to the newer NX-OSv, as well as IOS-XRv, IOS-XE on CSR100v, ASAv, as well as Linux hosts. I believe it is well worth the USD $199 /yr fee for what it offers, and if you are short on fund, Cisco DevNet (https://developer.cisco.com/) also o
Read post →Introduction: A quick start for using Guestshell and Python on the Cisco IOS-XE platform It has been many years since I explored onboard shell and Python options for Cisco platforms, the post on Cisco Nexus 3000 (https://blog.pythonicneteng.com/2013/06/quickly-change-cisco-nexus-config-via.html) was the last I can recall. Back then, onboard shell and Python works on Cisco, but it always felt a bit clunky and seemed like a hack. In comparison, the Arista switches have always been more open to gi
Read post →Introduction: Thoughts about the experience of translating my book from English into Mandarin Chinese I was born in Taiwan R.O.C and moved to the United States at the age of 13. Shortly after graduating from elementary school, my parents were divorced. Long story short, after moving around a bit, my mom, my sister, and I ended up in the States living with relatives in hope for a new beginning. Ever since I was little, I had an interest and appreciation for the Chinese language. I remember my da
Read post →Introduction: An Q&A on the topic of Network Programming and the Suitability of Python Here is an excerpt of the Medium post by Packt Publishing for a Q&A session with me on the topic of Network Programmability and Python (July 28th, 2020 4 min read): Link: https://medium.com/@Packt/network-programming-and-the-suitability-of-python-277d296813fc Network programming has always been a crucial task and an integral part of our communication. Networks in your infrastructure set the foundation for h
Read post →Q&A for new LinkedIn Learning course for Cisco DevNet Associate Cert Prep 1 I am excited about the newly released course on LinkedIn Learning titled 'Cisco DevNet Associate Cert Prep 1: Software Development and Design': I thought it might be a good idea to write a Q&A blog about the course, so here it is. Q. Why was the cert prep 1 course released AFTER Cisco DevNet ASsociate Cert Prep 2: Understanding and Using APIs? The learning path course numbering follows the published Cisco DevNet Exam
Read post →How to improve CAB from a network engineer's perspective Last week, Monika from Packt Publishing's marketing team shared Kenneth Hunt's kind video book review for my book with me. First, of course, I want to thank Kenneth for taking the time to do such as detail review and Monika for passing it on, I truly appreciate them. You can watch the entire review here. Second, right around the 4 min 11 seconds mark, he mentioned about the CAB (Change Advisory / Approval Board) process that I used to an
Read post →Network Programming and the Suitability of Python Interview The blog interview from the collaboration between Packt Publishing, JavaResisited, and me is published on Medium today. The title of the article is "Network Programming and the Suitability of Python". What is a bit interesting is the fact that I did this a few months ago so I already forgot many of the answers I gave. Below was my response to the 'best way to incorporate network automaiton in your network': The best way to incorporate
Read post →Introduction: What is the Python __name__ variable and when to use it in your code. You probably have seen this block of code many times before: if __name__ == "__main__": ....<code> You probably also know the purpose of this code, it means the code below if __name__ == "__main__" statement is executed when we execute the file as a standalone file. But why do we need this extra block? Consider this script: (venv) echou@network-dev-2:/tmp$ cat script1.py #!/usr/bin/env python def router_n
Read post →Using PySerial to capture serial console outputs Many of the IoT devices do not have WiFi or 3G/4G connections. They are simple single-board devices that lack computing resources in favor of low power consumption, cost, and footprint. In which case, we can treat it as an extension to a computing platform (such as Raspberry Pi) as a sensor and capture the output via serial. For example, I have been playing around with the Adafruit CLUE board that really packs a punch when it comes to the number
Read post →Book Review for 'Coding Projects in Python' Over the weekend I read 'Coding Projects in Python (Computer Coding for Kids)' (Amazon Link) to see if this is a good book to start coding projects with my kids. The book has over 117 ratings on Amazon and the average is over 4.6 out of 5: (Picture Source: https://www.amazon.com/gp/product/1465461884) Truth be told, I already have two of the other highly ranked, highly recommended Python-for-kids books but ended up not using them for one reason or a
Read post →Thoughts about remote presenting at PyCon TW 2020 PyCon TW 2020 took place between September 5th - 6th, 2020 in Taiwan a few weeks ago. I wanted to take a few moments to reflect on this experience, particularly because most of the conferences have gone 100% virtual due to COVID-19 but PyCon TW 2020 was a hybrid between Online and Offline (for Taiwan's successful effort in containing COVID-19, check out this CNN article). As more and more of the conference have gone online in the coming future,
Read post →Adding URL Filtering in Nginx Configuration I worked with a few Apache configurations back in the days when I was a junior system administrator for a small ISP. Throughout the years I sporadically work on projects that have some tie-in to web servers but always in the context of network engineering; which is a roundabout way to say I am a noob when it comes to web servers configuration. :) This week I was exploring a few ways to filter URL based on IP addresses. One of my friends suggested add
Read post →Recounting Blog Post for missing email recipients Last week I discovered that I have been doing the email tagging wrong. Over the years, people have been signing up for my email in various ways, such as websites, blogs, podcast appearances, etc. Long story short, when I consolidated the list into my current Network Automation Ninja Site, I missed 50% of the people who signed up. Here is my dilemma, I spent a lot of time writing the different blog posts so I want to bring it to 50% of the missi
Read post →My first experiment with Scrapy I have not done much web scraping since playing around with BeautifulSoup many years ago. Back then, I felt BSoup was a great tool but needed a deeper understanding of the HTML tags and CSS selectors to make good use of the tool. There were just so many more interesting topics in Python that pushed web scraping down the priority list. Fast forward a few years, I started to get deeper into web development with Django. I am still a beginner, but HTML and CSS no lo
Read post →Introduction: Why learning JavaScript might be the next logical step. I have always had a love-hate relationship with JavaScript. I like the fact that it is always backward compatible even to the earliest of websites, I like the fact that it has evolved into a full-featured framework including Vue and React, and I like all the fun things it can bring to the website. But there is one thing that I hate: My brain does not seem to like learning JavaScript. I have tried (and failed) to learn JavaSc
Read post →Using Google Charts JavaScript Library for Graphs Last week I wrote a blog post about "Why Learn JavaScript", one of the main reasons for learning and using JavaScript is the fact that it is the de facto standard for interactive web frontend. To that end, it would be interesting to see an example of it. In this post, we will use the Google Charts JavaScript Library to make some network graphs. This is actually part 1 of the 3 parts blog post that I plan to write about JavaScript. The second pa
Read post →Introduction on Vue JavaScript Library This is the second part of the three-part series on JavaScript. In the first part, Google Charts for Graphs, we discussed a bit about HTML and using the Google Charts JavaScript to make client-side charts. Instead of downloading potentially big, static graphs from the server, the client can now render the graphs locally. The graphs themselves offer a bit of interactivity, for example, we can hover over a part of the pie chart and the value will pop up. Thi
Read post →Sign up once. Get Discord access for live conversation with engineers, plus the newsletter with long-form posts and new episodes in your inbox.
Sign up for access