Stuff I’ve learned recently…

I teach this stuff. I didn’t say I could do it.

Live blogging World Series Game 4: Yankees/Phillies

with one comment

11:48 pm: It’s over.  The Yankees win 7-4, as the Phillies hit three balls to Mark Teixeira, the best fielder the Yankees have.

Cliff Lee now has to save the Phillies season.  Even if he does, though, it’s hard to imagine the Phillies beating the Yankees three straight times.  That just doesn’t happen in the playoffs.

Except in 2004, of course. :)

Johnny Damon made himself a ton of money tonight.  His arm is dead, his range is lousy and getting worse, and his hitting is fading badly.  But he turned a single into essentially a triple at a critical time in the World Series, so somebody will give him a big contract this off season.  I only pray it’s not the Sox.

As I’ve said before, I root for several ex-Sox: Nomar, Pedro, even Manny.  But I will never, ever forgive Johnny Damon.

11:44 pm: The irony is that assuming Rivera can hold a 3-run lead (and we’ll have major news if not), then the win actually goes to Joba, who gave up the tying run.  Yeah, that’s fair.

11:41 pm: Posada singles home two runs and is tagged out trying to stretch it into a double.  But now it’s 7-4 Yankees.  The game, and very probably the series, is over.

11:38 pm: A-Rod doubles, as he has all this post-season.  It’s now 5-4 Yankees.

11:37 pm: And he hits Teixeira!  Now we have runners on the corners with two outs.  We now have A-Rod up.

The funny part is, if A-Rod fails here, he’s a choker, but they’ll conveniently forget that Jeter just struck out himself.

11:35 pm: Damon stole 2nd, then saw that nobody was covering 3rd (because of the defensive shift for Tex) and just about walked there.  Now a wild pitch is a disaster.  Lidge has to be careful with his breaking ball.

11:33 pm: Lidge goes full count against Damon, too.  Damon fouls off 2 pitches and then singles.  Here comes Teixeira, which is not good.

11:29 pm: The guys at Baseball Prospectus are incensed that Girardi let his team blow a 1-run lead without getting either Hughes or Rivera into the game.  They hate the way so many teams manage to the save statistic.

Meanwhile, Lidge throws the same low strike that’s worked all game, but doesn’t get it against Jeter.  Instead the count goes full.  (And some people say baseball is boring.  As Joe Posnanski says, it is boring, and then it’s not.  That’s what makes it great.)

Lidge gets the K on Jeter.  Wow.

11:25 pm: Joe Buck is doing his best to reverse jinx Lidge by reciting all the bad statistics from this year (11 blown saves, etc).  We’ll see if it works.

It works on Matsui anyway, who pops to short.

11:23 pm: Here comes Brad Lidge.  As a Sox fan, I was very nervous this year every time Papelbon came in, and the playoffs showed I was right.  That is nothing, NOTHING, compared to what the Phillies fans are feeling right now.

11:21 pm: End of the 8th.  Talk about your true outcomes.  Joba goes K, K, HR, K.

(For those who don’t know, the “three true outcomes” are K, HR, and BB.  For each of them, the fielders might as well not have bothered to come out of the dugout.)

11:19 pm: Werth K’s on a high, inside pitch.  All fastballs from Joba.  Then Ibanez K’s too.

And just when it looked like Joba was going to strike out the side, Pedro Feliz takes a 3-2 fastball out of the park.  It’s tied again, 4-4.

11:13 pm: It’s Joba time!  Now anything can happen, from three straight K’s to three straight HR’s.

11:10 pm: Middle of the 8th. Ryan Madson takes over for the Phillies, against A-Rod, Posada, and Cano.

He K’s A-Rod without ever pitching him inside (where he’s supposed to be vulnerable).  He walks Posada, and then Cano drops a total bloop down the LF line between three fielders.  Bad, bad luck.

Swisher K’s on a very nice pitch that curved into the strike zone, and got Gardner to pop up to end the inning.

It’s Werth plus the bottom of the order in the 8th, hoping to score before Rivera comes in.

10:57 pm: Ryan Howard takes a strike on a off-speed ball, then a strike on a fastball strike.  Howard finally pops up yet another outside slider, and it’s inning over.  At the end of 7 innings, it’s 4-3 Yankees.

Now we get to see what the middle of the Yankees line up can do against the Phillies relievers.

10:54 pm: Utley crushes a ball into the stands and it’s a one-run game.  Yankees 4-3.  I was going to say that Girardi will probably let CC face Howard, since he still hasn’t done anything with the slider, but no, he’s gone.  That last pitch was a hanger, though, so that may have had something to do with it.

Now let’s see what Howard (and maybe Werth) can do with Damaso Marte.

10:50 pm: This has GOT to be the inning for the Phillies.  CC is almost done and the top of the lineup is up.

Two hard hit balls right at fielders (one to 3B, one to RF) and it’s two outs.  It’s time for Utley/Howard/Werth to win it.  Or not.

10:43 pm: Look, I read all the Sherlock Holmes stories as a kid, and again in grad school when I was trying to avoid my thesis.  I never remember him diving out of a window into the Thames.

10:41 pm: 7th inning stretch time.  CC bats to start the top of the 7th, so he’s definitely staying in, even after 95 pitches.  I guess Girardi really doesn’t trust his set-up men.  Makes you wonder, though, how easy it will be for CC to come back for a game 7.

Chan Ho Park comes in for the Phillies.

Jonah Keri points out that though Blanton looked good, he still gave up 4 runs in 6 innings.  He definitely thinks Lee should have pitched instead.

10:33 pm: End of the 6th.  Feliz moves to 2nd on Ruiz’s ground out, bringing in our first pitch hitter, Ben Francisco.  He flies out quietly to CF on the first pitch.  CC had now given up only 2 runs in 6 innings, and Rivera will pitch the 9th.  CC will no doubt start the 7th, too.  The window of opportunity is closing, especially if the Phillies left-handed batters can’t figure out how to lay off that low, outside slider.

10:30 pm: Gardner replaces Cabrera in CF when Cabrera pulls up lame running to 1B.  Better defense, but lousy hitter.  If the Phils don’t start hitting, though, it’s not going to matter.

Feliz gets on with one out, ensuring that the pitcher’s spot will indeed come up this inning.

10:25 pm: Middle of the 6th.  This time Howard really did catch the ball in the air (I think), but he flipped to Blanton anyway for the out.  McCarver is sure it short-hopped, but I thought it looked the other way.  Turns out it didn’t matter.

Swisher swung hard at ball 4, but Blanton walks him anyway.  Blanton gets Cabrera, though, to end the inning.

He’s up to 93 pitches, and the pitcher’s spot is due up 4th in the bottom of the 6th.  If the spot comes up, he should be done.  If not, well, they sent Pedro out for the 7th when they shouldn’t have…

At last, the Cialis commercials have started.  Bummer.

10:13 pm: End of the 5th, still 4-2 Yankees.  I’d never heard of a “quick pitch” before this series, but now it’s happening a lot.  Sabathia got Utley on one, apparently, pitching before he was ready.  Now it’s Howard’s turn to do something spectacular, but he pops up instead.  Sigh.

McCarver said that Jeter came out to Sabathia to make sure he wasn’t changing signs without letting Jeter know, but that’s not at all what it looked like he was saying.

Werth just missed crushing a pitch for another HR.  He strikes out instead.

Sabathia’s pitch count is now well into the 80’s.  He isn’t showing any signs of fatigue that I can see.  He’ll definitely go one more inning.  If it’s quick, maybe two.

10:04 pm: Maybe the problem is that I think of the strike zone as an absolute, when in reality it’s a probability distribution.  The two inches off the right side of the plate are a strike about 75% of the time.

(Keeping in mind that 80% of all statistics are made up on the spot, of course.)

10:03 pm: In case you’re wondering, the game moves a LOT faster when you’re live blogging it.

After 76 pitches, it’s now two on and nobody out for Sabathia.  This is a big opportunity for the Phils.  (I know — duh.  I plead too much exposure to Buck/McCarver.)

9:55 pm: Middle of 5th.  A-Rod hits a soft fly to end the inning.  An inside pitch very nearly hit him, though he didn’t try very hard to get out of the way.  At least we’re spared that controversy.

The Avatar movie is being hyped relentlessly.  I remember hearing that the initial trailer was very badly received.

Here’s the thing, though.  The greatest trailer I ever saw, and it was truly a work of art, was for Star Wars I: The Phantom Menace.  That just about sums it up.

9:54 pm: Blanton gets Tex to fly out, leading to A-Rod with two men on and two out.  If Blanton doesn’t get him, it probably doesn’t matter what the pitch count is.

9:51 pm: McCarver: “Lead-off walks always score.”  I never would have guessed.

That’s it — the Phillies outfielders are definitely playing too deep.  Damon bloops a single to make it 4-2 Yankees.

9:49 pm: Utley tries to make a spectacular flip to 2nd on a grounder by Cabrera but can’t do it.  Now Yankees have 1st and 2nd with nobody out, but Sabathia up.  Sabathia can’t get the bunt down, fouling the bunt with two strikes and bringing up Jeter.

Tweeps are understandably upset that Jeter won the Hank Aaron award ahead of Joe Mauer, but he singles here to make it 3-2 Yankees.

9:44 pm: Ugh. Swisher walks on 4 pitches, though two of them were arguable strikes.  The zone is definitely low, but I can’t tell if it’s outside or not any more.

9:42 pm: I don’t understand why the Yankees didn’t tag Howard anyway, if they thought he missed the plate.  Sure, Posada threw to 2nd to try to stop the advance, but they could have thrown back, right?  After Posada threw would have been a good time for Howard to go back and touch the plate, too.

9:40 pm: End of the 4th, tied 2-2. McCarver mentions that Feliz is slumping against left-handed pitching, so naturally he lines the next pitch for a single.  Howard challenges Damon’s arm (of course) and beats the throw, assuming he ever touched the plate, which he probably didn’t.  Feliz takes 2nd on the throw.

Then an intentional walk, but it’s to get to the pitcher so maybe that’s okay.  Blanton obliges by striking out on 3 pitches.

Howard finally gets a hit.  Sabathia tried yet another slider, but this one got a lot of the plate.  Then he actually stole 2nd when Posada, clearly surprised, couldn’t get the ball out of his glove.  So the lead-off hitter is on 2nd with nobody out.

In the manager interview, Girardi says C.C. could go 100 to 120 pitches.  But the real question is whether he’ll be able to control them as he tires.  We’re up to 66 pitches after 4 innings.

9:26 pm: Middle of 4th.  Blanton looks great and has only thrown 44 pitches.

McCarver says Posada couldn’t argue his strike three call because he has to get behind the plate and hope for consistency, but maybe he didn’t argue because it was a strike.

A-Rod flies out, to a big cheer from the crowd.  Apparently he annoys Phillies fans as much as Sox fans.

So we have a commercial based on Wayne’s World (at least 20 years old) and one based on Lassie (double that or more).  Either the advertising people are old, or they think the target audience is old.  I guess that figures, since the kids can’t make it to the end of the game. At least the Cialis commercials haven’t started yet.

9:18 pm: End of 3rd.  Joe Buck reminds us that lead-off hitters are important.  It’s that kind of insight and analysis that makes a World Series announcer.

Teixeira makes another good defensive play at 1B.  After watching the travesty the Yankees got from their first basemen last year, it’s been remarkable watching Tex this year.  Unfortunately.

This inning the high pitches were strikes.  Maybe the ump has a dinner date tonight.

1-2-3 inning for Sabathia, who has thrown 46 pitches after 3.

9:10 pm: End of 2 1/2.  Great play by Feliz on the Jeter grounder to 3rd. I love the fact that they said yesterday that Pedro Feliz has the most accurate arm of any 3B in the league.  That’s a great asset to have.

Another ball call on a strike, followed by a strike call on a ball.  Make up call or just incompetence?  You decide.  Actually, it looks like this ump has a very low strike zone that extends about 2 inches outside, too.

9:00 pm: End of 2nd. Jonah Keri points out that C.C. is getting 15 mph separation between his fastball and his slider.  That’s a lot.  We’ll see if he can maintain it as the innings add up.  The Phillies really need to be patient to let the pitch count climb.

The game is moving right along.  I expect it to really drag later, especially when the Yankees’ manager (Girardi) starts shuffling relievers.  The key for the Phillies is to get C.C. out of there early enough that they can crush the bullpen before Rivera comes in.  The opposite is true, too, except that the Yankees are probably salivating at the prospect of seeing Brad Lidge in a close game.

8:55 pm: Middle of the 2nd. Blanton gets the outs despite the fact the Yankees are making solid contact.  The hard hits are going to right, and easy flies are going to left.  Again, small sample size, but we’ll see if it holds.

You also knew the FOX dweebs would find a way to promote Brett Favre again.  I expect to hear about him at least a dozen more times before the night is out.

8:47 pm: That outside slider is still getting Phillies out.  2-1 Yankees at the end of 1.

The pitch count is adding up for Sabathia.  Of course, Pettitte had over 50 pitches after two innings yesterday, and we know how that worked out.

The idiot in the new Windows 7 commercial makes me want to buy a Mac.  That’s not good.

8:45 pm: Ouch.  Another K for Howard.  That was a really, really good pitch, though.  The ump’s strike zone is low and outside, and so was that pitch.  No way he could take it.

If they actually intentionally walk Werth, Joe Posnanski’s head will explode.  McCarver thinks they only reason they don’t do it is because it’s still the first inning.  The real reason not to do it is that it’s stupid.  Intentional walks are almost always a bad idea, and this would be no exception.

8:42 pm: Utley doubles home Victorino, and it’s 2-1 Yankees, bringing up Ryan Howard.  TV lives on small sample sizes (tiny in this case), so they keep bringing up the possibility of another K.

Posada is jumping around to catch Sabathia, implying C.C. is having trouble finding his targets.  We’ll see if he settles down.  Maybe both managers were wrong — Lee should be in there, and C.C. shouldn’t. :)

8:31 pm: End of the top of the first, 2-0 Yankees.  I liked the way the throw from left field hit Damon in the head.

Baseball is such a game of inches.  Utley made a great grab of that lead-off hit by Jeter, but slipped when he tried to get up to throw him out.  If he makes that out, it might have been a different inning.

8:30 pm: “The opening pitch was brought to you by ….”  The stupid promotions begin.

A-Rod plunked again.  McCarver thinks it was an accident, but it’s the third time in two days.  The umps warned both sides, so no obvious pay back.  We’ll see what the Yankees do anyway.  They certainly can’t afford to have Sabathia thrown out.  Advantage Phillies, other than the fact A-Rod is now on base.

8:20 pm: Tim McCarver thinks the Phillies should have pitched Cliff Lee on short rest, so not doing so must be the right move.

Okay, just because he says it doesn’t mean it’s automatically wrong.  But it’s awfully likely to be wrong.

The people I follow are split on the decision.  Lee has never gone on short rest before and this is a big stage to do it on, but the Phil’s really can’t afford to lose this game.  Sabathia will be going on three day’s rest.  We’ll see how that works out, too.  If the Phillies don’t hit, it won’t matter much.

(By the way, don’t expect me to keep updating this frequently.  I’ll settle into more of a rhythm as time goes on.)

Also, if you want to contact me, I’m available at ken.kousen@kousenit.com .

8:15 pm: In case you’re interested, I’m in downtown Parkersburg, WV this week, teaching an Intro Java class.  I haven’t taught Intro Java in years, but the class was available when I was still in my, “there’s a recession going on so say yes to everything” mode.  It should be an interesting experience, though.  I plan to get a fair amount of work done on my book (“Making Java Groovy,” coming soon from O’Reilly) this week as well.

8:05 pm: Isn’t waving a white towel supposed to mean you surrender?  That bothers me.  Maybe I’m just being a curmudgeon.

Another horrible thing about FOX’s coverage of baseball is the way they desperately try to find sponsors for everything.  This whole “introduce the game and hype Avatar at the same time” thing is truly annoying, and they’re just getting started.

8:00 pm: Jonah Keri’s live blog of game 4 can be found at http://blogs.wsj.com/dailyfix/2009/11/01/world-series-diary-yankees-at-phillies-2/ .

7:50 pm: In general, MLB announcers are the best announcers in any sport.  They’re clever, know the game, and are used to telling stories when they have time to fill.  I’ve been very fortunate that the local Red Sox announcers are particularly good.

NBA announcers are usually good as well.  I don’t watch as much basketball, at least not until the playoffs, because I get very frustrated by my inability to tell what a foul is anymore.  Still, Hubie Brown is great, and he’s not alone.

College basketball announcers tend to be solid, once you get past the rah-rah ones (and mute Dick Vitale).

The NFL has a handful of good announcers, like Troy Aikman and Chris Collinsworth, and a lot of really bad ones.   The transition from baseball season to football season is always such a drop in announcer quality, but so be it.

College football announcers should never be allowed near a microphone, with the possible exception of Bob Griese.  They are simply horrible, living off one cliche after another, most of which are just wrong.

And yet, with all the great baseball announcers out there, once we hit the World Series we’re saddled with the travesty that is Joe Buck and Tim McCarver.  I just can’t understand how either got the job, and I really can’t imagine how they keep it.  Blech.

Most of this night I’ll watch with the sound muted, but I’ll be forced to unmute occasionally.  That’ll no doubt generate more posts here.

7:30 pm: Two factors have increased my enjoyment of the World Series this year.  First, two of my favorite baseball writers, Jonah Keri and Joe Posnanski, are “live blogging” each game, though I really only follow Jonah Keri’s.  Second, Twitter has really broken through to the mainstream.

That deserves it’s own paragraph.  I joined Twitter (@kenkousen) a long time ago, but didn’t do anything with it for the longest time.  Then, to my surprise, I discovered that almost the entire Groovy and Grails core teams were there, and that they tweeted all the cool things they were doing on a regular basis.  I suddenly had a community to follow, and that made all the difference.

As Twitter grew and grew, I slowly added people I enjoyed following.  By now there are several baseball people I like there, like both the above mentioned guys and lots of others (@JPosnanski, @robneyer, @keithlaw, @joe_sheehan, and @jonahkeri).  They’re so much better than listening to the inanities of Joe Buck and Tim McCarver on FOX, who should never, ever be allowed to broadcast a baseball game.  They’re a complete travesty.  Thank goodness I now have an alternative!

A note on how I’m going to handle the “live” aspect of this blog.  I’m going to continually edit this post, but I’ll actually go through the motion of posting it, in the wildly unlikely event that anybody wants to follow me on it.  We’ll see how that works out.

Written by Ken Kousen

November 1, 2009 at 8:47 pm

Posted in Baseball

My approach to academic teaching

leave a comment »

I recently read a fascinating post by Joel Spolsky entitled “Capstone projects and time management”.  It’s highly opinionated, as usual, but makes several interesting points about teaching computer science in academia.

He basically claims that academic computer science doesn’t teach you to use modern tools, or do version control, bug tracking, teamwork, planning, etc., etc., etc.  He repeats his frequent assertion that the academic world is almost completely divorced from the real world of software development.

I imagine he’ll get a ton of responses to his post, which is fine.  Somebody needs to whack the beehive every now and again, and I’m glad this time it won’t be me.

(I’ve been bumping into beehives lately, which is unfortunate.  I like causing trouble, but I hate getting into trouble, and I’m doing way to much of the latter.  Maybe it’s my premature entry into curmudgeon-hood.  Ginger thinks it’s way too early for me to be turning into such a grumpy old man.  But, you kids, get off my lawn!)

At any rate, most people who follow my blog are aware that my regular job is teaching software development training courses.  Roughly once a year, though, I get to play at being a professor at Rensselaer Polytechnic Institute in the Education for Working Professionals program in Hartford, CT.  That’s formerly Rensselaer at Hartford, formerly the Hartford Graduate Center.  In the late ’90’s I got my MS in CS there, at night, while I was transitioning from my career as a research scientist into my current business.

I teach a class called “Developing Enterprise Applications”*

*So all of our programs work on the library computer on a starship (rimshot).

The basic idea is that I try to show the students the current state-of-the-art in software development, based on my experiences.  Since I teach a lot, I can travel to 20 to 40 different companies a year.  That gives me a decent sense of what’s going on around me, along with blogs, podcasts, twitter feeds, and participating in the Groovy and Grails open source projects.

I’ve taught my Rensselaer class about half a dozen times so far, and it’s been completely different each time.  Most recently I taught it last spring (2009).  We talked about Spring and Hibernate, used a Subversion server to check in code (actually a Google code project, but that’s the same thing), ran lots of JUnit tests, added Ajax capabilities with prototype and script.aculo.us, and briefly went over, of course, Groovy and Grails.  I write code during class which the students are free to use, and I keep notes on Google Docs, which I share with them.

Here’s the cool part, though.  There are no assignments, no exams, and no homework of any kind, with one exception.  At the end of the course, the students have to present an application they’ve written to the rest of the group.

The choice of project is completely up to the individual student.  I do give them a list of requirements, which are negotiable until about half-way through the semester.  Here’s a portion of this years’ list:

  • Use a framework (Struts, Spring MVC, JSF, Grails, RoR, or other)
  • Create an ORM layer (Hibernate, JPA, roll-your-own)
  • Test as much as possible (unit, integration, functional)
  • Ajax capabilities are a plus
  • Do something with web services (REST or SOAP; at least consume, generate if possible)
  • View templates are optional but preferred (Velocity, Freemarker, Sitemesh, whatever)

I’m quite flexible on the actual implementations, as long as the student clearly learned something and the implementation has some value.  Students can write in Java (most of my demos are in Java, so that tends to be a favorite), or .Net, or anything else they prefer, as long as they try to fulfill the requirements above.

My favorite requirement, however, is the Design Document.  This is very important to me because I want the students to tell me what worked, what didn’t, what they liked, and what they didn’t.  I want this to be a low-pressure opportunity to experiment, and if they’re truly experimenting, then not everything will succeed.  I want to know what they tried, even if it failed.

