Bookmark Archaeology

Aside

I was cleaning out my browser bookmarks last night, first time in years, bookmarks going back to the early-’00s, thousands of them. I opened them in batches, every one, to see if I wanted to keep them. Hundreds, thousands of dead sites, no longer found, no longer existing. All that history and culture vanished as if it never was, only the link and title in my bookmarks proving they once existed, and once I deleted that …

Code Stupidity

Aside

I got sick of the tiny, Web1.0 images everywhere here, a hangover from the earliest days of supernaut, so I decided — ’cos I like visuality & pix — to make small, big. I thought it would be easy. Little did I know I also create and add to the pile of Technical Debt. So: most single images in the recent past are now huge-ified, 666px wide; recent image galleries which are not full of diverse image ratios are now evenly splitting the Number of the Beast. Older images and galleries should be retaining their previous diminutiveness, but who knows, 13 years of blog is difficult to homogenise. Mostly I got distracted with how to make portrait images not blow out of the available browser window space, which turns out to be a kinda traumatising process I didn’t achieve. Plus how to Lazy Load srcsets by preg_replacing the new WordPress caption shortcode. OMFG, Frances, WTF? All of which makes me think it might be time for yet another supernaut refresh. So much code. So many images. So much …

Website rsync Backups the Time Machine Way

Continuing my recent rash of stupid coding, after Spellcheck the Shell Way, I decided for Website rsync Backups the Time Machine Way.

For a few years now, I’ve been using a bash script I bodged together that does incremental-ish backups of my websites using the rather formidable rsync. This week I’ve been working for maschinentempel.de, helping get frohstoff.de‘s WooCommerce shop from Trabant to Hoonage. Which required repeated backing up of the entire site and database, and made me realise the shoddiness of my original backup script.

I thought, “Wouldn’t it be awesome, instead of having to make those stupid ‘backup.blah’ folders, to let the script create a time-stamped folder like Time Machine for each backup, and use the most recent backup for the rsync hard links link destination?” Fukken wouldn’t it, eh?

Creating time-stamped folders was easy. Using the most recent backup folder — which has the most recent date, and in standard list view on my Mac, the last folder in a list — was a little trickier. Especially because once a new folder was created to backup into, that previously most recent was now second to last. tail and head feels hilariously bodgy, but works? Of course it does.

Bare bones explaining: The script needs to be in a folder with another folder called ‘backups’, and a text file called ‘excludes.txt’.  Needs to be given chmod +x to make it executable, and generally can be re-bodged to work on any server you can ssh into. Much faster, more reliable, increased laziness, time-stamped server backups.

#!/bin/sh
# ---------------------------------------------------------------
# A script to manually back up your entire website
# Backup will include everything from the user directory up
# excludes.txt lists files and folders not backed up
# Subsequent backups only download changes, but each folder is a complete backup
# ---------------------------------------------------------------
# get the folder we're in
this_dir="`dirname \"$0\"`"
# set the folder in that to backup into
backup_dir="$this_dir/backups"
# cd to that folder
echo "******************"
echo "cd-ing to $backup_dir"
echo "******************"
cd "$backup_dir" || exit 1
# make a new folder with timestamp
time_stamp=$(date +%Y-%m-%d-%H%M%S)
mkdir "$backup_dir/${backuppath}supernaut-${time_stamp}"
echo "created backup folder: supernaut-${time_stamp}"
echo "******************"
# set link destination for hard links to previous backup
# this gets the last two folders (including the one just made)
# and then the first of those, which is the most recent backup
link_dest=`ls | tail -2 | head -n 1`
echo "hardlink destination: $link_dest"
echo "******************"
# set rsync backup destination to the folder we just made
backup_dest=`ls | tail -1`
echo "backup destination: $backup_dest"
echo "******************"
# run rsync to do the backup via ssh with passwordless login
rsync -avvzc --hard-links --delete --delete-excluded --progress --exclude-from="$this_dir/excludes.txt" --link-dest="$backup_dir/$link_dest" -e ssh username@supernaut.info:~/ "$backup_dir/$backup_dest"
echo "******************"
echo "Backup complete"
echo "******************"
#------------------------------------------------
# info on the backup commands:
# -a --archive archive mode; same as -rlptgoD (no -H)
# -r --recursive recurse into directories
# -l --links copy symlinks as symlinks
# -p --perms preserve permissions
# -t --times preserve times
# -g --group preserve group
# -o --owner preserve owner (super-user only)
# -D same as --devices --specials
# --devices preserve device files (super-user only)
# --specials preserve special files
# -v --verbose increase verbosity - can increment for more detail i.e. -vv -vvv
# -z --compress compress file data during the transfer
# -c --checksum skip based on checksum, not mod-time & size – SLOWER
# -H --hard-links preserve hard links
# --delete delete extraneous files from dest dirs
# --delete-excluded also delete excluded files from dest dirs
# --progress show progress during transfer
# --exclude-from=FILE read exclude patterns from FILE – one file or folder per line
# --link-dest=DIR hardlink to files in DIR when unchanged – set as previous backup
# -e --rsh=COMMAND specify the remote shell to use – SSH
# -n --dry-run show what would have been transferred

