One of the best things about teaching

I’ve been very busy teaching classes recently (The last four weeks have gone Ajax, Spring, Struts 2.0, and XML and Java) so I haven’t had much time to blog.  Every once in a while, however, I try to stop and smell the roses, such as they are.

You want to know one of the best things about teaching training classes?  Think back to when you were in school, and remember the last day of classes.  More specifically, think about the ending of one of the classes where you had to work hard, but wound up doing a good job and being rewarded for it.  Picture that last day, when there are no more assignments, no more exams, no more projects to be done of any kind, just a warm feeling that you did everything that had to be done and you did a good job doing it.

Feels good, doesn’t it?  I get that feeling at the end of every training class. 🙂

I do enjoy the actual classes.  The give-and-take is always great fun.  For me, a big part of my job is technology transfer, telling the current students what’s going on at other clients I’ve seen (without the specific client names, of course), talking about events in the industry, learning how they plan to use the subject I’m teaching in their actual business.  I also enjoy seeing the light bulbs light up over the students’ heads when they “get” a particular concept.

Also, not every class goes well for every student.  Since the students are grading me, rather than the other way around, I hear about it when it doesn’t work.  I really feel every negative evaluation, too.

But there’s nothing like the joy of finishing, knowing that everybody is (basically) happy, there’s nothing else that has to be done, and you did a good job.  I love that feeling.

(That’s also a much more pleasant reward than what my friend Tom once told me, “the worst class in the world is over in a week,” even though he’s right, too.)

MLB playoffs from a TV Networks perspective

When the playoffs began, there was a chance that the championship series would have involved teams from [Note: TV market size in square brackets]

It turned out that the cities actually involved are

Snicker. I imagine the executives at Fox are not the happiest people in the world right now. Since they still plan to inflict Joe Buck and Tim McCarver on a helpless baseball public, I’m glad they’re suffering.

(Note that I’m carefully not gloating about the Yankees loss last night. I know that pain. I’m glad the Yankees are gone, but I know how much it hurts to see a team you live and die for over the long months of a baseball season fall apart in a short series.)

(Although I must say that I will never — NEVER — forgive Johnny Damon.)

OO JavaScript, such as it is

I teach Ajax on a somewhat regular basis, so it’s rather embarrassing to admit I never really understood JavaScript closures. Of course, I thought I did. Now that I’m reading Dave Crane’s Ajax in Practice book, though, I see now what I was missing before.

He has wonderful examples in that book. I love it when he gives me examples that I can just type into a Firebug console in my browser and show everybody.

For example, I think one of the early samples is like:


function getName() {  return this.name; }

var o = new Object();
o.name = "Object";
o.getMyName = getName;

window.name = "Window";

getName();  // returns "Window"
o.getMyName();  // returns "Object"

In other words, the this variable points to the current window if you don’t say anything different, or to the current object if the method is a property of the object.

Then there’s the beauty of the call() function, which allows you to invoke a function in a particular context.


getName.call(o);  // returns "Object"

Sweet. Also, I get it now that there are no real classes in JavaScript. Instead, you have functions that act as constructors only because they have properties in them that get assigned. When you use the word new with one of these functions, you’re essentially creating a new Object and adding properties to it.


function MyClass() {
this.name = name;
}

MyClass.prototype.getName = function() { return this.name; }

var m = new MyClass("Fred");
m.getName();  // returns "Fred"
m.getName.call(window);  // returns "Window"

And the really weird part is that MyClass is just a function, so I could just call it directly without the word new. Also, the MyClass function has a function inside it, which returns another property of whatever the context object is.

Bizarre. As a developer who was raised on Java, it’s a whole different world.

I solemnly promise, however, that now that I’m really becoming a Groovy developer, I will not become one of literalists who claims that Groovy closures aren’t REAL closures. 🙂

Baseball playoffs start (yay!)

I know, I know.  The Rockies – Padres game wasn’t technically in the playoffs.  The stats counted as regular season stats, which meant the batting title was still at risk and Jake Peavy had a chance to win his 20th game (which, of course, didn’t happen).

But still, that was some game.  Some quick observations:

  • I haven’t seen outfield play that bad in years, and I regularly attend AA minor league games.  Whew, that was cover-your-eyes awful.  Coco Crisp would have made every one of those catches with ease.
  • Despite the above, apparently the official scorers have forgotten how to put a check mark in the errors column.  Every bungled outfield play but one was listed as a hit.  No darn wonder errors are a misleading measure of defensive efficiency.  Worse, they contribute to ERA, which is also a mess.
  • I can’t remember who said it (probably Earl Weaver — he said practically everything else), but it’s still true: if you keep changing pitchers, sooner or later you’ll find one who is having a bad day.  Yesterday it was Jorge Julio for the Rockies.  It’s simply amazing the Rockies got away with it.
  • I’d heard about Troy Tulowitski before seeing that game, but I had no idea how good this kid is (worst picture at ESPN I’ve ever seen, btw — see the link above).   As a Red Sox fan, I can say that the Rockies have basically found their own Derek Jeter, except that Troy is a much better fielder.  Wow.
  • Matt Holliday is really good, but his defense contributed to the outfielding nightmare.  I’ll have to check the VORP stats at Baseball Prospectus to see how he really compares to Jimmy Rollins.

Okay, I just checked.  Holliday, 75.0.  Rollins, 66.1.  The real surprise, though, is that Rollins isn’t even the highest VORP on the Phillies.  Chase Utley is at 68.8.  Wow.

  • If anyone needs to know why you shouldn’t slide head first, that last play is Exhibit A.
  • There is no way Holliday touched the plate.  No way.  That means that instead of the game being over, it should have been tied, with two outs and a man on 2nd in the bottom of the 13th.  That means Trevor Hoffman might — just might — have gotten out of the inning.  We could still be playing that game now.
  • It felt really weird to see a game that exciting without having a serious rooting interest.  I kind of liked both teams.  I remember thinking over and over that it was shame either one had to lose.  Still, I’ll be rooting for the Phillies in the division series.
  • I SO enjoyed the announcers last night.  These guys (Don Orsillo, who I’ve listened to for years, and the other guy whose name I forget) were excellent.  Knowing that sooner or later I’m going to have Tim McCarver and Joe Buck inflicted on me made this brief respite all the sweeter.

Wednesday is going to be tough.  I’m teaching an online Ajax class and we have students on the west coast, so I’m committed until at least 5:30 pm and maybe 6 pm.  The Phillies – Rockies game starts at 3, the Sox are on at 6:30, and the Cubs start at 10 pm.  And I still have to teach Thursday morning.
Of course, I always have a tough time during the MLB playoffs.  I just hope the Indians beat the Yankees quickly and the Sox sweep the Angels.  Then we’ll see.

%d bloggers like this: