April 20, 2024

The Problem with Programming Languages

Recently I’ve been taking the very good CodeCademy course on the Python programming language. I’m doing this for several reasons. A number of my colleagues use Python, and I’ve been using their code and libraries. Knowing what I’m doing might be a good idea. Also, Python seems to be more of the language of choice these days instead of my perennial favorite, Perl. Plus, Python struck me as a clean, sparse language where you can do a lot with fewer syntax quirks getting in the way.

But doing so has set me to thinking about learning a new programming language and the things that one must forget from previous ones. I first learned computer programming in the early 1980s with BASIC. From there, I learned some FORTRAN and Pascal. Perl became my go-to language for writing web CGI programs. Also for data wrangling.

From BASIC I learned the very bad strategy of using GOTO statements to jump around in my code. It took me years to shake the bad habits that such an idea engendered. Pascal helped me to think in terms of modules or subroutines which I of course took with me when learning Perl.

But in making the transition from Perl to Python I’ve found a few “gotchas” that come from hard-to-break habits. For example, typing. With Perl, you can simply treat a string like an integer and it just goes along and treats it like an integer. With Python, you first need to change it from a string to an integer (e.g., “int(x)”).

Hard-to-break habits, outmoded ways of thinking about the solution to a problem, the requirement to learn a new syntax — all of these and more can make it difficult to transition to a new language.

Which brings me to the essential problem with programming languages — there are too damn many of them, and there are more all the time. If I had to give someone advice at this point about coding, I would say learn as few languages as you can get by with, and learn them only well enough to do the task at hand. Because otherwise, you’ll just be trying to unlearn it all someday.

Share
Roy Tennant About Roy Tennant

Roy Tennant is a Senior Program Officer for OCLC Research. He is the owner of the Web4Lib and XML4Lib electronic discussions, and the creator and editor of Current Cites, a current awareness newsletter published every month since 1990. His books include "Technology in Libraries: Essays in Honor of Anne Grodzins Lipow" (2008), "Managing the Digital Library" (2004), "XML in Libraries" (2002), "Practical HTML: A Self-Paced Tutorial" (1996), and "Crossing the Internet Threshold: An Instructional Handbook" (1993). Roy wrote a monthly column on digital libraries for Library Journal for a decade and has written numerous articles in other professional journals. In 2003, he received the American Library Association's LITA/Library Hi Tech Award for Excellence in Communication for Continuing Education. Follow him on Twitter @rtennant.

Comments

  1. But learn one of them well enough to get that feeling, if only for a moment, of being The Chosen One before whom all the files and records and pixels and network packages bow down.

    • I think I’ve wrestled them to the floor a bunch of times, but I don’t recall any of them bowing. But maybe that’s just me. ;-)