Reading … A 9th Anniversary

It’s that time of year again! Frances’ and supernaut’s Books of the Year for the 9th time. And some most excellent books were read indeed. This time last year, I realised I’d been struggling a bit with enjoying reading. I looked back over what I’d read in previous years, compared it with 2015’s crop, and noticed I’d dug myself into a bit of a hole with mediæval art and history.

What to do, Frances? I dunno, Other Frances, how about read about space travel and stuff? Good idea!

Unlike last year, my ninth iteration of looking back on a year’s reading — and it’s in October because that’s when I first started blogging about reading, almost a decade ago — has some absolute slammers on the fiction side. Last year I didn’t even name a fiction book of the year. This year, if it wasn’t for one in particular, there’s be 4 or 5 smashing at it for joint Book. And in non-fiction the situation’s pretty similar, or even better, cos there’s barely a single non-fiction work I’ve read in the past 12 months that was anything less than well awesome. It’s also one of my least-read years, only 29 that I read and blogged (possibly a couple of others I’ve forgotten); definitely plenty of internet — I mean Rainbow Autobahn distraction in the last year, exacerbating my inability to focus on pages. I blamed my poor reading last year on that distraction as well, probably time to harden the fuck up and put away the internet.

Of those 29, only 10 were non-fiction; the remaining 19 non-fiction skewed more to fantasy than sci-fi, with around 7 works explicitly skiffy, 9 explicitly fantasy, and a trio (maybe more depending on how dogmatically I apply those categories) deftly straddling both. I call those Speculative Fuckery, ’cos I love when the only two genres I read start boning each other.

On the non-fiction side, mediæval Northern European history continues filling my shelves, and there’s a bunch of “not easily categorised on their own” which nevertheless fit predictably into my decades-long interests.

Then there’s the new, or maybe to say newly clarified bunch that I kinda want to call Islamicate Studies, though that might miss something, so it encompasses that, human rights, identity, philosophy, feminism, and is primarily from women from and/or writing on Iran, Near/Middle East (I’m a bit iffy on this appellation right now, and have been trying out ‘West Asia’ also because it shifts the centre and subject of focus out of Europe, dunno though), and people from or descended from those regions in Europe, North America, Australia. I arrived at this field of interconnected subjects after increasing dissatisfaction with how feminist/queer/left-ist writing addressed brown and/or Muslim identities; regarded these people living in Europe, North America, Australia; and when I spent some time thinking about how the diverse subjects I was reading needed to come together. Also it’s a lot of living in Berlin/Germany/Europe and getting increasingly pissed at the racism against anyone not unequivocally ethnically correct, and the white feminist/queer/left-ist bullshit distractions, and my own personal, slow movement towards identifying if not myself as Turkish/brown/West Asian/Muslim, then definitely my family history (as you can see from all the slashes, I have no idea).

