Lean & Mean
I spent most of yesterday's reinstalling Windows XP on my primary development machine. It never really recovered since the Mozilla attack.
A pretty smooth install overall. Except for one problem with Norton SystemWorks 2002, which took me a little while to isolate.At least it gave me a chance to clean things up; lean and mean. I like it.
I think it may have been M$ not so subtle way to let me know I needed to get ready for the imminent SP 1 release.
In case you've been living on another planet or something, my girl, Kelly, won. She was on Leno last night, and is doing the morning shows tour. Unfortunately, her voice is completely shot.
The Apache Tomcat team is proud to announce that, after nearly one year of active development, the first stable release of the Tomcat 4.1.x branch has been released.
Over Tomcat 4.0, Tomcat 4.1 includes:
- JMX based administration features
- JSP and Struts based administration web application
- New Coyote HTTP/1.1 connector
- New Coyote JK2 AJP 1.3 connector
- Rewritten Jasper JSP page compiler
- Performance and memory efficiency improvements
- Enhanced manager application support for integration with development tools
- Custom Ant tasks to interact with the manager application directly from build.xml scripts
- Many other miscellaneous improvements
Adam Curry: Celebrity Sit-Coms
Rick has just discovered ProGuard. I've been using it to obfuscate IP Monitor for quite a while now. For our commercial releases we usually use Zelix KlassMaster.
Russell is a new Eclipse convert.
I solved my IDE problems a long time ago. I use a combination of Eclipse, IDEA, CodeWarrior and Sun One Studio (formerly known as Forte). As far as text editors: jEdit, UltraEdit, Visual SlickEdit and BBEdit.They all have pluses and minuses. It all comes down to choosing the best tool for the task at hand.
Where did my music content music go?
Music labels are bleeding. Piffle
The music industry reminds me of a dog chasing its tail. Pointless. The slump has very little to do with peer-to-peer music sharing. In the grand schema of things, it is insignificant. The problem lies solely with all the crap being constantly shoved down the audience throat. Given time, they will spit it back.Yes. I do not buy as many CDs as I once did. The industry is too fickled. Everything is tailored towards teens, which have the attention span of a lollipop. The flavor of the day, no doubt an overnight sensation, will be featured on VH1's One Hit Wonders next week.
Where the hell did my music content go?
I guess I'll have to wait for the next reunion tour to listen to tunes I can actually stomach.
Java theory and practice: I have to document THAT?
Blogging Roller: Today, I woke up to find an AIM message on the screen from Mike informing me that he has set us up and that he has already entered our SourceForge bugs into the system…
How Hot is HotSpot?
James Strachan: There seems to be this common, misguided assumption that because you're using XML you need to define schemas for everything…
Jenna wants to do Britney. Stranger than fiction, but I'll watch.
Dave: Last night I added two new elements to RSS 0.94 based on suggestions from Brent Simmons and Eric Thauvin…
Random Java Peeve: The StringBuffer Myth.
RSS 0.94: Spam Free
The RSS 0.94 draft is currently discussed on various blogs. I'm very interested in the matter since we made jTalk capable of generating both RSS and RDF channels. Like many others, I have a few ideas on extending the proposed specification.
Spam Free
I completely agree with Chuck Shotton. There is a pressing need for a content type attribute. But it also must be explicitly supported by the <webMaster/> and <managingEditor/> sub-elements. Most of us purposely employ various methods to cloak email addresses on web pages, while they are left wide open on all syndicated feeds. How long will it be before the email extractors figure out a way to collect addresses from our RSS-based feeds? They might even do so already. The one thing we surely don't need is more spam. Moreover, the current email address format [[email protected] (Full Name)] is non-standard. RSS 0.9.4 needs to utilize common Internet standards, not create unsupported ones. The addition of a type attribute would allow us to make use of our clever cloaking techniques. For examples:
<webMaster type="text/plain">erik at thauvin dot net</webMaster><webMaster type="text/html"><img src="http://host/email.gif"></webMaster>
<webMaster type="text/html"><a href="http://host/contact.html">contact me</a></webMaster><webMaster type="text/html"><a href="ldap://host/o=abc??sub?(cn=John Doe)">John Doe</a></webMaster>
The sky's the limit.
Comments
I'd also like to see an optional <comments/> sub-element added to <item/>. The required tag value would contain the location of the readers' comments associated with a specific item. For example:
<comments>http://host/?comments=1&postid=1</comments>
Base
Finally, an optional <base/> sub-element added to <channel/>. The required tag value would contain the absolute URI of the current channel. In the exact same fashion, the <base> tag is used in HTML document headers. For example:
<base>http://host/path/</base>
RSS aggregators will use the channel's base location to properly handle all relative links, etc. In other words:
<link>2002/08/27</link>
would be automatically interpreted as:
http://host/path/2002/08/27
Dates
I don't agree with the purpose and format of the new <pubDate/> sub-element of <item/>. First, the obsolete RFC-822 reference should be updated to point to RFC-2822. Furthermore, the value should take either date or date-time formats. Meaning that it should accept:
Tue, 3 Sep 2002 13:13:11 GMT or 3 Sep 2002
Sorry, Brent. I feel your pain, mon ami. But the date should reflect the actual publication date, not the modification date/time. What you're really looking for is a <modDate/> tag. Not a bad idea. I like it. I've checked the <dc:date/> implementation in quite a few RSS 1.0 feeds, and there really doesn't seem to be much willingness to provide a specific time at the item level. Sometimes it is wise to learn from the competition. Having multiple choices is a good thing.
Labor Day Diddler
The History of Labor Day.
Couple new photo albums: Jake's Christening and BBQ @ Flora
Trailer: The Animatrix.
Eclipse 2.0.1 released. There's even an unofficial release for Jaguar.
Java Tip 131: Make a statement with javac!
A pretty nifty utility whenever in need to quickly execute a few lines of code. It operates pretty much the same way as the MRJ Java Diddler did.To create a command launcher under OS X issue the following commands from within the directory containing the
JavaStatement.classfile:
echo '/usr/bin/java -cp "'$cwd'" JavaStatement' > run.command
chmod 755 run.commandTo execute simply double click on the run.command file.
You may want to check this Eclipse Plugins repository.
Get a Tattoo to monitor Diabetes.
Father's Day Tokenizer
Happy Father's Day.
Certy is offering various free online Java certifications.
I've been trying to make use of the PowerfulTokenizer I mentioned a few days ago. The author had the right idea, but his implementation is incomplete and riddled with bugs.
I started fixing it, but quickly realized it would be faster to roll my own.
Considering our particular needs it made more sense to implement it as part of the jTalk Utility class. But the gist of it goes something like this:
// The delimited string
String csv = ",2,3,"4, 4.1",5,,7,""5, 5.1""";
// The delimiter (i.e.: comma, tab, etc.)
String delim = ",";
// Tokenize the data
StringTokenizer st = new StringTokenizer(csv, delim, true);
// The buffer used to hold substrings
StringBuffer buffer = new StringBuffer(0);
// The current token
String token;
// The previous token
String oldToken = delim;
// Loop thru the tokens
while (st.hasMoreTokens())
{
// Get the current token
token = st.nextToken();
// If the current token and old token are both equal to the
// delimiter the current value is blank
if (token.equals(delim))
{
if (oldToken.equals(delim))
{
// Output a blank value
System.out.println("");
}
}
else
{
// A substring always starts with a double quote
if (token.charAt(0) == '"')
{
// Reset the buffer
buffer.setLength(0);
// Get the current substring chunk skipping the starting
// double quote
buffer.append(token.substring(1));
// Loop until the end of the substring
while (!(token.endsWith(""")))
{
// Get the current substring chunk
token = st.nextToken();
// Append it to the buffer
buffer.append(token);
}
// Output the buffer if not empty
if (buffer.length() > 0)
{
// Output the buffer skipping the ending double quote
System.out.println(
buffer.substring(0, buffer.length() - 1)));
}
}
else
{
// Output the trimmed token
System.out.println(token.trim());
}
}
// Save the value of the token
oldToken = token;
}You may also want to implement a method which automatically converts pairs of double quotes ("") to single double quotes (") which is a common practice in most export formats.
We're going to give the Smokey Joe a try in the afternoon. Should be fun.
Version 1.4.1 of Jakarta Cactus, a server-side unit testing framework, has been released.
La Question du Jour
I'm looking for ways to create password protected Zip archives using Java. If you have any suggestions let me know.
Henri has some interesting Ant tidbits.
My partner asked me the following question yesterday:
I am trying to get the indexOf a header column regardless of it's case.
This is how I do it case sensitive:
int pos = data.indexOf("Custom List 2");But I also want to find the case where it's "custom list 2".
The answer? Simple, make everything lowercase:
int pos = data.toLowerCase().indexOf("custom list 2");But I can definitely understand how puzzling it could be to someone who doesn't write code for a living.
Someone on the Java-Dev mailing list asked about getting the MRJ JavaDiddler to run under OS X. I suggested giving BeanShell a try instead.
The July 2002 Mac OS X 10.2 Developer Tools and the August 2002 Update are now available for free download by all ADC Members.
I was able to compile the latest Jikes CVS snapshot once I applied the update.
New Web Page: Mac OS X Server Resources For Developers.
New Internet Developer Article: Installing Perl 5.8 on Jaguar.
Cyberlaundry: eSuds. What will they think of next?
Yet another try at a Linux Desktop Edition.
Paris remembers Diana five years on.