Website news and weblog
Blog: Buildscripts and stuff [14th October 2005]
A while ago I started rewriting in python, still on cygwin. I really don't know why. It was worth it, I suppose, but more complicated than I'd hoped. In a final push yesterday and today I finally finished it, and cut its dependency on external utilities that cygwin provides (sed and find and stuff). So now it runs natively on Windows or Linux, which is a relief. Cygwin is fine as long as you stay inside the little cygwin box - but if you have to call in and out of it then you run into endless little filename-escaping issues.
The python version is certainly more verbose than its bash counterpart, but much easier to read (and, I hope, to maintain in future). Image scaling is now done by PIL rather than imagemagick (I just couldn't get PIL to work properly on cygwin's python). Where I used hacky sed calls to do some text substitutions I now do some really botched python regexps instead (I'm more ashamed of them that I was of the sed ones, which is saying quite a lot). The whole thing has about as many lines of code (although far fewer backslashes) and takes about the same time to run. But for exactly one line (a shell variable expansion in code called inside the macro system) it's entirely portable (damn, I'd forgotten that hideous DOS %var% syntax). I still use htmlpp to do template expansion, html tidy to fix any html snafus, and linklint to verify that there aren't any bad links. Blogs are still built in an overly manual way, and there's still no RSS syndication.
I keep wondering whether to shift the blogging support to Wordpress (which I've goofed around with, and which couldn't be easier). I guess I'd put the Wordpress content into an iframe (where the current static blog appears now) as I don't really want the entire content served from Wordpress. I'm squeamish about dynamically generated content when static would do, so I guess I'll have to figure out how to get it to produce static content. Urgh, I guess that's another hundred lines into the buildscript.
Blog: Backgrounds and their fans [19th August 2005]
In checking through my webserver logs I've discovered that several teenager use my images for the backgrounds to their weblogs. Technically it would be better if they downloaded the images to their own website (instead of using up my paid-for bandwidth), but they seem like sweet people, so I'm not going to hassle them about it. If I was particularly nasty I could write some code that checks the referrer on requests for those images, and send visitors to their site (but not mine) something horrible like the goatse man.
It's a compliment, I guess, so it'd be churlish to complain. The thing about copyright is that if I fail to defend it, someone might claim that I've abrogated my right to do so in future. The last thing I'm going to do is send a nasty cease-and-desist letter to these folks, so here's the smart solution - the following myspace users are hereby granted licence to use images from this website on their personal weblogs:
(boy, you guys have some really overproduced websites)Blog: Flowers [7th August 2005]
Older news and blog entries
Contents
The photo archive contains a number of photos of landscapes, buildings, nature, and animals with silly expressions on their faces. There's also some high-resolution digital pictures of various natural and artificial textures, which may be of use for texture mapping applications.
New: I've added some of my favourite closeup photographs, prepared in nice large sizes, to the new backgrounds section.
The source for a tiny java web server (HTTPd), together with some commentary, is available under the GNU General Public Licence (GPL). With some help from various people I've gotten this down to just over 15 lines of (horribly unreadable) java code. Can you make it any smaller?
Are you tired (or embarrassed) of that uncomfortable delay between launching a large java application and it actually appearing? Help overcome your feelings of inadequacy by wrapping your application in this handy java application splashscreen application, which can show a logo or other graphic while the main application loads.
This page also contains a few weird tricks you can do in the java programming language (but shouldn't).
A discussion of optimisation, in the context of a simple java text processing program is presented in the the java hexdump page. Surprisingly, this shows we can write text processing programs (which are generally IO bound) as fast as decent C language programs.
I've made some notes on webdesign, including:
- Some advice for the novice website creator and designer.
- What do I think of the website of british furniture retailer Habitat? Not much.
As almost any user of UNIX and its workalike environments knows, there's really no point in writing your own utilities - as soon as you're finished you'll find someone already wrote a better, simpler, faster solution to the same problem, probably in about 1970. Here are some UNIX shell programming gems that I discovered, shortly after writing my own versions.
Like its ID Software predecessors, Activision's game Return to Castle Wolfenstein contains a number of secret areas, cunningly positioned throughout the game to divert the player's attention from how interminably dull and criminally derivative this rather average game is.
Tim Schaefer's Day of the Tentacle is one of the best computer games of the lost "second age". It worked (with an unpleasant amount of that nasty config.sys wrangling) under DOS and older versions of Windows but it really doesn't work properly under
Windows XP. One might think Lucasarts might have released a DirectX version for windows, but perhaps moths have eaten the tape their only copy of the sourcecode is on (or something like that).
This site contains some mystical instructions for playing DoTT on Windows XP and (I think) on Windows 2000. Kindly multi-lingual readers have produced translations of this page into norsk, and nederlands. If you'd like to contribute a translation, even into something mad like Klingon, then I'd be happy to host it.
Although it's not very hard, and it's impossible to get it "wrong", some folks have asked me for a walkthrough of DoTT. As it rather spoils the game, I'd strongly recommend you read it only if you're really really stuck.
For your convenience, there are also the answers to some DoTT frequently asked questions.















