magpiebrain

Sam Newman's site, a Consultant at ThoughtWorks

Archive for ‘June, 2004’

Back from Glastonbury, and it seems people have been busy in my absence. A while back I integrated some Javascript from “Stuart Langridge”:http://www.kryogenix.org/ which parses Textile formatted text into HTML – I used this code to create a live preview for commentors (which itself was inspired by the HTML live preview on “Jon Hick’s”:http://www.hicksdesign.co.uk/journal/ site). Jeff Minard spotted my “original post(magpiebrain – Live textile comment previews)”:http://www.magpiebrain.com/archives/2004/05/18/preview on the subject, and “took it upon himself”:http://www.creatimation.net/journal/textile-live-preview to add support for some aspects of Textile formatting that were missing from Stuart’s original script prior to integrating it into his own very nice blog (another site that has encouraged me to start a minor design overhaul). When I get a spare moment, I’ll certainly be integrating Jeff’s changes into this site.

Any initial impressions are that its very nice indeed. I uninstalled 0.8 before installing “as advised(Firefox 0.9 release notes)”:http://www.mozilla.org/products/firefox/releases/, and was a little disappointed to see that it lost my settings. This however was a minor inconvenience (most of my bookmarks are in “del.icio.us”:http://del.icio.us for example) – the extension manager is fantastic, and it was a breeze to reinstall my favourite “Web Developer”:http://update.mozilla.org/extensions/moreinfo.php?application=firefox&id=60&vid=63 extension (which has added even more useful features, such as improved CSS reports and a “page speed report”:http://www.websiteoptimization.com/cgi-bin/wso/wso.pl?url=http%3A//www.magpiebrain.com/. Now all I have to do is wait for the “Tab Browser Extension”:http://white.sakura.ne.jp/~piro/xul/_tabextensions.html.en to support the new API…

I woke up this morning to a pleasant arrival in my inbox – no, not the latest Nigeria scam, instead a communication from “Sixapart”:http://www.sixapart.com/, makers of “Movable Type”:http://www.moveabletype.org. Firstly they informed me that my Personal Edition has been upgraded for free to an Unlimited Personal Edition (so I can now have as many authors as I like), but have also explained that the standard Personal Edition now allows an unlimited number of blogs too (previously you were limited to five authors).

When the original licensing structure was announced many bloggers got a “little histerical”:http://diveintomark.org/archives/2004/05/14/freedom-0 – I instead decided to wait it out and see how Six Apart dealt with the criticism. Six Apart listened, reacted, and the net result is that the new license scheme was to my liking. I paid for a license an am very happy with it. The fact that they’ve further rewarded me for my support is icing on an already quite nice cake.

You’ve found a project which interests you. It looks in fact like it might be incredibly useful. You start to play around with the code. You have some questions, find some bugs. You post queries and bug reports. Nothing happens. You find some more problems – some architectural issues for example, which result in queries you’d like answered. Still no reply. You even send in patches – still nothing. You like the idea of the project, just not the current implementation or the way its being run – so when do you make the decision to fork, or even re-implement it?

I’m currently writing a UI layer for Naked Objects. I’m using a TDD approach and have also used the development as an excuse to give “JMock”:http://www.jmock.org/ a go. It being my first experience using a proper Mock Objects API (I have used the very handy “MockRunner”:http://mockrunner.sourceforge.net/, which Mocks application frameworks rather than objects) its been slow going at the start. Things have now started to click into place mentally and JMock is at last making some sense.

Today however I hit a really annoying problem. I’m developing a simple @FrameFactory@, who when given a @NakedClass@ will return a window showing a list of instances. The code looks like this:


public class FrameFactory {
  public FrameFactory(FactoryDependancy dependancy) {
    ...
  }

  public Component makeInstanceList(NakedClass clazz) {
    //make an instance - this is what I want to test
  }
}

Continue reading…

After thinking it over for a while I decided to upgrade to Movable Type 3. The install process went well and everything seems to be working fine. Rather than simply going for the free version I decided instead to reach for the credit card and purchase a Personal Edition license – I had a beta testers discount so it made it stupidly cheap for what I was getting. Anyway, the earlier versions of MT gave me excellent service, and I thought it was time I contributed toward the development costs. As always, if it looks like anything is bust, “let me know(Contact Me)”:http://www.magpiebrain.com/contact.

Along the way I discovered I nifty little freeware (for non-commercial use) ftp tool called “SmartFTP”:www.smartftp.com/ which is worth a look if you’re in the market for a graphical FTP tool.

“Rome”:http://wiki.java.net/bin/view/Javawsxml/Rome is another Java API which provides RSS parsing capabilities. Unlike the more mature “Informa”:http://informa.sourceforge.net it also supports Atom. Their comparison with Informa makes interesting reading – they state that Informa is hard to use! The mind boggles – here is how you can parse a feed:


FeedManager feedManager = new FeedManager();
FeedIF feed = feedManager.addFeed(getUri());

What is complicated about that? It’s true that Informa doesn’t support Atom yet, but that is a trivial task and support should be in soon (Niko is working on it now). Their only other complaint seems to be that Informa can only 1.0 and 0.91 in output – this is a valid criticism but RSS output never core to Informa’s goals. In any case adding support for other export mechanisms is trivial but to my knowledge has never been requested by anyone.
Continue reading…

I have on occasion been bitten by online retailers. A recent nasty experience has prompted me to list a few bits of advice to people thinking about buying online. Needless to say my recent bad experience was caused by not following my own advice…

If they don’t have a contact phone number on their website, don’t use them

If nothing goes wrong, all well and good – but if it doesn’t, you don’t want to be dealing with customer support via email if you don’t have to.

If their website looks more stale than last weeks doughnuts, don’t use them

Last update times of 2001 are a nasty sign that a company can’t afford to update its website, which can speak volumes about what they do have money for.
Continue reading…

In a recent trend of technologies being used as verbs (think _googling_, and err, well something else) of late I have been mostly Naked Objecting. For those who don’t know, “Naked Objects”:http://www.nakedobjects.org/ is a framework which allows the developer to quickly roll an application which provides both a UI and persistence layer simply by coding a domain model (for a better overview see ” Introduction To Naked Objects”:http://today.java.net/pub/a/today/2003/07/15/nakedaddress.html over at Java.net). Thats the good side.

That bad side is that the built in default ‘lightweight’ UI just plain sucks. It makes heavy use of drag and drop which is not in itself a bad thing, however its a jolt for those users more used to a standard UI, and no non-drag and drop alternatives are provided. It is also ugly, and not that intuitive. Luckily, Naked Objects make it fairly easy to roll your own UI for it, something I’ve been playing around with over the last few days.
Continue reading…