Dondo Land

Bryan Donovan's Weblog

All | General | Music | Rails

20050729 Friday July 29, 2005

 Baseball Sparklines

I just took a class from Edward Tufte on how to display and present information. Tufte has relatively recently introduced the idea of sparklines (careful, that page has large graphics), which are essentially word-sized graphics that can fit right into a paragraph of text. I'm currently working on adding customizable sparklines for various baseball statistics, including team wins and losses for the season (thanks to sparkline.org's free PHP library). For example, the Oakland A's have made a dramatic comeback since May 29, as can be seen by this sparkline: (through July 28th). The upward whiskers are wins and the downward whiskers are losses. Red indicates a shutout, and the horizontal line under some of the whiskers indicates a home game. From this sparkline you can clearly see how the A's have turned around their season.



(2005-07-31 13:44:27.0/2005-07-29 11:06:11.0) Permalink Comments [0]
Trackback: http://blogs.sun.com/bdonovan/entry/baseball_sparklines

20050723 Saturday July 23, 2005

 Attention Baseball Fans

If you're a Major League Baseball fan and haven't seen it already, there's a great website out there called The Hardball Times that includes great daily articles as well as a wide variety of baseball statistics, especially some of the more hard-to-find Sabermetric stats like Win Shares, Pitching Runs, and Runs Created. I admit this is partially a shameless plug since I volunteered to develop the code for the statistics pages, but I have to say it is pretty darn nice stuff. If you're looking for baseball stats that you can sort and limit any which way you want without having to wait 30 seconds for a banner-ad-polluted page to render, The Hardball Times stats pages are probably something you'll appreciate.


For the techy folks, given that this is a Sun Microsystems-hosted blog, I developed the code in PHP 4 (I wish it were 5, but sometimes you have to deal with what the hosting company uses), Smarty, and MySQL 4.0.x. I used the great Propel object persistence and query toolkit for PHP, which is essentially a PHP version of Apache Torque, a peristence layer for Java. So far it's been great, but I do run into the occassional memory limit since our web host kills scripts that use more than about 16MB, and a Propel object can take up quite a bit of memory. I only run into this problem when running database loading scripts though, which cycle through all the players and do a lot of simple calculations to generate the various statistics. I also use some home-grown DB query classes for common queries that aren't Propel-friendly or efficient (at least in how I use Propel). The problem with a persistence layer that maps an object to a database table is that each object is generally an entire row of the table. If you need something like the average batters faced per game for pitchers in the American League, a persistence layer isn't really the way to go. I still abstract my queries from the DB using PEAR::DB (I could certainly use Creole, which is what Propel uses), so at least I've preserved some level of portability.


The coolest thing about this Hardball Times code is that I made most of it completely generic--it's sort of a framework really. Other people can use a web form to make changes to the sortable stats tables, including which columns are displayed, what the title of the column is, whether it should be included in the sort and limit drop-down lists, and what order the columns are displayed. All that is needed to add a new sortable web table is a group of Propel classes for the table and you're ready to go. This has come in very handy for my real job at Sun, where I create web applications to display statistical information on manufacturing data (such as fail rates, control charts, etc.).


For future PHP projects, I think I'll use the new Cake web development framework based on Ruby on Rails. I've tinkered with it a bit and so far it's great. One big advantage is that you don't have to generate the ORM classes for your database tables (although this is pretty easy with Propel), which makes updates to your code, especially database changes, quicker to implement.



(2005-07-29 11:46:58.0/2005-07-23 14:26:22.0) Permalink Comments [0]
Trackback: http://blogs.sun.com/bdonovan/entry/attention_baseball_fans

20050510 Tuesday May 10, 2005

 Who says you can't get a good education in a small public school?

This is the high school I went to. We were very lucky to have such a great science program. Keep in mind this is a school with less than 100 students in a town of about 450:

In the small community of Sunburst near the Canadian border, North Toole County High School teacher Larry Fauque accompanied four of his students to ISEF. Fauque estimates this was his 20th trip to ISEF. Three of his four students won awards at this year's national level of competition. The National Science Teachers Association has recognized Fauque's science curriculum over the last 34 years as one of the top 10 science research programs in the nation. Link