I do ask that one use case has to work.  I’m fine with experimenting, but there’s nothing like working code to motivate you.  Students (like most developers) tend to way overestimate how much they’ll actually finish, though, so I only ask for a single case to function correctly.

Regarding teamwork, I allow them to work in groups of one or two only.  My experience has been that groups of three or larger don’t finish in time, or one student winds up doing too much of the work.  I like the idea of doing a team project, but I haven’t figured out a good way to manage it yet.  Two person teams tend to work, both in scheduling and production.  Most students prefer to work by themselves.  I’m fine either way.

During the last class, each student (or group) hooks up their laptop to the projector, demonstrates the application, and then walks through the code.  I bring the donuts and coffee, and we all watch together and ask questions.

Then I give out the A’s.  If you clearly tried something ambitious, and you clearly learned something, and you fulfilled the deliverables above, then why not?  I only give out A’s and F’s, and the latter only happens if a student clearly left everything until the last minute, never came to class, and then tried to snow me with a rushed project.  My rule of thumb is that if I could do your entire project in a couple hours, you didn’t do enough*.  I get a student like that about once every other year.

*Of course, I have to pretend I don’t know Grails when I say that…

I find this a very easy, successful way to teach, and the students seem to like it too.

Written by Ken Kousen

October 27, 2009 at 12:31 am

Posted in Teaching

SpringOne 2GX final thoughts

with 4 comments

I wound up too busy to maintain my daily reports, but here are a couple of items I want to highlight as important take-aways from SpringOne 2GX. Rather than just recap sessions or dole out marketing-type praise, I’m going to focus on some things I learned that I didn’t necessarily expect.

  1. A lot of people who advocate Scala or Clojure over Groovy emphasize their scalability and features like immutable objects. Groovy’s @Immutable annotation takes care of the latter, and the gpars project handles the rest. You can use @Immutable right away. The gpars project is still pretty early in its lifecycle, but it’s going to be HUGE.
  2. By the way, despite the fact it looks like it’s pronounced “Gee-Pars” (and Paul King kept calling it that), I love the way Scott Davis kept referring to it as “jeepers:)
  3. Twitter has reached “essential” status at conferences. This is the first conference I attended where I would have missed half of what was going on if I hadn’t been using my Twitter client the whole time (I use twhirl, btw, but I’m open to other possibilities). Most of the presenters (@glaforge, @graemerocher, @paulk_asert, @daveklein, @jeffscottbrown, @scottdavis99, @aalmiray, and several others that would come to mind if I thought harder about it) were continually tweeting good info. As a company, @ManningBooks did an excellent job, especially with their #hideandtweet game.
  4. As a totally unexpected (to me) underlying theme, the rise of non-relational databases is striking. Apparently, the major cloud providers (Google AppEngine, Amazon SimpleDB) have decided that relational simply doesn’t scale, so they’re going with “schemaless” solutions. I had no idea how significant that was until I heard enthusiastic support for the idea from the audience of one of the Amazon cloud computing sessions. I know a lot of DBAs who are in for quite a shock. So is Oracle, too, and that’s got to be a Good Thing.
  5. Like Grails recently and Ruby on Rails before that, the new Spring Roo project makes existing web development approaches look antiquated. Roo and Grails are siblings that will learn a lot from each other as they continue to grow. For example, Grails has an interactive console, but it isn’t nearly as cool as Roo’s. I’m sure that’ll change soon enough.
  6. The extraordinarily humility and friendliness of the Groovy and Grails core teams is charming. Everyone I met seems almost embarrassed to be having so much fun working on something they like so much. There’s none of the arrogance or elitism that characterizes so many other revolutionary groups, and they always go out of their way to help and answer questions. I love talking to them and really hope to be included as one of them some day.
  7. Speaking of that, sometimes timing is everything. I told Guillaume Laforge (Groovy team lead, for those who don’t know) that he was one of my personal heroes and nearly made him spit up his drink. Sorry, I didn’t get a picture. :)
  8. Griffon made several fans at the conference, especially among the existing Groovy people. I still think it’s a bit early for mainstream practice, but all the signs are favorable.
  9. October is definitely the right time to visit New Orleans.

I had a very good time at the conference and am already looking forward to the next one.

Written by Ken Kousen

October 23, 2009 at 11:42 am

Posted in Grails, Griffon, Groovy, Spring

SpringOne 2GX Day 1

with 2 comments

… or day 2, by the official count. Today was the first full day of sessions, though, so I’m counting from 1.

From now on, I can only comment on the sessions I attended. There were many parallel sessions I wish I could have gone to, but until I get one of those cool Time Turner like Hermione Granger had in the third Harry Potter movie, I still have to operate synchronously. I’ll just make some comments about each here.

Since the conference is a combined one, I decided I should try to attend some Spring sessions as well as Groovy/Grails/Griffon ones. The first session I went to was “Overview of the Spring 3.0 Web Stack,” given by Keith Donald. This was a major overview, with some discussion of Spring MVC, Spring JavaScript, Spring Web Flow, Spring Faces, Spring Security, and even Spring BlazeDS Integration. That’s obviously way more that can be covered in one session, so a lot of the slides were really pointers to other presentations given later in the conference.

That said, after the introductory material he spent a fair amount of time on the new REST support in Spring MVC 3.0. I’ve been working with Spring 2.5 for some time, and I’ve played with the new MVC annotations like @Controller and @Service, but I hadn’t seen the RESTful ones yet.

To give us an idea what’s coming, Keith went over parts of the new sample application for Spring MVC 3.0, yet another version of their PetClinic app. For those interested in looking at it, the svn repository for the RESTful PetClinic is here. Feel free to check it out.

Keith spent a fair amount of time on ways to do the URL mapping, the new validator framework, and the new formatters that replace custom property editors. This isn’t the right post for a detailed discussion, so I’ll refer you to SpringSource for more details. The slides suggested the link http://www.springsource.org/web , but that site didn’t exist when I tried to go there. Still, there’s tons of documentation on all the projects at the base URL.

It turned out there wasn’t time for much information about the other areas, but I did note that Spring JavaScript is really a spring-enabled front end on dojo, which is pretty cool.

(I can’t help automatically going, “Pain … does not exist … in this dojo!” Hopefully Spring JavaScript is also painless.)

It also turns out that the amount of configuration to get Spring Security working has been reduced dramatically. That can only be good news.

In the end, I’d say that Spring definitely lived up to its “Swiss Army Chainsaw” reputation, but I liked a lot of what I saw.

(I especially liked the introduction to Spring Roo that I saw later. See below for that.)

The next talk I attended was “Introduction to Griffon” by Danno Ferrin. I was torn there, because I really wanted to go see Paul King talk about Spring and web services, but I knew most of what Paul was going to say already. Besides, I can probably harass him with questions about the rest (no pun intended) tomorrow. :)

I do know something about Griffon. It started off as an offshoot of the Grails project, with the same value proposition: bring ease of development and convention over configuration to desktop development. I’ve had long email exchanges with Andres Almiray about Swing development, especially with Groovy’s SwingBuilder and working on and off the Event Dispatch Thread, which I’ve written about here a few times. I’ve only run the basic demos on Griffon, though, and hadn’t seen it presented in any official way yet.

Griffon is all about enforcing MVC architecture with desktop apps. It looks and feels a lot like Grails, but there are important differences. The project is only at version 0.2 (and only a beta for that at the moment), so it’s really early. Still, the basics of “MVC groups” (Danno wanted a better term for them, but I kind of like that one), event handling, deployment, and more are already in place.

