Tuesday, December 27, 2005

Choosing Platforms

I just listened to a podcast on Rebel Platforms by Richard Monson-Haefel from IT Conversations

I've also been reading The Innovator's Dilemma and The Innovator's Solution by Clayton Christensen. (And his podcast Capturing the Upside)

It got me thinking about what I'd choose for platforms for new projects.

For a desktop application, I'd be tempted to go with Java + Eclipse + SWT + RCP (Rich Client Platform). I haven't actually written an application on this platform, but I've done a lot of reading and some playing around and it seems like a pretty powerful combination. But I still have some concerns with the ease of installing Java based applications. Maybe there are solutions, but I'd hate to require users to install a Java runtime.

Another portable approach would be wxWidgets with one of a variety of languages e.g. C++, Python, Ruby, Tcl. Again, I'd prefer to package it so the user didn't have to install any support for the language.

Of course, for a lot of things, I'd still lean towards using my own Suneido application platform :-)

The other big area is web applications. The "establishment" approach would be to use J2EE, but that seems like an awfully heavy-weight solution. Tomcat + Spring + Hibernate would be a more light-weight option. But if I was going to write a web application, I'd want to use something like Ajax to provide a richer user interface. Ideally, I'd want something with Ajax support like Ruby on Rails or maybe the Zimbra toolkit (or a Flash based alternative like OpenLazlo). Again, I haven't actually developed any applcations with these platforms so it's hard to say what's best. I have played around with Rails and it seems good, and it's getting a lot of positive press these days. I don't think it hurts that Rails came from 37signals, the developers of Basecamp and Backpack. I really like a lot of their ideas.

Thursday, October 27, 2005

Frustrations

It started when I went to print some photos from a recent holiday. First, I printed a nozzle test, and sure enough I needed to clean the print heads. I've had a number of Epson ink jets; my current one is a wide format 2200. I love it, it produces awesome photo prints virtually indistinguishable from actual photographs. But every Epson ink jet has had this same problem, which I assume is caused by the print heads drying out. You'd think after so many years and so many million printers they would have come up with a solution to this problem!

So I run the head cleaning and print another nozzle check, still no good. (It often takes several cleaning cycles.) I go to run another head cleaning and it tells me one of the ink cartridges is empty. No problem, I have a spare for each color. Or not. I have every color except the one that's run out! So much for printing.

Since I'm sitting at the computer, I figure I might as well do something useful. I was running the free version of AVG at home even though we have a paid license at work. I don't think there's any difference in the software, but with the paid version you get access to better servers for the updates and I have had problems getting updates with the free version. I figure all I have to do is install the paid version.

The first problem is that the AVG installer tells me I have an old version of Roxio CD Creator that will cause problems with AVG and other programs. It helpfully provides a link to the Roxio update page. I download the update, but when I try to run it, it tells me it's intended for a newer version of CD Creator. It doesn't actually say whether it has updated my old version or not, so I try the AVG installer again, just to confirm that the problem isn't fixed.

So I get on the Roxio site to try to find an update for my version. After some digging I find it and click on the download link. But now it wants my login and password. I have no idea if I ever registered the software, but probably not since it came already installed on the computer. But it lets me type in my email address to see if I'm registered - and tells me I'm not. So I go through several screens of registration until finally it tells me I'm already registered under that email address! Next problem is I don't know the password, but they have a link in case you forgot your password and I follow that and eventually I get my download.

But when I try to run the update, it fails and tells me it's messed up my installed copy and I'll have to reinstall! How's that for a friendly update! Luckily I have the install disk handy and I start up the install. I get a big warning saying this version of CD Creator is not intended for this version of Windows. Huh? This version of CD Creator is what came with the computer, as did Windows XP. The disk even lists Windows XP on the label. And it's always worked fine. I shake my head, ignore the warning, and continue.

Now I'm back to AVG. I start up the install once more. This time I get farther - it tells me that I already have AVG installed and that if I want to install this version I have to uninstall the current version. Of course, it doesn't offer to do this for me; I have to abort the install (again!), uninstall my current version, and then restart the installer once more. During this process I have no virus protection, which makes me a little nervous, kind of like walking around naked in a snow storm.

