grack.com

In his latest post about RSS, Robert Scoble says:

“Now, imagine a new syndication format that brought up a page that showed what a news aggregator was, and explained how the system worked and why it’s more productive.”

My challenge: create a plug-in XSL file that works with RSS to explain to the user what RSS is and point him at a application to read RSS.

This is actually a fairly easy task.  XSL can be plugged into any arbitrary XML file via something called a processing instruction.  In the XML file, these appear as tags of the form:

<?some-processing-instruction some-attribute="some-value"?>  

There is a special processing instruction that ties an XSL transformation stylesheet to an XML document:

<?xml-stylesheet link="stylesheet.xsl" type="text/xsl"?>

Once the XML file was pointed at an XSL file, the next task was creating a quick-and-dirty XSLT transformation that picks out various bits from the RSS feed itself to create a customized-looking HTML page. You can see my XSLT file here: rss.xsl.

It turns out that my hosting provider isn’t set up out-of-the-box to serve XSLT files with the correct MIME type for Mozilla/Firebird to pick up. It’s likely that a few hosting providers aren’t set up correctly for this. It’s easily fixed, however, by adding a simple .htaccess file to the root of your site:

AddType text/xml .xsl

This .htaccess file sets up the correct XML mime-type mapping for .xsl files, allowing correct operation under Mozilla.

Works well, explains what is available and shows the user what they need to do. I’m sure more features could be added.

I have no idea how you might get this into something like Radio Userland, however.

Read full post

For those of you writing Visual Studio.NET 2003 add-ins in C# (or any other .NET-enabled language), you might have noticed that CreateToolWindow doesn’t really work with real .NET controls.  Fortunately, this piece of code fixes this problem.  It’s a bit of hack, but it works for me so far and was created by using Reflector to figure out exactly what was going on.

// Run this code before any CreateToolWindow calls
Type tp = typeof( System.Windows.Forms.Control );
tp = tp.GetNestedType( "ActiveXImpl", BindingFlags.NonPublic );
FieldInfo fi = 
    tp.GetField( "globalActiveXCount", BindingFlags.Static | BindingFlags.NonPublic );
fi.SetValue( null, Convert.ToInt32( fi.GetValue( null ) ) + 1 );

I’m not sure if Craig Skibo would approve of this work-around, but it’s way easier (and cleaner, IMHO) than using that nasty shim control. If you want to figure out how this works, read my posting to the vsnetaddins Yahoo! group.

Read full post

I’ve managed to replace the built-in IE control in SharpReader with a nice, fast Mozilla ActiveX control.  There’s a few easy steps to follow to get this working:

  1. Stop SharpReader.
  2. Download and install the Mozilla ActiveX control: MozillaControl.exe (5 MB).
  3. Rename the file AxInterop.SHDocVw.dll to AxInterop.SHDocVw.dll.old.
  4. Extract the new AxInterop.SHDocVw.dll file from here: (download no longer available) (11 KB).

That’s it- when you start SharpReader, you’ll see a nice Mozilla window instead of IE.  To test if it works, right-click the page and select “Properties”.  You’ll see a Mozilla-style window like this if everything worked:

Can you tell this application is running Mozilla?  :)

Please note that this officially a hack and is not supported by either myself or Luke Hutteman.  Have fun!

Read full post

I’ve added permalinks for all of my articles, as well as commenting for most of the pages within this site (the news pages themselves being one exception).  This means that you can now comment on the various coding projects I’ve worked on.

Read full post

It seems as if x0rfbserver is no longer around.  I’m not sure the program was really supported by its author, so it’s no surprise.  Fortunately, a number of replacements have popped up!

So, for a fantastic replacement application, try x11vnc by Karl Runge.  I managed to get this installed and running with virtually no effort.  It uses the fantastic libvncserver library to do its magic.  Just make sure that you have the requirement libraries, headers and source (libjpeg-devel, zlib-devel and XFree86-devel) available.

Starting it is just a matter of running the x11vnc executable.  For anyone looking for VNC for an existing X11 session, I highly recommend this program.

Read full post

I wonder if I can get Dave Winer to start pushing more user-friendly RSS with XSL.  I would like to see someone collect a library of XSL transformations for RSS/RSS2.0 and Atom that can handle pretty much any valid feed.  Would this be a better way to softly introduce visitors to RSS?

Read full post

I’ve started a project to integrate the Bugzilla bug tracking system with Visual Studio .NET.  So far, I’ve managed to get a “quick query” window in Visual Studio, as well as synchronization for server-side saved searches with the Task List window.  This should help make bug lists more available for anyone using both VS.NET and Bugzilla.  My plan is to put it up on Sourceforge, but I haven’t had a chance yet. 

