Heaven has one hell of a baseball team

It’s hard to believe that, not so long ago, blacks were forbidden from playing Major League Baseball. For a person like myself, born in 1970 and never experiencing the true meaning of segregation, it’s hard to comprehend. Alas, it’s true. One can be disappointed by this tarnished past, or be proud of how we, as a people, have overcome it.

Regardless, being excluded from “professional” baseball didn’t stop many from playing professional baseball, thanks to the Negro Leagues. Without such a league, we’d never have the opportunity to know some of the most talented athletes and colorful sports personalities to ever play the game.

The Negro Leagues brought to fame folks such as Andrew “Rube” Foster (a great pitcher and the founder of the Negro League), Satchel Paige (one of the best pitchers of all time), Josh Gibson (a power-hitting catcher)… and Prince Joe Henry.

He wore shorts as part of his uniform, his hat bill turned around crooked and was animated at the plate.ref

Prince Joe has a special place for me and some friends, for a very special reason. A few years back, RedHawk (a player of my online baseball game, CSFBL) started a new league in our game: Negro League Tribute. After starting the league, RedHawk and TFM_Dale (another community member) got in touch with Negro League legend Prince Joe. Continue reading

Operator overloading your domain model with interfaces and base classes

One of the challenges in rewriting my online baseball game is dealing with enormous amounts of data that needs to be stored as aggregates, and coming up with a domain model and data mapping pattern that works. In this blog post, I’ll outline how I addressed some of those issues.

The Data Model

Baseball is very much a statistics-oriented game. Consider fielding statistics: putouts (PO), assists (A), errors (E) and others. These stats need to be stored:

  • Per game, for each player who played in the game, for each position he played (key fields: game, player, position)
  • Per season, for each player, for each team he played for, for each position he played (key fields: season, player, team, position)
  • Career, for each player, for each position he played (key fields: player, position)

On the database side, that results in three tables: GameFieldingStats, SeasonFieldingStats, and CareerFieldingStats. Each has the same set of fields to store the statistics (PO, A, and E); the differences are in the key fields for each, as outlined in the diagram below. (Note: For the remainder of this post, I’ll include only the first two of those tables to keep things short.)

Continue reading

Lost in (Google) translation

For the past few days, I’ve been working on importing raw play-by-play data for Japanese baseball. Once the import scripts and queries were written, I needed a way to audit the results. To do that, I needed a source for up-to-date statistics on Japanese baseball players.
Yahoo! provides a rather robust web site for the Nippon Professional Baseball (NPB). Unfortunately, the web site is in Japanese, a language I don’t read or have support for on my computer, so the screen was, for the most part, filled with question marks, as seen below.

Yahoo! Sports NPB Baseball (before translation)
Yahoo! Sports NPB Baseball (before translation)

By using Google Translator, I was able to transform this into the following:

Yahoo! Sports NPB Baseball (with Google translation)
Yahoo! Sports NPB Baseball (with Google translation)

I wasn’t expecting a perfect translation (it would be silly to do so), but the results were certainly entertaining.

  • A “base on balls” is a “giving Annie Oakley”.
  • A “hit batter” is a “giving dead sphere” (the poor batter).
  • “On base percentage” is “coming out base ratio”.
  • “Slugging percentage” is “long batting average”.

If you look at a translated hitter’s page, you’ll see this unusual description of a player’s at-bat:

Two racketeers, empty three swing, medium flying it is cheap, the left ? flying, two racketeers

Who says there’s no racketeering in professional baseball today?