Developing .NET Compact Framework Applications

I got my Dell Axim X5 handheld unit last night. Very nice device. Much nicer than my old Palm V. Gorgeous 16 bit color screen. Snappy response from the OS, which is PocketPC 2002. Battery life seems good. And with a wifi card sitting in the Compact Flash slot, I can get on my home network easily.

Now, here’s what’s really cool. I installed the final beta of Visual Studio last night. (And it only took 2.5 hours…) Within 30 minutes I had written, tested and deployed a Compact Framework application to the device. Writing with CF seems to be quite a bit easier/nicer than writing with J2ME. I haven’t looked at J2ME in quite some time, but the last time I looked it was not a fun thing to use. Writing apps for the Compact Framework, at least in my initial testing, is an absolute dream.

My One Complaint About The Latest Eclipse

I have but one complaint about the latest release of my favorite IDE, Eclipse. Everyone who uses Eclipse knows that to close an editor you click on the little ‘X’ button on the right side of the editor’s tab. But for the past several months there’s been another way: Control-Click anywhere on the tab. (You can also Ctrl-F4.) The Ctrl-Click struck me as odd when I first read about it, but I’ve come to do it reflexively. Now they’ve taken it away!!! I don’t know why, but they did. And I’m not happy about it… I keep Ctrl-clicking on those tabs and they just don’t go anywhere now…

User-Agent Based Content Inclusion Plugin

I’ve just released a new Blosxom plugin called UAInclude that allows you to include specific content in the section of a page, based on the User-Agent of the user’s browser. This came about because when I added Todd’s nice Categories plugin. My pages looked great with Moz or other sane browsers, but they looked like crap with IE. The reason for the difference is that IE and Moz render various styles differently, and my painstaking design was suffering because of it. Todd offered a solution, but while it made the pages look better under IE, they didn’t look as good under Moz.

Thus, I wrote this plugin. It’s driven by a hash of regexes that map to (possibly non-existent) files relative to $blosxom::datadir. Each of these regexes are compared against the User-Agent from the current user’s browser to decide which content to include. A variable called $uainclude::included_content is exposed and should be added inside the section in your head.html flavour file. This variable will contain the text of the matching file, or will be empty if the matching file doesn’t exist. (An example of when this would be useful is for a browser like Lynx which is a text-only browser; it will ignore styles, so why send them?) If nothing matches, there’s a default that will be served up, to account for all the browsers that I don’t know about.

This may not be useful to anyone but me, but I wanted to make it available. Get it here and let me know if it’s useful to you or you have suggestions for improvements.

UAInclude could certainly be generalized to support more than just head-related stuff, but I didn’t feel like thinking about it that much. If there are requests for that, I’ll think about it some more.

Latest Nightly Eclipse Re-Adds Editor Linkage

The latest build of Eclipse has re-added a feature that I had been missing since the M4 or so. This feature is a linking of location between the Package view and the current editor. You’ve always been able to double-click on a class in the package explorer and have it bring that class up in the editor. What you used to be able to do, and what you can do again, is to have the package view updated based on your location. So if I’m editing Foo and then I click on the tab for Bar, the package view will now show that I’m in Bar. This is now a toggle instead of being foisted upon those who don’t like it. If you install this latest version (remember to do it like this) you’ll now see a little icon on the top of the package explorer that looks like this

Toggle Switch

I’m really glad this is back because I missed it. But I’m also glad that there’s a toggle switch because there were times that this behavior was a real pain.

New Comments System

I’ve finally gotten Movable Type’s Standalone TrackBack system installed and working. As you can see each story now has a “0 Comments” or “1 Comment”, etc link at its end. Clicking on this will not only show comments left by other visitors, but it will allow you to leave comments for all the world (well, at least that small part of it that reads my blog) to see. It’s sort of like the old graffiti walls on BBSs.

I don’t claim to fully understand the intricacies of Trackback (as opposed to a regular old comment system), but it seems to work and that makes me happy.

Give it a try if you’re itching to say something. Just be nice. Or at least polite.

My Blosxom 2.0 Google Plugin

I’m releasing a preview version of my Google plugin for Blosxom 2.0. We’ve all seen blog entries with a little “G” or “Google” that when clicked execute a search at Google for something related to the blog topic. I’ve seen those that strictly took the article title and used all those words in the query, but I wanted more control. So in my plugin I inspect the first line of the blog entry body, and if it starts with “KW:” (user-configurable) then the rest of that line is taken as keywords. These keywords are joined with “+” signs and tacked onto a configurable Google search query URL. For example, if the first line of the body (obviously after the title) looked like this:

 	KW: fox news channel 

then the resulting URL (assuming no config changes) would look like this

 	http://www.google.com/search?q=fox+news+channel 

and would show up in the story as “| Google”.

The look of the link is also user-configurable. You can see from all of my entries that I use a pipe, then the word “Google” but you can use whatever you want. In order to get the link, just include $google::google in your story.html and that’s it.

There’s also a setting that will make the link open in a new window or not.

What license are people using for this type of stuff? I read through the Blosxom license but I couldn’t tell if it was one of the “well known” licenses or not. I think I lean towards LGPL, but the alphabet soup of licenses is somewhat hard to get through. Do I even need to license this?

This is a 0.1 release with very little in the way of docs other than this entry and the sparse comments in the code. Get it here

If you use this plugin, please let me know. If you have suggestions/comments/complaints send me an email.

Update!

Thanks to the rapid suggestions of Todd Larason I’ve made some changes to the plugin to make it better. Here’s what I did:

The new version is available here and the old version from here just in case I messed something up!

Again, please let me know of anything else!

New Version of Blosxom

Ooo yah! I checked my email this morning and see that Rael has dropped a new version of Blosxom. It’s 2.0 beta1 and it sports a new plugin architecture and other nifty features. I’ve gotten it setup on my local box and have ported some code I’d written against the 0+5i release to the new plugin format. I’ll be getting this site up with the new version later today I suspect.

Eclipse M5 Painless Upgrade

Man, I love Eclipse more and more every day. I’ve been using it for almost a year and it just keeps getting better. The fabulous Eclipse team released Eclipse 2.1 M5 a couple of hours ago and I fetched it shortly thereafter. Wanna know how the install went?

  1. I shut down the instance I had running
  2. Squirreled away trusty M4 version for safe-keeping
  3. Unzipped the M5 distro
  4. Copied my workspace folder from M4 to M5
  5. Copied my plugins over from M4
  6. Fired up the new version

Why can’t all installs be that easy?

If you are an Eclipse user, think about getting this version. There are quite a few tasty new features lurking about in there.

Irrational Pro-Piracy “Argument”

It’s really funny when someone knows something that he is doing is morally or ethically wrong but tries to explain it away as not really so bad. Case in point: on /. there is a thread about the BSA sending threatening letters to companies telling them to do a “self audit” of their software to make sure they are totally legal. One genius responded thusly

yeah but… so they “pirated” software. here is the result:

one, it doesn’t cost the software companies a thing. you steal a car, it takes steel, rubber, plastic from somewhere. you make a DIGITAL copy, it costs software co. nothing. and many of the “pirates” wouldn’t have bought the software.

Yep, it doesn’t “cost” the software companies anything. That’s a good one. Just like stealing cable or satellite service doesn’t “cost” those companies anything. His last sentence is the kicker, though. “[A]nd many of the ‘pirates’ wouldn’t have bought the software.” So, by this guy’s “logic” if you wouldn’t have bought a product anyway, but you still want to use it, it should be ok for you to just take it? Give me a break. It sounds to me like his conscience is whispering to him and he is doing his best not to listen.