Engineers need to embrace polyglotism

Why Python is a crucial part of the DevOps toolchain

Richard Gall
DevOps
© Shutterstock / Tashatuvango

DevOps is built for agility and handling change. In this year’s Skill Up survey, Packt found that Python is one of the primary languages used by DevOps engineers. In this article, Richard Gall explores why Python is such a popular part of the DevOps toolchain.

DevOps is a way of thinking; it’s an approach, not a specific set of tools. And that’s all well and good – but it only gives you half the picture. If we overstate DevOps as a philosophy or a methodology, then it becomes too easy to forget that the toolchain is everything when it comes to DevOps. In fact, DevOps thinking forces you to think about your toolchain more than ever – when infrastructure becomes code, the way in which you manage it, change it is constantly.

Skills Up survey: Python is the primary language used by those working in DevOps

Because DevOps is an approach built for agility and for handling change, engineers need to embrace polyglotism. But there’s one language that’s coming out as a crucial component of the DevOps toolchain — Python. In this year’s Skill Up survey, publisher Packt found that Python was the primary language used by those working in DevOps. Indeed, it was a language that dominated across job roles – from web development to security to data science – a fact which underscores Python’s flexibility and adaptability. But it’s in DevOps that we can see Python’s true strengths. If DevOps is a modern, novel phenomenon in the software world, it’s significant that Python is the tool that DevOps practitioners share as a common language.

SEE MORE: DevOps engineers think Docker, Ansible and Kubernetes are the top 3 tools to learn

But why Python?

Clearly, flexibility plays an important role, but more specifically, it’s the accessibility of Python that explains its popularity in Packt’s research. This comes back to the increasing importance of polyglotism — if you’re working in a DevOps role, you need an adaptable skill set; Python is a language that forms a solid foundation for anyone curious about technology, committed to exploring new languages and tools; the fact that it isn’t a hugely taxing language to learn means it doesn’t require the level of commitment that a specialist language may need.

However, there’s a lot more to it than just accessibility – perhaps the key reason Packt found Python to be such a popular language for DevOps engineers is that it’s a great language for scripting – and scripting means automation. And, to go full circle, if DevOps is about anything at all, it’s ultimately about automating things and improving efficiency.

The fact that some of the key configuration management tools like Ansible and SaltStack are written in Python underscores just how useful the language is when it comes to infrastructure automation and orchestration.

SEE MORE: Report: IDEs are among the most loved tools but developers want a ‘jack of all trades’ tool

It’s worth looking at how Python compares with a language like Ruby. The two are often compared, they’re both pretty accessible, and are both used in applications built by a large range of organizations. They’re also both languages that feature in the DevOps toolchain. There’s little to choose between them, and, by and large, you’ll be able to do many of the things you can do with Python with Ruby.

But it’s when you look at the syntax that you can begin to see why Python may be winning out – Python is much more direct than Ruby – as the piece above puts it:

Python takes a more direct approach to programming. It’s main goal is to make everything obvious to the programmer. This sacrifices some of the elegance that Ruby has but gives Python a big advantage when it comes to learning to code and debugging problems.

If you’re working in DevOps and agility is the aim of the game, this simplicity and directness is invaluable. In fact, some have commented on the decline of Ruby – which could go some way to suggest why Python is winning in the popularity stakes.

SEE MORE: Have we bridged the gap between Data Science and DevOps?

But this shouldn’t turn into a popularity contest – the key point for anyone, whether they work in DevOps or otherwise – is that you need to use the best tools for the job. It simply seems that Python is becoming the best tool for the job in a range of areas. It has clearly captured the software zeitgeist, bringing its syntactical zeal and can-do attitude to a huge range of problems.

So, as the toolchain opens out, with developers and engineers taking on decision-making responsibilities, Python might just be a stabilizing language. Because it can be used in so many different ways, it allows you to remain open to new technical possibilities. And what, really, is more valuable than adaptation when it comes to DevOps?

asap

Author
Richard Gall
Richard Gall is Communications Manager at Packt, utilising his background in writing and publishing to help Packt in their mission to help the world put software to work in new ways. Packt, one of the biggest tech publishers in the world, deliver effective learning and information services to IT professionals.

Comments
comments powered by Disqus