Books! I have read them!

Fiction first. This was a fine year. If I hadn’t read Sofia Samatar’s A Stranger in Olondria, she’d still be my Fiction Book of the Year with The Winged Histories, though sharing with a few others. I don’t actually know how I would pick a book of the year from a pile comprised of that plus Jo Walton’s Necessity and The Philosopher Kings;  Jaymee Goh and Joyce Chng’s The Sea Is Ours; and Ann Leckie’s masterful finish to her debut Imperial Radch trilogy, Ancillary Mercy. Impossible. I would probably give it to the latter, but then … Necessity, a brilliant conclusion to another trilogy, and The Winged Histories: sublime. So I could possibly get it down to a trio of exceptional literature, but no further. Lucky then A Stranger in Orlondria saved me from that anguish.

I don’t want to say it’s ‘better’ any of those other three — though perhaps that’s the case when comparing it to The Winged Histories, which would lose its spot in the trio just as The Philosopher Kings does to Necessity. I think of the two Samatar has written it’s a more major work. If this is my final trio then, I’m not claiming one is better than another, simply A Stranger in Olondria has had a significant effect on me. Would that effect stand up under re-reading? How would that re-reading compare to one of Leckie’s trilogy? If I read them both back-to-back, what then would be my judgement? The best questions always involve more reading.

This is all anyway just writing from memory, how I remember a book made me feel. I’ve been thinking recently that eventually my memory of a book dissolves until it’s just feelings, colours, a glimpse of an image or two. It’s like sediment, like geology, layers upon layers of this.

A quartet of other books I liked a lot: Ada Palmer’s Too Like the Lightning, Genevieve Cogman’s The Masked City, K. T. Davies’ Breed, and Alastair Reynolds’ Revelation Space.

Breed was a romp of Oglaf proportions and probably the most fun I had this year. I wish she’d write more of this. Reynolds’ Revelation Space I read because I needed some hard operatic space sci-fi, and his Slow Bullets novella was a favourite of mine last year. This one was good enough for me to slog through the whole, uneven trilogy. I like him, but there’s a hopelessness in his work, like the heat death of the universe.

As with Reynolds, Genevieve Cogman is another whose previous works got me to read her latest. The Invisible Library, which I also read last year was well tasty. I was super excited to find she had this sequel — and OMG! Just like last time when I discovered The Masked City, she has a sequel to that! Excellent! The immediate result of me writing about my favourite books is I’m ordering more.

Ada Palmer’s Too Like the Lightning. Yeah, loved a lot. Glorious cover art, almost almost one of my first choices, but a few flaws in it, and the cliffhanger “Will bad things happen? Stay tuned for Book 2!” guaranteed to piss me right off. Please, don’t do that to me. I’ve paid for a story, not half a story. If your story’s too big for one book, then at least divide it in a way that doesn’t leave me hanging.

All of these authors I’ll read again (along with a score of others on my Have You Written A New Book Yet? list). I might be a bit crabby here and there about the works, but I also possess a modicum of self-awareness that I’m a pretty fucking demanding reader. The authors and works above if you’re into sci-fi / fantasy (or if you’re not) are about as good as it gets. Not just for this year, but of everything I’ve read in the last 12 years or so. (And just wait for next year’s Books of the Decade! It’s gonna be hectic!)

Non-fiction!

I didn’t read much of this in the last year, but I lucked out here too, barely a dud among them (and that single one was an old book I realised I’d never finished), running out of superlatives here.

I tried to broaden my non-fiction reading a little again, move outside the clag of mediæval history. So I read Amy Shira Teitel’s Breaking the Chains of Gravity: The Story of Spaceflight before NASA, Julie Phillips’ James Tiptree, Jr.: The Double Life of Alice B. Sheldon, and Jo Walton’ What Makes This Book So Great. All excellent works in completely different ways, and which remind me I need to read more astronomy, astrophysics, and geology this year.

