Vonnegut on software development teams.

So here's a thing. Spotted this in some of Kurt Vonnegut's personal correspondence, talking about an instructor of his named Slotkin:

What Slotkin said was this: no man who achieved greatness in the arts operated by himself; he was top man in a group of like-minded individuals. This works out fine for the cubists, and Slotkin had plenty of good evidence for its applying to Goethe, Thoreau, Hemingway, and just about anybody you care to name.

If this isn't 100% true, it's true enough to be interesting—and maybe helpful.

The school gives a man, Slotkin said, the fantastic amount of guts it takes to add to culture. It gives him morale, esprit de corps, the resources of many brains, and—maybe most important—one-sidedness with assurance.

Reminds me powerfully of my growing impressions of the environment a person needs to be in in order to do great things in software. There is no doubt some effectiveness in assembling great individuals to create a great team.

But in my personal experience, there is a whole lot more value in creating a great team by instilling the right values, and then watching the members visibly level each other up, producing a succession of great individuals, and only subsequently attracting more of the same.

Swamp Thing, Vol 1: Saga of the Swamp Thing

Swamp Thing cover

by Alan Moore, Jogn Totleben, & Steve Bissette

spoilers

Moore's deconstruction of existing characters continues. Originally Swamp Thing was Alec Holland, miraculously transformed by an infusion of artificially stimulated plant matter. When Alan Moore takes over the writing, Swamp Thing's ostracization and existential dread is compounded by the discovery that this origins story has been a delusion all along. Alec Holland was killed outright in the accident, and an accumulation of plant matter grew around his decaying form, integrating the physical remains of his memories into a creature that yearned to recapture its human form, but was never human in the first place.


Miracleman, books 1, 2 & 3

Miracleman cover

by Alan Moore, Alan Davies, & John Totleben.

I spent a little time digging out earlier works of Alan Moore. These inter-library loans didn't disappoint.

Originally published as Marvelman by Mick Anglo, from 1954-59. Legal battles re-branded the character as Miracleman in 1985.

spoilers

The opening pages reprint one of those campy early stories, involving primary-colored moralizing while flying around to punch time-travelling Nazi super-scientists.

They then continue with Alan Moore's postmodern 1980s reboot. This recasts the simplistic tales of the original period as a placating dream, fed to a captured Miracleman by his nemesis. His hokey origins story is similarly re-ploughed. The ensuing tales are dark and introspective.

One thread follows the emotional stresses placed on Miracleman when incarnated as his human alter-ego, the frail and fallible half of a godlike being. He's unable to conceive a child with his wife, although it turns out Miracleman can, and succumbs to self-loathing and jealousy, culminating in a touching scene in which he climbs a mountain, leaves a forlorn monument, and changes into Miracleman one last time, never to change back.

Yes, this is more uneven than Moore's later works. Yes, it's unashamedly an underwear-on-the-outside superhero story. But nonetheless I loved it, and scenes like the above stayed with me for months.

Also this month:

The Atrocity Archive by Charles Stross. The conceit of Lovecraftian horror rationalized to a mathematical or computable topic is appealing to me, and kept the pages turning, but I didn't ultimately find it life-changing.

Nightwings by Robert Silverberg. A fantastical far-future tale of humanity split into occupational castes, guarding the world against prophesied invasion. Not my thing.


Hull Zero Three

Hull Zero Three cover

by Greg Bear, 2010

A smashing hard SF tale, about the existential mystery of life aboard a generation starship that has lost its way. Following in the footsteps of classic variations, such as Non-Stop, Methusalah's Children, and Tau Zero, it centers around the character's revelations as they uncover their situation and origins, being decanted to order by warring factions amongst high technology ruins.


Station Eleven

Station Eleven cover

by Emily St. John Mendel, 2014

An evocative tale of intertwined lives, before and after the sudden fall of contemporary civilisation due to a global pandemic.


Installing Colout

Colout is amazing, I use it all the time.

Update: Colout on PyPI now works just fine, all the following is needless.


But pip install colout from PyPI is broken, and has been for many months, due to a typo in the latest (v0.5) PyPI release.

I've tried to contact the author, with email and issues on the Colout Github project.

This has had no effect, although I see the author has made substantial commits to the Github project in that time, including fixing this problem and tagging a new v0.6 version, although has not released any of that to PyPI.

So, in increasing order of desirability, you can either:

Clone the latest repo from Github, and install from that:

# cd to the clone, then
python3 -m pip install --user .

Or, pip install the version I uploaded to PyPI, which is a straight copy of the latest Github at the time:

pip install --user colout-fix

Or, best of all, pip install straight from the original Github repo:

pip install --user git+git://github.com/nojhan/colout.git

Note that, throughout, we're using --user, so that you can install development tools like this system-wide for the current user, without needing a virtualenv, without needing root access, and without modifying your installed Python system libraries.

Running Multiple Firefox Profiles on Linux

I recently switched from Chrome to Firefox. It's so fast, and easier to trust that Mozilla has my privacy and interests at heart than Google does.

I want to run a second profile at work, to keep a distinct set of open tabs, bookmarks, and the like. Here's how I did it:

Close all Firefox windows. Run the Profile Manager with firefox -p. Create a second profile.