To add to the "fun" most of these installs / updates / upgrades / uninstalls requires me to reboot. Remember when Windows XP came out and one of their big features was that you wouldn't have to reboot every time you touched anything? I guess everyone has forgotten about that "feature". Microsoft has gotten so big I guess you have to treat their promises as if they come from a politician - only good for the duration of the election.

The good news is that I finally got AVG updated. I'm not sure whether CD Creator is still working or not - I guess I'll find out the next time I try to use it.

I have a fair bit of patience with this sort of thing, I know how hard it is to make foolproof software like installers. But some of these things stretch even my patience level! I can only imagine what it's like for someone who has no concept of what's going on or why they're being asked (forced) to jump through a bunch of irrational hoops.

Sunday, October 16, 2005

AJAX and more

To start, a couple of good articles:

Ideas for Startups by Paul Graham

Set Your Priorities by Joel Spolsky

I don't always agree with everything Paul and Joel have to say, but they're usually worth reading.

I've been running into more and more about AJAX. It stands for Asynchronous JavaScript and XML. The name "AJAX" is recent, but the technology it makes use of has been around for a while. It's just that now people are discovering how to really take advantage of it. Things like Gmail and Google Maps use AJAX. AJAX applications promise to combine rich user interfaces with the advantages of a web client.

A recent blog by Jon Udell (and a previous entry) pointed me to Zimbra - an AJAX mail client, their screencast, architecture whitepaper, and AJAX toolkit. They're worth taking a look at.

There are many advantages of web based applications, but so far I've resisted because HTML user interfaces suck. But recent developments like AJAX and Lazlo are promising rich user interfaces for web apps. I still have some reservations - there's a shortage of tools and documentation and they require quite a mixed bag of technologies. All this means a steep learning curve at the moment. But it's making me think that maybe I should be looking at developing web apps. Maybe Suneido should have some tools for doing AJAX.

There are a bunch of recent AJAX books - a search on Amazon will find them.

Zimbra looks pretty cool and it got me thinking about Gmail (maybe not quite as cool, but still pretty good). I've been using Thunderbird for my email and for the most part I've been pretty happy with it. Searching is awkward and slow, but I solved that by using Google Desktop Search. I was excited when Thunderbird added spam filtering. After faithfully training it for a long time, it identifies about 90% of my spam. But the more spam I get, the more annoying that remaining 10% is. It also occasionally identifies legitimate messages as spam, which means I have to review the spam messages, somewhat defeating the purpose of filtering.

I was curious whether Gmail would do a better or worse job of identifying spam. I finally took the plunge and forwarded my main mail account to my Gmail account. It's only been a little over a day, but so far it's been a lot better than Thunderbird. Only about 2% of spam messages have slipped through and no legitimate messages have been mis-identified as spam.

And Gmail has other advantages. I can access my mail (including old mail) from home or anywhere. And I can still use Google Desktop Search.

Another book that I noticed recently was Cross-Platform GUI Programming with wxWidgets. wxWindows is one of the main cross-platform GUI toolkits. Several people have suggested it's probably the best way to make Suneido's GUI portable. In fact, there's a newcomer on the Suneido forum who appears to be working on this right now. I should probably pick up this book just to learn a little more about it.

Tuesday, October 11, 2005

Slack, Quality, and Automation

I recently finished reading Slack : Getting Past Burnout, Busywork, and the Myth of Total Efficiency by Tom DeMarco (co-author of Peopleware). This isn't a new book; it was first published in 2001, but I hadn't got around to reading it. (I assumed coming from DeMarco that it would be worth reading.)

I've read a lot of software development management books, so a lot of the book wasn't completely new to me. But there were a few ideas that stood out:

The key role of middle management is reinvention.
Like many people, I bought into the idea that most middle management is unnecessary overhead. DeMarco challenges this, quite convincingly I think.

Product quality has almost nothing to do with defects or their lack.
I'm not sure I agree with him totally on this one. He claims that a product with a lot of defects could still be a high quality product and people would still want to use it. Hmmm. Some defects maybe, but a lot? I'd probably put it less strongly as "a lack of defects is not sufficient for high quality". This wasn't exactly new to me, but it made me think. It's been a while since I read Zen and the Art of Motorcycle Maintenance. (Arguably one of the most profoundly important essays ever written on the nature and significance of "quality" and definitely a necessary anodyne to the consequences of a modern world pathologically obsessed with quantity. - Amazon) It's very easy, in product development, to fall into the trap of thinking that defects are the only factor in quality - and it's just not true.

When you automate the mechanical stuff, what's left is harder.
DeMarco calls this "the paradox of automation" - it makes the work harder, not easier. He's talking about automation in terms of knowledge workers. But what struck me was how this might apply to "automating" application development. As we automate the easy stuff with frameworks, wizards, libraries, and tools, does it end up making our job harder instead of easier? Of course, we're accomplishing more, so it's not pointless. But it's still ironic that in trying to make our jobs easier we're actually making them harder.

I find it frustrating with Suneido that no matter how much it has, people always end up wanting to do something that isn't supported. I thought this was just Murphy's law, but perhaps it's a logical consequence. Everything that's already supported becomes the base that people want to extend from. And because most of the "easy" stuff is handled, the requests tend to be for harder stuff.

I'm not sure how to benefit from this insight, but I'm going to ponder it.

Monday, October 10, 2005

Handheld Wikipedia

I recently bought a new PDA, a Palm Tungsten T5, to replace my ancient Handspring Visor. Previously, I thought it was amazing that I could have a complete dictionary on my PDA. Now, I have the whole of Wikipedia, complete with most of the images!

I bought a 1 gb SD memory card, and plugged it into the T5. Then I downloaded a version of Wikipedia. It's in TomeRaider format so I had to download and register TomeRaider for Palm (it's shareware). (If anyone knows a completely free solution, or even better open source - let me know.)

At this point I ran into some problems with installing the Wikipedia file onto the Palm SD card. The Palm QuickInstall didn't like the .tr3 file so I used Drive Mode to copy the file. It took about 30 minutes to transfer the 1 gb file but TomeRaider on the Palm didn't show the new file. I thought the problem might be that I hadn't put the file in the right directory so I tried to move it, but that didn't work because it ran out of space - apparently to move files it makes a copy. The Documentation mentioned something about Palm not recognizing .tr3 files so you had to rename them to .pdb - I tried this, but it still didn't work.

A Google search turned up a page where it said simple renaming didn't work - you had to open the file with TomeRaider for Windows and then use File > Transfer to Palm and then HotSync. I tried this but HotSync didn't transfer the file. And QuickInstall didn't show the file either. Looking at the directories, I saw TomeRaider had put it in the CardInst directory rather than the QuickInstall directory. I dragged the file to the QuickInstall Expansion Card pane (which put it in the QuickInstall/ExpCard directory). This time when I HotSync'ed it started to transfer the file.

Sadly, after about 40 minutes, for some reason HotSync lost connection and didn't finish transferring the file. But at least I could see that it was trying to put it in the Palm/Launcher directory on the card. (Later I found this directory is a setting in TomeRaider.) So I tried again using Palm File Transfer. This time the transfer succeeded.

Voila, Wikipedia on the Palm! I don't actually have a practical purpose for this, it just seems like an amazing thing - to have an encyclopedia in your pocket. So whatever comes to mind, you can look it up. And the fact that's it's the Wikipedia encyclopedia makes it all the more amazing. 750,000 articles (in English) and counting - all freely contributed! It's an amazing feat. Unfortunately, the file I downloaded was created before I added the Wikipedia entry for Suneido :-(

Monday, September 05, 2005

Random Pair Programming

One of the problems we ran into with pair programming was deciding who was going to pair up. With only four to six programmers it should have been easy - there aren't that many combinations! But either it would end up the same pairs over and over, or else everyone would sit and look at each other, with no one wanting to make a decision.

Eventually I got fed up and wrote a little function (in Suneido, of course) to pick random pairs. Although technical fixes to people problems often fail, this one seems to work quite well. Everyone seems happy to let the computer decide. Of course, there are groans when it repeats too much, and a temptation to re-run it till it gives "good" results, but overall it's been well accepted.

When the function found it's way out to other Suneido users, one questioned what such a specific function was for and suggested that a generic "shuffle" function would be more generally useful and would still serve the original purpose. True enough, so I replaced RandomPairs with Shuffle. (In the process of searching the web for a decent yet simple shuffle algorithm, I found that it's actually quite an interesting problem.)

Friday, July 15, 2005

Laptop Linux

Frustrated by salesmen borrowing my laptop all the time I decided to buy a new one and give them my old one. I wanted something smaller anyway - my old one wouldn't fit in my backpack!

I'd had my eye on a Panasonic Toughbook W2 but it was pretty pricey. When I saw Future Shop had a special on an Averatic 3250 for almost a third the price, I decided it was too good a deal to pass up. I'm sure it's not as tough as the Toughbook but if it broke I could buy another one and I'd still be ahead. And despite the sale price it came fairly generously equipped - 80gb hard drive, 512mb of memory, and even a DVD burner.

I knew I'd want to put Linux on it, and I'd had trouble before with Linux on laptops so I did a quick Google search for Linux on this laptop. It looked like other people had been successful without too much trouble. Several of the references had used Ubuntu and I liked how it had both an install version and a live cd version, and that they were single cd's (not four like the latest Fedora Core) I downloaded both cd's of Ubuntu 5.04

I booted from the live cd and it seemed to work ok so I went ahead with the install. I kept Windows and partitioned the machine so I could dual boot. (My apologies to the purists, but I still have things I need Windows for.) Although some people had reported issues with the video drivers it seemed ok to me. Then again, I'm not trying to play games.

The only challenge was getting the wireless working. I use wireless at home so it was fairly important. Following instructions I'd found through with my Google search, I downloaded the Windows 2000 RT2500 drivers and used ndiswrapper to install them. Ubuntu came with ndiswrapper and wireless-tools already installed so I just had to get ndiswrapper-utils. I hadn't used Ubuntu before but didn't have too much trouble figuring out the Synaptic Package Manager.

So far everything is working great. I'm considering switching my desktop machine from Fedora Core to Ubuntu - partly for consistency, and partly because Ubuntu is smaller and seems more "approachable".

Tuesday, June 14, 2005

Language Workbenches

Martin Fowler's latest article is on "language workbenches", which is a term he defines as tools for doing "language oriented programming", which he defines as programming using domain specific "little languages" (DSLs).

He makes the distinction between "external" DSLs that are written in a separate language, and "internal" DSLs that use the main language itself to write the DSL.

I found this pretty interesting because one of my goals with Suneido was to support internal DSLs, although I didn't call them that. For example, rather than use external XML files for plugins like Eclipse, Suneido uses internal object literals. Similarly, GUI layouts in Suneido are also written as nested object literals.

I've thought about taking this a step further and allowing custom editors for internal DSLs. For example, a visual editor for GUI layouts that would simply be another way to edit the code. This is the kind of thing the article describes as part of a "language workbench".

Now if only I had unlimited time to work on this stuff ...

Saturday, June 11, 2005

New Articles

Here are a couple of new interesting articles from Martin Fowler's web-site although not written by him.

Before Clarity - Michael Feathers

I think what he's saying here is that testability has first priority, sometimes even ahead of clarity. I think I'd agree. I'm coming to believe that the only way to have high quality software is to have tests. What good is clarity if the code isn't correct?

Fail Fast - Jim Shore

This article argues that it's better for software to fail right away if there is an error in the code, rather than trying to be "error tolerant" and hiding the error. I'd agree. I have this debate with my programmers. I'll say "we should put an assert here", and they'll say, "but we don't want the user to get an error". But they're missing the point - the purpose of the assert is to catch any errors before they get to the user. And if an error does slip through to the user, it's still better to know about it sooner rather than later.

This article also prompted me to change our user error message from "A program error has occured" to "An unexpected problem has occured". My support staff has wanted this changed for some time - they think that "program error" sounds like it's our fault. Of course, it usually is, but I guess there's no point making that too obvious!

Friday, June 10, 2005

Dependency Injection

It started with an article listed in the IBM developerWorks technology newsletter - Secrets of lightweight development success, Part 2: How to lighten up your containers
which was interesting enough, but at the end there was a link to Martin Fowler's article on dependency injection. I always like Fowler's writing so I followed the link and printed the article to read later. I read it last night and, as usual, he does a great job of explaining the topic, including alternatives.

I'd read about dependency injection in Spring in Better, Faster, Lighter Java, but I don't think it sank in until reading Fowler's article. I also found an article in Ruby Garden about it. It talks about HiveMind which is one of the Java dependency injection packages (Pico is another).