The Book of the Year though — and I’m forcing myself to pick only one — comes from another trio: Kathryn Babayan and  Afsaneh Najmabadi’s Islamicate Sexualities: Translations Across Temporal Geographies of Desire; Seyla Benhabib’s The Rights of Others: Aliens, Residents, and Citizens; and Svetlana Alexievich’s Zinky Boys: Soviet Voices from the Afghanistan War.

Svetlana Alexievich was awarded the Nobel Prize in Literature last year, in no small part for her writing on the Soviet occupation and war in Afghanistan. Her writing is chilling. Heart-rending. I even said Zinky Boys would be my Book of the Year. Pretty sure I said the same thing about Seyla Benhabib’s The Rights of Others. In truth I shouldn’t pick one over the other, except that Babayan and Najmabadi’s Islamicate Sexualities somehow is tying all this together, mediæval history, human rights, feminism, identity, migration, religion, and it’s so urgently pertinent to the slow stumbling back to the abyss Europe is currently taking. Read them all, or at least familiarise yourself with the writers.

Other books well worth reading: Kecia Ali’s Sexual Ethics in Islam: Feminist Reflections on Qur’an, Hadith, and Jurisprudence. Mediæval of course: Miri Rubin’s Emotion and Devotion: The Meaning of Mary in Medieval Religious Cultures, and Gude Suckale-Redlefsen’s Mauritius Der heilige Mohr / The Black Saint Maurice.

And that’s my reading for the last 12 months. As if I’m not sated and replete already, I’ve already got a pile of new stuff.

Reading is a great privilege. It’s not however, explicitly a human right. Article 26 i. and 27 i. of the UN Declaration of Human Rights either directly imply or by extrapolation intend reading as a human right, yet nowhere is it explicitly stated that reading comprehension or literacy, and the opportunity to gain this ability is a right. Perhaps I’m splitting hairs, yet I can interpret the UNDHR in a way that fulfils the letter of declaration while still populating my dictatorship with illiterate proles.

My ability to read, at the level I do, at the frequency, my ability to critically consider the works I read (with or without concomitant swearing), to write about them here, to discuss them with others, all this is a privilege. And I mean that in the sense of a special honour. And that necessitates obligation.

Rather than continuing blabbing, I’ll quote myself, first from 2013 and then from last year:

Buy books! Buy books for your friends! Encourage people to read. If you know someone who Can’t Read Good (And Wanna Learn To Do Other Stuff Good Too), help them, reading is only difficult if you’ve been told it is. Support your local libraries!

And:

So here’s to the writers, and their publishers and proofreaders and editors and typesetters and designers and artists and agents and friends and families who make it possible for them to write so that I may read.

Reading: Charlie Jane Anders — All the Birds in the Sky

A couple of years ago, I discovered this amazing website called io9, full of sci-fi and weirdness, great writers, actually pretty good commenter community, and one day I clicked on the link at the top called Jalopnik and my love of hooning was reborn. This isn’t about hoonage though, it’s about sci-fi, and Charlie Jane Anders, one of the founders and former co-editor of io9, and her novel (which I thought was her debut, but it’s not) All the Birds in the Sky.

I’d been avoiding reading this for a while. Maybe because I like her a lot as an io9 writer, so heavy expectations here for a skiffy/fantasy novel. Maybe because I read the first pages and it didn’t really click with me. But I needed some fiction to read, so it landed in my backpack as part of a quartet on Friday. And now I’ve finished it. Bunked off ballet training this morning for that.