We might not have had AP classes, but classes like this made up for it. I'm also confident our English and Math curricula were as strong as most schools' AP curricula.



(2005-05-10 08:15:39.0/2005-05-10 08:09:04.0) Permalink Comments [1]
Trackback: http://blogs.sun.com/bdonovan/entry/who_says_you_can_t

20050501 Sunday May 01, 2005

 Bookmarks on the Web: del.icio.us

A friend of mine introduced me to del.icio.us a couple of years ago, but I didn't take the time to really figure out what it was for... and the name "del.icio.us" was a bit confusing and hard to remember how to spell. Anyway, if you use the Internet, you should use del.icio.us. Or maybe another similar service, but del.icio.us is the most popular right now, and they just got VC funding, so hopefully we can expect it to grow and improve.

So, where do you start? What's the point of del.icio.us? In a very basic sense, it's like having your bookmarks on the web, which by itself is very useful (you can access them from any computer, etc.). But the real value of del.icio.us is that you can tag your bookmarks with keywords to categorize them under. Furthermore, you can see who else has bookmarked a webpage, what tags they used, and what other bookmarks that person has. So in a sense it's a social network of bookmarks. And if bookmarks are any indication of a person's web-surfing experience, then del.icio.us is a network of web experiences. The coolest features to me are that you can subscribe to RSS feeds for any tag, including another person's entire bookmark collection or just a subset. For example, if you wanted to subscribe to the Java RSS feed from all del.icio.us users, you would simply subscribe to http://del.icio.us/rss/tag/java in whatever RSS aggregator you use (I have to recommend trying Thunderbird for that). Or if you just wanted the Java bookmarks feed from me, you could subscribe at http://del.icio.us/rss/bdondo/java (this is not recommended, as I am not a real Java programmer!). It's amazing how many useful and interesting sites I've found this way. If RSS isn't your thing, then maybe just check out the most popular websites page directly. You might find some cool stuff.

And now to the how-to portion..