Read full post

It’s been a while since I last put any news on this page, so I thought I’d do a quick update:

  • Number one priority for me is getting nprof building with NAnt. This makes it easier for me to release new versions, and less likely to put them off. :)
  • Number two priority is fixing some of the numbers within the profiler that are supposed to be showing percentages, but are showing decimals instead.
  • Number three priority is fixing the VS.NET integration once and for all. When I first wrote the code, I didn’t really understand how to do it properly. I think I’ll still go for launching VS.NET windows externally, but I might switch to an external process call to get around some of the strange focus issues.
  • Other priorities are currently undecided. Feel free to send your input.

There’s been some external developer interest in the project as well. I’ll let everyone know if we pick up some extra development hands.

Read full post

UPDATE: Perhaps I don’t know my procmail as well as I thought. There was something wrong with this setup and I don’t know what it was. I ended up with major mail loops as sendmail tried to redeliver messages to my local address over and over, which were then forwarded to the unpublished account (which refused it because it was an invalid address!). Any ideas?  For now, I’ve updated this setup to deliver locally–something that’s fairly straightforward to do for most people.

And now, back to our regularly scheduled entry:

I’ve got Spamassassin running against one of my POP3 mail servers via fetchmail.  It cleans the mail, marks spam, junks anything that rates extremely high (I’ve set a score of 15 as “extremely high”), then redelivers it to a non-public filtered email address.  It’s working great so far!  Here’s the description of how I managed to get this working:

For this HOWTO, I’m assuming you have the following packages installed and working:

  • Fetchmail
  • Procmail
  • Spamassassin

First of all, I set Fetchmail up to run against my POP3 server.  This is the easy part:

poll mailserver
 uidl
 protocol pop3
 user "username"
 password "password"
 mda "procmail ~/.procmailrc-fetchmail -f %F -m"

This file instructs Fetchmail to grab mail from the given account and process it in procmail using the .procmailrc-fetchmail file. I’ve set it up to use .procmailrc-fetchmail so that regular mail delivery to my Unix user won’t get run through the procmail file again, causing a potential mail loop in some cases. While you’re at it, set up hotwayd and get your Hotmail mail cleanly delivered to your main POP3 account.

To start fetchmail, run this command as your user:

fetchmail -d 120

The contents of this procmail configuration file are:

:0B
* ^this is the latest version of security update.*
{
  :0fwh
  | formail -I"Subject: [SPAM] Virus 1"
}

:0B
* ^ZGUuDQ0KJAAAAAAAAAB\+i6hSOurGATrqxgE66sYBQfbKATvqxgG59sgBLerGAdL1zAEA6sYBWPXV
{
  :0fwh
  | formail -I"Subject: [SPAM] Virus 2"
}

:0fw: spamassassin.lock
* < 256000
| spamc

:0
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
$HOME/major-spam

Note that in this file, I’ve used procmail to filter out a couple of viruses. This is to stem the tide of the latest email viruses being sent around. I was getting more than 100 a day at its peak!

To summarize the procmail file, the steps are:

  1. If the virus matches the first virus’s signature, mark the subject as “Virus 1” using formail.
  2. If the virus matches the second virus’s signature, mark the subject as “Virus 2” using formail.
  3. Filter the message through Spamassassin, but only if its size is less than 256,000 bytes.
  4. Dump any messages with a spam level > 15 into the mail folder “major-spam”. You can use /dev/null here to ensure that it doesn’t get saved anywhere. Any message that matches this test does not get sent on.
  5. Any messages that survived Step 4 will be delivered to the local mailbox.
  6. Extra credit: If you’ve got the University of Washington IMAP packages installed, you can get yourself an SSL-enabled POP3 server to your local machine. Make sure you’ve created (or obtained) a proper certificate for /usr/share/ssl/certs.

The mail feed you get from this filter chain tends to be fairly clean. On most days, 5-10% of spam might make it through. It’s much better than 100% and Mozilla is pretty good at picking out the remainder with its Bayesean Junk Filter.

Read full post

The latest Google Zeitgeist is out.  Using the approximate readings from this forum post, it looks like the new (very approximate) browser shares for Google are:

  • MSIE 6.0: 68.5%
  • MSIE 5.5: 10%
  • MSIE 5.0: 11.5%
  • Netscape 6+ (Mozilla): 5%
  • Other: 5%

