An Eccentric Anomaly: Self Reference

Ed Davies's Blog


Pages tagged: Self Reference

Commentary on this blog's construction

Web Key Directory Implementation

In the last few days I've seen a couple of write ups of implementations of Web Key Directory (for finding the public cryptographic key associated with an email address) so I thought it might be useful to describe mine.

More...

HTTPS!

At the end of January my hosting provider (Mythic Beasts) announced support for HTTPS for customers with sites on their yali and onza servers. Sadly my site is on sphinx so I couldn't switch immediately.

As mentioned in the update at the end of my Site Tweaks post they've been working towards HTTPS on sphinx since. I've just got round to checking and found it's now available so switched it on immediately.

More...

Site Tweaks

I've just made a couple of tweaks to the way in which this site is served. They shouldn't have any harmful effects but if you notice anything wrong I'd be grateful if you could let me know.

More...

Blog Templating

Introduction

The software used to create this blog writes a number of files: the individual HTML pages, the HTML index files and the Atom feed. Though it's not necessary for the HTML to be well-formed XML I do have a strong preference for it to be. Actually, I'd rather just use XHTML but that's a separate rant.

XML is just text and can be treated as such but there are enough traps for the wary, let alone the unwary, that it's really not a good plan; in particular, when doing template substitution on the text form it is quite hard to guarantee that the result will be well formed. It's much better to handle it as a proper document structure and leave serialization to code which specializes in doing that right. Python has a number of packages for handling XML with varying degrees of power and standarization but I decided to just use the basic xml.dom and xml.dom.minidom for simplicity. The lack of any form of XPath expressions or the like could be a pain in some applications but isn't a problem here. The compromised namespace management is more irritating but I've hived off dealing with that to a separate module avoiding too much grief while accepting some limitations.

The general scheme is to have template documents stored in the Python code as multiline strings and "compiled" to DOM trees on load. For each output document the Python code recurses down the appropriate template tree producing the output by copying most of the template and performing substitutions for elements in a specific namespace.

The template document therefore has a similar flavour to an XSLT Literal Result Element StyleSheet. The main difference is that the values substituted come from Python data structures rather than from an input XML document.

More...

Blog Software

This blog is produced using some home-grown software. It's intended specifically for my own use — that's the point; it should do what I want without all sorts of configuration options for things I don't need — so is very unlikely to be of much direct interest to anybody else. Never-the-less, some design decisions, and perhaps even code modules, might be of interest to somebody rolling their own.

This entry is a brief overview to be supplemented by later discussion of certain aspects.

More...

In the Beginning

What's the literal meaning of the title of this blog?: Eccentric Anomaly. It just appealed to me though I have used the concept a little bit for work purposes.

And why the badger? I have some grey bits in my hair which are fairly randomly organized but used to form a pretty prominent strip down the front. Somebody said that every time he saw me I looked more and more like a badger. This amused another somebody enough to start calling me Ed the Badger. More...