Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Dirge (Retrograde Amnesia)

by biohisham (Priest)
on Oct 23, 2009 at 01:51 UTC ( #802824=perlmeditation: print w/replies, xml ) Need Help??

Yesterday I was caught in a fix, a dreadful situation that I am certain many have come across but my certainty doesn't provide for ways to get out of or alleviate its impact nor doest it tell me of individual ways to see-it-coming and halt it right there, neither. I may sound alarmed, but justification is what follows and a requirement for useful tips and directions is what I seek.

This particularly involves the monks among you who use more than one programming languages in their work. I was introduced to SAS sometime before Perl, I reached a nice level of understanding its different language structures and concepts and used to work my way through the many procedures it had to achieve something purposeful, it was nice and fun. Today I don't know if it is mastery anymore that I thought I possessed, I haven't used SAS, however, for ~4 months. Back to yesterday again, I heard of a new SAS community that holds the sort of interactions the likes of StackOverFlow, I happily joined in, and then tried to answer a simple post, to my consternation, my fingers just couldn't type and my mind stayed blank,and dude(tte) I wasn't caught in the moment and it seems like I forgot the syntax!.

What betook me then was enormous to describe, and in the inside of my mind I have been thinking about this; All the love I have for Perl, every time I check a Monk's node and find that that Monk hasn't been around here for 2 or 5 or 7 years and I'd sadly wonder, where they are and what has become of their Perl programming skills and if I would get to walk down that path ever would I forget the syntax, would it rust with length of unuse, and I feel while I am in the middle of such thoughts that it would be a darn world outside the confines of the Monastery, so I stop thinking and haste back to try to reply to a freshly submitted post or get to contemplate the Monastery.

It is a frustration to not be able to retain information after all the dedication and enthusiasm spent picking it, I don't wanna say I forgot SAS (Retrograde Forgetfulness), but I would wanna know how do you manage to transit between two disparate programming languages and how do you strive to keep abreast without sacrificing one for the other.

Would ye revered monks be caught in such a situation at times?, how would you cope to retain and compartmentalize your programming tools and how would you push the refresh button on a programming language you haven't probably used in a while in response to an immediate stimulus like the one I had yesterday and not fail like I did?

Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.

Replies are listed 'Best First'.
Re: Dirge (Retrograde Amnesia)
by Old_Gray_Bear (Bishop) on Oct 23, 2009 at 18:22 UTC
    "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.


Re: Dirge (Retrograde Amnesia) - Try PLEAC
by clp (Friar) on Oct 24, 2009 at 00:03 UTC
    Don't forget, which can jog your memory by showing example code (used in the Perl Cookbook) implemented in several languages.

    PLEAC - Programming Language Examples Alike Cookbook

    Following the great Perl Cookbook (by Tom Christiansen & Nathan Torkington, published by O'Reilly; you can freely browse an excerpt of the book here) which presents a suite of common programming problems solved in the Perl language, this project aims to implement the solutions in other programming languages.

    If successful, this project may become a primary resource for quick, handy and free reference to solve most common programming problems using various programming languages, and for comparison on ease-of-use and power/efficiency of these languages.

    I didn't see SAS in the list of languages shown, so you have an opportunity to add it to pleac while you refresh your memory about the language. If you publicize it, other SAS programmers may join you & quickly complete it.

Re: Dirge (Retrograde Amnesia)
by Anonymous Monk on Oct 23, 2009 at 02:39 UTC
    If you keep good notes (in version control), refer to them often, and review and condense them, esp before switching languages, when you come back 3 months later, you can refresh your memory in 5 minutes or less.

    Its much more effective if you create the notes yourself and keep them in your pocket, like a touchstone (Hipster PDA,, but for perl I find that reading perlcheat and/or perlintro is sufficient.

      These are nice tips. perlcheat and perlintro are readily accessible right through perldoc, WOW, they are so concise and condensed that things become correlated nicely. Thanks for making me aware of this utility in Perl..

      I'd surely want to get more tips, the PDA is another one-hell-of-a-way, I'd think of building one for myself...

      Thank God, I have made notes around different levels for the other language, I'd go back through them and figure a better organizational approach so I can retain info better. Thing is, compared to Perl, that is such a rigid language and extremely commercial, no provisions for open sourcing or sharing with the same spirit Perl offers hence a reduced interactivity and less enthusiastic resources is what results.

      Hail Perl...

      Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.
Re: Dirge (Retrograde Amnesia)
by gwadej (Chaplain) on Oct 23, 2009 at 14:12 UTC

    An approach I've found useful is to do some of my private, $home projects in languages I'm not using for $work. Much of my Perl knowledge has been gained on such projects because Perl was not the main language at various companies where I've worked.

    Much like any skill, I find that a little practice with the basics helps to keep the whole thing from slipping away. Obviously, some of the advanced stuff becomes rusty, but it does seem to come back when needed.

    G. Wade
Re: Dirge (Retrograde Amnesia)
by holli (Monsignor) on Oct 29, 2009 at 20:28 UTC
    Coming back to a language after a while is one thing. Using two somewhat similar ones together is another.

    I think I can't count how often I wrote stuff like my $data = { foo: 'bar' }; or even var data = { foo=>'bar' }; and then complentated over it for a while when the compiler/browser complained, me not knowing wtf is wrong with it =)


    You can lead your users to water, but alas, you cannot drown them.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://802824]
Approved by GrandFather
Front-paged by Arunbear
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2017-12-18 00:46 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (466 votes). Check out past polls.