I wrote this post mostly to stir some discussion rather than to explain a strong opinion of mine.
A bit of Introduction
Some predictions come true by themselves. Undergraduate students are often told that they will spend a lot of time debugging their own code. Most of them will never become professional programmers, they will just learn the basic tools of the trade to handle laboratory’s devices. The result is: they spend a lot of time debugging their own programs. Not to mention what happens when they pass their codes to some colleagues of theirs, or have to modify these programs after six months.
Do you remember the famous never-ending stream of hexadecimal characters flowing on pc screens in The Matrix? Only highly trained people are able to understand at first glance what’s going on. To point out a red-dressed blonde was a difficult task even to Neo, a (real-)world-class hacker!
In my opinion, the situation is not too different in science. Take for instance the land of High Energy Physics: the largest CERN experiments run millions of line of code, most of them highly engineered and centrally maintained with collaborative tools such as Subversion. With more that 3,500 scientist for each experiment, even the very fact that such massive programs can run is an amazing feat never attempted before in this field.
However, the end of the chain is usually made of end-user C++ analysis programs, often driven by bash and python scripts. Almost 100% of them are command-line based, their parameters are set by often ugly text files, and practically none of them implements multithreading. All of these represent often a lack of efficiency, let alone scalability, and an enormous waste of computing power.
Where does these problems come from? Can they be overcome? Are physicists slackers, maybe they don’t recognize the importance of good programming, or is it something else? I think that in the end it boils down to everyone’s vision of the future. Dose your future look like Alien’s or Star Trek’s?
Dystopic futures in our computers
Alien, The Matrix, Blade Runner, Firefly Serenity
This future is mostly filthy and dim. Technology overtook human control and incredibly we are still struggling with terminals and command line tools. We can travel light years away from home, visit extrasolar planets but our space ships are still nuts and bolts. I won’t be too surprise to discover that the Serenity spaceship runs Slackware Linux. We probably need to recompile the kernel by hand every time the spaceship gets prepared for the next launch towards the Moon.
If your future looks like this, you would be probably lost without the command line (of course, with a black background and green text)
Why do you need to remember tons of commands with obscure names when you could ask your computer to do all the hard work for you with speech or even thought?
Utopic futures in our computers
Star Trek, 2001: A Space Odyssey
As Ray Kurtzweil correctly predicted, technology overtook human control around 2100 A.D. However, things are not always as easy as they could seem at first. With the aid of massive computing power, humans managed to solve most of the health problems that afflicted the XXIth century. Oil is not an issue anymore since the introduction of high-efficiency, nanotech-based solar panels. Mass transportation is based on artificial intelligence and it not required anymore to have a driving license, simply because cars are self-driven and accident rate dropped to almost 0. Now that humanity has been freed from day-by-day issues, everybody can spend most of the day in self-improvement, learning new stuff and – why not? – take a trip to basecamp Moon 1. But are we really safe in the lap of über-computers? Do we really trust what we created and still we don’t understand completely?
Brain freed our hands from walking – Artificial Intelligence freed our hands from typing a keyboard, move a mouse and even write with a pen. It is reasonable to expect that in 100 years AI will be better than us in C++ programming, exa-scale computing would have probably invented a new programming paradigm from scratch. Perhaps humans will design the interfaces and the overall structure of the programs, while the low-level code will be automatically generated by intelligent meta-meta-compilers.
Does your future looks like this one? Have you ever wondered why should one has to press the “start” to shut down a computer? Are you concerned because we live in a 3D world but the desktop has only 2 dimensions? You don’t have to worry, all these issues will be solved in the near future. Brain-machine interfaces will let you fetch any information you need from the internet and download them directly to your brain. When did Rome fell? Who discovered the electron and when? When was a cure to cancer finally found?
In this case, most of your programs are wiki-documented or some other sort of online help, probably even a GUI and for sure they print out understandable error messages rather than “foo bar 123”. You’ll never know where the programs you write end up, so it’s important to make them simple to use, and possibly minimally documented. All param files are XML-based. They even begin with int main and not void main!
Our (most likely) (near) future?
Avatar, Minority Report
The future is always uncertain, and so is the stability of next Windows release. There are probably some issue deeply rooted in human nature we will never get rid of. When cars were first introduced, they basically looked like carriages without horses. On average, humans like change, but only when it comes step by step. So, after many years, we have GUIs and we still have terminals. We have speech dictation, voice recognition, biometric reading but we still need to turn a key to open a door. What I want to say is that in the near future it is very likely that we will be able to send intelligent probes to far-away planets, drill their surfaces looking for some rare earth metal essential for our technology-to-come, and possibly freeze ourselves and go there in person. As 2012, space shuttles’ cockpit still looks like Apollo’s because of continuity. In 2112 it will be a touchscreen made of some sort of gorilla glass, but I bet that its concept will stay almost the same – nowadays, after 100 years, cars still have a wheel and some pedals.
I hope that in 2112 your program will not hung up so often, because there will be no CTRL+ALT+CANC keys to be pressed anymore!