For the past 32 years, whenever Yours Truly needed a custom standalone computer program, he wrote it in Basic. First Atari Basic in 1982, then AmigaBASIC for the Commodore Amiga, followed by Microsoft QuickBASIC for DOS (the last version, 4.5, appeared in 1988), then Microsoft’s BASIC Professional Development System (the last version. 7.1, appeared in October 1990), Microsoft Visual Basic and finally PowerBASIC, which was an updated, Windows version of the old 1980s Turbo Basic.
Despite my peculiar natural talent when it came to programming computers, coding anything in Basic always brought howls of derision from the Peanut Gallery. It didn’t matter if I had published code for a rule-based expert system in the much-respected Dr. Dobb’s Journal in April 1987, or had written a scheduling calendar and file management system for my law firm and multimedia presentation software for Bell Labs in the early 1990s.
People would at first marvel at my latest creation and then ask, “What language is this written in?” I would hesitantly reply, “Basic, with the loops replaced with assembler code for speed,” cringing in my knowledge that, suddenly, the onlookers’ opinion of my magnificent handiwork was about to take a complete, 180-degree turn. I wanted to go hide somewhere until the wisecracks about coding in a “beginners’ toy language” subsided.
And so, toward the end of last year, Yours Truly, grand old man of telecom and computerdom that I am, finally looked around for a new language in which to write software. I searched for a general-purpose language that had a wide range of capabilities — but mostly I needed something that wasn’t as déclassé as Basic.
And I found it — Python.
No, it’s not named after those snakes that are currently overrunning Florida. (Ironically, so any people believe Python was named after the snake that the critter appears in the Python Foundation's logo.) Rather, its Dutch principal author, Giudo van Rossum, named it after the TV series, “Monty Python’s Flying Circus.” The joke extends to the Integrated Development Environment (IDE) that many people use to write Python programs: It’s named IDLE after Eric Idle, an esteemed member of the comedy group. Moreover, programmers often insert Monte Python references in their code; for example, the words “spam” and “eggs” are often used in tutorial Python code.
Python is open source and is absolutely free, even if you write commercial software with it. It runs natively on Windows, the Mac OS, and Linux. If you’re careful and write “generically,” you can cobble together a program that will run on just about every microcomputer there is.
I was always a stickler for making my computer programming code look pretty, carefully indenting various blocks of code for functions, under “IF tests,” and so forth, keeping the nested blocks of code together for readability.
Well, lo and behold, in Python, the neat indentation of nested blocks is not just aesthetic — it’s mandatory, or else the program won’t run! You can’t even mix tabs and spaces; you’ve got to use one or the other.
In terms of sheer readability, Python’s syntax is beautifully straightforward (unlike a language like, say, Perl). Some experiments demonstrate that Python programmers can be twice as productive as those coding in other languages (such as Microsoft’s much-ballyhooed C#). Supposedly, for any algorithm, it takes six lines of code in the “C” or “C++” languages to do what a single line of Python code can do.
Indeed, Python code is so readable that a programmer can abandon work on a program for a while, come back weeks or months later and pick up where he or she left off without missing a beat. Likewise, the programmer can pass his work along to other programmers on a team, who can quickly figure out what the code does. It doesn’t matter whether the software is for business, managing server logs, automating system processes, quant shop number crunching, or video games.
Python’s “vocabulary” is so concise that you can keep all of its commands in your head simultaneously.
There are a huge number of terrific free add-on libraries of functions that can be imported into Python. For years scientists and various denizens of academia have relied upon a high-level language and interactive environment for numerical computation and visualization called MATLAB as well as a computer language for statistical computing and graphics called “R.” Now, with third-party open source libraries available such as Numpy/Scipy for numerical operations and MatPlotLib for visual plotting, scientists have a new favorite partner in Python.
Python is an “interpreted” language, which means when you push a button the program runs immediately. There is no wait to “compile” the language into the machine code the computer’s CPU understands.
Google uses Python, as does Dropbox. The original client (and several spin-offs) of BitTorrent were programmed in Python, and it is embedded as a scripting language in the free 3D art and animation program Blender 3D and the 3D modeler Autodesk Maya, popular in the television industry.
Beginning programmers, seasoned professionals, and everybody in between should take a look at Python.
Richard Grigonis is an internationally known technology editor and writer. He was executive editor of Technology Management Corporation’s IP Communications Group of magazines from 2006 to 2009. The author of five books on computers and telecom, including the highly influential Computer Telephony Encyclopedia (2000), he was the chief technical editor of Harry Newton's Computer Telephony magazine (later retitled Communications Convergence after its acquisition by Miller Freeman/CMP Media) from its first year of operation in 1994 until 2003. Read more reports from Richard Grigonis — Click Here Now
© 2016 Newsmax. All rights reserved.