2016 — 3 September: Saturday

The ever-amiable Brian Matthew is burbling away.1 The freshly-made tea has been enjoyed. I'm beginning to give some thought to breakfast. No rush.

I was mildly...

... irritated (literally) last night when I belatedly discovered I was giving a free ride (just above my ankle) to a tiny little tick from the walk a couple of days ago. The perisher is now an ex-tick, and the itchy bit has been swabbed with my trusty Dettol antiseptic cream (a mere decade past its "use by") and covered by a plaster (that still retained mild adhesive properties despite years of sitting around unused).

Ticks constitute clear evidence of a singularly black sense of humour, not to mention apprentice-level unintelligent design, on the part of that benevolent Creator of Life, the Universe, and Everything. I wonder where they were housed — and why — on Noah's unlikely Ark? But then, I also wonder how long our wondrous assortment of variously-insane religions will survive our encounter with more intelligent lifeforms from off-planet.

Providing they don't simply domesticate us for their food supply. Or nick our water. Or our women. Or oxygen. (See endless cheesy SF plots of yesteryear for further possibilities.)

I devoured...

... John Lanchester's beautifully-written (and clear) explanation of the most recent global financial spasm when it came out2 in the UK six years ago:

Whoops! Book

He's now reviewed Jeff Gramm's book "Dear Chairman: Boardroom Battles and the Rise of Shareholder Activism" which focuses on eight specific letters to CEOs from their shareholders. By no means as unpromising a subject as it sounds. Source and snippet:

From the literary-critical point of view, there is always going to be a difficulty with the genre of the investor's letter. What we're dealing with here, in essence, is rich people wanting more money. That creates issues of tone. The attempted solutions to the problem change over time, just as financial fashions change. In the early days, a moral note is struck. Ben Graham's prose is sincere and concerned — Wharton School of Business meets Edith Wharton ("Your attention is respectfully directed..."). By 1985, Ross Perot is communicating in bullet points, even when he is writing a blisteringly personal letter to the head of General Motors...

John Lanchester in New Yorker


I mentioned yesterday...

... that my first Kodi SQLite-generated consolidated list of Films and TV Shows didn't yet put hyperlinks on my TV Show video titles to match the links to IMDB that my Movie titles incorporate. It seemed to take Brian about four seconds to discover — tucked away inside Kodi's SQLite DB of my TV Shows — the serial numbers needed to link my TV titles to the same TVDB "scraper" that supplies all the episode data and fan art. He quickly retrofitted these numbers into the videos list-generating code, and warned me to backup the code from yesterday's builds before taking it out for a test drive.

As far as I can see, it still all works perfectly. Evidence here. The second title ("2 Broke Girls") is the first example of a TV show that now links to the TVDB data.

All this code...

... initially grew out of chats regarding the amazingly primitive way I was handling my books data. I fell into a nasty proprietary (and at £250 expensive) DB trap early (late 2002) in my days of using Windows — the particular program I used was actually locked to one specific named PC as part of its anti-piracy activation process. And that PC was my little Shuttle. It wasn't very long before I outgrew it. When I realised I couldn't actually move my DB and all its datasets to a new PC I was unimpressed. So I stepped back to a much simpler world of flat ASCII data files, with some hand-crafting using a text editor, and some very simple HTML markup. It's this ASCII material that Brian's been wrangling into a SQLite DB for me while also writing Python code to extract, sort, and output my books data directly into ready-built 'molehole'-style web pages.

With books successfully handled, we first added (correction; attempted to add) my videos data (more ASCII) to the same home-cooked Books SQLite DB as just another table. But "inconsistencies" in my ASCII data were generating far more work than it was saving. We thought "Hang on, why not use Kodi's own SQLite DB to handle this video data?" Kodi handles Films and TV Shows separately, but Python can extract and merge the data to produce the output that I want. Brian has steadily been abstracting and generalising his processing to the point where he's now made both Books and Videos output easily tailorable just by editing simple "control files" of parameters.

Now that I can...

... so easily tweak the way I sort and list all my books and videos — just by editing a file that defines the parameters of which fields to include, in what order, and which field or fields to sort by (ascending or descending, too) — I've naturally been experimenting with several different output options. This one, for example...

[Report]
reporttype: Books
filename: Books_sorted_by_date_bought.html
titles: Bought,Title,Notes,Year,Author,Price,Genre
sortby: -Bought,Title,Author
split: True

... tells Brian's Python to read all my book data records into memory, arrange each line of data in the field order defined by "titles", sort the lines of data by the date "Bought" (most recent, first, as requested by the "-" sign), then within that date by "Title". In the unlikely event that I bought two books of identical title on the same date I finally sort within that title by "Author".3 Then the code loops though the sorted data, line by line, writing HTML tagged output (that, and the CSS, are my miniscule contribution) to the file named:
"Books_sorted_by_date_bought.html"

When I'm happy with the set of options, I will parcel everything into a batch shell script to run all the page generation in one swell foop. Great fun, if you're of a mind to enjoy this sort of thing.

In my more primitive (Windows) days, I could achieve exactly the same end result... but only by laborious column edits and subsorts carried out carefully within one large ASCII file. Not difficult, but both time-consuming and (on occasion) error-prone. Of course, in my even more primitive (CP/M and RISC OS) days I wrote my own code to sort and merge my ASCII files for import into whatever DTP program I was using at the time, albeit running a lot less quickly. The march of Progress, heh?

Just another day...

... in the world of Philip K Dick:

... the epiphany he came to refer to as '2-3-74'. This was the date on which he was visited by a dark-haired girl — an archetype he always related back to his lost sister — delivering medication from the pharmacy. She wore a Christian fish symbol around her neck; as the sun glinted off it Dick felt himself pierced by a 'pink light'. For several weeks afterwards he lay in bed in a semi-trance receiving visions. He time-travelled to ancient Rome and lived a parallel life as 'Thomas', a persecuted early Christian. At other times he was penetrated by an all-knowing intelligence that revealed to him for the first time the world not as it seemed, but as it really was.

Mike Jay, reviewing Kyle Arnold's book in Literary Review


Those pesky all-knowing intelligences, heh?

Oh, good grief!

Words fail me. (Link.)


Footnotes

1  Streaming in, with only a very occasional stutter — on the i5 NUC directly into the Rotel pre-amp — from what (I've only just noticed) is now a BBC Radio 2 "HD" audio stream. "Pop" material of the 1960s rarely stretches the hi-fi!
2  Of course, I've lent it to someone since then (several someones) and doubt I'll ever see it again, but no matter.
3  I'm not saying that often happens, but it's an edge case so why take chances? :-)