I’m sticking with my “like her a lot”/“didn’t really click” vacillating. If someone asked me if they’d like it, I’d say, “If Jo Walton’s Among Others, Charles Stross’ The Laundry Files series and/or Iain Banks’ The Wasp Factory did it for you, and you’re fine with deeply San Francisco-centric story-telling — and I mean deeply, I can taste the locally sourced artisanal — you’ll probably get a kick out of it.” Or,  “It’s a whiter, hipsterer, startup-er, unthreatening middle-class version of Ayize Jama-Everett’s The Liminal People trilogy.” You can “To tha Googz” if what you’re looking for is a two-sentence synopsis, I’m kinda crap at those; my reading for pleasure concerns are more like chewing on bones.

Chewing on bones, then. I liked much of this. Charlie Jane is a smart writer and knows how to weave a story like tapestry over hundreds of pages. For me it’s a little too influenced by American-centric pop culture and the rather (also pop culture) Hegelian dialectic binarism that it views the world through. I’d like to read a novel from her where she forgoes these devices. I’d also like to read one without a whiny, verging on skeevy hetero manchild as one of the main protagonists. I know he spent a lot of his teens getting a kicking, but fuck me, he needed another and in the words of the great poet Chopper Read, harden the fuck up.

I was thinking about ballet choreographers, and the tendency for the gay male ones to make quintessentially heterosexual pieces, in fact to perpetuate that as the only possibility for ballet, and I was wondering why Charlie Jane, who’s hella queer, would go for such a white bread hetero pairing of the two main characters. It might be she was mocking/satirising/ironically depicting these binaries as a story structure, somewhat in parallel to the material activities of the two. If so, I’m not sure it worked or was necessary, and me being the bolshie one think ditching this conceit would have made a far less pedestrian narrative.

I often worry when I write like this that it reads as “Hostile to Everything”, when in fact I enjoyed quite a bit — enough to bunk off training this morning to finish it. Maybe to say this isn’t a review, it’s me trying to elucidate what didn’t work for me, to describe that in more considered terms than a string of obscenities. So, will I read her next novel? If it’s sci-fi, yes, yes I will.

Charlie Jane Anders — All the Birds in the Sky
Charlie Jane Anders — All the Birds in the Sky

The Staatliche Kunstsammlungen Dresden Blog Posts

To keep all my posts and the 236 images of my trip to Staatliche Kunstsammlungen Dresden orderly, here’s a list of them:

  1. Dresden & the Staatliche Kunstsammlungen
  2. Löbtauer Straße in Dresden
  3. Zwinger mit Semperbau Gemäldegalerie Alte Meister: Mediæval & Renaissance Art
  4. Zwinger mit Semperbau Gemäldegalerie Alte Meister: Baroque & Enlightenment Art
  5. Albertinum Galerie Neue Meister: Expressionism & Impressionism
  6. Albertinum Galerie Neue Meister: Max Slevogt
  7. Albertinum Galerie Neue Meister: Contemporary Art
  8. Zwinger mit Semperbau Porzellansammlung; Albertinum Skulpturensammlung; Residenzschloss Kupferstich-Kabinett, Rüstkammer, & Münzkabinett
  9. Residenzschloss Neues Grünes Gewölbe

Reading: Jo Walton — What Makes This Book So Great

Jo Walton. Not a writer I’d give to just anyone. “Frances! I want sci-fi to read!” “Iain Banks!” I will say, “With or without an M.” Jo Walton though, you have to do some prep-work first. Or love libraries. Or anyway read a lot. Iain Banks you can go from “What is ‘Book’?” to guzzling the Culture series in a matter of hours; Jo Walton, you need the padding first that comes from some form of literary guzzling.

Jo Walton. One of my rare favourites. Among Others was first, four years ago. Got my dubiously prestigious Book of the Year. The Just City and The Philosopher Kings. Whatever I might have written here (without clicking those links, I’d like to remember it as favourable), my memory of them is of books I feel I’ve read more than once; books for when someone I know will appreciate this kind of literature, I will say “Jo Walton. You should read her”. Which is the heart of What Makes This Book So Great.

