|

 |
|
|
|
| A Developer's Perspective |
|
 |
Rick Ross is the founder of
Javalobby. He is a frequent speaker at Java-related events and a well-known
advocate for Java developer interests.. |
|
Don't forget the simple solution (like I did)
We needed to modify the firmware of a specialized device
today, and doing so required that we actually have a computer with a parallel
port. My, how times have changed! Neither my laptop nor my desktop machine has
any serial or parallel ports, although there must be at least 8 USB ports on my
desktop, if not more. At first I had mistakenly thought the 25-pin, male
connector was an old-fashioned serial port. I was looking all over for cables
and adapters to get the device connected to one of the older machines we have
running upstairs as a local server - those being the only machines here that
have any serial ports.
I located a cable and adapter combination that allowed me to get
things plugged in, but the device programming software wouldn't work. A little
more research revealed that it was a parallel port, not a 25-pin serial port.
Luckily, Matt's desktop machine has a parallel port, so things were looking
hopeful. We tried the only cable which matched the genders of both ends, but it
was apparently not correct, and I started to think we were out of luck. There
was little hope of finding the correct cable in the spaghetti heap of dozens of
tangled up, old cables we have heaped into a bin in the back closet. Then came
Mike's moment of brilliance for the day. "Don't worry about the cable," he said,
"just plug the thing straight into the port."
The simple solution… the one right at your fingertips, so obvious
that you can't believe you overlooked it. That's the one most of us really want,
although it's incredibly easy for any of us to overcomplicate our development
problems and miss solutions that don't require any ingenuity at all. Mike
brought that concept front and center for me today with his clear-minded
suggestion (which worked perfectly, by the way.) We plugged the device's 6-inch
ribbon cable straight into Matt's parallel port and got the job done in minutes.
I couldn't help wondering how many times we have encountered similar
circumstances in our software projects, struggling to devise elaborate
workarounds when the simple solution should be drop-dead obvious. It's food for
thought.
Not So SimpleDateFormat
Speaking of simple, we also had
a headache today with Java's ironically named "SimpleDateFormat." A utility
we're creating to support dzone.com uses the Rome library to fetch and parse
news feeds from a number of sources. Simple enough, right? Not on your life! One
of the feeds we need to work with uses the Dublin Core extensions to provide
metadata that enhances the limited information included in standard RSS. The
<dc:date> element permits a wider range of acceptable formats than its RSS
counterpart, and the feed we wanted to parse uses one which we hadn't previously
encountered. Some investigation led us to believe the date format, which
includes a decimal fraction of a second with six digits of precision, should be
considered correct and acceptable in the context.
Nonetheless, this particular date format was giving the Rome
library a bad case of indigestion. The problem turned out to be that Rome uses
SimpleDateFormat to parse dates, and apparently SimpleDateFormat is simply not
able to parse a 6-digit decimal fraction of a second (in effect, microseconds.)
SimpleDateFormat is willing and able to parse milliseconds, but if you have
microseconds your out of luck. No problem, you say, isn't it just a trivial
matter of ignoring the three least significant digits? Nope, it doesn't work
that way, and you cannot apparently instruct SimpleDateFormat to ignore data by
pattern. Characters in your format string are either interpreted or not, but the
characters which are not interpreted must be quoted literals - wildcards and
patterns aren't allowed. There's no way for the format string to say something
like "ignore the next three characters of input."
We managed to work around the problem in this instance by writing
a modified version of Rome's DateParser class. Thankfully we were able to just
copy the original Rome class, make the necessary mods, and put the compiled
class into our classpath so it overrides the one in the jar file. It's poor
form, but doing the job in a more proper way would have required a ton more
effort for limited additional benefit. It just wasn't worth the hassle and
expense. Our compromise will do the trick, even if it stinks of being a dodgy
hack. Remember, all we really wanted to do was read and parse a valid RSS
feed.
The date format we needed to read is valid according to both ISO
and W3C specifications, and it's really not unreasonable for a date to have this
level of precision even if you may not often need such precision. Since
SimpleDateFormat can't be coaxed into digesting it, there doesn't seem to be any
reasonable workaround that does not include munging the date input string before
feeding it to the parser. Rome is a super-handy Java library for reading and
publishing all kinds of feeds, but this valid feed will never work in Rome
unless the library overcomes the limitations of the underlying SimpleDateFormat
for date parsing. Not so simple after all, but nothing about dates in Java is
simple, is it?
Until next time,
Rick Ross
rick@javalobby.org
AIM or Yahoo Messenger: RickRossJL
|
| |
|
|
|
|
|
 |