1. Sign up for an account here.
2. After you log in, go to the http://del.icio.us/doc/about page and you'll see a section called "Bookmarklets".
3. Drag the link named "my del.icio.us" to your bookmark bar or folder (Yes, drag the link.. don't just click on it).
4. Drag the link named "post to del.icio.us" to your bookmark bar or folder as well.
5. Now when you come to a web page you would like to bookmark in del.icio.us, simply click on your "post to del.icio.us" bookmark that you just added to your bookmark bar/folder. A window will pop up asking for tags and some optional additional description.
6. Now you can access your bookmarks by clicking on the "my del.icio.us" bookmark you added to your bookmark bar/folder in step 3.

That's it.. it's really easy.

(2005-05-01 08:28:35.0/2005-05-01 08:28:52.0) Permalink Comments [0]
Trackback: http://blogs.sun.com/bdonovan/entry/bookmarks_on_the_web_del

20050112 Wednesday January 12, 2005

 An open letter to the big TV networks

To: ABC, CBS, NBC, Fox, and all other interested television networks

From: Bryan Donovan

Re: Amazing Business Opportunity

Dear Television Channel Executives,

I am writing to offer my free advice on how you can please more customers and make more money than you are right now. I don't currently subscribe to any television; I don't have an antenna on my TV and I don't have any form of cable or satellite programming. This is due to my complete dissatisfaction with the majority of television programming. The small list of programs I enjoy does not warrant spending money on a monthly service, and given that I cannot get good antenna reception in my condominium, I'm left with the (good) option of renting last season's programs on DVD. However, it would be nice to watch shows from the current season without having to subscribe to a television service.

The solution? Allow customers to download television programs on the Internet for a small fee, and with the important feature of being able to download one episode at a time and pay only for that episode. If I am required to subscribe to a package of programs or buy a certain number of episodes in order to use the service, I might as well get cable. Major League Baseball allows for the downloading of individual baseball games and the service seems to work quite well. If I could download the season opener of Fox's 24, for example, and not have to deal with any other programs or channels, I would be in TV heaven. I've heard rumors of such a service coming about, but nothing has emerged that I know of yet.

I imagine the revenue per program would be rather high, as you could easily charge $1-$2 per episode for most shows, which must be much higher than the revenue per episode you receive from cable providers. Although I cannot stand watching advertisements, I would be willing to put up with them if this service was offered, so you would continue to reap the advertising money as well.

People are downloading TV shows illegally on the Internet now, so you might as well offer a viable alternative, much like iTunes has done with online music. If you can't beat them, join them and make money doing so.

If you need computer infrastructure and software, I know of a great company who specializes in that sort of thing.

Sincerely,

Bryan Donovan

(2005-01-12 16:57:55.0/2005-01-12 16:37:11.0) Permalink Comments [2]
Trackback: http://blogs.sun.com/bdonovan/entry/an_open_letter_to_the

20041208 Wednesday December 08, 2004

 Hydrogen's Empty Environmental Promises

Cato has an interesting article by San Jose State professor emeritus Donald Anthrop on the viability of hydrogen as an energy source. A notable quote:

"Before any more money is spent pursuing the dream of a "hydrogen economy," [...] policymakers need to get out their calculators and seriously consider the environmental costs of bringing this dream to reality. If they do, they'll find that harnessing hydrogen for widespread use in the energy sector will consume more energy than it will save, and it will worsen, not better, environmental quality."

After showing his calculations, Anthrop later says:

"The environmental implications of moving vehicles with hydrogen-powered fuel cells rather than with gasoline are bracing. Replacing 16 quads of gasoline-fired energy with 32 quads of coal-fired energy to produce electrolysis hydrogen would result in a 2.7-fold increase in carbon emissions."

The article continues with a brief analysis of the pitfalls of using renewable resources (hydro-electric, wind, solar, etc.) as the energy source to produce hydrogen. He concludes with perhaps the most important points:

"...Although technological improvement may well increase the efficiency with which energy is used along some if not all of the production chain, the challenges are so immense that the confident predictions of imminent economic breakthroughs heard from the political class are hard to take seriously.
Decisions about the relative merits of various emerging technologies are best left to the marketplace, where private investors have every incentive to make the soundest bets. If hydrogen-powered fuel cells hold economic promise, investors will have every incentive to promote their development. If they do not, then investors will rightly put their money elsewhere. Subsidies simply impose politically-inspired judgments on market actors, and there is no reason to think that those judgments are better informed than the ones that reign in the marketplace."

(2004-12-08 20:43:32.0/2004-12-08 20:43:32.0) Permalink
Trackback: http://blogs.sun.com/bdonovan/entry/hydrogen_s_empty_environmental_promises

20041206 Monday December 06, 2004

 The MLB Steroid Scandal

I'm a big baseball fan, so frankly this steroid scandal ticks me off. Jason Giambi was once my favorite player in the game when he was with the A's (and quickly became my least favorite when the Yankees bought him). One of the great baseball moments in my life occured when Giambi hit the game winning homer to beat the Yankees a few years ago (2001?). Now even that memory has an asterisk by it. Even more depressing is to think of the possibility that Giambi's former mentor in the mid-90s, Mark McGwire, may have juiced as well. We'll obviously never know for sure who did what, which makes it even more frustrating.

However, despite my angry assumption that they're all guilty, I have to admit that there is a decent chance that many of the freakishly bulked-up players did not use steroids to get as muscular and strong as they are. The reason for my doubt is quite simple: walk into a "health" store some day and look at the alternatives available. In particular, creatine can certainly (in my experience and experience of peers) increase strength if you are in a proper weight-lifting program. Furthermore, simply following a good training and nutrition program can help a person achieve substantial strength gains. Modern training programs also seem to put increased emphasis on proper stretching to maintain flexibility and prevent injury. So it's quite possible that baseball players in "the old days" simply did not work out as much or follow as sound of nutrition and exercise programs as today's players. This, complimented with the drastically more convenient sources of protein (e.g. a player can drink a protein shake after a workout instead of chug a glass of raw eggs or cook a steak) and the extremely popular creatine supplements, could account for a large portion of the increased size and strength of today's baseball players.

That being said, I don't buy for a minute that Bonds thought the creams were "the nutritional supplement flaxseed oil and a rubbing balm for arthritis." Why was he rubbing flaxseed oil on his skin? Is he a model or something? Needs vibrant, glowing skin? Well maybe there is a good reason.. but anyway, I don't buy it. Also, Bonds' attorney, Michael Rains, said

"This is Barry's best friend in the world. Barry trusted him. He trusts him today. He trusts that he never got anything illegal from Greg Anderson."

Ok, so Bonds took something from a guy he trusts, but this guy didn't even know what he was giving him? Yeah, that's it.



(2004-12-06 19:52:27.0/2004-12-06 19:49:48.0) Permalink
Trackback: http://blogs.sun.com/bdonovan/entry/the_mlb_steroid_scandal

20041108 Monday November 08, 2004

 Tomboy Note Taking App

Tomboy is a desktop note-taking wiki for Linux. If you're unfamiliar with how a wiki works, I'll explain using a Tomboy example. Say you want to create a small note, such as "pay electric bill". With Tomboy, you can create links to other notes, such as "Bills" or "electric bill". You could create a note called "Bills" that listed all the bills you need to pay each month. One of the bills in this list could be "electric bill." You could then have a note named "electric bill" that contained the details of that bill, such as when it's due.

Sounds kind of complicated and cumbersome, but it's definitely not. Creating such a network of notes is extremely easy and mostly automatic with Tomboy. For example, I might have a master note (in Tomboy called "Start Here") where I list categories of notes, one of which is "Bills." All I have to do to make "Bills" a note itself is highlight it and click on the "Link" button in Tomboy. Then any time I type the word "Bills" in another note, it automatically creates a link to the "Bills" note. Likewise, if I create a to-do list for today and include "pay electric bill" in that list, "electric bill" will be automatically linked to the "electric bill" entry.

The best is surely to come with Tomboy, including integration into Rhythmbox and Evolution. The fact that it's this useful already is quite promising.

Tomboy requires Mono, which is based on the .NET framework (hey, someone should write something similar in Java!). I ended up downloading a pile of RPMs, but the install was pretty easy after that.



(2004-11-08 09:45:53.0/2004-11-08 09:45:53.0) Permalink
Trackback: http://blogs.sun.com/bdonovan/entry/tomboy_note_taking_app

20041030 Saturday October 30, 2004

 Great concert last night: North Miss. Allstars ....

Last night I saw these three great bands down the street at the Crystal Ballroom. First, The Rising Star Fife & Drum Band took stage... two guys playing snare drums and one playing a bass drum. They walked around the floor for a bit before stepping up on stage. They were then joined by a guitarist (who turned out to be Luther Dickinson of the North Miss. Allstars), who wasn't doing anything too special but was still good. They played some very interesting mixes of music, fusing blues guitar with R&B/rap.

Next the Dirty Dozen Brass Band took stage and rocked as well. Everyone in the band was exceptional... I particularly liked the trombone solo.

Then the North Mississippi Allstars took stage (again.. kinda, since they were on stage with Rising Star) and Luther Dickinson revealed that he was holding back earlier in the show.. he is an awesome guitar player. They had Rising Star on stage a few times with them as well during an old-fashioned anthem-style concert. Some songs must have been 15-20 minutes long with killer slide guitar, drum, and bass solos. If you like rock, blues, and/or rap, these guys are definitely worth checking out.

I highly recommend the North Mississippi Allstars' latest (and live) album, Hill Country Review, which you can download for $9.99 at the iTunes Music Store here.

Or you could catch an upcoming concert... Click here for tour dates



(2004-10-30 09:56:10.0/2004-10-30 09:50:55.0) Permalink
Trackback: http://blogs.sun.com/bdonovan/entry/great_bands_north_mississippi_allstars

20041027 Wednesday October 27, 2004

 CSS support by browsers

Possibly the most annoying thing with developing a web page is having to deal with the varying (especially the poor) support for CSS by various browsers. The most annoying was at one time Netscape in their circa version 4.7 days. I've decided to ignore the possibily that someone out there is using Netscape 4--if they're still using a browser that old, they probably have a terrible monitor as well, in which case my page style is likely irrelevant; I'll just have Netscape 4 ignore the style sheet and render the raw HTML instead--but now the annoying browser is (and has been for a while actually) Internet Explorer. I've had web-developer friends of mine say rather recently that they hate having to deal with Mozilla/Firefox/Netscape and that their site looks fine in IE, implying that it's Mozilla/Firefox/Netscape's fault for not rendering their page as they intended. The truth, however, is that Mozilla (in general... of course there are problems with how Mozilla renders pages as well, but at least they are constantly improving) complies to W3C standards better than IE, and doesn't allow some of the sloppy HTML that IE allows.

The most annoying thing to me is that IE doesn't support hovering over non-link elements. In recent versions of Mozilla/Firefox, you can use CSS to create fast, light-weight menus that JavaScript was previously used to create (see Eric Meyer's how-to at css/edge). I'm not much for flair on a web page, but creating useful menus can be very beneficial and help clean up a page. Using JavaScript has its obvious downfalls, such as code maintenance and the ability for users to disable JavaScript. The sad truth is that most people (unwittingly I presume, for there is no other reason I can think of) use IE instead of the much better Mozilla and other Gecko derivations. This means we have to either not use some of the CSS tools available or create alternate style sheets for various browsers (such as what I did on my other blog, which has pure-CSS menus if you use a recent version of Mozilla or Firefox, and the entire layout is pure CSS (no tables)). If IE would just improve their support of CSS standards, it would make web development much easier for many people. Luckily most of my web development is for internal Sun Microsystems sites, so I don't have to worry about how IE renders the page.

