August 2005 - Posts - Jon Galloway

August 2005 - Posts

Free Opera license (until 12 AM PDT August 31)

I'm not an Opera user, but for it's nice to have a copy on hand for testing. Opera's giving away free licenses to celebrate their 10th birthday:

http://my.opera.com/community/party/reg.dml

It's been slashdotted[1], but seems to be holding up well - I got mine pretty quickly. If it gets overloaded, you can request yours via e-mail, too:

For one day only, you can get an ad-free version of Opera. Simply e-mail registerme@opera.com to obtain a registration code. This offer is valid from 12 a.m. Tuesday, August 30 to 12 a.m. Wednesday, August 31 2005 (PDT).

[1] I don't normally repeat things that are on Slashdot, but since this is a one day only thing I'm making an exception.

Posted by Jon Galloway | with no comments

Monoppix 1.1.8 - New Release

Monoppix 1.1.8 is live!

This is a big release, featuring WinForms support. Here are some screenshots of the exact same .NET WinForm EXE running on Linux and Windows (the same binary file no recompile required)[1]:

 

See Roiy's post on C# WinForms on Linux (using Monoppix) for more details on Monoppix WinForms. Mono's System.Windows.Forms support is pretty impressive - it no longer runs on Wine; rather it directly implements drawing functions through System.Drawing.

Release notes (via the Monoppix download page):

Latest release:    Monoppix v1.1.8.0 stable [ Torrent ]
The main new features of v1.1.8 are:
- mono 1.1.8
- libgdiplus 1.1.8
- xsp 1.0.9
- monodevelop 0.7
Additions:
- Mplayer to allow viewing our tutorials from Monoppix
- Hello world video tutorial included in the image
Notes:
Native mono Windows.Forms class libraries are available without wine thanks to Mono's v1.1.8 implementation.