Dependency injection also ties in with breaking dependencies for testing as explained so well in Working Effectively with Legacy Code by Michael Feathers.

I'm not sure how I can apply dependency injection in Suneido, but I'm going to keep it in mind. It would be easy enough to implement - it's more a question of where it would be useful.

2005-6-11 Another good article - Dependency Injection in Ruby

There has to be a Better Way!

Recently, I've been listening to some tapes of our training sessions and there has to be a better way! I don't blame the trainers - it's hard to see the forest when you're thrashing through the bushes.

My company trains our customers' staff how to use our software. We don't do this to be nice. Our sales depend a lot on word of mouth and referals so we need happy users. And, so far, the best way we've found to get happy users is to train them. (Even that doesn't always work, but it seems to help!)

The big question is: what is the best way to train people to use a complex software package. Actually, that's not the whole problem. Sometimes it's a matter of trying to train them to operate their business, which shouldn't be our problem, but it tends to get in the way of our goal of happy users.

I've got to think about this some more, but some initial thoughts are:
  • don't waste time on a lot of details that the user couldn't care less about
  • don't just lecture - they won't remember so it's a waste of time
  • focus on what they need to know to start using the software
  • treat it more like "consulting" rather than "teaching"
I'm always suspicious of technical "solutions" to people problems, but I wonder if "screencasts" that covered small parts of the software would be a good addition to our documentation and to the training process. I've been impressed by Jon Udell's screencasts so I bought a copy of Camtasia to see what we can do with it. I also want to try it for Suneido.

Wednesday, June 08, 2005

Cutting With the Grain

Cutting with the Grain is an interesting article by Kent Beck, Joseph Leddy, and William Wake.

I could definitely relate to what it was talking about, both from personal experience and from feedback on the Suneido forum.

A couple of other programmers in my company are currently working on a feature that seems to be a neverending source of complications. Definitely going against the grain. But do you abandon it or push ahead? If you push ahead, are you going to end up with something ugly? (It wouldn't be the first time.)

Suneido can make certain projects wonderfully simple. But sometimes people seem determined to make it do something it was never designed to do. Not surprisingly, it's very difficult and I can't help them much. Sometimes they persevere and Suneido gains new abilities. Other times they give up and disappear, no doubt with a negative opinion of Suneido. I try to lead them onto the path of least resistance, into "cutting with the grain", but it doesn't always work.

Saturday, March 26, 2005

Why Software is Better

I had a dream last night that I was a mechanic at a small town gas station. (Don't ask me where this came from - I've never had anything to do with anything like this!) Some rich guy broke down in a fancy car and I towed him into the gas station. He arranged for other transportation and left, telling me to keep the fancy car - he didn't want it. Wow! Just like winning the lottery. Or was it? I guess I could have sold it, but what I really wanted was to fix it and be able to drive it around and impress everyone. But to my huge frustration and disappointment, it was impossible for me to fix. Too many fancy, computerized parts. No way to work on the engine without tearing the whole thing apart, for which you needed special equipment and tools.

What does this have to do with software? Well, it's the opposite of what I like about open source software. No matter how complicated a piece of software is, I can look at all the pieces. I can change anything. It's all open. I might not understand it right away, and it might take a lot of work to figure it out, but there's nothing stopping me from doing it. That's an amazing power that you just don't have with anything else.

Thursday, March 24, 2005

From Maps to Focus Time

Another one of the web sites that was mentioned at ETech was Google Maps. It's still labeled as "Beta" but it's pretty slick. I also found an interesting blog on how it works. Taking inspiration from the conference, I decided to "remix" Google Maps into my companies business application. An hour on the couch with my laptop one evening added a "Map" button to our address widget, so everywhere we have an address you can click on Map and you'll get a Google map of the address (assuming you're connected to the internet). Pretty cool.

I'm a little concerned about releasing this to our customers since Google Maps are still beta and it could break or change at any time. I think what I'll do is also support Yahoo Maps and MapQuest. I still like Google Maps better, especially since it doesn't have any ads yet, but this way they have a choice and if one quits working they'll still be able to use another.

Another site I heard about at ETech was Technorati. It uses tags to track blogs. It also works with Flickr and Delicious. For example, you can look at blogs with the tag