The total is 100%, but that luck more than anything.  I didn’t fudge any numbers, but I eyeballed most of them.  Each of those Google major ticks are 15%, from what I can tell. 

Good news: Mozilla is now 5% of the web (according to Google). 

Bad news: MSIE total is approx. 90%, compared to 85% in Dec. of 2002.  Where they’ve taken browser share from, I don’t know, but it’s likely from older Netscape 4 installations that have moved on.

Good news: at least 95% of the web can handle a good deal of CSS, even if 11.5% is fairly broken and 10% is only somewhat broken.

Read full post

Since Scoble has been pushing Morton Thiokol stories over the last few days, I thought I would counter with a Linux success story from this article (first page here). 

“Sabre Holdings Corp., based in Southlake, Texas, is a $2.1 billion holding company with four technology-based travel business units: the Travelocity online travel site; the Sabre Travel Network, which operates the Sabre reservations system for travel agents, suppliers and travelers; GetThere, a Web-based corporate travel service; and Sabre Airline Solutions, which provides software and consulting services to airlines.”

Here’s the great quote: “We’ve got to get faster, better, cheaper solutions into our infrastructure, and Linux lets us get there”. 

Sabre Holdings Corp. isn’t designing the space shuttle engines, sure, but the next time you book your Travelocity holiday online, picture all of that open-source, finely-tuned machinery ticking away in the background.  And they can scale up any part of their system for the cost of the new hardware.  No Microsoft Licensing 6.0 yearly payments and no random license audits from the BSA.  Just re-image the new machine and add it to the cluster!  Like the Murphy, the CTO, says:

“Your cost at the scaling point, after the initial implementation, is essentially zero, and you’re getting a robust environment that delivers the intangible benefit that your technicians love to work on Linux.”

I imagine that seeing all of these Linux stories in the trade press is making Microsoft’s star evangelist a little jealous.  I’m happy to see all of the attention that open-source products have been getting lately.

Read full post

I didn’t expect to get a response to my Linux for Travel Systems article so quickly, but it’s clear that Robert Scoble either missed the point or has decided to fabricate a great deal of my argument to suit his own:

Matthew makes a mistake, though. He tries to use this as an example of how a company has fired Microsoft. Instead, though, you need to look at what Travelocity used before. Unix. So, what Travelocity really decided was to replace its Unix-based systems with Linux.

In this case, Robert is the one who has made a mistake.  Nowhere in my article did I even mention “firing Microsoft”.  In fact, the only reference to Microsoft in my article is referring to Robert’s role as evangelist.  My goal was simply to match his “Windows Success Story” with a story of how a company evaluated its options and came up with the conclusion Linux Works Better For Them.

This is where Robert believes his “switch story” is more convincing:

My Morton Thiokol example was more of a real win. Why? Because Morton Thiokol switched from Unix to Windows (that’s a real jump over the fence – Unix to Linux isn’t as big a difference as Unix to Windows).

I’m finding it hard to give this point any credit for two reasons:

  1. Robert hadn’t positioned his article as a Unix to Windows switch.  In fact, I have no idea what really went on at Morton Thiokol.  Looking back at Robert’s previous two mentions of the company, this is the most information I can get out of it:

    On the other hand, ask yourself why no one has written about Morton Thiokol lately. They just changed computer systems for their engineers.

    “Changed computer systems,” eh?  From what to what?  I can assume that the “to what” part of that is Windows, but nowhere in this article does he mention that it was from something else.  They could have been running AutoCAD on Windows ‘95 for all we know.  For the record, I have seen people run those two together.

  2. In the original case study I referenced, we don’t know what the architecture history of Travelocity was.  At the time, I was positioning the story only as one in which Linux was chosen over other alternatives.  I did manage to dig up another article that describes them switching from C++/SGI to Java/Linux.  The Unix-to-Java/Linux switch is not any less valid than Robert’s Unix-to-Windows switch.  I would consider Java to be a platform of its own and the change to it significant.  If you read the other article describing the switch, you can see how they switched to Apache Tomcat (a Java Enterprise hosting environment) with Struts (a web-page rendering environment).  That’s not a trivial change, Robert!

So you can see, my Travelocity switch story is just as valid as Robert’s Morton Thiokol story.  Either switch would be a major undertaking for any organization.  Switching from Unix to Linux, however, is a win for Linux (and a win for Open Source at the same time).  You can’t discount this switch just because both operating systems end in the letter “x”.

If you look at the stories and how they would affect a normal working-class Joe, you’d probably find that the Travelocity story has greater influence.  Not everyone flies to the moon, but pretty much everyone flies between cities at some point in their life.  Linux now helps you get your ticket cheaper and faster.

