MCWALTER.ORG
mcwalter.org and mcwalter.net
The homepage of Finlay McWalter.
Navigation: blog | contents | photos | about

Website news and weblog

Blog: Buildscripts and stuff [14th October 2005]

Ah, there's nothing like making life difficult for yourself. This site, you see, is maintained by a script of my own creation. For a very long time it's been a cygwin bash file, which at its heart is a massive find statement. This finds a bunch of html-like source files and runs them through an html preprocessor. I use iMatrix' HTMLPP - I can't say I particularly recommend it (it seems there's no ongoing development on it, it's a bit crufty and requires a bunch more stuff in the templated document than I'd really wish. Ideally I'd move to a modern, supported templating system (people have recommended Clearsilver to me, and it looks nice), but the effort of changing all my sources files (of which there are around forty, plus some files that are built automatically) would be a bunch of work. The bash script which drives this thing grew and grew, doing automatic image thumbnailing, having support to host source code files (importing them from a nearby live sourcetree and formatting them nicely), and having some basic blogging support. Imagemagick handled the image scaling.

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]

morning glory picture
Our morning glories are out today (and will be gone tomorrow), so I took some pretty nice photos of them. I've added the best (the plainest) as a new background.

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]

fuschia picture
I've been looking after my neighbour's greenhouse and the plants on his deck while he's on holiday. The weather has been lovely, which makes for much watering to be done. Although the neighbours are missing the display, I'm enjoying the flowers. Here's some photos:

Older news and blog entries

Full text of older blog entries and website news are stored on the blog index page.

Contents

Navigation: blog | contents | photos | about

ImagesImages

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.

TechnologyTechnology

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.

Games - RtCWGames - RtCW

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.

Games - DoTTGames - DoTT

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.

Photos

Navigation: blog | contents | photos | about

. flames
flames
.


. batllo2
batllo2
.

. golden_canyon
golden_canyon
.

. monument2
monument2
.


. treeline
treeline
.


. lobelia1
lobelia1
.

. godetia
godetia
.

. web
web
.


. seal1
seal1
.


. mudflat
mudflat
.

Information about this site from various web sources:
  • of this page (from wayback machine).
  • Statistics from alexa.com
  • Netcraft info about www.mcwalter.org
  • Search mcwalter.org with Google

Navigation: blog | contents | photos | about

Page information

Valid HTML 4.01!     Valid CSS!

Everything on this website is Copyright © 2001-2005 W.Finlay McWalter. ALL RIGHTS RESERVED. No part of this website may be redistributed in any form without the express written consent of the copyright owner. NO WARRANTY of any type is given for this website, or for the information or software programs presented herein. Users proceed entirely at their own risk. Continued viewing of this website consistitutes acceptance of these terms. The twin-eagle sigil is the property of id Software, or Activision, or whomever. The purple-tentacle-gone-bad icon is property of LucasArts inc. Java is a registered trademark of Sun Microsystems Incorporated. Windows and Internet Explorer are registered trademarks of Microsoft Corporation. Microsoft Corporation is a registered subsidiary of Satan™. All other trademarks are the property of their respective owners. This website is not endorsed or sponsored in any way by any of these companies. Infact, if they knew about it, man, they'd be sooo angry.