Open Firefox and find the directories your profiles live by browsing to about:profiles.

Substitute those directories into this firefox.desktop file, where I've marked 'XXX':

# Gnome3 .desktop file for Firefox with multiple profiles
[Desktop Entry]
Version=1.0
Name=Firefox
Comment=Browse the web
GenericName=Web Browser
Keywords=Internet;WWW;Browser;Web;Explorer
Type=Application
Exec=firefox --no-remote %u
Terminal=false
X-MultipleArgs=false
Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
Actions=home;work
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true

[Desktop Action home]
Name=Firefox (home)
Exec=firefox --profile .mozilla/firefox/XXX --no-remote %u

[Desktop Action work]
Name=Firefox (work)
Exec=firefox --profile .mozilla/firefox/XXX --no-remote %u

Save the above as firefox.desktop and install using:

$ desktop-file-validate firefox.desktop
$ desktop-file-install --dir=.local/share/applications firefox.desktop

This results in a Firefox icon in your applications menu that defaults to whichever profile you mark as default in the ProfileManager, but right clicking lets you select the home or work profile explicitly. Open each, and change the theme in one of them so the windows are visually distinct.

Tested on Ubuntu, RHEL 7.3, probably works on all Gnome3 desktops.

Automate Gnome keybindings

Sick of manual GUI twiddling to fix inconsistent keybindings on various computers. Solved once and for all, by a new script in my personal workstation setup bucket:

Warning: This:

  • works great on RHEL,
  • doesn't all work on Ubuntu<=17.04, I suspect because Unity has it's own set of keybinds that are defined elsewhere.
  • works great on Ubuntu 17.10. especially if you go in manually to disable the built-in keybinding for Super-V, which displays the calendar and notifications window, which shadows my 'toggle window maximize vertically'.
#!/usr/bin/env bash

kb='org.gnome.desktop.wm.keybindings'

# Switcher, between windows not apps, uses alt-tab and alt-grave
gsettings set $kb switch-windows "['Tab']"
gsettings set $kb switch-windows-backward "['grave', 'Tab']"
gsettings set $kb switch-applications "[]"
gsettings set $kb switch-applications-backward "[]"

# Window maximize toggle, super-up
gsettings set $kb maximize "[]"
gsettings set $kb toggle-maximized "['Up']"

# Window maximize vertically toggle, super-v
gsettings set $kb maximize-vertically "['v']"

# run command, super-r
gsettings set $kb panel-run-dialog "['r', 'F2']"


# Custom commands

mk='org.gnome.settings-daemon.plugins.media-keys'
ckb='/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings'

gsettings set $mk custom-keybindings "['$ckb/custom0/', '$ckb/custom1/']"

gsettings set $mk.custom-keybinding:$ckb/custom0/ name "screen off"
gsettings set $mk.custom-keybinding:$ckb/custom0/ command "screenoff"
gsettings set $mk.custom-keybinding:$ckb/custom0/ binding "z"

gsettings set $mk.custom-keybinding:$ckb/custom1/ name "terminal"
gsettings set $mk.custom-keybinding:$ckb/custom1/ command "terminal"
gsettings set $mk.custom-keybinding:$ckb/custom1/ binding "t"

Embedded in that is the ultimate solution to my longstanding irk with Unity and Gnome's default window switcher (alt-tab.) By default it groups windows of a single application together, requiring some extra -grave pressing to navigate between windows within an application.

This not only requires way more effort, but also breaks the expected behaviour of just tapping alt-tab to go back to the last used window. Instead it goes back to the last used application, so you can't toggle between two windows of the same application, eg. two terminals. Absolute madness.

The above modifies alt-tab to just cycle through all windows, ungrouped, which fixes the ability to toggle between last two windows. Also, alt-grave is provided as an alternative to cycle backwards through the windows, which is easier to hit than shift-alt-tab.

Postscript formatted man pages

man and its troff formatting can be asked to produce postscript output. Define a Bash function, e.g. in your .bashrc:

function psman () {
    SLUG=$(echo $@ | tr ' ' '-')
    FNAME="/tmp/man-$SLUG.pdf"
    set -o pipefail
    man -t "$@" | ps2pdf - "$FNAME" && \
      nohup evince "$FNAME" >/dev/null 2>/dev/null
    set +o pipefail
}

(I tried to do this without tempfiles, using process substitution, but failed. Anyone got better Bash-fu?)

The man -t is the crucial part. It tells man to produce output in postscript format, which ps2pdf can read, and evince displays the PDF. We disconnect the evince process using nohup, so that it lives on even if we kill the terminal. We `set -o pipefail` so that if `man` fails, the exit code is preserved as the exit of `man|ps2pdf`, which causes the `&&` to short-circuit, preventing evince from being run on an empty pdf document. We restore `+o pipefail` again at the end.

Then, from the command line:

$ psman tr

produces

Rhythmbox plugin: "Announce"

I use the Linux music player "Rhythmbox". This morning I wrote a plugin for it, called "Announce":

https://github.com/tartley/rhythmbox-plugin-announce

Every time a new song starts to play, it announces the title using speech synthesis. I like it when I'm listening to some new music I'm not familiar with, but am away from the computer. Then I can still know which track is which.

If the album or artist names are different from the previous track, then it includes those in the announcement, too.