Monday, March 17, 2008

Okay, so I Lied

Once upon a recent time, I said my next IT purchase would be a shotgun.

In fact, my next was more IT Stuff: a box of sundry electronic guts and a case to surround them. The man child did all the work, with just a bit of coaching from the side lines.

So far, XP is far superior to that vista Vista. The thing worked perfectly right out of the boxes.

I offloaded the original source of all evil as we know it on a local MD's office, at a nearly Bear-Sterns fire sale price.

The man-child and I have already started on our next task. Per AOG's recommendation, m-c and I are learning Perl. Despite being only 13, m-c has an amazingly long attention span for the gory details of a programming language; e.g., tokenizing, and internal representation of various data types.

Now, if I could just get him that interested in baseball ...


Blogger Susan's Husband said...

When are you going to enable OpenID, so I can post as AOG?

Be sure to encourage experimentation. That is, if M-C wonders "what does this do?", he should just write some code and then run it in the Komodo debugger, from which he can observe the behavior. That's how I learned Perl - read some manual, write some code, see what happens.

And don't forget to look at Perl/TK.

March 18, 2008 8:06 AM  
Blogger Hey Skipper said...

OpenID? Huh? Wot?

Be sure to encourage experimentation.

That's how I have always done it.

In fact, we had to from the git-go, because the Perl book is written as if you are in Unix. So, I had to show M-C how to open a DOS session, how to navigate in DOS, and how to execute DOS commands.

BTW -- thanks for mentioning Komodo. I had no idea what Perl uses for a debugging environment, and the Perl book (so far) hasn't mentioned the word.

We also got Perl/TK, but the book for that says it presumes the user already knows Perl.

March 18, 2008 8:34 AM  
Blogger Susan's Husband said...

All the other kids are doing it (OpenID).

You really want to work in Komodo, which is a very nice IDE for Perl (and other languages). You can easily step through the code, line by line, and look at all the variables, and even change them. It also does semi real time parsing and highlights syntax errors before you even try to run the code.

March 18, 2008 11:17 AM  
Blogger Harry Eagar said...

Well, now you're back, Skipper, I want to ask you about the story in Hawaii where an airliner flew 100 miles past its airport, while the controllers spent 20 minutes trying to raise the pilots.

It looks as if they were asleep.

(The airport they overflew is Hilo, not another scrap of land for 800 miles in that direction.)

One of the Honolulu TV stations proposes that overtired pilots fall asleep at the wheel a lot.

Your thoughts?

March 18, 2008 12:36 PM  
Blogger joe shropshire said...

Tokenization? Internal representation? Let the boy slap some code. my $perl_training =~ /fun/ || die "Dad, this is borrrriiing...\n"; But I am looking forward to you teaching him about this.

March 18, 2008 6:57 PM  
Blogger Hey Skipper said...


I don't have the foggiest what OpenID is. Although, I suppose I could google it and find out.

Tomorrow's task is to load Perl and (now that I know about it) Komodo onto my MacBook.


I'm just following the script in Learning Perl. I keep the sessions to no longer than an hour. Near as I can tell, he is an AOG clone -- he loves the stuff and soaks it right up.


I haven't heard about this particular incident. I have done the leg from Memphis to HNL, with a 2:30 am takeoff. There is no way to avoid being brutally tired somewhere over the next 9-ish hours. That sort of thing just comes with the territory. There is no job I know of that plays greater havoc with one's circadian rhythm than flying long-range airplanes. And there is really no way around it, either.

The only cure for that kind of fatigue is a combat nap during high-altitude cruise, making sure the other guy is good to go for a half-hour or so. The point is to get the batteries recharged enough to cope with the arrival and landing.

(short pause, whilst I avail myself of google magic)

Okay. I have no fricken idea whatsoever how a couple guys could nod off during a 40 minute flight. Considering the very strict rules regarding duty day limits, crew rest, etc, my best guess is these guys were too busy partying at the layover, and not enough time doing fatigue management.

March 19, 2008 2:31 AM  
Blogger Hey Skipper said...


BTW, the search string [hawaii hilo pilots asleep] got 149,000 hits.

March 19, 2008 2:34 AM  
Blogger Duck said...

Perl eh? I thought the language du jour was PHP?

Skipper, not to pry into personal family affairs, but in the photo of M-C it looks like he has two bald spots on his scalp, a sign of Alopecia Areata. I know of this condition, as I developed it about 8 years ago. Some cortisone injections in my scalp helped ward off the bald spots there, so I've retained a full head of hair, but my beard is a total writeoff, and my eyebrows are a mere remnant.

March 21, 2008 1:22 AM  
Blogger Susan's Husband said...

Perl, PHP, Javascript -- they're all basically the same, just different syntactic sugar. If you learn any of them, you can pick up the others very quickly. Perl is nicer for non-web page applications.

March 21, 2008 5:54 AM  
Blogger Ali said...

How easy is it to pick up SAS? I know quite a bit of C++ and am thinking of learning a new programming language to give my brain a respite from being fried by tax.

March 21, 2008 7:57 AM  
Blogger lonbud said...

Can I recommend Cocoa Touch for the M-C?

Apple owns the future of computing.

March 21, 2008 10:25 AM  
Blogger Susan's Husband said...

I have never heard of SAS. I do most of my coding in C++ these days.

March 21, 2008 10:36 AM  
Blogger Hey Skipper said...


... but in the photo of M-C it looks like he has two bald spots ...

Thankfully, it is nothing like Alopecia Areata: not bald, blonde. Just like (as in same two spots, same places) his mother's father. The girls his age are starting to find them very cute. Which worries his mother a great deal.


I have never heard of Cocoa Touch -- perhaps that will be language two for the m-c.

Interestingly, when I decided to download Perl onto my MacBook, I discovered it comes pre-installed, along with a great deal of documentation.


Great suggestion -- Perl is high-level enough to avoid most of the problems of comprehending code, while containing a fair number of syntactical constructs for languages such as C++.

I introduced the m-c to loop structures and functions yesterday, by writing a program to list the ASCII characters from 0 - 127. Next step is to write the result to a text file, then retrieve it.

April 03, 2008 9:56 AM  
Blogger Susan's Husband said...

Loops? What do you need loops for?

print map { "$_ = " . chr($_) . "\n" } 1..127;

And don't forget to have fun with closures!

April 03, 2008 1:10 PM  
Blogger Hey Skipper said...


What do I need loops for?

Two reasons, the first far more fundamental.

At any given instant, I know Perl only a little better than the m-c.

Second, it is easier to explain what is going on in a loop with less parsimonious notation. Also, it is easier to stick statements in to see what will happen, then since things are less wrapped up, demonstrate debugging techniques.

However, like I say, ignorance is paramount.

BTW, when we finished writing loop to produce the ASCII codes and characters on screen, I cut and paste your version for comparison.

April 09, 2008 5:36 PM  
Blogger Susan's Husband said...

Heh, I was just needling you.

But, seriously, a rule I have taken to heart is "you won't have bugs in code you don't write". Avoiding loop control structures means you can't get them wrong (e.g., off by one, forget the increment, double increment, etc.). In real life, I use loops as the manual backup, when the automatics don't work. If I can avoid a loop control structure, I do.

It's probably best to teach loops first for pedagogical purposes, but once MC is comfortable with them, move on to the more functional style.

April 11, 2008 10:04 AM  

Post a Comment

<< Home