in reply to Dirge (Retrograde Amnesia)

"What the Mind may forget, the Hands will remember."

I tried to enumerate all of the languages I have used in a production environment since I started this Game. I came up with ten, before I switched from Big Iron (IBM 370/390/Z-OS) to Unix systems, back in 1995. Since then it seems that I have been learning a new language every six months or so....

I learned early on that the details of syntax and compiler settings and such rapidly got fuzzy. But, the method of thinking about how to solve a problem carries over from one language to another. The syntactic details may vary, but there are general invariants: call them 'programming templates' 'design patterns', 'atoms of logical thought', 'paradigmatic programming', what ever. These general problem solving methods come up again and again. The Syntax may change, but the Code goes on.

Somewhere in my very early days I was exposed to the 'Structured Programming' Ideology (Tom DeMarco, et al; not Dijkstra & Plauger. It was, basically, a commercial implementation of the theoretical concepts). Structured Programming was a technique that had every Program going through an initial design phase coded in pseudo-English. The idea was to get the algorithm down before starting to commit bits to the compiler. This had a couple of interesting side effects -- it makes much easier to communicate with the non-coders (read: 'managers'). The logic is there naked, not swaddled in layers and layers of Language Syntax (Hi There, Java). Secondly, the process of writing everything in pseudo-code means that when you finally get to writing the real code, most of the design bits (the hard parts) have been reviewed, re-hashed, and re-vamped to the point that what is left in the design is very, very solid. You can get into the Coding Grove with out the niggling worrying that you are Coding yourself into a logical corner. All the logical corners have been considered, sorted, and included in the final pseudo-code.

I can think of only one instance during that three year period where I got deep into the code-phase before we discovered design-oops that invalidated more than a dozen lines of code. (It was a Hardware Vendor who suffered a Hurricane driven plant closing; it was going to take them eighteen months to come back on line. We decided to write a software emulation layer to be able to use the alternate vendor's hardware. We we in a time crunch, so we decided to wing-it ('after all, it's just a mechanical translation problem, right?'). There were, shall we say, difficulties....)

Once I have the p-code sketched out and solidified, then I get to the 'Choice of Language' problem. Sometimes this is dictated by the Project -- if 90% of the Project is in Java, guess what you are going to use to code your piece of the puzzle.... Other times the choice is dictated by 'external factors' (read political considerations -- some pointy-haired Executive VP was reading an airline magazine article about 'software best practices' on a flight from Chicago last month and has decreed that all new development will use the 'DotNet' framework. That includes the Unix/Linux platforms as well - no exceptions!).

So now I have the Design and the Language specified, it's time to actually start coding. My work-station has a book-case built around it. On the first shelf, on the left hand side is my collection of 'pocket-guide to XXX'. Some of these are commercially produced, but a lot of them are my notes gathered from various places. (Yes, I have a SAS cheat-sheet there. Also Perl, PHP, BASIC, Lisp, ...) I always have a couple of terminal sessions open as well as my Editor windows so I can test in tandem as I code. When I get one of those incomprehensible 'syntax error near line yy', I reach out with my Left Hand....

I find that change from one language to another is akin to changing dialects of a Common Tongue. I have my design here, written in my English-like lingua-franca. Now I merely need to translate it into this particular dialect of "Programmerese". It usually takes me ten minutes or so to start recalling the language basics and a couple of hours for the full idiomatically correct usage of the Dialect to come back. The Mind may forget....

Note: This is true for me with most Procedural and Object-Oriented languages. Changing the fundamental Paradigm to Functional-Programming, and my head hurts. I have been seriously exposed to LISP and Haskell and their Brethren and Sisteren; I haven't developed the taste for thinking that way. (I Want My; I want My; I Want My Side-Effects! (with apologies to Mark Knopfler).)

----
I Go Back to Sleep, Now.

OGB