RSS 0.94: Spam Free

1 min read

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">&lt;img src="http://host/email.gif"&gt;</webMaster>
<webMaster type="text/html">&lt;a href="http://host/contact.html"&gt;contact me&lt;/a&gt;</webMaster>
<webMaster type="text/html">&lt;a href="ldap://host/o=abc??sub?(cn=John Doe)"&gt;John Doe&lt;/a&gt;</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

1 min read

holidayThe History of Labor Day.

photosCouple new photo albums: Jake's Christening and BBQ @ Flora

moviesTrailer: The Animatrix.

javaEclipse 2.0.1 released. There's even an unofficial release for Jaguar.

javaJava 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.class file:

  echo '/usr/bin/java -cp "'$cwd'" JavaStatement' > run.command
  chmod 755 run.command

To execute simply double click on the run.command file.

javaYou may want to check this Eclipse Plugins repository.

newsGet a Tattoo to monitor Diabetes.

Father's Day Tokenizer

2 min read

holidayHappy Father's Day.

javaCerty is offering various free online Java certifications.

javaI'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.

usWe're going to give the Smokey Joe a try in the afternoon. Should be fun.

javaVersion 1.4.1 of Jakarta Cactus, a server-side unit testing framework, has been released.

La Question du Jour

1 min read

javaI'm looking for ways to create password protected Zip archives using Java. If you have any suggestions let me know.

javaHenri has some interesting Ant tidbits.

javaMy 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.

javaSomeone on the Java-Dev mailing list asked about getting the MRJ JavaDiddler to run under OS X. I suggested giving BeanShell a try instead.

macThe 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.

macNew Web Page: Mac OS X Server Resources For Developers.

macNew Internet Developer Article: Installing Perl 5.8 on Jaguar.

newsCyberlaundry: eSuds. What will they think of next?

linuxYet another try at a Linux Desktop Edition.

newsParis remembers Diana five years on.

Smokey Joe

1 min read

newsAlexa Top 500 websites.

javaJava Recipe of the Day: Performance Timing.

newsRSS 0.9.4 draft specs.

windowsTightVNC 1.2.6 has been released.

javaSitraka is offering a seminar on Assuring Maximum Performance in J2EE Systems in Seattle on September 4th. I've registered for it but I'm not sure if I will actually attend.

usWe're going to go help Vicki' sister, Flora, pickup a Smokey Joe for her new house this afternoon. We're supposed to have a barbecue at her place on Sunday.

Random OS X 10.2 Observations

1 min read

My observations (and fixes) on Jaguar upon installation:

/usr/local/bin is no longer in the $PATH.
  To fix, execute:
    echo "source /usr/share/tcsh/examples/rc" >> ~/.tcshrc
    echo "source /usr/share/tcsh/examples/login" >> ~/.login
NcFTP has been removed.
  See my previous installation instructions or get it here.
/usr/share/init/tcsh/aliases is gone.
  To fix, execute:
    echo "source /usr/share/tcsh/examples/aliases" >> ~/.tcshrc
You might also want to look at this article.
FTP access is turned off.
  Needs to be turned back on via the Sharing control panel.
Printer Sharing is now available in the Sharing control panel.
  It's about time. Very cool!
However USB Printer Sharing with computers running OS 9 is only supported through Classic. Does not seem to work with 10.1.5 or Windows either.
The Finder command-option shortcuts have been changed to command-shift.
  Takes some time getting used to.
The locate/whatis databases are not rebuilt.
  To fix, execute:
    sudo /private/etc/weekly
The Address Book LDAP implementation is useless.
  Returning the name, email address and phone number is just not good enough.
Windows File Sharing is not as straight forward as it looks.
  I was able to mount a shared folder from a Windows machine, but not the other way around. Still working on that one.
[Update] Resetting my password did the trick. Thanks Mike.
The Finder open window zooming effect is annoying.
  How do I turn the damn thing off?
An ODBC Administrator is included in the Utilities folder.
  I haven't tried it, but should prove to be useful.
A Terminal window can now be split into horizontal panes.
  Sweet!
This new cursor Busy Cursor is way too fat.
  And I don't mean pretty hot and tempting.
command-option-click to hide current application.
  Just like it has been since System 7. option-click is still supported too. Great!
Interface Sound Effects are turned on by default.
  Can be turned off in the Sound control panel.
The ability to Replace All items when copying/moving files has been added.
  Thank God! No smart folder replace like Windows though.
VNCDimension 0.7.10 no longer works.
  Thankfully VNCThing still works.
Unfortunately this annoying problem has not been addressed. At least there is a way navigate thru the elements of open/save dialogs using the tab key.

Jikes & OS X (II)

1 min read

linuxI upgraded the server to bind 9.2.1 release 1.7x.2 last night.

musicI voted for Kelly, again. I'm just so predictable.

linuxIs Red Hat the Microsoft of Linux?

musicRIAA promotes file sharing.

windowsMicrosoft: XP SP1 "Within 10 Days"

newsShop till you drop. Size does matter.

windowsMicrosoft Publishes 272 Windows APIs.

javaSome problems with Jikes 1.1.6 have been fixed and are available via CVS. Here are the steps I used to compile and install the latest snapshot under OS X 10.1.5:

cvs -d :pserver:[email protected]:/usr/cvs/jikes login
cvs -d :pserver:[email protected]:/usr/cvs/jikes checkout jikes
cd jikes
./configure
sudo make install
rehash
cd ..
rm -rf jikes

blankThe first cvs command will prompt for a password, simply enter "anoncvs".

Someone has made a patch for Jaguar, but I haven't had a chance to tried it, yet.

javaThe Jakarta Commons BeanUtils version 1.4.1 has been released.

javaVersion 3.4 of the NetBeans IDE has also been released.