The deployment story rocks, by the way. You can export your app as a jar file, as an applet, or even as a Java Web Start application automatically, and it’ll help you digitally sign the jars. That’s really cool. The whole technology is pretty slick, actually. It’s pretty much the only framework for desktop apps I know, though I believe there are a few in development. I suggest that anyone interested in desktop development (and there are far more people like that than most developers think) to check it out at its home page.

By the way, Danno had a great line that I just have to use in the future. He said at some point in the presentation he might have to switch from Bob Ross mode to Julia Child mode, meaning he wasn’t necessarily going to have enough time to paint in front of us, but rather would have to pull completed meals out of the oven. I knew exactly what he meant. :)

My feeling about Griffon is that it’s great, but it’s still very early in the development cycle and the documentation isn’t sufficient yet for actual work by people who aren’t closely involved in the project. On the other hand, Danno, Andres, and James Williams (not here) are all co-authors on the upcoming “Griffon in Action” book from Manning. I suspect that book will be as important to future Griffon developers as “Groovy in Action” was (and is) to Groovy developers.

** update: James’s last name is Williams, of course. Also, he’s not a co-author on the book. He is a core committer on the Griffon project. **

The next talk I attended was Paul King’s presentation of “Industrial Strength Groovy.” As he explained, some of the reluctance to adopt Groovy that he finds in the business world is a fear that they won’t be able to use the tools they already adopted and really like. Paul went through a range of tool categories showing how that wasn’t the case.

He discussed lots of testing tools, including mocks like MockFor (built into Groovy), GMock, and EasyMock; injection with Spring or Guice; code coverage with Cobertura; build tools like Ant, Gant, GMaven, and Gradle, Hudson continuous integration, and lots more.

Here’s the best part, at least as far as you, the outside reader, is concerned. You can see all of Paul’s slides on SlideShare.

As an aside, I’m of the opinion that anything Paul writes is great. He has an excellent introductory tutorial for Groovy online in PDF form. He’s also a co-author on GinA (Groovy in Action), which doesn’t surprise me at all.

For the next talk I switched back to the Spring side and attended “Introduction to Spring Roo” by Ben Alex. Ben founded the Roo project, and as it turned out he also founded the Spring Security project. That’s quite a resume. He’s also an outstanding presenter. He doesn’t go for rah-rah tricks or false enthusiasm. Instead he has a very friendly, comfortable, low-pressure style that I find quite appealing. He reminds me a lot of Jason Rudolph that way, or even Guillaume Laforge.

I’d heard of Spring Roo, but didn’t know any details. My original thought was, “oh no, not another Java framework,” but decided to give Roo a try.

Let me just say flat out that I was very impressed. Roo’s best feature (okay, best is a strong term — one of its best features) is that it operates as an interactive command-line application with lots of help and hints available. You start up Roo at the command line (or in STS), type “hint”, and it tells you what it’s expecting next. Just keep hitting the TAB key to get more suggestions.

Essentially what Roo is about is building and configuring a Maven project with lots of AspectJ code generation to modify the source. It felt a lot like Grails, but using Java instead, and most of the code generation affected what happens at compile time rather than at run time. For example, it automatically generates getters and setters and toString() methods for domain objects. It generates the same sort of dynamic finders that Grails has, though you have to choose to add them. It automatically configures Spring JavaScript to do form validation. It uses the JSR 303 bean validation annotations to enforce what it wants. It configures databases for you, too.

I couldn’t help but feel that the Grails framework has been highly influential inside SpringSource. I can only assume that’s partly because Graeme Rocher is now one of their employees (after they bought G2One). At any rate, this was the first Java-based framework that I thought could provide serious competition to Grails. I still like Grails partly because I really like Groovy, and I think it’s always easier to implement anything in Groovy than in Java. Also, Grails has about 300 plugins at the moment, that do basically everything. But if you’re committed to Java, Roo looks like a great alternative. You can download it at the project page at SpringSource.

I only had a couple of criticisms. One was that you can replay your Roo scripts, which is cool, but there’s no way to automatically record them as you go. Expect that to change, since everybody seemed to want it.

The other came from the fact that I downloaded Roo while Ben was talking and was running the app along with him. Then, when typed

roo> perform eclipse

to generate an Eclipse project, I did the same and had to wait about 15 minutes (literally — that’s an estimate) while the underlying Maven engine downloaded the Internet. When I went to test the app in Tomcat, I exited Roo and typed “mvn tomcat:run” and waited again for tons more downloads, even though I have both Tomcat 6 and Tomcat 5.5 on my hard drive already. Finally, when I tried out the Selenium support (another great feature, btw) and ran “mvn selenium:selenese” I had to wait again as Maven did its thing. They all worked, and the delays all had to do with Maven rather than Roo, but yikes nevertheless.

Right now Roo is at version 1.0.0.RC2 and should be at GA some time in December, and that one will include docs. Until then it’s mostly blog posts and the associated forums. I’m definitely going to try Roo, though, when it’s ready.

This post has already gone on too long, so I think I’ll leave it at that. I’m enjoying the conference and am looking forward to more presentations tomorrow.

Written by Ken Kousen

October 21, 2009 at 12:37 am

Posted in Griffon, Groovy, Spring

SpringOne 2GX Day 0

with 3 comments

I’m at the SpringOne2GX conference (http://www.springone2gx.com) in New Orleans this week. Monday (which they’re calling day 1 but I’m referring to here as day 0) consisted only of registration plus a reception and finally a keynote by Rod Johnson.

As a frequent NFJS attendee, the “reception” was a bit of a culture shock. One of the great appeals of No Fluff, Just Stuff is that there are no vendors present. This reception turned out to be purely a vendor reception, with wine and beer and light munchies. The vendors were all talking about Spring, of course, not Groovy or Grails. I didn’t find any of them particularly overwhelming.

The most amusing part is that one of the Platinum Sponsors was, of all companies, Microsoft. The Microsoft rep was sitting at a table by himself, with no posters or anything. He was sitting in front of a Mac (!).

When I asked him about the Mac, he showed me that it was running VMWare and a Windows 7 pre-release version. Then I asked him about he platinum status, in a rather obnoxious way.

“I can understand why Microsoft might want to be here,” I said, “but Platinum Sponsor? What’s up with that? What’s your goal?”

“We’re talking about our integration story,” he said.

“You mean web services?”

“No,” he said, and then proceeded to describe accessing MS apps via RESTful web services (or maybe just GETful — I didn’t get the details). He also mentioned some MS product I’d never heard of.

When I prodded again about the platinum sponsorship, he confessed that this isn’t really a large conference for MS, so the platinum sponsorship really wasn’t much money to them. Must be nice.

I also asked him why he didn’t have any posters or anything. He said that MS has a major developer conference coming up in a couple of weeks. When he went to get the stuff he needed for this conf, it turned out everything was already packed away. :)

The other big event of the evening was Rod Johnson’s keynote. That turned out to be a mixed bag, at least from my point of view. He spent the first 20 minutes or so reviewing the glorious history of Spring, focusing on a timeline and all the enthusiasm in the developer community. Now, I’ve been using (and teaching) Spring for years and I really like it, but this felt like a “fire up the troops” talk as though we were marketeers.

He did break for demos of Spring Integration, and tc server with the cool performance monitoring stuff, and a review of what’s new in 3.0. Then he set up the demo by Graeme Rocher, the extremely impressive lead of the Grails project.