This version is for now availabile only through torrent network but we expect our mirrors to be updated within next 24 hours. We would appreciate it if you can continue seeding the image for a while after you completed the download (we're bandwidth challenged!).
Feedback is always welcome, if you found bug, have ideas for improvements or need help then check our forum.

Direct download links will be available on our download page once the mirrors are ready (within 24 hours).
Until then, grab the torrent here: Monoppix 1.1.8 Torrent

[1] I think there is a widespread misconception that Mono can only compile .NET source. It can, but it can also execute .NET compiled code (MSIL). That means you can compile an application on Windows under Visual Studio, copy the EXE onto a Linux box with Mono installed, and run it under Mono. There are of course other requirements, like you can't be making Windows native PInvoke calls, Mono needs to have implemented all features you're using, etc., but there's no need to compile under Mono to run on Mono.

Posted by Jon Galloway | 1 comment(s)
Filed under:

TagCloud - Automated Folksonomy generation from RSS feeds

TagCloud is an automated Folksonomy tool. Essentially, TagCloud searches any number of RSS feeds you specify, extracts keywords from the content and lists them according to prevalence within the RSS feeds. Clicking on the tag's link will display a list of all the article abstracts associated with that keyword. TagCloud lets you create and manage clouds with content you are interested in, and lets you publish them on your own website.

Here's a link to my TagCloud. They have a system that allows embedding it via a Javascript include, but the blog system I'm on prevents posting scripts. Here's a snapshot of how mine looks today:

Posted by Jon Galloway | with no comments

How to run IE7 (Beta 1) alongside IE6

UPDATE:

IE standalone mode isn't supported and has been reported to cause problems with a recent IE6 service pack - http://blogs.msdn.com/ie/archive/2005/12/16/504864.aspx.

See my updated instructions here: http://weblogs.asp.net/jgalloway/archive/2005/12/28/434132.aspx
 

Sure, you knew IE7 Beta 1 was up on MDSN, but you don't have a free machine to test it on. Can't install it on your main work machine, because you can't afford to mess it up... plus, you need to be testing your work against IE 6, right?

You thought about setting up a Virtual PC image, but it seemed like too much trouble for a Beta 1. Still, it would be nice to click around in it for a few minutes here and there...

Fret no more! IE has a secret standalone mode which lets you run multiple versions side by side (thanks to Joe Maddalone for figuring this out).

See the updated instructions here.

It's pretty simple:

  • Download the IE7 Beta 1 Install from MSDN
  • Open the install file with WinRAR (yep, it's an EXE, but it's a self extracting EXE) and extract them to a folder. Alternatively, you can just run the EXE, make a copy of the files which are extracted in the first step, and cancel the install. I was too chicken to do this on my work computer.
  • Look in the folder you extracted to for the file SHLWAPI.DLL. Delete this file.
  • Create a new text file in the folder, then rename it to IEXPLORE.exe.local.

That's it. The .local file in the folder tells the IExplore.exe instance to run in local mode, which means it won't mess with your IE6 settings, registry, etc. It sounds complicated, but it takes less than 10 minutes and it goes just great with your Friday morning coffee. Of course, you can help your friends at work (who also have MDSN subscriptions, of course) by zipping the folder and sharing it with them so they don't have to go through this crazy mumbo jumbo.

Incidentally, there are archives of old IE versions converted to standalone mode over at browsers.evolt.org and at skyzyx.com. C'mon, spend a day with IE3 for old time's sake!

Random idea: Using MIDI for WAV file compression

Since even mobile devices now have basic General MIDI support now, what about approximating digital audio as a stream of very short MIDI notes?

Encoding seems like it would be reasonably simple - do a best fit of each 100ms audio sample with a library of cached samples of a few hundred MIDI samples converted to raw WAV format, then stream the MIDI info. Obviously this could be optimized with some math smarts and statistical analysis on voice and music data. It wouldn't handle polyphonic music well, and would be pretty darn lo-fi, but it seems like a good way to compress audio since both sides of the communication have a common library of audio information.

Of course this is not so useful now that bandwidth is plentiful, but it still could make for at least an interesting BSCS project, right?

Usually any ideas I come up with are unworkable, have been patented the year before or are unpopular for some reason I don't understand. Which is this?

Posted by Jon Galloway | with no comments
Filed under:

Wish: Subscription Abstraction Layer

RSS.NET and Atom.NET[1] are great, but they sure could use an abstraction layer. I'll bet the same conditional logic has been written hundreds of times, but I haven't found anywhere that it's been abstracted out as a standalone library. Think ADO.NET - it's a general data access framework that allows any data provider (SQL Server, Oracle, DB2, Text, write your own) to be accessed as generic interfaces (IDataReader, etc.).

A Subscription Abstraction Layer (SAL) would simplify a few things:

  1. Generic access to subscription providers
  2. Simplified extensibility for new or changed subscription formats
  3. Offer a Persistance layer which would store data to any provider for which a provider had been written. Of course, everyone's datastore would be diferent so the providers would mostly serve as samples, but I'd just need to fill in my stored procedure names or SQL commands. This could potentially use the Enterprise Library, or could just implement the informal DAAB 1.0 DataHelper interface.

I'm hoping someone has already written this and I've just Googled poorly. I'm guessing there are parts of this in many weblog systems and aggregators, but I'd really prefer a distinct library. If it's not out there, I'll probably write it - does this look like an okay design?

IFeed IFeedCollection IPost IPostCollection Additional generic interfaces  ... 


Subscription Abstraction Layer (SAL)

Persistance Provider Interface

MS SQL
Firebird
SQLite
...

RSS.NET

RSSFeed
RSSChannel
RSSFeedCollection
...

Atom.NET

AtomFeed
AtomChannel
AtomFeedCollection
...
Additional Subscription Providers (Atom 1.0, RDF, NNTP, etc.)

A really lame cheat would be to just XSLT RSS to Atom or Atom to RSS and treat them all as one specific feed type, but I don't think I can bring myself to do that.

[1] Anyone know if / when Atom.NET will support Atom 1.0?

Posted by Jon Galloway | with no comments
Filed under: ,

isIE=document.all; //only kind of true

Internet Explorer 4 used document.all['elementName'] to refer to document elements while waiting for the W3C standard, which turned out to be document.getElementById('elementName'). IE 5 and above, plus all other modern standards based browsers, all support document.getElementByID(). IE 4 usage was below .5% in 2002 and isn't even being tracked anymore, so there's no good reason to be using document.all anymore.

Firefox developers decided to partially support this non-standard syntax since so many pages are still using it. It was probably a good decision - if they didn't, people would decide that Firefox was no good since it couldn't run their favorite pages, even though real problem was buggy webpages.

On the other hand, they didn't want to encourage use of non-standards compliant code, and they certainly didn't want to break all those poorly written scripts that (incorrectly) assumed the following:
isIE=document.all;

So Firefox supports document.all, but says it doesn't. That means it can evaluate document.all['elementName'], but alert(document.all) shows false.

This behavior makes some sense, but can result in some weird behavior. Scripts that were written for IE only (using document.all[] syntax) will work in Firefox, but scripts which test for IE with document.all but don't include proper handling for non-IE browsers don't work.

There are some much better solutions to the document.all mess:

1. Obviously, the best is to convert from document.all[] to document.getElementById(). It's standards compliant, works in 99+% of browsers, has a great beat, and is easy to dance to. Usually it's a simple find / replace exercise. However, it's sometimes not practical when you've got legacy scripts or browsers to deal with.

2. If you have to support IE 4 David Emmerson came up with a great work-around: add document.getElementById support to IE4 with this little script:

if(document.all && !document.getElementById) {
    document.getElementById = function(id) {
         return document.all[id];
    }
}

3. If you absolutely have to write browser dependant code, use a decent browser detection script. This one is pretty solid: http://webreference.com/tools/browser/javascript.html

The best general approach is to check for support of a feature rather than to sniff IE and apply IE / non-IE logic. If you need to determine if you're looking at IE, you can just ask nicely (does navigator.appName = 'MSIE'?).

Of course, cross browser Javascript is a complex subject. Here are some good references:
http://www.stopbadtherapy.com/standards.shtml
http://www-128.ibm.com/developerworks/web/library/wa-ie2mozgd/
powered by IMHO 1.2

OpenNetCF - Smart Device Framework

Heard about the OpenNetCF Smart Device Framework on Wally McClure's ASP.NET Podcast. It's a shared source framework that "enriches and extends the .NET Compact Framework by providing a rich set of classes and controls not available in the .NET Compact Framework."

Check out the library to see what's included, then download the latest binary and / or source here.

I just got an Audiovox SmartPhone last weekend, so I'm eager to see what sort of trouble this will help me get into.

powered by IMHO 1.2

Posted by Jon Galloway | with no comments
Filed under:

How to Speed up RSSBandit (while waiting for the Nightcrawler release)

RSSBandit is a great RSS Aggregator, but it's just about unusable with over 1000 feeds. CPU use goes through the roof, and it's got some GDI leaks. It runs, but the computer's not very usable. I've been starting it up every few days and setting the process priority to "Below Normal" in the Task Manager, but it's enough of a pain that I've just been browsing to a few pages in a browser (shudder) and ignoring the other feeds.

Dare's post on Nightcrawler's feature list gave me the clue as to what's wrong - the comment threading. So I pulled the latest code from CVS and made a custom build with threading diabled. It just took one line of code, and it made a huge difference.

I just added the following line of code to WinGUIMain.cs file in the InitializeComponent function (line 2869):

this.listFeedItems.ShowAsThreads = false;

Note that this disables threaded viewing of comments and trackbacks. The Nightcrawler release will offer this as a mode, so if you can wait until then I'd suggest it. If not, have at it. If you haven't compiled a project from SourceForge, see Haacked's post on building SubText - just use :pserver:anonymous@cvs.sourceforge.net:/cvsroot/rssbandit as the CVS root, and pull down the current_work module.

[...]
Release Date: August 31, 2005

New Features:

  • NNTP Newsgroups support
  • Downloading of Enclosures/Podcasts
  • Subscription Wizard replaces Add New Feed dialog
  • Fast Mode (shutting off comment threading which uses a lot of CPU)
  • Synchronization with Newsgator Online
  • Atom 1.0 Support
  • Extensibility Framework to Enable Richer Plugins
  • Item Manipulation from Newspaper Views (e.g. Mark As Read, Flagging)
  • Tip of the Day on Startup

Source: 25 Hours A Day - RSS Bandit [Nightcrawler Edition] Alpha Coming Soon

Posted by Jon Galloway | with no comments
Filed under:
More Posts