Gracefully degrading jQuery edit-in-place

I recently became curious about creating some edit-in-place controls: things that look like static text until you click them, and they magically become editable. It turns out that creating this sort of thing is almost trivial with jQuery, which is now my favourite JavaScript framework. I’m a big fan of functional-style programming, and jQuery plays right [...]

A content-based file manager

I’ve been thinking recently about Insight again, and I’ve been considering part of the problem with naming and uniqueness.

Names in a traditional file system are made unique based on a full path to the file, but most people think of a file name as just the final component. This would then cause a problem with the move to Insight, as a file could appear in multiple directories, and its only distinguishing feature would be the final component of its path. This is counter-intuitive and can cause all sorts of problems.

Consider makefiles, for example. They rely on a standard named file (Makefile) appearing at various levels in the hierarchy in order to work. Obviously, you would want different makefiles at different levels and in different projects, but Insight as it stands has no way to handle this.

I then started thinking about what makes a file unique. In the end, I came up with two things: name and content. This covers the makefile case (same name, different content) as well as the backup case (same content, different name). It then occurred to me that, in the general case, all you need to distinguish a file is its content, and then actually finding it can all be left up to metadata.

Continue reading “A content-based file manager” »

mod_sqltemplate: A distraction from work

I’ve begun the long and (hopefully) interesting task of working on mod_sqltemplate.  I have not yet found a tutorial or guide to working with APR’s DBD API (the database abstraction layer for the Apache Portable Runtime), so I’ll write one and publish it here as I [...]

Modules for Apache and PHP

The number of projects I have in mind just keeps growing… I really need to get something together to organise them, and remember them! But here are two more to add to the list: an Apache module for dynamic configuration generation and a PHP framework inside an extension. Read on for a monster post with more information…

Continue reading “Modules for Apache and PHP” »

In-place array uniq in C

I’ve been developing Insight even though the uni project has come to an end, because it’s fun! I also want to make it more stable and eventually release it under an open-source licence of some kind. There will be an update coming soon, I promise! I now have Internet, so I can write up some things… Anyway, one of the interesting things I wanted to do for Insight was an in-place form of uniq for an array, ideally without any additional memory allocation. It seems that this is something nobody else has done yet! So I set about doing it myself… For those of you who are unfamiliar with the Linux/UNIX command uniq, it takes a sorted list and removes any duplicates. This is almost exactly what I’m trying to do, with one caveat: I need to keep the “discarded” duplicates. What happens is that I have an array containing a number of strings, and these have all been dynamically allocated via malloc() or calloc(). If I just remove or overwrite their pointers, they’ll vanish and cause a memory leak. While I’ve now fixed a large number of leaks thanks to Valgrind, I’m trying to actively avoid any possibility of adding them. Read on for the details… Continue reading “In-place array uniq in C” »

Overflowing with ideas

I’ve found myself overflowing with ideas as I try to focus on revision, so I thought I might as well scribble some of them down, if only to get them out of my head! To name the prominent few:

  • More on Partis and its future
  • A web service integration API proposal
  • A PHP system to make it easy to plug together a load of code modules for rapid development
  • Not to mention some others which are too fleeting or too vague to pin down yet

Continue reading “Overflowing with ideas” »

FolderCheck Thunderbird Extension

This is something I’ve been meaning to write for a while, and finally got round to doing. Basically, it’s a simple Thunderbird extension that makes it easier for you to check other folders for new messages. I’ve named it FolderCheck* (rather unimaginatively), and it’s available from the Mozilla Add-ons site sandbox.

The problem is that, at the [...]

Coolermaster CoolDrive 6

Well this has been a bit of a saga so far. I’ve been working on Linux support for the CoolerMaster CoolDrive 6 (CD6 henceforth) which I currently have in my computer. It has a USB connection, and an inbuilt Prolific PL2303X USB-Serial converter. Sadly, I’ve been struggling with uncooperative C code that I’d found which supposedly allows me to control a serial port. Yeah, right.

Continue reading “Coolermaster CoolDrive 6” »

Automatic email forwarding

Well I got fed up with email filter rules last week, and this is the rather bizarre result: autoforward, a Perl script and configuration file that will automatically generate Exim filter files (.forward files), mainly to be used on my University account. My email processing rules have become pretty complex and messy, making them difficult to control, and there’s a lack of uniformity about them. I decided there had to be a better way, so set about writing a configuration format and parser… and I think I succeeded.

Continue reading “Automatic email forwarding” »

My current projects

So, what am I working on at the moment?

Continue reading “My current projects” »