I had an epiphany the other day while looking at line 6257 of a 15,983-line UNIX shell script. That line was either author-encrypted (only decipherable by the programmer who wrote it) or the result of a cat walking on someone’s keyboard. Or maybe, just maybe, my programming skills were not up to the task.
Although the chances that a 15,983-line shell script would challenge my programming expertise were less than the odds of collecting on that “unclaimed inheritance” email from the exchequer of IBS (International Bank of Spam), I supposed I could stand a little technical touch-up. After all, my formal training started decades ago on a Burroughs/Univac/Honeywell Abacus System 490 (or maybe it was the BUH AS 491) and renewed technical enlightenment in the halls of higher learning would no doubt expand my knowledge base.
The Good Old Days
My introduction to programming back then began with the Fortran language. I couldn’t remember the exact name of my textbook, so I searched Amazon.com for a clue. It came back with FORTRAN IV with WATFOR and WATFIV and an image of a book with an olive green cover bedecked with six punch cards. A used copy of the book was selling for—and I’m not making this up—$.01. Yup, a single penny.
It’s easier to forget Fortran than punch cards and keypunch machines. Cards were the input media for programs. You entered program statements at a keypunch, for example, by typing P R I N T. The keypunch would transcribe your keystrokes into holes punched on a card with a resounding tat tat tat tat tat. A single line of code fit on one card that wasn’t much thinner than a slim-profile smartphone.
The cards went into a card reader and—if they didn’t jam—the data was read by the computer. Your program and its output came out on a high-speed line printer in a louder, faster hammering of tat-tat-tats. (If you yearn nostalgically for the sounds of keypunches and line printers, there’s a good simulation—including audio effects—by Google60.)
Ah yes, the good old days. Or at least they were good for the manufacturers of cards as I burned through a pallet or two of data center card stock keying P R N T and P R I N T T and countless other permutations before correctly typing P R I N T cards.
Back to School
Those memories of my first programming experiences came to mind while I perused the course catalog of my alma mater, the University of Pittsburgh, for a refresher course. Looking over the computer science courses, I considered what one industry guru said in Today’s Engineer: “Software engineering is the nuts and bolts for the entire future. You need software for everything these days. It’s deeper than deep. I think it’s going to become the new English.”
Perhaps I could find the converse — a course where English was the new software. Say the English, out comes the software.
The Pitt catalog did not have a listing for “Introduction to Computer Programming with English,” so I settled for “Introduction to Computer Programming with Python,” the recommended introduction for computer science majors.
I told my boss that I made arrangements to attend “Introduction to Computer Programming with Python” and that I may even get to pet a Python. He gave me a deadpan glare that spelled “Your sense of humor is pathetic.” (I know how to read my boss!) He added, using vocal chords this time, “Whatever.”
He probably knew (correction: he absolutely knew, after all he’s the boss) that the creator of the Python programming language named it, not after the snake, but after the British television comedy series Monty Python’s Flying Circus because he wanted it to be fun to use. I discovered this historic footnote later. I also learned that Python users are called Pythoneers, which led me to wonder if Ruby users are root-beers, mouse users are mouseketeers, and Basic users are basteers?
The Python Software Foundation chooses to mix its pythons, noting the genesis of the name from Monty while selecting the reptile for its official icon. Maybe the foundation’s art department observed that a rendering of Monty Python’s Flying Circus in the space the size of an icon looked more like an electron microscope view of this season’s flu virus than a troupe of comedians.
Eager to learn the first programming language in my career that is fun to use—I swaggered into the spring 2013 class of Computer Science 8 at the University of Pittsburgh. I joined about 50 other aspiring Pythoneers. Senior Lecturer George Novacky, a 36-year veteran of teaching programming, introduced himself at the podium. He began by dispensing with administrative items including grading, attendance (“The more you skip, the more you slip”), recitations (labs) taught by three teaching assistants, web location for the class syllabus and instructions for downloading Python.
Then he addressed the class with his first question: “How many of you have programming experience?”
About half of the class raised their hands. Novacky later cited this experience as a key difference between today’s students and students of the Fortran era. Students entering college now have often taken programming in high school, and they have an innate ability to work with new technology having honed their skills on smartphones, tablet computers and laptops.
Fun with Python
Novacky then proceeded to demonstrate a rudimentary program in Python on an iMac, displaying the screen image on an overhead projector. He started the Python interpreter within IDLE (Interactive DeveLopment Environment for Python, freely available at python.org). He entered 3**100 to show 3 raised to the 100th power. The 48-digit result displayed instantaneously: 515377520732011331036461129765621272702107522001.
I nearly did a fist pump, realizing how much effort would be required in managing precision and formatting to calculate the result and display it in languages such as Fortran, C++ and Java. I looked around the room for other signs of jubilation and saw my classmates sitting poker-faced, as if this calculation were as routine as 2 + 2.
Next Novacky presented a mini-lesson in output describing the print statement. The print statement is one of the conundrums of programming languages—common to most languages but sufficiently different syntactically to trip you up when you switch from one language to another. Once Novacky typed:
print(, the IDLE editor magically completed the Python syntax displaying:
print(value, ..., sep=' ', end='n', file=sys.stdout, flush=False)
This type of auto-completion has been a feature of programming editors and IDEs (Integrated Development Environments) for the past 15 years or so. I’m now glad to see that the pre-auto-completion-errors-galore days are largely behind us. Prior to the advent of IDEs, the next best thing was involved lifting your arm to bookshelf in a reflex reaction, grasping programming reference book, flipping to dog-eared page 391 and gleaning technical minutiae for print statement. This process worked seamlessly—except on those occasions when the arm grasped thin air because some unidentified coworker borrowed your book.
At this point, my Python programming experience had yet to rise to the threshold of fun in the sense of the fun of riding a roller coaster at the amusement park or the fun of sneaking a BSOD (Blue Screen of Death) screen saver on someone’s Windows computer. In its favor, Python did eliminate some of the drudgery that typifies other programming languages. I was far from saying “Let’s have fun this weekend and write some Python code,” but I could see the CHLOC rate (curses per hundred lines of code) being lower in Python.
On that initial classroom foray into Python land, there was one of those technical mystifiers that one encounters when you spend more than a few minutes at the keyboard of a computer. Part of the IDLE/Python start up messages that scrolled by on Novacky’s monitor included: WARNING The version of Tcl/Tk (8.5.9) in use may be unstable. Visit http://www.python.org/download/mac/tcltk for current information.
I later researched python.org to learn that Python’s IDLE depends on the Tk GUI toolkit, which is not part of Python itself and must be installed separately. Specific versions of Python require specific versions of Tk.
Herein lies a key computing lesson rarely covered in the textbooks: If you choose a career in computing, you will spend many waking hours and just as many half-wake hours upgrading and updating software to achieve a stable system, for which the duration of stability will be measured in a period of time expressed as milliseconds.
The flip side of striving for this stability and mastering computer science is the career itself, something that is far from guaranteed for many college graduates in today’s economy. Novacky’s 50-seat classroom was nearly filled to capacity because many of the students were undoubtedly aware of the job opportunities related to computer science. In an article entitled The Best Jobs of 2013, U.S. News & World Report ranked computer systems analyst, database administrator, software developer and Web developer in the top 10. Computer-related jobs took 7 of the top 25 rankings.
For 2013 graduates, CNN Money predicted that the highest demand for bachelor’s degrees would be finance, followed by computer and information science, accounting, business administration/management and mechanical engineering.
Novacky anecdotally related that many of the Pitt senior computer science majors had job offers in hand before graduation. And a course section was added to his teaching load this semester due to higher than expected registrations.
The career prospects mirror enrollments in computer science programs. In its most recent Computing Degree and Enrollment Trends report, the Computer Research Association said majors in undergraduate computer science programs were up by an “astonishing 29.2 %” for the 2011-12 academic year. This increase is the fifth straight annual enrollment gain.
So if you’re considering going back to school to brush up on your programming skills or launch a computing career, I highly recommend it. You may be enticed by the new programming languages taught at your local college or university. And if you find the course “Introduction to Computer Programming with English,” let me know.
Edward J. Joyce, a software engineering manager at CA Technologies, is looking forward to the winged version of Python for programming the Cloud.