Archive

Archive for October, 2003

Using CGLIB to speed up XML parsing

October 21st, 2003

Good stuff from Chris Nokleberg… using CGLIB to make SAX parsing zippy:

For validated documents this is safe and gives a 3X speedup.

I don’t think I’d be likely to use the if/else if/else if structure that he mentions, because that seems like the kind of thing that is screaming out for separate objects. I believe Fowler even has a refactoring for this, but it’s too early in the morning to recall which one.

Software Development

SWT and memory management

October 20th, 2003

Pazu laments the pain of SWT. I was seriously considering Eclipse as an application framework, and SWT’s memory management needs were among the reasons that I opted for another path.

For those who haven’t looked at SWT, here’s the scoop: every SWT component (including ones that you write) have a dispose() method. If you make a panel that has several widgets (or even fonts and colors!) on it, you need to keep track of those and explicitly call their dispose() methods from your own dispose() method. If you don’t, you’ve got a memory leak… because SWT will never release the native widgets that it has allocated.

Why does SWT have this bit of nastiness and Swing does not? Because Swing doesn’t allocate native widgets. It draws all of its widgets, directly in Java code, using basic AWT calls.

If Java had real, reliable destructors this would not be a problem. But, alas…

Software Development

Hessian binary web services protocol

October 20th, 2003

Via WIRED I learned about Hessian, which is a web services protocol designed by Caucho, the Resin people. It’s designed to be a very easy API, and since the protocol is binary you don’t need attachments to send binary files, which is something that may have value in some work that I’m doing.

Software Development

Agile Methods: The Bottom Line

October 20th, 2003

Bob Martin provides a great article that sums up the value of Agile programming in Agile Methods. The bottom Line.. The summary: agile methods provide the data necessary to make business decisions. That’s a great observation, and I think it is an important part of what XP is about.

Software Development

Huh? Corp

October 20th, 2003

The web site for Huh? Corp is a great piece of satire. There were so many companies with websites like this one a couple of years back. (I even worked for one!) It really shows how much it can pay to be known for something rather than everything.

Money

iTunes: Where’s the music? MP3s?

October 20th, 2003

This weekend, I fired up iTunes for the first time (on both my Mac and PC). I also made my first purchases from the iTunes Music Store (ITMS).

First thing: I do like iTunes. It’s a nice piece of software with a good interface. Some people have complained about memory usage and performance, but on my 2.4GHz Celeron and 1GHz G4, there doesn’t seem to be a problem. Using iTunes and the ITMS was very easy and painless. Synchronization with the iPod was definitely a lot slicker than it was with MusicMatch.

Regarding the ITMS: Apple talks about having 400,000 tracks by the end of October, from all 5 major labels and over 200 independents. But, it’s very easy to spot gaps in their music. Why are bands not signing up for this? I can understand not finding songs by Queen, because the label needs to make sure that digital delivery rights are cleared with the songs’ publisher. But, why can’t I find Nickelback? You’d think that any platinum band releasing a new album should be on ITMS at this point, but they’re not.

I watched Steve Jobs’ announcement of iTunes for Windows. While trashing Windows Media Player, he said “we’ve heard over and over from customers that what they want is to be able to create MP3 files”. Let me state for the record that what I want to buy are MP3 files as well.

ITMS has the least restrictive DRM out there, which I’m happy about. But, if I’m looking to buy a whole album, I’ll buy the CD. With a CD, I can rip good quality MP3s with no DRM hassles at all. The main reason that I’ll use ITMS at this point is that it is the only inexpensive way to buy single songs that is not crippling to use.

Note to the music, movie, software, book (and any other media) companies: copy protection sucks. Provide a good product at a reasonable price and you won’t need it. The software business went through this cycle and unanimously came to this conclusion.

Music

Java Developers Almanac

October 17th, 2003

This looks like a treasure trove of good tips. If this site is as useful as it looks on the surface, I may have to buy the book! Java Examples from The Java Developers Almanac 1.4

Software Development

Bush is in charge?

October 17th, 2003

Earlier this week, Bush declare that he was in charge in his government after media outlets continued to talk about the infighting between Bush’s cabinet members. Now we get a story of Bush’s latest secret order to his staff:

President Bush - living up to his recent declaration that he is in charge - told his top officials to “stop the leaks” to the media, or else.

News of Bush’s order leaked almost immediately.

A little over a year until the election!

Politics

iTunes for Windows announced

October 16th, 2003

From MacRumors’ live coverage of Apple’s music event today, they are reporting that Apple has announced iTunes for Windows. Steve Jobs said that Apple current has 70% of the downloaded music market, and have raised the bar on the number of downloads they expect.

Now, we are clearly the market leader here. We set some goals. We wanted to sell 1 million in the first 6 months, but sold 1 million in the first week. Reset goal to 10 milllion in 6 months, but reached it in 4 months. Now… want to sell 100 million songs in a year - by April 2004.

To get there, they’ve announced an exclusive deal with AOL that will put iTunes links all over the AOL music site. They’ve also got a big Superbowl promotion going with Pepsi, where 1 in 3 Pepsi bottles is a winner of a free iTunes song.

Apple’s marketing fu is staggering. This launch really makes the original launches of Pressplay and MusicNet look like the jokes that they were.

Apple also announced new iPod peripherals: digicam storage and a microphone. These do not particularly excite me… but you can tell from the event that these were not the big announcement. Apple is expecting big things from iTunes for Windows… $100 million in first year revenue from songs, plus mega sales of iPods to follow.

Music

Swing and CSS

October 16th, 2003

In the article Swing and CSS, Joshua Marinacci shows a simple implementation of a CSS-like system for styling Swing interfaces. It’s an interesting idea, and the implementation looks potentially flexible enough to do interesting things. However, I agree with some of the commenters that what this is trying to do is essentially the same as what L&Fs are all about. Maybe the syntax will be more accessible to non-programmers.

CSS is great for the web, because the web is presenting documents. Swing is not used for presenting documents… it’s used for creating desktop applications, which (generally) should have a consistent L&F with the rest of the desktop. If you’re making MP3 playing software, sure, you may want to make that skinnable. But, for large business applications you want something that looks like a normal desktop app. Standard Swing L&Fs are designed to do that (regardless of how well they succeed at that task).

Software Development