Matthew Schmidt is the man behind
the scenes at Javalobby. If you have questions or concerns, feel free to email
him at matt@javalobby.org. |
|
Preparing for a major upgrade
Yes yes, I know that each week I write about this upgrade or that
one, but hopefully by this time tomorrow we’ll have successfully completed one
of the upgrades that I’ve been putting off for some time now. JavaForge has come a long way since we
launched it less than a year ago, and now it’s time to give it its first
overhaul and makeover. We’re going to be upgrading to the latest version of the
Codebeamer software. This update has been a long time coming and I have to
admit, just a little bit scary. Fortunately, I think we’ve overcome some of the
major issues blocking it and we’ll be holding our breath tomorrow when we roll
it out to see whether it stands up to the test of the traffic of JavaForge.
So, enough about the stress that comes with the upgrade, what
goodies can we expect from this upgrade? First, the user interface has
lightened up a bit. It’s not quite so dark and 1990s. The first major feature
you’ll find is that you won’t need to always see EVERY project along the
left-hand side. There are these things called “working sets” which let a
registered user choose the projects to see along the side. By default, there
are two options, “All” or “I’m a member”. You’re likely going to want to see
the “I’m a member” list, which is much more useful. You can also create your
own sets for a completely different set of projects, perhaps some you’re
watching. The next update is that the wiki support is now pervasive throughout
all descriptions and pages. You can use wiki syntax everywhere and even get a
huge wiki space to do whatever you want with it. While this might seem like old
hat, you should check out the “Wiki Plugins” that Intland has introduced. Check
the help files as you’re editing a field that supports wiki to see some of the
examples and how to use the new plugins.
The new version also answers a recently requested feature of
JavaForge users – commit notification from subversion and CVS. I’m not entirely
sure how these particular features works, but again, check out the help link.
In addition to the smattering of new features, there are tons of bug fixes since
the version that we’ve been running and we have some nice ideas for making
JavaForge feel more useful and be more of a community. For the full list of
changes since the version we’re running, check out the changelog on the
Intland site.
Java can look good and do multimedia too!
One of the
two major complaints about Java as a platform is that it looks like crap and
doesn’t have any support for real multimedia. This morning, Riyad posted a nice
find (which it turns out I had seen via Romain Guy but didn’t realize it)
called ionDB. Ion is self-described as “the
Media browser for finding, managing and experiencing web podcasts, videos and
photos!” It’s written in Java, looks good, and has a ton of features for
managing your podcasts and mp3s. It also appears to have some nice integration
with iTunes and it’s been reported that it calls out to the host operating
system to play any of the video types that the OS supports. In my limited
trials on Windows, it felt fairly snappy and the video streaming was very
smooth. There’s no doubt that it still needs a little work, but they’re also
headed in some interesting directions with sharable playlists. From the ion
homepage you can browse the playlists of other users and add them to Ion (or any
other player that supports it such as iTunes) via a special RSS feed. Nice job
guys, it’s good to see Java on the desktop producing excellent multi-media
applications. Also, if you’re looking for another slick multi-media application
written in Java, check out SimpleCenter. It’s on its way to being
open sourced and while it seems it only works on Windows, it looks pretty damned
good. Check it out.
Only a few more podcasts to go
We’ve been working
furiously to finish producing our initial EclipseZone Callisto Podcast
series and we’ve only got 1 (with maybe an extra one) left to go. This
morning we launched episode
number 6, which is an interview with the CDT project lead, Doug Schaefer.
While it’s not strictly Java, it’s interesting to see how people are adding
support for other well-entrenched languages such as C++ and C#. Tomorrow, we
hope to have one more episode up and running for the hundreds of people
subscribed to our podcast feed. Episode 7 covers BIRT (Business Intelligence
Reporting Tool) and should be an interesting one to listen to. Jason Weathersby
is one of the participants and is also an active member at EclipseZone.
So, now that we’re approaching the end of our initial podcast
experiment, we’re wondering: should we do more? We seem to have found a
reliable way to do podcasts and decent transcriptions of the audio, so I don’t
believe it would be that complicated to do some of these on a somewhat regular
basis. Would more podcasts be interesting? If so, what would you like to hear
in the ‘casts? News, interviews, beer drinking and jokes? We’re open to any
suggestions that you guys might have, so send them to the editors. They
like getting mail anyway!
Until Next Time,
Matthew Schmidt
matt@javalobby.org
Yahoo IM:
mattschmidtjl
|
| |
|
|
|
|
|
 |
Erik C. Thauvin maintains a blog , as well as one of the web's
first and most popular linkblogs, which he updates daily
with the latest Java and technology news. |
|
|
|
|
|
 |
A recap of some of the most
popular and active Javalobby.org
discussions this week. |
|
|
|
|
|
 |
Technical papers & research
related to Java development. |
 |
Product and service announcements
for Java developers. |
| Aranea 1.0 M4 |
|
This milestone includes enhancements to UiLib, improved
handling of internal class loading, means of communications between popups and
extension defining mechanism
|
| Full Announcement & Discussion |
Posted By: Jevgeni Kabanov - (-1
Replies) |
| Wicket 1.2.1 available |
|
The Wicket project has released the maintenance release
Wicket 1.2.1. Wicket is an open source, Java component based web application
framework using just Java and HTML.
|
| Full Announcement & Discussion |
Posted By: Martijn Dashorst - (0
Replies) |
| CAPXOUS AutoComplete 1.0.1 |
|
An AJAX autocomplete component make your software sizzle. #
July 19, 1.0.1 released. Quick release that fixes a serious bug of 1.0. # July
16, 1.0 released. Support .NET Web Service.
|
| Full Announcement & Discussion |
Posted By: Cheng Guangnan - (0
Replies) |
|
|
|

 
@Macarlo,
Inc.
@Macarlo's Shareware
& Web
OS/2
Java Lobby Member
Java Site Accredited
[TOP] [HOME] [INDEX]
|