However, I suppose I have a secret desire for IE to not improve because the longer they sit idle, the further ahead Mozilla will get.

/end rant

(2004-10-27 11:52:56.0/2004-10-27 11:51:58.0) Permalink Comments [4]
Trackback: http://blogs.sun.com/bdonovan/entry/css_support_by_browsers

20041026 Tuesday October 26, 2004

 Voices of Iraq

This movie looks interesting: Voices of Iraq. I hope it comes to a theater near me.. so far Portland isn't listed.



(2004-10-27 08:57:37.0/2004-10-26 18:36:48.0) Permalink Comments [1]
Trackback: http://blogs.sun.com/bdonovan/entry/voices_of_iraq

20041024 Sunday October 24, 2004

 Musicmobs

If you haven't already seen it, Musicmobs is a great online music community and music suggestion engine, among other things. It works best with iTunes, especially if you use a Mac--in which case you can also use the cool Mobster software that integrates seamlessly with iTunes--but it's also great for Linux users as well if you use Rhythmbox, an integrated music management system inspired by iTunes.

Musicmobs is simple to use: Just sign up (you don't even need to fill out a big form to do so) and upload your iTunes XML library file. Then Musicmobs lets you see what music you have in common with other users, gives you music suggestions, and links songs and albums to the iTunes Music Store (one feature you can't get in Linux of course). It's fun to browse through the artists and the various Musicmobs user pages to see what others have. You can leave comments on their pages or add them to your list of favorite users as well. I like Musicmobs because, unlike most "network" web sites, Musicmobs is very focused on one thing: music. It's not a dating service or a way to set up parties or anything like that.

To use Rhythmbox with Musicmobs, I have a crude Perl script available here that you can download and run rather easily to parse your Rhythmbox XML library file and upload it to Musicmobs.



(2004-10-24 18:38:56.0/2004-10-24 17:56:57.0) Permalink Comments [3]
Trackback: http://blogs.sun.com/bdonovan/entry/musicmobs

 Hello World

This is just my first post to this blog. I plan to write about a variety of topics ranging from programming to philosophy to baseball. I'm currently a quality engineer in the high-end servers business unit at Sun Microsystems, Inc. I am blessed with what I find to be a very interesting and challenging job. Where else would I get to blend my interest in cutting edge computer hardware, statistics, web programming, and web design? I also get to learn new programming and scripting languages and develop better UNIX skills. Right now I'm working on web tools that aggregate manufacturing test data into useful summaries for product engineers (my previous position). I love to automate and simplify things in general, so this is right up my alley.



(2004-10-24 17:31:27.0/2004-10-24 17:22:35.0) Permalink
Trackback: http://blogs.sun.com/bdonovan/entry/hello_world


« December 2009
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today


XML







Today's Page Hits: 23