Java

Handling Numeric XML Entities in a Weblog Move

I'm exporting a Radio UserLand weblog to Movable Type for a client, turning Radio's XML archive of weblog entries into a Movable Type import file. I wrote a Java application that employs the XOM XML library to read Radio's weblog data. Some numeric character entities in Radio's XML data threw me for a loop: â (’), À (¿), Ž (é), ‡ (á) and — (ó). They were transformed -- either by XOM or the Xerces XML parser that it uses -- ... (read more)

New Book: Programming with Java in 24 Hours

I just launched the web site for Sams Teach Yourself Programming with Java in 24 Hours, my 21st computer book since I began writing them in 1996. I'm not sure how this happened. I went to college to learn interpretive dance. This is the fourth edition of the book, updated to cover Java 2 version 5. I wrote the first in a 17-day haze in 1997, covering Java 1.1 and its class library, which is less than one-tenth the size of the Java 2 class library today. Over the years, the book has grown to 558 ... (read more)

Displaying XML Data with PHP

I recently finished writing Sams Teach Yourself Programming with Java in 24 Hours, the fourth edition of an introductory book for Java programmers, which comes out in around two weeks. I've been given wide editorial license with the book, so it contains unusual projects like Lottorobics, a lottery simulation applet that demonstrates why "Win the Lotto" is a terrible retirement plan. The new edition adds chapters on XML and XML-RPC that use XOM and Apache XML-RPC, two great open source class ... (read more)

Keeping Computer Books Up-to-Date

Charles Wright in the Sydney Morning Herald: With the number of blogs increasing at a phenomenal rate, more people than ever will find themselves dealing with the market-leading Movable Type. The Movable Type 3 Bible, from Wiley, gives you a thorough grounding in the complexities of a blogging platform that, on the surface, looks relatively easy to master but repays the effort required to learn about its more powerful features. Increasingly, these books are rendered somewhat out of date with ... (read more)

Open Source, Insert Foot

As a Java devotee, I grimace whenever language inventor James Gosling expounds to the press on the subject of open source. In a story noting the 10th birthday of Java, Gosling said, "We did do it as close to open source as you could and still be a corporation." Last month, Gosling responded to an Apache proposal to create an open source version of Java with puzzlement: It's often difficult to get a good picture from the open source community of what they actually object to in what we're doing. ... (read more)

Choosing a Programmer's Editor

A reader laments the difficulty of writing programs in a plain-vanilla text editor: I have a question that I can't seem to frame correctly. It relates to my inability to format nested punctuation (in any language, on any day). I would dearly love to see a quasi-visual editor which replaces the {{ ... }} with nested shading, and bold type used to identify classes, italics for variables, etc. etc. It clearly calls for a different approach to the text-bound, linear approach to coding. What would ... (read more)An e-mail from a reader of Sams Teach Yourself Java 2 in 24 Hours: i really enjoyed reading what you wrote and especially the way you wrote it!! all i want to know now is how i can make a virus because some of my pals are bugging me and i'm really pissed! and like you i feel that i'd rather be georgia vs. mafiaboy !! thanks again and please send me a repley as soon as possible and please please make sure to include a virus making "formula in it". bye ... (read more)Mason Glaves believes that Sun has killed the Java Media Framework without telling anyone: If you've got a six-month project, and you only need one small addition, or one small bug-fix to JMF to complete it on time, it's fairly easy to assume that by the time the release date comes around, you'll have the next release of JMF and will be ready to go. The next release is not coming. From the chatter on the list it has become more and more obvious that Sun has quietly abandoned JMF, but isn't ... (read more)

Sun Frowns on StringTokenizer

While working on a new Java book this weekend, I discovered that Sun is now discouraging programmers from using the java.util.StringTokenizer class, as noted in the class documentation: StringTokenizer is a legacy class that is retained for compatibility reasons although its use is discouraged in new code. It is recommended that anyone seeking this functionality use the split method of String or the java.util.regex package instead. The following example illustrates how the String.split method ... (read more)

May Diverse Be With You

The ongoing debate over weblogger diversity leaves me wishing there were better tools to find new voices making their way up the long tail. I'm too lazy to find them on my own (with the exception of new bloggers in Jacksonville and St. Augustine), so I link to the same people often -- mostly the crowd of plugged-in web technologists who I have read for years. They are admittedly a largely white and male group, but I assuage my liberal guilt by linking often to Bill Lazar, who as you may not ... (read more)