Automation

Moving Towards Automation with Python

John Partee, Full Stack Machine Learning Engineer

A few weeks ago, I gave a Python training to a group intent on expanding their automation practice. The big focus was network automation, which is little different than any other type of Python development. Learning Python can be intimidating, and it won’t always be easy. Though, with the right tools, we can accelerate our learning process, and help propel organizations into the automated future.

The biggest take away I hoped folks would get from the training is problem solving skills. Programming changes how you see problems. Learning to see those problems as solvable with loops and some ‘if’ statements is way more important than learning syntax or tools!

If you or your team are ready to start automating, here are a few of my personal recommendations.

SoloLearn

Source: Screenshot of Sololearn.com

Start with SoloLearn. SoloLearn helps reinforce the fundamentals, like syntax and the flow of a program. If you aren’t certain what a loop is, or how a conditional works, this is your resource.

Their Android app is pretty solid and makes for something to do when you have a few minutes to burn. Have you tried Duolingo? This is Duolingo for code.

Exercism

Once you have the fundamentals down, you need to work on problem solving. The best way to do this is by taking little bites of the elephant, with quick feedback on your solutions. My absolute number one pick for learning Python is Exercism. Exercism has a mentoring system to request feedback on your code, and a ton of exercises for a ton of languages. I’m working through their Haskell and Rust tracks right now! Version 3 of Exercism is coming next month and will be fantastic. Their systems use Test Driven Development (TDD), which can be a little rough at first, but builds good habits and intuition. We also use the ‘Teams’ edition of Exercism to teach Python in classes, and internally!

The moment I learned about f-strings, source: screenshot of Exercism.io

Codewars

The biggest complaint I’ve heard about Exercism is that it’s hard, which is valid! When you get discouraged, pop over to Codewars and knock out a few quick exercises. Available exercises can be as easy or as hard as you want them and are completely doable in-browser. Even your code runs there!

Whether you solve a problem or get stuck, don’t miss the community solutions area. People star and comment on clever solutions and understanding other’s code is a great way to learn. I’ve written Python as my day job for two years or so now, and I still knock out a few minutes of codewars a day to stay fresh. It’s as crucial in my morning routine as coffee!

It’s all in-browser, which is nice even at work! Source: Screenshot of codewars.com

Python Preview (VSCode)

The biggest thing you can do today to speed up your learning is picking a good IDE. I won’t start that fight here, but I do recommend VSCode, which is lightweight and works with all of the languages I write in on a daily basis. For Python, nothing is more useful to beginners than the Python Preview extension (other than the Python language server, I guess!):

Source: Screenshot of VSCode, with Python Preview

In the above picture, it’s okay if you don’t follow! With Python Preview we can go line by line to see what is happening to our code, and our data. It is essential to making sense of loops and conditionals. Even today, if I get stuck on a function misbehaving, I often reach for Python Preview to step through. I haven’t found a better tool for visualizing the flow yet!

Finding a Mentor or Course, Building a Community

Of course, software can’t replace humans all the time. Getting real feedback from a practitioner is crucial, and having friends to commiserate with helps! If you see a Python developer in the wild, ask what tools they used to become proficient. Ask some friends if they’re interested in learning as well, and keep each other honest. Bounce problems off of one another. Pair up on solutions, screenshare, you’ll both get more out of the experience.

And of course, if your organization is ready to move towards automation, reach out to NTS! Our trainers are real programmers and practitioners, bringing their automation experience to the classroom. NTS is here for you with every step of the automation journey. If you’re ready to accelerate your automation practice, we offer training and tooling to get you there, under budget and ahead of time.

WITH AUTOMATION, THE POSSIBILITIES ARE ENDLESS

At NTS we recognize that automation is not a destination, but instead a journey. To learn more about NTS automation service offerings and the best practices for your organization to take on the road of automation success please contact sales@nextechsol.com.