Sam Wilson's Journal


I’ve been writing lots of integration tests lately, for a system that has zero unit tests. Does this make me a bad programmer? Probably. But it’s so easy! This is in Kohana, using ORM, and so the model basically is the database (which idea I rather like), and mocking it or splitting it out to be separate is just a pain. Far less code to write if one can test the whole interaction of the system at once.

I am being slightly tongue-in-cheek here, because I do realise that the maintenance burden of a system built with tight coupling between the various layers is likely to increase contiunually (to a point where someone at somepoint says “oh sod it, let’s rebuild from scratch on Drupal”). But for the multitude of systems that are basically just CRUD, the approach of writing tests that mimic the code seen in controllers is pretty simple and neat.

[No comments] [Keywords: , , , , , , , ] [Permanent link] [13 views]

It would seem that when using Composer on Windows, one cannot use UNC paths as repository URLs. That is to say, the following doesn’t work:

  "repositories": [
      "type": "vcs",
      "url": "//SERVER/Share/project.git"

Instead, the share must be mapped and the mapped drive letter used:

      "url": "G:/project.git"

This does, of course, have the stupid side effect of forcing everyone who uses the composer.json in question to map the share to the same drive letter! However, this is hardly the most significant of the miseries that one must live through when developing software on Windows…

[No comments] [Keywords: , , , , , , , , , ] [Permanent link] [29 views]

Today, it seems to me that the incremental construction approach is best. Don’t tear everything down and start again! That’s slow, and will never result in an improvement overall — some parts will be better, but others worse. Instead, find the bit that is most rubbish, and fix that. Then repeat. The growth will be messy and disorganised, but will have a quality that otherwise would never be achieved. Both a particular quality and a vibe of quality I mean.

[No comments] [Keywords: , , , , ] [Permanent link] [542 views]

I’m really not particularly convinced that Twitter is at all a sensible thing. However, today thanks to T’w’r, I discovered that it is “the day we fight back“, and (despite feeling that this is armchair activism at it’s most lazy) I have added the banner to my site. I dare say no one will see it, nor will anyone read this, but at least I know that I am rather annoyed that the lovely internet is becoming a nasty panopticon.

I don’t think this banner-adding could be called “fighting”, but as soon as it’s announced I will very gladly join the bicycle-based task-force that shall tour the suburbs installing wireless meshnet nodes and helping people become responsible for their own electronic communication. That’ll be fighting.

[No comments] [Keywords: , , , , , ] [Permanent link] [455 views]

I use LibraryThing to keep track my book collection and reading. It’s great!

(Hullo LT Matt! This post is to confirm that I am me.)

[No comments] [Keywords: , , ] [Permanent link] [342 views]

I started using DokuWiki a few years ago, and didn’t think very correctly about how to organise the page and media hierarchies. Now I know more about what I want in and how I need to be able to give people access to it, I’ve decided to reorganise the whole thing. Namespaces shall now be used for access control, not topics. The problem with this change is that there would be a pile of namespaces that would no longer exist but which would still need to be protected (or have their revision history removed). Most of their content isn’t going to remain on the site (thanks to a pile of family history stuff being moved into Webtrees at and so it seemed easier to start with a clean slate and move only selected bits to it. Hence, how to move a namespace into another wiki:

  1. Copy the data/{attic,media,media_attic,media_meta,meta,pages}/nsname directories from the old wiki’s data directory to that of the new.
  2. Clear the new wiki’s cache.
  3. Run php bin/indexer.php.
  4. Browse the new wiki and check that all is okay.

Easy, really.

[No comments] [Keywords: , , , , ] [Permanent link] [661 views]

Linux Voice coverLinux Voice has reached their target, and so shall be published! Hooray!

[No comments] [Keywords: , , , , ] [Permanent link] [4,135 views]

The Fremantle Society AGM is on tomorrow evening at Victoria Hall, from 6PM. There’s going to be a ballot for the position of president, which should be fun. I shall be voting for Henty Farrar.

I’ll post the Freopedia map that we’ve been working on, tomorrow.

[No comments] [Keywords: , , ] [Permanent link] [2,576 views]

The MoonMoon underneath Planet Freo has been upgraded. If anyone notices anything strange, could they please let me know? Thanks!

[No comments] [Keywords: , , , , ] [Permanent link] [1,507 views]

The wood really wasn’t being nice to me, today. I was dressing some old jarrah with a scrub plane, and it just wasn’t cutting the mustard or the wood. Of course, it simply wasn’t sharp:

Plane blade, blunt

That shiny bit in the middle isn’t a trick of the light, it’s bluntiness.

However, I have no grinder, and this blade needs a fair bit taken off, so I’m giving up for the day…

Maybe I should get one of these from Carba-Tec:

Or be tricky and build something like this:

(From here)

The trouble with that latter is that it’s pretty impossible to find the stone for such a thing! Otherwise, would be brilliant.

Ah well… I’ll keep honing that blade…

[No comments] [Keywords: , , , , , , ] [Permanent link] [2,591 views]