Sam's notebook

Sorting duplicates in Piwigo August 10th, 2018, 6PM

Programming

Piwigo has a duplicates-search feature, which allows you to search for duplicate photos by original filename, MD5 checksum, creation date & time, and/or image width & height. It’s slightly annoying though, because although it presents you with the duplicates, it doesn’t sort them so that potential duplicates are displayed next to each other. I’ve attempted to fix this.

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

The world wide success that is XML July 27th, 2018, 12PM

Programming

Most of the work has finished: people are using the specifications in production and the rate of errata has slowed to a crawl. XQuery, XSLT and EXI ended this year. But just because the specification work is ending doesn’t mean XML is ending! It means XML is at a stage where the technology is mature and widely deployed. People aren’t reporting many new problems because the problems have already been worked out.

The World Wide Success That Is XML, on the W3C Blog.

[Keywords: , ] [Permanent link]

Vote with sausage; help the P&Cs July 27th, 2018, 10AM

Miscellaneous

One makes enemies for life when one ignores the North Fremantle community, so I’d better give a plug for the catering at the North Freo Primary School at Saturday’s FEDERAL BI-ELECTION DAY, after I did the same for the Freo Primary School. It’s not a competition, so people in those areas please supports the P&C of these schools, and others such as the Beacy Primary, close to where I live! Vote for Labor’s Josh Wilson. He is a good bloke!

SUPPORT THE SCHOOLS P&Cs ON ELECTION DAY! from Roel Loopers’ blog.

That makes five Democracy Sausage booths for the Freo election (I just submitted the missing North Freo one). I don’t know if Beaconsfield Primary is having one.

A grand Australian tradition.

[Keywords: , , , ] [Permanent link]

July 20th, 2018, 5PM

Status updates

Things should be ‘projects’, not ‘systems’. They should end, so they can be forgotten. They must be in a fit state to be ended and forgotten. Books work with that idea, but websites are trickier. That’s slightly annoying, but there are great tools for making it easier. Not as easy as sticking a book in a cupboard for a century though. Hmm. I think I need another beer….

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

WTFM is fun July 6th, 2018, 3PM

Programming

There’s a delight in writing documentation, in putting the words down that you wish you could read when first starting to use a project. At that point nothing doesn’t make sense, and everything is going to proceed according to the clear picture you have. Things later change, but when done well I think the earlier documentation serves to get you back on track, and makes later maintenance so much better.

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

Tabulate 2.10.3 July 6th, 2018, 6AM

Programming

I fixed a bug in Tabulate last night, and released version 2.10.3. I’ve rather been neglecting this project for a while, so it’s been nice to come back to it. There are a few things that I might try to get done on it in the next few days or weeks (starting with more documentation).

The bug was to do with the change in WordPress’ default database character set and how that affected the reports ‘title’ column. Previously, a key length on this column of 200 was okay as it was under MySQL’s maximum of 767 (i.e. 767 bytes / 3 bytes for utf8 = max. 255 characters), but now the default is utf8mb4 each character can use up to 4 bytes instead of 3, and so the length must be reduced to 191 (i.e. 767 bytes / 4 bytes for utf8mb4 = max. 191 characters). WordPress core only does this for sites running on MySQL 5.5 and above, but it seemed easier just to reduce the key length for all Tabulate installations; it doesn’t seem likely to be an annoyance to anyone.

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

Wrong date? Just add 3½ days July 3rd, 2018, 1PM

Programming

More PHP date weirdness, this time in the Cargo extension for MediaWiki:

+		// 'o' is better than 'Y' because it does not add leading
+		// zeroes to years with fewer than four digits.
+		// For some reason, though, this fails for some years -
+		// returning one year lower than it's supposed to - unless you
+		// add the equivalent of 3 days or more to the number of
+		// seconds. Is that a leap day thing? Weird PHP bug? Who knows.
+		// Anyway, it's easy to get around.
+		$yearString = date( 'o', $seconds + 300000 );

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