To introduce the topic of Grails, Rod made an extremely odd segue. He mentioned how he was able to get “bacon ice cream” in the hotel (a real, of strange product). He somehow related that to a picture of three pigs, and said that pigs build brick houses, and that Grails is built on a brick foundation. That foundation included Spring of course, but he forgot to say anything about Hibernate. :)

Graeme, wisely IMHO, ignored all that. He showed how the latest version of STS (SpringSource Tool Suite) had very good Grails support. The version he showed will be released Wednesday. Graeme was great, as usual. The only problem I ever have with him is that he tends to make everything look easy, which can be a tad misleading. Still, the support looked solid, and as a community we desperately need that.

The one practical point I took from Rod is that apparently there’s going to be a developer version of tc server. I was really looking forward to checking into tc server, until I found you have to pay for it. I can’t justify that, especially when GlassFish has improved so much over the past few years and JBoss still works, too. Now if there’s a free dev version, maybe I’ll try it.

The biggest message I got from the whole evening, though, is that so far this is a Spring conference, not a Groovy/Grails conference. I hope that doesn’t carry through the whole way.

For me, the best part was finally getting to meet Guillaume Laforge, Paul King, and Robert Fischer in person. I also re-connected with Dave Klein and the indefatigable Andres Almiray. That rocked. The Groovy/Grails/Griffon (!) community is filled with great people.

I’ll try to update this blog periodically as the conference goes on. Any comments, of course, are welcome and appreciated.

Written by Ken Kousen

October 20, 2009 at 9:58 am

Posted in Grails, Groovy

Humor lost on Grails Podcast

with 4 comments

During the last Grails Podcast, Glen and Sven mentioned how they’d received feedback from me on the previous podcast, part two of their interview with Scott Davis. Instead of reading my feedback verbatim, they made the (possibly wise) decision to just summarize it.

The only problem I have with their decision is that I went to a lot of trouble to make my message as funny as possible, and I even included a comment about Dave Klein in it. All of that was lost. So, as a (possibly unwise) service to my readers, I thought I’d reproduce my message here.

My message is below. I also feel the need to embed some of my own comments, which I’ll include in square brackets [like this].

———— Original message [with annotations] ——————
Hi Glen and Sven,

I just listened to your two-part podcast with Scott Davis, and I feel I have to correct the record on a couple of points. In part two, Glen asked Scott about the O’Reilly book that he and I are working on, entitled “Making Java Groovy“. During that discussion, Scott pronounced my name correctly, which is pretty amazing, but he mistakenly said that I live in the Philadelphia area. Actually, I live in Connecticut, and have for the past 20 years. My sister lives outside of Philly, but I don’t think Scott knows that.

[Missed opportunity for a joke: "Wait a minute... what is Scott Davis doing with my sister?"]

Scott also mentioned that the book has been taking a bit longer than we originally anticipated. Actually, that’s true. One of the reasons is that writing this book has been too much fun. I’m really enjoying working through all the different ways to enhance Java systems with Groovy, ranging from Swing user interfaces (as Scott mentioned) to using Groovy to configure Spring beans to building Groovy handlers for JAX-WS web services. These days I’m hard at work on a chapter called “Groovy in the Cloud”, describing my experiences with Groovy and Java on Google App Engine. I’m also working with a lot of XML-based baseball data, which means that Red Sox games are deductible, right?

[Note the subtle interplay of self-deprecating humor with actual info about the book. Plus, I managed to work in a baseball joke, though it was pretty lame.]

Let’s also get real here. Some of the delays are your fault, Glen. You keep tweeting about all the interesting things you’re learning and doing, and then I feel I have to follow up and discuss them in our book. So quit it.

[I thought the "so quit it" line was maybe the best one of the message, but I probably should have put it in all caps. Also, I meant to say that it's all the news items in the podcast that I find time consuming, since they inevitably cause me to dig into them.]

Finally, you and I both know that producing real quality takes time. It’s hard to write good code, and it’s hard to write good prose, and it’s doubly hard to do both at the same time. So this stuff just takes time. Unless you’re that hoser Dave Klein, who produced his fantastic book “Grails Quickly” so quickly (pun intended) that it’s making us all look bad. He’s a freakin’ loser, and I mean that in the nicest possible way.

[Total back-handed compliment for Dave Klein. Didn't see that one coming, did you? I'm sure he didn't. As it turns out, the actual title of his book is "Grails: A Quick Start Guide" and can be found through the link at PragProg. Why pick on Dave, other than the fact that he did such an awesome job? One good way to sell books is to generate artificial controversy, and who's a better target for that than the Klein-meister? Besides, he's got so many kids at home he'll never have time to read this message. (Oops! Too over the top? YMMV)]

Keep up the good work and see you both at 2GX,

[Ooh, subtle plug for the SpringOne2GX conference, too. Sweet.]

Ken Kousen
————– End of annotated message ————

See? The message had everything, with even a reference to the 2GX conference, so I was quite surprised when Glen and Sven decided to just summarize the newsy parts. Don’t get me wrong — I was half-terrified that they would read it, and if you listen closely you can almost hear both Glen and Sven uncomfortably debating what to do with it. The result, though, probably left most listeners (almost certainly including my poor co-author) wondering what the heck I was on about in the first place.

Well, now you know. While I doubt it would qualify as worthy of a Grails Podcast “Poll of the Week”, I’m curious to see what you think. Did they do the right thing by leaving out all the good stuff (I mean, “humor”)? Am I not nearly as funny as I think I am? (Wait, don’t answer that one.)

Comments are of course welcome. You can also harass (I mean “tweet”) me on Twitter. I’m @kenkousen over there.

Now back to working on the book…

Written by Ken Kousen

August 30, 2009 at 4:06 pm

Posted in Grails, Groovy

Abbreviating the descendant axis in XSLT

with one comment

Say we have the following XML:

<root>
  <para>p1</para>
  <para>p2</para>
  <other>
    <para>p3</para>
  </other>
</root>

The question is, what does the XPath expression //para[1] return? I originally expected it to select all the para elements and then return just the first one. In fact, what it returns is

p1
p3

This is because what the expression actually means is, “return all the para elements that are the first child of any element”.

Why is that?  According to the XPath specification, // is actually the abbreviation for /descendant-or-self::node()/, so that //para is actually /descendant-or-self::node()/child::para.

Since p1 and p3 are the first children of their parents, and p2 is the second child* of its parent, the nodes returned are p1 and p3.

*Assuming we’re ignoring whitespace, of course, which is always a bit of an adventure.

If I really want the first instance of all the para elements, then I need the expression /descendant::para[1]. That collects all the para elements and returns the first one.

A side benefit to this approach is that it forced me to learn how to spell “descendant” correctly. :)

Written by Ken Kousen

July 16, 2009 at 10:47 am

Posted in XML

Dragons roar, cough, and sputter in Dayton

leave a comment »

Tim Kurkjian says you should never miss the chance to go to a ballgame, because you might see something you’ve never seen before.  On Tuesday I got the chance to go to see the Dayton Dragons play in their charming stadium, Fifth Third Field (seriously, that’s the name) in downtown Dayton, Ohio.

(I’m here this week teaching a class that combines Java Server Faces, Spring Web Flow, and Spring Faces — an adventure to say the least, but a story for another post.)

Accompanying me was my friend Stephen Williams, who I hadn’t seen in about eight months. He lives reasonably close to Dayton, but had never seen the Dragons play.

The Dragons are the A-ball affliate of the Cincinnati Reds.  They draw extremely well in Dayton, despite the fact that they’re really, really bad this year.

