Month: October 2004

  • Word press spam and comments pages

    I’ve got tired of people spamming my web log. So I’ve changed the name of the comments posting page. I’m going to see if it makes a difference. If it does then the people spamming are automated, if it doesn’t then the automatic system is either too smart or it’s figuring it out in some other way. I’ve got some more ideas so if this doesn’t work then I’ll move on. Either that or ban URLs in comments altogether.

    Potential spammers should note that advertising or commercially orientated posting in the comments area is specifically prohibited. Under no circumstances is any such posting permitted. Posting any such comment counts as unauthorized and illegal use of this machine.

  • Walled City of Kowloon

    Leynos posted a really interesting story about the Walled City of Kowloon.

    It’s fascinating and I’ve been reading all the linked web pages …

  • Integrate flyspray with CVSWeb

    Currently I’m using flyspray for bug tracking.
    I use cvsweb to view the cvs tree online.

    One thing that I really wanted was to be able to click one bug numbers in the cvs log reports and see the bug tracking entry that matches it.
    It turns out this is amazingly simple. I added the following code to the cvsweb.cgi file inside the htmlify function, just below the bit that does the urls. (new section in bold)

    # get URL's as link
    s{
    ((https?|ftp)://.+?)([s']|&(quot|[lg]t);)
    }{
    &link($1, htmlunquote($1)) . $3
    }egx;


    # replace FS with correct bug track link in flyspray
    s{
    FS#([0-9]+)
    }{
    &link("[$1]","/flyspray/index.php?do=details&id=$1")
    }egx;


    # get e-mails as link

    And now my cvs logs display a link whenever I use FS#100 or a similar bug number. Next I suppose is to integrate it the other way and have the cvs system automatically close resolved issues in flyspray. There is actually already some code for subversion so it wouldn’t be very hard to implement probably (but there are better things to do with my time).

    [edit]
    subversion code is at http://flyspray.rocks.cc/bts/index.php?do=details&id=310&area=attachments#tabs

  • Java FileWriter, XML and UTF-8

    Oddly enough the java.io.FileWriter class doesn’t use UTF-8 by default. I’m not exactly sure what the default encoding is (possibly ISO-8859-1 or US-ASCII?) but it doesn’t seem to be UTF-8, which is odd given that java strings are supposed to be unicode. This causes a problem if you want to have non-ascii characters and you don’t realise what’s happening. This was a bug in SQLEditor and somebody accidentally typed an umlaut into one of the fields and the file wouldn’t reload. (Which was annoying).

    The correct thing to do seems to be to use the following:

    OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(path),"UTF-8");

    Which ensures that you are using UTF-8.

    I suppose that the motivation for this is that it means that simple use of FileWriter is compatible with applications that are not unicode aware and don’t support UTF-8. It probably makes sense at some level, but it just goes to show that you can’t assume anything. 🙂

    Update: Bela’s comment (below) explains more about which character set you’ll actually get.

  • SQLEditor Cocoa B11a

    Unfortunately there was a crashing bug in SQLEditor beta 11 and I had to release b11a.

    It was one of these things were format strings caused the crash. I’d transposed two of the entries

    [NSString stringWithFormat:@” %@ %d”,aDecimal,aString]

    instead of

    [NSString stringWithFormat:@” %@ %d”, aString, aDecimal]

    and of course cocoa crashed, probably because it tried to send a message to the aDecimal variable.

    It’s unfortunate that this can’t be detected at compile time, because it’s really annoying and very easy to do.

    Possibly this could be caught in an exception handler of some kind though. I’ll have to do some more work on it.

  • HP unveils paper-thin flexible screen technology – ZDNet UK News

    HP unveils paper-thin flexible screen technology – ZDNet UK News

    This is a really amazing development. There are some images too. The most impressive one is probably the first image which has been unplugged for two years!

    They also demonstrate a color version which offers 125 colors at the moment.

    The advantages of this technology are obvious, although it isn’t (yet) fast enough for digital video. It can be used to create clever signage, smart display panels for places like airports and railway stations. Intelligent motorway signs and many other things. It will allow lower cost and better display quality.
    Think how much fun it could be in airports if a late passenger announcement also included a giant photo of the passenger holding up the flight. 🙂

    Maybe one day we might even have proper electronic paper. A unit as thin and light as real paper but with all of the qualities of a computer display.

  • SQLEditor Cocoa B11 Released

    Released SQLEditor Cocoa B11 today. Lots of new features included in this release.

    I almost missed the release today actually because I found an unfortunate bug just before I was about to upload. It turned out that an object wasn’t correctly removed from the notification center list, which caused a crash when the application tried to clean up by sending messages to various objects (including one that had actually been deleted already). But I fixed it and released just slightly late (it wasn’t really a serious bug)

  • UGC Cinema Pass & recent films

    Well I finally signed up for this. After about 5 minutes and an amazingly scarey form, I’ve now got a commitment to pay £120 and a pass good for 30 days. The actual pass will be delivered by post later.

    Saw Wimbledon. Along similar lines to many recent British romantic comedies, but pretty good none the less. The tennis scenes were suitable dramatic and it had a happy ending.

    Saw “Sky Captain and the World of Tomorrow” last week. Excellent film in the Indianna Jones style.

    Now I have my cinema pass I must see more films though.

    Still wanting to see

    Shark Tale

  • Mental Control of Computers

    Yahoo! News – Scientists gingerly tap into brain’s power

    This is a really great piece of news. If this technology can be extended then it will really improve the quality of people’s lives immensely.

    Plus they’re also promising non-invasive approaches too.

  • Cocoa#

    I’ve been playing around a bit recently with mono and cocoa#.

    There also seems to be an experimental build of Mono-develop.

    I begin to think that .net and mono are going to be excellent java competitors. I also think that the idea of supporting platform differences makes more sense than the java swing approach of lowest-common-denominator functionality.

    I started off SQLEditor in java swing and then switched to cocoa. I wonder if there will eventually be another rewrite to mono and .net?