magpiebrain

Sam Newman's site, a Consultant at ThoughtWorks

Archive for ‘April, 2004’

So occasionally when I order my lunch, the person serving me remembers me. Then, the conversation goes even smoother than “normally(Ordering sandwiches and GUIs)”:http://www.magpiebrain.com/archives/2004/04/28/sandwiches:

==

Server
The usual?
Me
Yes thanks

==

As Rajkumar “points out(Adaptive UIs)”:http://jroller.com/page/rmadhuram/20040428#adaptive_uis, its one thing for the user to learn from the UI, but another for the UI to learn from the user.
Continue reading…

Advertisements

I frequently pop down to the canteen to buy a sandwich. The early conversations with the person serving went a little like this:

==

Me
I’d like a sandwich please
Server
What would you like on it?
Me
Erm, Cheese and coleslaw please
Server
On what kind of bread?
Me
White sliced please

==
Continue reading…

Each language feature introduced that tries to enforce safety of some kind invariably introduces some reduction in the power of the language. Some of these tradeoffs’ seem acceptable. The Java security model is an example of a limiting factor in the deployment and execution of a Java application which makes perfect sense to me. Java also hides memory management and pointers from you, which for the majority of applications also makes sense, however sometimes you really want to get hold of the underlying memory model and do nasty things with pointers and that is why C and C++ are still used for writing OS API’s.

Other limitations just become more frustrating over time. Java’s strongly typed language provides a great deal of compile-time checking, at the cost of program flexibility – Python, Ruby et al provide a richer, dynamically typed language which gives the programmer much more power (And anyone saying “You get dynamic typing with Groovy” is going to get smote with the cluestick of death, +1.). At this point I’d like to borrow a phrase from Spiderman (uh oh – nerd alert!) “With power comes responsibility”. Such dynamic languages with their more flexible typing can also get you into a bit of a mess. These dynamic languages can be seen primarily as enabling languages – they make the assumption that developer actually know what they are doing. As a result, they will on occasion let them shoot yourself in the foot. C and C++ likewise let you shoot yourself in the foot – they also however let you shoot the guy next to you, blow your car up, drink your beer and steal your girlfriend, but that perhaps is a discussion for another day.
Continue reading…

Well, as per “MarkPilgrim’s instructions(Cruft-free URLs in Movable Type)”:http://diveintomark.org/archives/2003/08/15/slugs and with a little help from Dave Dribin’s “@MTEntryShortTitle@”:http://www.dribin.org/dave/software/movabletype/ plugin, my URL’s should be a little more “user friendly(Jakob Nielsen – URL as UI)”:http://www.useit.com/alertbox/990321.html, and a little more “future-proof(Movable Type’s non-permanent permalinks)”:http://mar.anomy.net/entry/2003/06/09/13.28.59/. Getting Apache to handle my files as PHP without file extensions was more work than it should of been – conventional wisdom has it that Apache’s @DefaultType@ directive should of worked:

DefaultType application/x-httpd-php

Continue reading…

I’ve been looking at the issue of getting Movable Type to produce some more friendly URLs off the back of my recent site redesign and the decision to start using PHP to build certain parts of the site. By default, MT generates pages with URLs like this:

http://www.magpiebrain.com/archives/000226.html

The first problem with such a URL is that it is by no means friendly. Secondly they are dependent on the server-side technology I’m using – for example what if I decided to produce PHP files rather than HTML? These and other issues are looked at in Jakob Nielsen’s “URL as UI”:http://www.useit.com/alertbox/990321.html and in Tim Berners-Lee’s “Cool URIs don’t change”:http://www.w3.org/Provider/Style/URI so I won’t go over them in any detail here – suffice to say if you’re interested in the subject you could do worse than read both of them.
Continue reading…

I’ve been looking into using some PHP on this blog in order to reduce rebuild times. My sidebar, which is included on each page using Movable Type’s @MTIncludes@ tag is used to collate information from a variety of sources (although currently just my bloglines blogroll). Due to the way MT handles templates, this sidebar is being rebuilt for each and every page – so in the case of my blogroll, thats one request to bloglines per entry, category page, date archive etc. @MTIncludes@ can be used to include static files rather than other Movable Type modules, so my initial thought was to change my sidebar from a module template to an Index Template so it only gets rebuilt once. The problem with this is that @MTIncludes@ performs a static import – that is to say it imports the content when the page doing the including is built, but won’t pick up any changes to the included file afterwards. This is an even bigger problem when you consider how Movable Type rebuilds files – the index templates are the last to get done, so at best the individual entries will have an out of date include, and at worst might not find the file to be included at all.
Continue reading…