(This is in contrast to my own Connecticut Defenders, who are limping their way out of town this season and playing to an almost empty stadium.  That, too, though, is a post for another day.)

The Dragons were 8 – 23 when the game started.  Their opponent tonight was the West Michigan Whitecaps, the Class A affliate of the Detroit Tigers and leaders of their division with a record of 21 – 9.  The weather was beautiful, roughly 70 degrees and sunny, with a very mild breeze, and the stands were nearly filled.  They were treated to what only can be described as a very odd game.

The fun started in the bottom of the second inning.  There’s no score when Taylor Sloval led off with a walk.  Then Stephen Chapman was called out on strikes, leaving a man on first with one out.

The official boxscore then says, “Kevin Coddington reaches on a fielders choice, fielded by third baseman Bryan Pounds.  Tyler Stoval to 2nd.”

Hmm.  How did that happen?  How can a third baseman field a cleanly hit ball and manage not to get either runner out?

The key is that it looked to everyone in the place, including poor Bryan Pounds, like Coddington hit a soft fly right to him which he then caught.  Pounds looked around, expecting the umpire to signal an out, but nothing happened.  The runner, seeing this, kept going for 2nd, and by the time Pounds threw the ball there, he was called safe.  Even that wasn’t clear, though, because it looked like the throw beat the runner.

So, either Coddington is out and Stoval is safe at 2nd on a stolen base, because he wasn’t tagged, or Coddington is safe at 1st because the ball bounced, but Stoval is out at 2nd on a force out.  Which is it?

The umpires got together and talked it over.  Eventually they settled on the unlikeliest of outcomes, which was that both runners were safe, but Coddington didn’t get a base hit on the play, nor was anybody charged with an error.   Instead, it looked like Pounds was an idiot for holding onto the ball too long.

In my scorecard, I just put in a giant question mark.  Welcome to A ball, where the umpires, too, are not necessarily ready for the big leagues. We’ll come back to that later.

Of course, what followed was a double and a single, resulting in a 2 – 0 lead for Dayton.  Yay home team.

Skip forward to the top of the 7th, where the fun really started.  The Dragons are holding onto a 2 – 1 lead when Billy Nowlin for the Whitecaps singled and stole 2nd.  Joseph Bowen struck out swinging, then Luis Salas walked, and Gustavo Nunez popped out to the catcher in foul territory.  So now we have men on 1st and 2nd, but with two outs.  The tying run is on 2nd, but both teams have hit horribly with men in scoring position all night.   Then the next batter, Brett Wyatt, hits a soft grounder to the pitcher.  It looks like Andrew Bowman, the Dragon’s pitcher who came in at the top of the 6th, is going to escape with no damage.

Or not.  His throw to 1st winds up somewhere near Cincinnati.  Nowlin scores, Salas makes it to 3rd, and Wyatt is safe at 1st.  Now the game is tied, with men on 1st and 3rd, still with two outs.

Surprise, surprise, the next batter, Ben Guez, gets hit by a pitch, loading the bases.   This despite the fact that Guez was 0 for 2 at the time, with a strike out and a foul out to 3rd, and had already been hit by a pitch way back in the 1st inning.

The catcher trots out to have a word with Bowman.  Steve and I imagine the conversation going something like:

Catcher: Dude, stop thinking about your throwing error, or the fact that you just blew the win so that the best you can hope for now is a no-decision.  Just throw strikes.

Pitcher: Yeah, whatever.

Next up comes Brandon Douglas.  Whack!  Yet another hit by pitch, bringing home Salas. Now it’s 3 – 2 Whitecaps and the bases are still loaded.  The night is now officially over for Andrew Bowman.  He’s replaced by Aguido Gonzales.

Gonzales faces Bryan Pounds (remember him from the 2nd inning?).  Pounds works the count full and is rewarded with a walk, bringing home another run.  Ron Bourquin then singles, scoring yet another.  Finally, Billy Nowlin (batting again this inning — yup, the Whitecaps batted around) pops out to 1st to end the inning.  The score is now 6 – 2 Whitecaps and the game is effectively over.

By the way, the second-to-last batter was given a single by a generous home scorer when the 2nd baseman (Cody Pucket, who went 4 for 4 and probably won’t be playing here long) should have been given an error.  If it had been ruled an error, then the Whitecaps would have scored 5 runs on one hit, two walks, two errors, and two hit-by-pitches.  I don’t expect to ever see that again.

The fun wasn’t over yet.  Advance to the bottom of the 8th, with the score still 6 to 2.  After two fly-outs and two singles, it’s now men on 1st and 2nd with two outs, and up comes Byron Wiley for the home team.  The count goes full, and to Byron Wiley, the next pitch looks very much like a ball.  He actually tosses his bat three feet away and starts heading for 1st when the umpire yells strike!

Oops.  Umpires really hate it when you show them up like that.  Wiley retrieves his bat, and again Steve and I imagine the conversation going on at the moment.

Umpire: Make me look bad like that?  You better swing at the next pitch, dude, because it’s a strike.  I can tell you that right now.  I don’t care if it’s over your head, in the dugout, or three rows into the stands, it’s a strike.  So don’t forget to swing.

Wiley: <grumble>

Sure enough, the next pitch is high and outside.  Sure enough, Wiley swings and misses.  Sure enough, the umpire calls it a strike before the swing even starts.  Inning over.

Wiley throws both his helmet and his bat this time, and the umpire throws Wiley.  Out of the game, actually, which comes as a surprise to nobody.

You’d think that would be it, but no, the top of the 9th was great, too.  There were six total at-bats in the top of the 9th.  They went: home run, strike out, strike out, home run, home run, strike out.

Yes, that’s three homers and three Ks.  The fielders might as well have stayed in the dugout. How cool is that? :)

The bottom of the 9th featured yet another homer, meaning that there were four total home runs in the 9th.  The final score was 9 – 4 in favor of the Whitecaps.

Even then my evening wasn’t finished.  I convinced Steve to come with me to the Dragons Team Store, so I could buy a massively overpriced T-shirt or a massively overpriced cap. While I was browsing the massively overpriced merchandise ($35 for a shirt, and even $33 for a cap, but at least I wasn’t even tempted by the massively overpriced $125 jersey), a worker in the store pointed us to the line for autographs.  It turned out one of the Dragon players was coming down to sign for the fans.

Who was the player?  Yup, you guessed it, poor unfortunate pitcher Andrew Bowman, whose pitching line for the night read 1.2 innings, 1 hit, 5 runs, none earned (wow), two walks, two strike outs, a very bad throwing error and a 6.48 ERA.  He got both a blown save and took the loss.  Not his best day.

He was warm and friendly, though.  He was kind enough to put an unintelligible scribble in my program and I got a quick picture with him on my phone.

Me and poor Andrew Bowman, of the Dayton Dragons

I did feel I had to say something, though.

Me: How’s your arm?

Bowman (smiling): It’s sore.

Me: Ah.  Well, good luck.

Bowman: Thanks.

I think anything else would have been cruel.  I paid for my massively overpriced shirt and left with a cool story to tell.  Yup, never miss the chance to go to a ballgame. :)

Written by Ken Kousen

May 13, 2009 at 12:20 am

Posted in Baseball, Teaching

O’Reilly screencasts coming

leave a comment »

A few weeks ago, I got an email from a “digital content director” at O’Reilly. He said he was building up O’Reilly’s catalog of screencasts on technical subjects and wanted to know if I wanted to participate. The plan would be for me to come to California, where a camera crew would record me teaching students, in an informal setting, about new interesting technologies.

