8 reasons Python will rule the enterprise — and 8 reasons it won’t

The rise of Python will lead many enterprise managers to wonder whether it’s time to jump on the hype train. Let’s weigh the pros and cons.

8 reasons Python will rule the enterprise — and 8 reasons it won’t
Get Bullish (CC BY 2.0)

There’s no question that Python is hugely popular with software developers, or that its popularity continues to rise. TIOBE, a software company that publishes a measure of the popularity of programming languages every month, reported in November that Python had climbed into the number two slot for the first time, passing Java. 

This wasn’t the only indication of Python’s success, nor much of a surprise to the acolytes. Indeed, other rankings have also recorded Python’s ascent. The IEEE, for instance, rates languages according to their suitability — and in 2020 they put Python at the top of the list.

Ranking computer languages for popularity is only a bit more scientific than, say, hosting a sleepover for junior high kids and asking them to pick the most popular kids in school. If you count lines of code written, some contrarian will point out that we want our code to be short and easy to read. If you try to measure code being run in production, the top language will be the one used to create those addictive games on your smartphone. There’s no easy metric, although mixing all of the numbers together gives us a rough way of generating a useful answer.

Still, nothing succeeds like success and few can deny the increasing importance of the once-lowly scripting language from the world of open source. The rise of Python will lead many enterprise managers to wonder whether it’s time to jump on the hype train. To try to make sense of this impossible question, we’ve drawn up a list of eight reasons why joining the crowd is smart and eight other reasons why you might want to wait a few decades.

Python is popular

Yes, our mothers told us not to jump off the bridge if everyone is leaping like lemmings, but there are practical reasons why it makes sense to rush to hang out with the cool kids. Hiring programmers is easier, especially the younger generation just graduating from colleges that have almost universally adopted Python for introductory programming classes. Thanks to Python’s ubiquity, there are more new libraries and tools available, and as we’ve seen in machine learning, the latest technology is more likely to be written in the hot language.

Popularity is stupid for enterprises

It’s one thing to join the mob if you’re looking for a novel to read on the beach, but it’s another when you’re managing a software stack that could live for decades. Letting the new team do what’s popular leads to a collection of code with layers much like tree rings. The newer files are filled with JavaScript, then there’s some Ruby, some Java, and maybe a bit of ColdFusion wrapped around a core filled with COBOL with a few libraries written in SNOBOL. Do you want your codebase to be a good illustration of all of coding history?

The differences make maintenance impossible. The new coders can’t even read the code that’s a few years old, so they treat it like a black box and write endless glue routines to translate the data into the format they want. The tree rings grow fatter and more numerous even though not much new work is being done. The stack may do something simple like maintain a ledger of transactions with a running total, but it has millions of lines of code and the data goes on a hero’s quest as daunting as the one from the Lord of the RIngs trilogy. The stack may convert the data 18 times as it journeys there and back again into the center of the code where the magic Wizard of COBOL executes the definitive business logic.

Consistency may be boring, but the enterprise doesn’t need exciting code. It needs the software to work.

People like scripting languages

Languages like Python were created because programmers often need to solve small problems. They want to toss off a few lines and be done without the grief of starting up some IDE, waiting for the right libraries to load, creating the code repositories, and configuring the CI/CD build path. Bazillions of little code snippets can’t be wrong. If it’s easy to write a few lines, the simplicity should extend to writing a few million lines, right?

Spreadsheets are the scripting language for enterprises

Many programmers may not realize just how much computation is done in spreadsheets, often because they don’t realize just how much real work can be accomplished by people who don’t even think of themselves as coders. Programmers may dismiss the tools as word processors but for numbers, but they don’t realize just how useful and adaptive the spreadsheets may be. This is why so many enterprise tools output reports as spreadsheets and so many business teams use spreadsheets as the lingua franca. Python is a nice tool for some science labs, but why turn away from a perfectly good tool that many people in the office already know?

Dynamic languages are fun

One of the reasons that Python coding can be so quick is that the language doesn’t require the programmer to spend time laboriously defining data types. The interpreter is smart enough to flag errors on the run, so why not let the machine’s smarts do some of the work for us?

Typed languages are better for big jobs

There is plenty of disagreement about this claim, but one common complaint about dynamic languages is that an error in one part of the program will finally lead to a crash in a completely different place. Debugging means finding the connection. Just this summer while struggling with a Python error, one programmer I know started cursing at dynamic languages’ lack of typing.

Typed languages force the developer to add an extra layer of information that can help spot these problems before the code even runs for the first time. This also helps larger teams work together because they don’t need to read each other’s minds about the data types and know that any variable named “i” will only be an integer. The good news is that Python is embracing type hinting. If you want the power of type checking, you just need to convince the team to add the hints.

Toys aren’t just for kids

Python’s success is just one reflection of the advances in tools and the rise of the casual programmer. Just as the so called “no code” revolution is sweeping through some layers, non-programmers are realizing that they can do quite a bit with just some basic tools. Sure, the serious coders may dismiss scripting languages like Python as toys, but if the job gets done who cares?