Apart from the conference itself, the trip to San Diego, away from work, gave me a chance to step back and think about how things were going with the programmers in my company. One of the things that was bothering me was that we didn't seem to be making as much progress as I'd like. Everyone is working hard, but there always seem to be a million distractions and interruptions, so many that days go by without actually programming anything! We'd previously tried following the rule that one pair would always be programming. But it never seemed to work very well. One of the books I took to read was Alistair Cockburn's latest Crystal Clear. One of the things he mentions is the idea of "focus" time. This is where you set aside certain hours of the day (e.g. 10 to 12) where you focus on your primary job - in our case programming. During this time, you try not to allow any interruptions - no phone calls, no email, no visitors, no coffee breaks. When I got back I described this idea to the other programmers and they agreed to give it a try. So far it seems to be working pretty well, hopefully it'll stick. I've tried unsuccessfully in the past to introduce daily "standup" meetings. Again, it hasn't worked out. But I snuck them back in at the beginning of the focus time - just five or ten minutes to review what they got done the day before and to decide how they'll pair up and what they'll work on today. So far this also seems to be working. Time will tell.

Sunday, March 20, 2005

Remixing ETech 2005

I just got back from the O'Reilly Emerging Technology Conference (ETech). It was an interesting experience. There were a lot of interesting speakers, including well known people like Daniel Hillis, Jeff Bezos, Cory Doctorow, Neil Gershenfeld, Joel Spolsky, Lee Felsenstein, and Lawrence Lessig. The theme of the conference was the idea of "remixing", the "mass amateurization of technology: the hardware hacks, software tweaks, and network combinatorics coming from the citizen engineers and inventors, networks of wily geeks and grassroots efforts within large companies".

During the conference there was a lot of talk about certain web sites. Flickr is a photo sharing site. del.icio.us is a link sharing site, the start of mine is at del.icio.us/amckinlay. Both of them use "tags" to "categorize" their content.

Jimmy Wales talked about Wikipedia - a free encyclopedia that has been wildly successful. They just passed 500,000 articles in English (compared with Britannica's 80,000 and Encarta's 4,500!) And they just passed the New York Times web site in traffic!

Not all the sessions were great. One that bombed was a session called "Building Applications Without Software" by Adam Gross from salesforce.com. It was in a smaller room, but it ended up packed, there were people standing at the back and overflowing out the door. Jeff Bezos (Amazon) was a few seats down from me. Who wouldn't want to hear about how to build applications without software? What a disappointment! First, don't send a salesman to talk to techies, it doesn't go over very well. (Just as sending a techie to talk to suits probably wouldn't work.) When he could get beyond his company sales pitch what he showed us was how you could add user defined fields to their application. As you can imagine, it didn't take long for the audience (including me) to leave for somewhere more interesting.

Apple laptops were definitely "in" with attendees. I would guess Apples made up over half of the laptops there - a lot more than their 2 or 3% market share would predict.

I was a bit shocked by people's laptop use during the sessions. Why would you pay good money and valuable time to attend a conference with great speakers and then spend the sessions emailing and chatting instead of listening? Not to mention, it seems pretty rude to the speakers. And this wasn't just a few exceptions - I'd guess over half the audience were heads down in their laptops.

Jason Fried from 37signals talked about "Lessons Learned While Building Basecamp". Basically he recommended agile development. Reading agile books and going to agile conferences, it's easy to start thinking that agile is mainstream but it was obvious from peoples' reactions that there are still a lot of non-believers out there. The questions from the audience reflected disbelief, resistance, and even a certain degree of hostility. To me it seemed mostly pretty standard stuff - release early and often, start simple, don't do big up front design, get the right people. A few of his points were more interesting - obsess over aesthetics, embrace constraints, and design from the user interface first. They just released Ta-da List - a free to do list web application.

O'Reilly introduced their new quarterly Make magazine and held a "Maker Fair" - a kind of science fair for grownups with a lot of weird and wonderful projects and demos.

I came away from the conference all fired up, full of optimism, and excited. Getting back to the office to wade through 800 emails (99% spam) and to face the usual array of problems and issues put a damper on my mood, but I'm sure I'll rebound :-)

Saturday, March 19, 2005

First Blog

I decided I'd better try out this blogging thing, and a book I picked up recomended Blogger, so here I am.