Read full post

Bugzilla.NET version 0.1 has been released!

Bugzilla.NET is my Visual Studio.NET <-> Bugzilla integration project. So far it has the ability to query Bugzilla from within Visual Studio and synchronize a set of tasks with a given set of server-side queries.

Requirements:

  • Bugzilla 2.16.1 or later
  • Visual Studio.NET 2003 (2002 may work, but is untested)

Downloads:

Here’s a screenshot of the Bugzilla query window:

Read full post

The nprof 0.5 alpha release is now available. Changes in this version are:

  • Improved UI (about box, new project icon)
  • Fixed sorting - faster, doesn’t crash
  • Removed GUILibrary dependency
  • New NAnt build scripts
  • Fixed callee timing percentages (now display as % instead of useless total ticks)
  • Added suspended time in callee description
  • Added command-line interface for SharpDevelop integration

The big change for me is the NAnt integration. This should allow me to release nprof more often (by removing the previously tedious and error-prone release steps). It should also help anyone interested in enhancing nprof to get a packaged release for testing.

Read full post

The nprof 0.6 alpha release is now available. Changes in this version are:

  • Fixes for recursive function calls
  • Some minor GUI updates (double-click profiler runs to open)
  • VS.NET add-in work - moved enable item to menu
  • Fixed major slowdown in large profiler runs introduced last version

Those people who use the VS.NET add-in should be very happy to know that it’s been worked on a fair bit. It should perform as expected now (at least it did in my testing).

The problem with recursive calls messing up the percentages has been fixed. With any luck I haven’t introduced any bugs with the other numbers. I’ve managed to profile an entire run of nprof with some good looking numbers. I’ve also changed the numbers that are displayed on the profile run list. They are:

  • # of calls: The total number of calls to the method
  • % of total: The percentage of total time (relative to the thread’s lifetime) spent in or under this method. This includes all time in methods called by this one.
  • % in method: Percentage of total time (relative to the thread’s lifetime) spent in the method itself.
  • % in children: Percentage of total time (relative to the thread’s lifetime) spent in the children of the method. This does not include time spent in the method called by children of children (or any other call to the method below itself).
  • % suspended: Percentage of total time (relative to the thread’s lifetime) during which the function was suspended.

In a future version I will allow customization of the displayed data columns, as well as batch sorting of the items.

Finally, I fixed a bug that I introduced in 0.5 that made large profile runs load very slowly (it was sorting the listview on each insertion). Large profile runs should no longer cause any grief.

Read full post

I had made a mistake in packaging 0.6 and forgot to include NProf.Hook.dll. This has been corrected in the 0.7 package.

Sorry for the inconvenience.

Read full post

I just purchased the Atech Pro-9 9-in-1 flash card reader.  This thing is extremely cool- it has a number of different ports on the front to plug various storage items into.  A bit pricey (CDN$100), but cool nonetheless!

Getting it to work under linux is trivial.  If your kernel has CONFIG_SCSI_MULTI_LUN set, it will work out-of-the-box.  If not (RedHat kernels don’t set this flag by default), just add the following line to your modprobe.conf file for 2.6.x:

options scsi_mod max_luns=512

Or, if you are running 2.4.x, add the following line to modules.conf:

options scsi_mod max_scsi_luns=512

These options force the SCSI layer to scan up to 512 LUNs (sub-devices) on each SCSI device. It’s required because the 9-in-1 has four effective devices inside. Scanning the first device only will give you the first of the four devices only.

You should now see the following in dmesg when plugging the device in:

scsi0 : SCSI emulation for USB Mass Storage devices
  Vendor: AFT PRO   Model: -IX CF            Rev: 0.0>
  Type:   Direct-Access                      ANSI SCSI revision: 02
  Vendor: AFT PRO   Model: -IX SD            Rev: 0.0>
  Type:   Direct-Access                      ANSI SCSI revision: 02
  Vendor: AFT PRO   Model: -IX SM/XD         Rev: 0.0>
  Type:   Direct-Access                      ANSI SCSI revision: 02
  Vendor: AFT PRO   Model: -IX MS            Rev: 0.0>
  Type:   Direct-Access                      ANSI SCSI revision: 02

You can see the Compact Flash, Secure Digital, SmartMedia and Memory Stick interfaces appearing as separate devices. In theory, you can insert one piece of memory of each kind and use them simultaneously! I’ve only tried my SmartMedia card, personally, but it will likely work if you have multiple media types.

Read full post