As they say in baseball, that’s right in my wheelhouse. While I do as much development and consulting as I can, my schedule fills with teaching engagements very quickly. I probably consider myself an instructor above everything else. Asking me to talk for a couple of days to make a 90 to 120 minute screencast is simple — getting me to stop talking would be much harder.

(That’s the thing about instructors: the job requires you to respond to every question with a conversation that lasts until the student is either satisfied or gives up. The job selects for that. After all, I’m not grading them; they’re grading me. Okay, that was a bit facetious, but only a bit.)

The upshot is that last week I traveled to California and recorded two screencasts. The first is tentatively entitled “How Groovy Helps,” and walks through a handful of Groovy-based applications to show how the language dramatically simplify application development. The other is called “Modern Enterprise Java Development” and discusses how creating web applications evolved from a servlets/JSPs/JavaBeans model to Spring Core + JPA + Ajax, with an overview of tools and technologies thrown in for good measure. They were all recorded as I talked to one student at the Westerbeke Ranch in Sonoma, CA.

I’ll have a lot more to say about them as we get closer to their availability, which ought to be in a month or so. In the meantime, here are a few observations:

1. You know you’re in wine country when there’s a bottle of wine waiting for you in the hotel (a decent chardonnay as it turned out).

2. I enjoyed adding Google Maps functionality to my Groovy Baseball application. Now when I choose a date, I get a marker at each home stadium with an info window showing the scores. Once I clean up the look and feel, I’ll add that to my own web site.

3. My student didn’t have much of a programming background, so I inevitably slowed down. The screencasts are therefore geared more towards beginners than experts.

4. We recorded almost everything outside. That was quite an adjustment for me, since I consider air conditioning and high-speed Internet access minimum requirements for any trip, including vacations. My son was quite amused to hear I got a mild sunburn on my bald spot.

5. I had to drive to Boston in order to take Virgin America, but have an actual, real live plug in the seat was worth it.

6. The production values on these things are going to be sick. I saw a preview and was very, very impressed. I only hope the content measures up. :)

My only regret was not being able to meet up with Andres Almiray while I was out there, but he was south of San Francisco and I was about an hour north of there. Maybe next time.

Written by Ken Kousen

May 5, 2009 at 4:23 pm

Posted in Groovy, Teaching

Making Java Groovy, an upcoming book from O’Reilly

with 7 comments

Recently there was a discussion on the Groovy User’s list about Groovy books, in which it was noted that there are currently no books involving Groovy from O’Reilly. I responded to that post, announcing for the first time in a public forum that Scott Davis and I are working on a Groovy book from O’Reilly, entitled “Making Java Groovy“.

Since some people don’t necessarily follow the mailing list, I thought I’d echo that post in my blog. Feel free to skip this if you’re not interested.

I should mention that as a result of the discussion on the email list, I’m considering adding the subtitle, “Enrich, Enhance, and Amplify Your Java with Groovy” to our title. Thanks to Dierk Koenig for that idea.

Here’s my post:

Scott Davis and I are working on a Groovy book, to be published by O’Reilly, entitled “Making Java Groovy”. We hope to have it available by the end of this year.

Some obvious FAQs:

1. What’s the book about?

The goal of “Making Java Groovy” (MJG) is to show existing Java developers how to add Groovy to their systems in order to make their lives easier. It’s really a book about Java/Groovy integration, rather than being a pure Groovy book. In that we’re following the Groovy philosophy, which is that Groovy doesn’t replace Java, it works with Java to get the job done.

2. How is “Making Java Groovy” different from all the other Groovy books in the marketplace?

I’m a huge fan of GinA (“Groovy in Action“, of course), which is one of my all-time favorite technical books on any subject. I think Dierk Koenig and his co-authors did a brilliant job on that book and will order the second edition as soon as it’s announced. I’m also a big fan of Scott’s “Groovy Recipes” book, and I had the great pleasure of being one of the technical reviewers on Venkat Subramaniam’s excellent “Programming Groovy” book. I’m a book fan, actually, so I also have “Groovy and Grails Recipes“, “Beginning Groovy and Grails“, all the Grails-specific books I could find (especially DGG2, which totally rocks), and even that old academic book on Groovy programming.

I’d say, therefore, that I’m pretty familiar with the marketplace, and MJG is attempting to fill a role that is different from all the others. Our book assumes that you’re not necessarily free to replace everything you have with Groovy code, but instead want to leverage Groovy to make you more productive in the Java world. For example, if you can build your application using Grails, then more power to you. Grails is wonderful, and the fact that it uses Spring and Hibernate under the hood is pretty well hidden if you don’t need to access that functionality directly. If, on the other hand, you don’t have the freedom to do everything in Grails, then Groovy can still play an important role. That’s especially true if you’re using the Spring framework, like most of the industry. We have a dedicated chapter on using the Groovy capabilities of Spring.

(By the way, if you want to get a sense of what that particular chapter is about, see my article on Groovy/Spring integration in the February issue of GroovyMag.)

Most of the book will follow that pattern. We’ve got chapters planned on using Groovy with databases (with a nod to Robert Fischer’s upcoming book on that topic), using Groovy in your build system (Gant, AntBuilder, Grape, Gradle, and so on), taking advantage of Groovy’s testing capabilities, working with XML, how Groovy can be used in web services, building user interfaces with Groovy’s builders, and even Griffon. In each case, our focus is on how Groovy helps you be more productive.

3. Who are you and why are you qualified to write an O’Reilly book on Groovy?

First of all, Scott Davis probably needs no introduction to this group. He’s the author of “Groovy Recipes” and several other books, a JavaOne superstar, internationally known speaker and consultant, and combines all of that with being a really good guy. (Just don’t tell him I said so.)

My own credentials in this area aren’t as showy, but I’ve been working with Groovy and Grails for the past couple of years, and with Java and related technologies since the mid 90’s. My primary job is as an instructor teaching technical training classes, but I also do consulting, mentoring, and my own development projects. I’ve been a tech editor on several books, a speaker at No Fluff Just Stuff conferences, and have been working in industry for the past 20 years or so. For what it’s worth, I’m also an adjunct professor at Rensselaer Polytechnic Institute in their Hartford, CT location, and have a range of academic degrees, most of which I no longer use.

More details can be found on my company web site, Kousen IT, Inc. Incidentally, my last name is pronounced like the relative, so my company name sounds like the hairy character in the Addams Family.

(One more aside: I have a friend who is a graphic designer and was looking for a small project, so I had him design a new logo for me. It’s on my web site. Now I’m just waiting for the cease and desist order from the Addams estate.)

4. When is all this going to happen?

We’re hoping to have a draft of the book ready in the early fall and hope to see it published by the end of the year. We’re planning on releasing a “Rough Cut” (O’Reilly’s early access PDFs) in the next few months. When that happens, I’ll post something here.

5. Did you clear all this information with Scott?

Um, no. Maybe I should have. Er. No, I’m sure he’ll be okay with it (right Scott?).

6. Are you willing to take suggestions on topics and techniques?

Most definitely. Please feel free to contact me with any questions, comments, or concerns you might have. I’ll do my best to respond to each one as quickly as possible, and I’ll make sure that if I use any of your suggestions that I’ll give you full credit in the acknowledgments section. :)

Written by Ken Kousen

April 24, 2009 at 1:44 am

Posted in Groovy