Serious projects demand serious tools

A language that’s right for creating 10 lines of code is not automatically good for creating 10-thousand-line stacks or 10-million-line monstrosities. Over the years, programmers have added smart constructs that organize big codebases with discipline and consistency. Python lovers have been grafting these ideas into Python, but often at the expense of backward compatibility. Languages like Java or C/C++ have evolved to handle the jobs that enterprise coders need done.

Machine learning and data science are booming

In the old days, it was enough for the IT team to manage the inventory and keep the books straight. Now many enterprises are exploring more sophisticated approaches using complex mathematics and artificial intelligence. Python just happens to be extremely popular in those worlds. Sure, you could wait for someone to rewrite the machine learning libraries in COBOL or you could just type up a bit more glue code and be done.

Chasing fads requires care

It may be too early to know if approaches like machine learning will be around as long as, say, quantum coherence in the supercooled core of a quantum computer, but sometimes the IT staff doesn’t get to make that decision. If some suit wants it, the challenge is finding the best way to accomplish it without mucking up the codebase. Some insist that Python be used only inside these processes and the bulk of the work be done with one standard language for as much consistency as possible.

The Python ecosystem is growing

Momentum may be an important concept in physics class, but it shouldn’t apply to things like programming languages that don’t have mass. Perhaps. But no one can deny that there’s a feedback loop of excitement that attracts more coders who then write more libraries that attract more coders. The rise of Python on the TIOBE charts represents the individual decisions of thousands if not millions of coders who looked at all of the options and chose Python. We could overthink it and stare at our bellybuttons a bit longer, or we could just go with the crowd.

The growth hasn’t been uniform              

Some of the programming languages like Java place a premium on evolving slowly and only in a way that avoids breaking anything. The Python team doesn’t seem to be as afraid of progress. The jump from Python 2.6 to Python 3.0 was a big one and everyone knows that they’re effectively two different languages.

The smaller jumps, though, are often just as nerve-racking. A quick skim of the Python 3.9 release notes shows that they’ve just up and changed the error type returned by the import function as well as the behavior of the replace function. These may be real improvements, and the other new features are nice, but the smart thing to do is treat each upgrade as a distinct language. So in reality, there are now more different variants of Python than you can count on your fingers.

Python seems like part of the OS

Linux may have started with C and assembly code, but Python seems like it’s everywhere. It’s now such a big part of many Linux distributions that people ask questions about how to add Python to their version of the kernel. If you’re going to be using Linux machines, using Python will help you fit right in.

Python and Linux are co-dependent

This tight connection has downsides. This spring, I wasted a few days because Ubuntu 19.04 relies upon Python 3.7 by default and Ubuntu 18.04 uses Python 3.6. The code stack gifted unto me would run on the Ubuntu 18.04 machine but fail when I moved it to the machine with the newer version of Ubuntu. Something changed between Python 3.6 and Python 3.7. But if I replaced Python 3.7 on the Ubuntu 19.04 machine with Python 3.6, I would see glitches in the OS.

After a few days of wrestling with the various tools that try to make Python installation easy, I just downgraded from Ubuntu 19.04 to Ubuntu 18.04 and stopped thinking about it. The Python community is well aware of these issues and they build tools to manage them, but the proliferation of these Python juggling tools adds another layer of meta confusion. One helper on the project was using Pip and the other was using Anaconda and both insisted my problems would disappear by switching to their favorite. But they didn’t.

These issues don’t tend to bother the scientists in the labs who are just writing a few lines to boil down their data. They can just reinstall different versions or run things in some container. But problems like these can be crippling to anyone trying to maintain a big pile of code that’s been written over the years on machines with different versions of the language. Try telling the new hires who learned Python 3.9 in school that the codebase is frozen on Python 3.2.5.

Python is everywhere

The open source tradition has encouraged plenty of experimentation and innovation, creating a cornucopia of code not only to plop on your stack but even to keep your stack running. While some languages built and maintained by a single corporation have one compiler, Python authors can argue about their favorites from a list that needs more than one hand to count. There are dozens of endless choices.

The tyranny of choice is real

Is it really a gift to be given a long list of options? Or would you rather have one solid choice that you can trust? Open source code is a wonderful feast but it doesn’t come with a side helping of extra time in the day to try the options, patch the flaws, and fiddle with it until it works.

Easy does it

Enterprise shops need to move forward with baby steps. Python is a great tool that isn’t going to go away. It is now deeply embedded in the education system and that means it’s closer to becoming the lingua franca.

Teams need to migrate slowly into the future, and adopting more Python is a way to do that. The question is how to do it carefully and with a solid strategy. The good news is that Python doesn’t require major investments in time or infrastructure. It was designed for small jobs. It is possible to start small, enjoy the benefits, and keep it on a tight leash. Bigger jobs can come later if it makes sense.

Copyright © 2021 IDG Communications, Inc.

InfoWorld Technology of the Year Awards 2023. Now open for entries!