Jo Walton, reader of more than one book a day. Sure, if it’s Terry Pratchett’s Discworld, I can sort of keep up — for a day. No endurance here. She’s a beast. Reads like that and writes like that. This is a collection of her blog posts from Tor.com from 2008-2011. The Contents run for six pages. It’s like Among Others where she references fifty or sixty — no, 169! books from the history of science-fiction and fantasy, and manages to comment on all of them all the while carrying on a story not quite a spectacularly depraved as The Wasp Factory.

I sold a box of books recently. fifty-ish. Exchanged them for credit at Saint George’s. Books for books. It worked out to be around 5:1. So I have ten or so new ones I’m dealing to, trying to make a dent in my wish list. I shuffled potential candidates for an afternoon, and this was one that made the final cut. I’ve finished two others before even beginning to write this, slightly out of synch here. Not to worry. Jo Walton is a brilliant, sensitive writer whose vocation fits perfectly her love. I get a mad kick out of reading her for the transcendental moments when her ideas riot in improbable, literature-saturated thought experiments. She starts with an essay / blog post on re-reading, the joy of certitude when returning to a favourite versus the treacherous possibility of disappointment in reading something new; and conversely old favourites that now reveal themselves as thin and lacking; new works that open entire worlds. I read her and think of my own re-readings, think of books that have moved me, changed me.

Jo Walton — What Makes This Book So Great
Jo Walton — What Makes This Book So Great

A Bit of Character Counting Stupidity

When I’m using WordPress’ Status Post Format, I like to keep it to 140 characters, so it’s like a Tweet. But how many characters have I typed? Cos The Visual Editor only shows Word Count. So I took a look around and saw various ways of doing it, quite a few using regex to strip ‘unwanted characters’—but a space counts as a character! So I wrote my own, based loosely on what I’d been using for counting characters in the Excerpt, and from a few different plugins and bits of code. Turned out to be surprisingly easy and uncomplicated (I say that now, of course).

So, first I need a function to call a couple of files if I happen to be editing a Post or Page:

function supernaut_character_count( $charcount ) {
  if ( 'post.php' == $charcount || 'post-new.php' == $charcount ) {
    wp_enqueue_style( 'character-count-css', get_stylesheet_directory_uri() . '/css/char-count.css', array() );
    wp_enqueue_script( 'character-count-js', get_stylesheet_directory_uri() . '/js/char-count.js', array( 'jquery' ), '20160519', true );
  }
  else return;
}
add_action( 'admin_enqueue_scripts', 'supernaut_character_count' );

Then I slap together some jQuery:

jQuery( document ).ready( function( $ ) {
  if( $( '.post-php' ).length || $( '.post-new-php' ).length ) {
    $( '#post-formats-select input' ).click( function() {
      if ( $('#post-format-status').is(':checked') ) {
        $( '#post-status-info tr:first-child' ).after( 'Character count: ' );
        $( '#content_ifr' ).ready( function () {
          setInterval( function() {
            var tinymcebody = $( '#content_ifr' ).contents().find( 'body' );
            $( '#postdivrich .character-count' ).html( tinymcebody.text().length );
          }, 500 )
        });
      } else {
        $( '#post-status-info tr:first-child' ).nextAll().remove();
      }
    });
  }
});

Then a miniscule bit of CSS:

.post-php #wp-character-count {
  font-size: 12px;
  line-height: 1;
  display: block;
  padding: 0 10px 4px;
}

It’s a little bodgy, and if I had more than the 45 minutes to a) work out how the Visual Editor can be fiddled with, and b) write something that worked and looked ok—the bare minimum really—I’d do it slightly nice and maybe consider for a minute throwing it into a plugin (where it officially belongs). But I won’t. It does what I want: live updating of how many characters I’ve written in the Visual Editor, and shows it in a line underneath the Word Count (also aided me in delaying writing a residency application on the day it’s due).

supernaut Character Count
supernaut Character Count