blarg?

October 25, 2020

Navigational Instruments

Filed under: digital,documentation,interfaces,mozilla,toys,work — mhoye @ 11:03 am

A decade ago I got to sit in on a talk by one of the designers of Microsoft Office who’d worked on the transition to the new Ribbon user interface. There was a lot to learn there, but the most interesting thing was when he explained the core rationale for the redesign: of the top ten new feature requests for Office, every year, six to eight of them were already features built into the product, and had been for at least one previous version. They’d already built all this stuff people kept saying they wanted, and nobody could find it to use it.

It comes up periodically at my job that we have the same problem; there are so many useful features in Firefox that approximately nobody knows about, even people who’ve been using the browser every day and soaking in the codebase for years. People who work here still find themselves saying “wait, you can do that?” when a colleague shows them some novel feature or way to get around the browser that hasn’t seen a lot of daylight.

In the hopes of putting this particular peeve to bed, I did a casual survey the other day of people’s favorite examples of underknown or underappreciated features in the product, and I’ve collected a bunch of them here. These aren’t Add-ons, as great as they are; this is what you get from Firefox out of the proverbial box. I’m going to say “Alt” and “Ctrl” a lot here, because I live in PC land, but if you’re on a Mac those are “Option” and “Command” respectively.

Starting at the top, one of the biggest differences between Firefox and basically everything else out there is right there at the top of the window, the address bar that we call the Quantumbar.

Most of the chromium-client-state browsers seem to be working hard to nerf out the address bar, and URLs in general. It’s my own paranoia, maybe, but I suspect the ultimate goal here is to make it easier to hide how much of that sweet, sweet behavioral data this will help companies siphon up unsupervised. Hoarding the right to look over your shoulder forever seems to be the name of the game in that space, and I’ve got a set of feelings about that you might be able to infer from this paragraph. It’s true that there’s a lot of implementation detail being exposed there, and it’s true that most people might not care so why show it, but being able to see into the guts of a process so you can understand and trust it is just about the whole point of the open-source exercise. Shoving that already-tiny porthole all the way back into the bowels of the raw codebase – particularly when the people doing the shoving have entire identities, careers and employers none of which would exist at all if they hadn’t leveraged the privileges of open software for themselves – is galling to watch, very obviously a selfish, bad-faith exercise. It reduces clicking a mouse around the Web to little more than clicking a TV remote, what Douglas Adams use to call the “point and grunt interface”.

Fortunately the spirit of the command line, in all its esoteric and hidden power, lives on in a few places in Firefox. Most notably in a rich set of Quantumbar shortcuts you can use to get around your browser state and history:

  • Start typing your search with ^ to show only matches in your browsing history.
  • * to show only matches in your bookmarks.
  • + to show only matches in bookmarks you’ve tagged.
  • % to show only matches in your currently open tabs.
  • # to show only matches where every search term is part of the title or part of a tag.
  • $ to show only matches where every search term is part of the web address (URL). The text “https://” or “http://” in the URL is ignored but not “file:///”.
  • Add ? to show only search suggestions.
  • Hitting Ctrl-enter in the URL bar works like autocomplete;”mozilla” go straight to www.mozilla.com, for example. Shift-enter will open a URL in a new tab.

Speaking of the Quantumbar, you can customize it by right-clicking any of the options in the three-dot “Page Options” pulldown menu, and adding them to the address bar. The screenshot tool is pretty great, but one of my personal favorites in that pile is Reader Mode. Did you know there’s text-to-speech built into Reader Mode? It surprised me, too. Click those headphones, see how it goes.

It’s sort of Quantumbar-adjacent, but once you’ve been using it for a few hours the Search Keyword feature is one of those things you just don’t go back to not having. If you right-click or a search field on just about any site, “Add a Keyword for this Search” is one of the options. give it a simple term or letter, then “<term or letter> <search term>” in the Quantumbar and you’re immediately doing that search. A lot of us have that set up for Bugzilla, Github, or Stack Overflow, but just about any search box on just about any site works. If you’re finding yourself searching particular forums, or anywhere search engines can’t reach, this is a fantastic feature.

There are a lot of other small navigation tricks that come in surprisingly handy:

  • Holding down Alt while selecting text allows you to select text within a link without triggering the link
  • Shift-right-click will show Firefox’s context menu even on sites that override it. This is great for Picture-In-Picture most video sites, and getting your expected context menu back from GDocs. (PiP is another feature I’m fond of.)
  • Clicking and dragging down on the forward and back buttons will show a list of previous or next pages this tab has visited.
  • You can use Ctrl-click and middle-mouseclick on most toolbar buttons to open whatever they point at in a new tab; Ctrl-reload  duplicates your current tab. You can use this trick to pop stuff out of the middle of your back and forward history stack into new tabs.
  • You can do this trick with the “view image”  option in the right-click menu, too – Ctrl-clicking that menu item will open that image in its own new tab.
  • New Tab then Undo – Ctrl-T then Ctrl-Z – will populate the address bar with the URL of the previously focused tab, and it’s useful to duplicate the current tab from the keyboard.
  • You can right click an iframe and use the This Frame option to open the iframe in a tab of its own, then access the URL and other things.
  • Ctrl+Shift+N will reopen the most recently closed window, Ctrl+Shift+T the most recently closed tab. The tabs are a history stack, so you can keep re-opening them.
  • Knowing you can use Ctrl-M to mute a tab is invaluable.

If you’re a tab-hoarder like me, there’s a lot here to make your life better; Ctrl-# for some N 1 to 8 will switch you to the Nth tab, and Ctrl-9 takes you to the rightmost tab (in left-to-right language layouts, it’s mirrored in RTL). You might want to look over the whole list of keyboard shortcuts, if that’s your thing. There are a lot of them. But probably the most underappreciated is that you can select multiple tabs by using Shift-click, so you can work on the as a group. Ctrl-click will also let you select non-adjacent tabs, as you might expect, and once you’ve selected a few you can:

  • Move them as a group, left, right, new window, into Container tabs, you name it.
  • Pin them (Pinned tabs are another fantastic feature, and the combination of pinned tabs and ctrl-# is very nice.)
  • Mute a bunch of tabs at once.
  • If you’ve got Sync set up – and if you’ve got more than one device, seriously, make your life better and set up sync! – you can right-click and send them all to a different device. If you’ve got Firefox on your phone, “send these ten tabs to my phone” is one click. That action is privacy-respecting, too – nobody can see what you’re sending over, not even Mozilla.

I suspect it’s also not widely appreciated that you can customize Firefox in some depth, another option not widely available in other browsers. Click that three-bar menu in the upper right, click customize; there’s a lot there.

  • You get light, dark and Alpenglow themes stock, and you can find a bunch more on AMO to suit your taste.
  • There’s a few buttons in there for features you didn’t know Firefox had, and you can put them wherever
  • Density is a nice tweak, and removing the title bar is great for squeezing more real estate out of smaller laptop screens.
  • Overflow menu is a great place to put lightly used extensions or buttons
  • There’s a few Easter eggs in there, too, I’m told?

You can also play some games with named profiles that a lot of people doing web development find useful as well. By modifyingyour desktop shortcuts to add “-P [profile name]” –no-remote” after the firefox.exe bit, you can have “personal Firefox” and “work Firefox” running independently and fully separately from each other. That’s getting a bit esoteric, but if you do a lot of webdev or testing you might find it helpful.

So, there you go, I hope it’s helpful.

I’ll keep that casual survey running for a while, but if your personal favorite pet feature isn’t in there, feel free to email me. I know there are more.

October 8, 2020

Control Keys Redux

Filed under: arcade,digital,documentation,interfaces,life,linux,science,toys — mhoye @ 5:29 pm

A long overdue followup.

One of my favourite anecdotes in Kernighan’s “Unix, A History And A Memoir” is the observation that the reason early Unix commands are so often truncated – rm, mv, ls, and so on – was that the keyboards of the day were so terrible that they hurt to type on for any length of time.

I wish more people thought about keyboards. This is the primary interface to these devices we spend so much of our time on, and it baffles me that people just stick with whatever ten dollar keyboard came in the box. It makes as much sense to me a runner buying one-size-fits-all shoes.

There are a lot of people who do think about keyboards, of course, but even so what I’m aiming for isn’t part of that conversation, and often feels like lonely work. Most of the mechanical keyboard fetishists that I can find are in it for the aesthetics, assembling these switches and those keycaps, and while the results can be beautiful they aren’t structurally all that different, still not quite something truly built to be truly personal. Kailh bronze switches are made of joy, sure, but if my wrists are still contorting to use the keyboard, that fantastic popcorn keyspring texture isn’t going to be durably great for me.

I’ve had this plan in mind for a while now, and have finally gotten around to setting up a keyboard the way I’ve long intended to thanks to a friend who introduced me to Cardellini ball clamps and mounting plates. Those were the missing pieces I needed to set up the keyboard I’m typing this on now, a Kinesis Ergo Edge split mechanical keyboard.

Some minor gripes about this specific device include:

    • Manufacturers of split keyboards absolutely refuse, for reasons I cannot figure out, to allow the halves of the keyboard to overlap. I want the 6TGB line and 7YHN columns on both halves! I’d much rather have that than macros or illumination gimmicks.
    • The stands you can order for it, like the wrist rests in the box, are a waste of time. I’m using neither so it’s not a big deal, but seeing a nice product ship with cheap plastic greebling is always a shame.
    • The customization software that comes with it is… somewhat opaque. I’ll find a use for those macro keys, but for now meh. Remapping that ridiculous panic button thing in the upper left to “lock my screen” was straightforward enough, which was nice.
    • Keys on these split keyboards are never ortholinear – meaning, never in a regular old, non-offset grid, like you’d expect on a tool being used by people without diagonal fingers. Standard keyboard layouts make zero sense and haven’t in fifty years; we don’t need to genuflect to a layout forced on us by mechanical typewriter levers and haven’t since before Unix was invented! Get it together, manufacturers! But here we are.

But the nice things about it – the action on these delightfully clicky Cherry MX Blue switches,  the fact that most of the keys are in the right places, the split cable being elegantly tucked away – they outweigh all of the gripes, and so far I’m reasonably happy with the setup, but that’s not really because of what came in the box.

It’s because the setup is this:


Ergonomics

Like I say, I’ve had this in mind for a while – an A shape hanging off the front of the desk, each half of the keyboard with a ball head sticking out the plates on the bottom and a third ball head sticking out of the standing desk at about belt level, bolted into the underside of my standing desk. All of it is held together with a surprisingly rigid three-way ball clamp – the film industry doesn’t like having lights or cameras just topple to the floor for no reason, funny story – and the result is a standing desk where I can type with my hands in a very relaxed, natural position all day, without craning my wrists or resting them awkwardly on anything. The key surface is all facing away from me, which takes some getting used to, but hooking my thumbs on the side of the spacebars gives me a good enough home key experience that my typing error rate is getting back down to the usual “merely poor” levels I’m long accustomed to.

It’s a good feeling so far, even if I’m making microadjustments all the time and sort of reteaching myself how to type. I’m starting to suspect that any computer-related ergonomics setup that preassumes a desk and chair is starting from a unrecoverable condition of sin; humans are shaped like neither of those things, and tools should be made to fit humans.

Update: A few people have asked me for a parts list. It is:

 

October 7, 2020

5150

Filed under: analog,beauty,life,music — mhoye @ 7:47 pm

Thinking of an old friend today.

August 31, 2020

Consequences Of Code

Filed under: a/b,digital,documentation,doom,fail,hate,interfaces,losers,vendetta — mhoye @ 9:24 pm

[Content warning: There’s descriptions of psychological and animal abuse in here, because I’m talking about Facebook. This gets ugly fast.]

The idea behind DevOps – a consolidation of the developers who created software and the operational teams who deployed and maintained it, a meaningful distinction once upon a time – was simple. You, developer, will spend couple of days a month carrying the pager that wakes somebody up when your software fails. It’s telling that “you should own the consequences of your professional actions” was considered some sort of revolutionary insight in this industry, but let’s put that aside for the moment; that model of service development and deployment where engineers own and experience the failure modes of code they wrote, this sudden, shocking alignment of incentives – what do you mean, I’m going to be sitting in the economy seats during the maiden flight of this airplane I designed? – has driven dramatic improvements in too many organizations to count.

There are some exceptions, though.

Many Facebook employees reportedly weren’t satisfied with Zuckerberg’s explanation for the lack of action on the Kenosha Guard page, BuzzFeed reported. “We need to get better at avoiding mistakes and being more proactive,” one employee commented on the livestream of the Facebook meeting. ”Feels like we’re caught in a cycle of responding to damage after it’s already been done rather than constructing mechanisms to nip these issues before they result in real harm.” Employees have also blamed Zuckerberg personally for the company’s repeated failure to adequately address hate on its platform, with one telling BuzzFeed that Zuckerberg “seems truly incapable of taking personal responsibility for decisions and actions at Facebook.””

Many Facebook employees “weren’t satisfied”, golly. Sure, they all showed up for work the next day but think of all that dissatisfaction. Then compare it to what their content moderators – the people they pay to deal with the consequences of the software they’ve written – go through for fifteen bucks an hour every fucking day.

For the six months after he was hired, Speagle would moderate 100 to 200 posts a day. He watched people throw puppies into a raging river, and put lit fireworks in dogs’ mouths. He watched people mutilate the genitals of a live mouse, and chop off a cat’s face with a hatchet. He watched videos of people playing with human fetuses, and says he learned that they are allowed on Facebook “as long as the skin is translucent.” He found that he could no longer sleep for more than two or three hours a night. He would frequently wake up in a cold sweat, crying.

Who could have predicted that “operational mistakes” might happen in an environment like that?

In a companywide meeting on Thursday, Facebook CEO Mark Zuckerberg said that a militia page advocating for followers to bring weapons to an upcoming protest in Kenosha, Wisconsin, remained on the platform because of “an operational mistake.”

… which is just the most obvious and egregious lie. 3 overlooked reports might, conceivably, be an operational mistake. Four hundred is a policy decision.

The reason Facebook’s engineers, managers and leadership don’t and will never take operational responsibility for their code – the reason they won’t ever put the people who write their software and the people subject to the worst consequences of it in the same State, much less the same building – is simple: if Facebook’s engineers and managers had to spend one week every quarter doing the moderation work they fob off on underpaid contractors, Facebook wouldn’t exist in a year. And everyone working there knows that.

If you work at Facebook, quit. You might have good intentions – the best intentions, just really great intentions, fantastic intentions – but you know who you are and what you’re complicit in. Your intentions are just the bedtime stories you’re telling your conscience so you can sleep at night. You have a choice. Do better.

July 30, 2020

Connections


Untitled

“A lunatic is easily recognized. He is a moron who doesn’t know the ropes. The moron proves his thesis; he has logic, however twisted it may be. The lunatic on the other hand, doesn’t concern himself at all with logic; he works by short circuits. For him, everything proves everything else. The lunatic is all idée fixe, and whatever he comes across confirms his lunacy. You can tell him by the liberties he takes with common sense, by his flashes of inspiration, and by the fact that sooner or later he brings up the Templars.”
– Umberto Eco, Foucault’s Pendulum.

… but it’s basically impossible to talk about this stuff without sounding like a lunatic, so let’s press on. I suppose that’s never stopped me before.

Hey, does anyone remember the tagline from the Majestic conspiracy game back in the day: “The Game Plays You”? Hold that thought.

You might have seen the argument from Adrian Hon recently, that the QAnon conspiracy theory is actually an ARG:

… and I knew I’d seen an argument that general shape before, but I couldn’t remember where; the “bottomless ARG” idea, I mean. It hit me earlier this week, shortly before the phrase “Alien DNA and Demon Sperm” became a part of this year’s pantheon of nonsensical headline nightmares: that was C.S. Lewis’ description of occultism, and the occult in general.

Lewis saw occultism as a sort of psychological snare, a set of endlessly self-referential symbols of symbols of symbols with no ultimate referent, a bottomless semiotic rathole for the overcurious inquirer designed to perpetually confuse and distract the mind. Beaudrillard, incidentally – creator of the term “hyperreal” – saw modern finance, and particularly advertising, in the same light – a set of self-referential symbols ultimately disconnected from reality, meaningful only in their own context, self-sustaining only to people trapped in that interlocking mesh.

Seeing through this lens makes the underpinnings of Facebook’s deep-seated resistance to admit the existence of, much less take responsibility for, much less do anything about, the running river of fake news, conspiracy theories and racist agitprop on that platform understandable: Facebook isn’t a social network: Facebook is an ARG Platform. It’s indiscriminate, unpoliced Alternate-Reality-As-A-Service.

“Whatever the rhythm was, luck rewarded us, because, wanting connections, we found connections — always, everywhere, and between everything. The world exploded in a whirling network of kinships, where everything pointed to everything else, everything explained everything else… “
– Umberto Eco, Foucault’s Pendulum

And with an audience already wound up in this unfiltered, overpopulated hyperreality-as-service, you barely need to do any work at all to kickstart the sort of amazing, self-sustaining paranoia-fulfillment engine that would have put the last few centuries’ foil-hatted quasi-mystic conspiriographists’ jaws right on the floor. All you need is enough people in rough proximity who feel frightened and powerless, a compelling seed crystal – the antivax fraud, the QAnon clownshow, a thousand others, it barely matters as long as it’s got a sharp hook – and this cancerous hyperculture machine pretty much bootstraps itself, making in-group celebrities out wannabe James Burkes pulling obscure facts together and drip-feeding the occasional five-like dopamine hit to the noobs explaining that you can’t spell “Rosicrucianist Aliens” without “Clintons”.

(For a while I was using that as a first-pass test for newsfeeds: if I replace “the Clintons” with “the Templars” and say this out loud… do I sound like a crank? I’ve never mentioned it, because I don’t need people who already sound like cranks emailing me to say “of course, it was right in front of us the whole time”, but we’re playing way past that now. But if I’ve accidentally added something to the collective lunatic lexicon – the lexographia lunacii, as it was first described in fifteen-forty-never because I just made that up – then I will seriously owe Chelsea an apology.)

Facebook’s ongoing negligence aside, what makes the Q-loons fascinating is that despite all its modern trappings, once that meme set its hooks into a vulnerable population (and psychological vulnerability is the name of the game, out there in the fever swamps) this wide-open extremely-2020 conspiracy-ARG is structurally nothing more a massively-multiplayer version of every vintage occult ceremony in history. I mean, the baseline aesthetic is trash, but still; it’s just a bunch of lunatic imagery, strange incantations and oddball ceremonials whose only reason to exist is to justify the time people have spent bringing it into existence.

“I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth.”
– Umberto Eco, Foucault’s Pendulum

So now thousands and thousands of people are participating, without realizing it, in a massively-distributed, collaborative occult ceremony, tying every scrap of fact and coincidence of the world together into this giant fractal-sefirot red-yarn serial-killer wall, drawing lines of imaginary digital salt from symbol to symbol to meaningless symbol, each utterly disconnected from anything more real than their own paranoid helplessness and fear.

Another way to say that is: QAnon is an occult conspiracy whose nefarious secret purpose is convincing themselves that an occult conspiracy actually exists.

It’s strangely beautiful in a way, until you understand what you’re seeing; Foucault’s Pendulum rewritten as a cryptofascist fever-swamp MMORPG. I love that book, and seeing this is like being offered the Maltese Falcon and handed a seagull drowned in crude.

“You see, Casaubon, even the Pendulum is a false prophet. You look at it, you think it’s the only fixed point in the cosmos. but if you detach it from the ceiling of the Conservatoire and hang it in a brothel, it works just the same. And there are other pendulums: there’s one in New York, in the UN building, there’s one in the science museum in San Francisco, and God knows how many others. Wherever you put it, Foucault’s Pendulum swings from a motionless point while the earth rotates beneath it. Every point of the universe is a fixed point: all you have to do is hang the Pendulum from it.”
– Umberto Eco, Foucault’s Pendulum

I’m not sure what to do with that information, sadly. If we’ve learned anything from the ongoing death throes of the 20th century, it’s that in an information dense and hyperconnected society, that robust commitments to social infrastructure – public health, public education, public journalism, social justice, social welfare and full employment – aren’t some sort of lefty, feel-good hippie political niceties; these are national security issues, and their failures expose an attack surface on participatory representative democracy. And while I don’t think Facebook profits from disinformation, they’re definitely complicit and definitely profiting from ignorance, powerlessness and helplessness. The disinformation, the conspiracy theories and racist agitprop, the antivax gongshow, Q and a thousand others festering alternate realities are just byproducts of that fear and desperation, parasites that have latched on to a vulnerable population from an accommodating platform happy to look the other way, wash their hands of the whole thing and let the machine grind away.

“I believe that you can reach the point where there is no longer any difference between developing the habit of pretending to believe and developing the habit of believing.
– Umberto Eco, Foucault’s Pendulum

I sometimes wonder what makes Facebook’s staff think the algorithms they’ve built, to give their users whatever keeps them clicking away uncritically, aren’t pointed back at them? Do they not wonder, or just not ask?

May 5, 2020

The Shape Of The Machine

Filed under: digital,documentation,doom,interfaces,vendetta — mhoye @ 11:18 am

P4030207

The AMP people are rebranding their “AMP Stories” as “web stories“, raising that bland flag to the strained smiles of their publisher client-states, so it’s about time for me to click “post” on this. I was ranting about AMP a few weeks ago, partly because it’s a minor fraud being carried out at the expense of open standards and the common good, but mostly because of what an incredible social engineering exercise it’s been inside the big G.

The most remarkable thing about this machine – specifically, this corner of the massive Google monitor-and-monetize engine – how well they’ve broken up every part of the process internally at Google. The team working on AMP is making web pages lighter-weight and faster to load, and that sure seems like a net good in the world. Elsewhere, the search team has built out a preference for surfacing faster-loading and lighter-weight web pages to mobile users, which I’m sure was a decision with some sort of empirical basis and on its face seems like a good idea too. That a site would show up better in search results because it’s snappier or more responsive seems reasonable. And finally Google sells ads and shares ad revenue and that keeps a lot of sites alive these days, and I guess that’s good as well.

But when you put all the parts of that machine together under one P&L-statement roof suddenly you’re looking at a thinly veiled extortion scheme; as a publisher you either use AMP or your ad revenue goes away. Google could have approached the “be better on mobile” problem, search optimization and revenue sharing any number of ways, obviously, but the one they’ve chosen and built out is the one that guarantees that either you let them middleman all of your traffic or they cut off your oxygen.

That’s a real nice revenue stream you’ve got there; it’d be a shame if anything happened to it.

It’s got a certain sinister elegance to it, that mercenary Vintage Microsoft flavor, but Vintage Microsoft never pretended they were anything other than mercenary and this is all about the pretending. It’s not on the same level as Facebook, obviously, where they’ve managed to compartment their org structure so carefully that complicity in war crimes and other atrocities leaves facebookers feeling like they’re the ones being portrayed unfairly, but it’s still an accomplishment. That’s the most fascinating part of this exercise, to my mind: that Google has managed to structure this surveillance-and-value-extraction machine entirely out of people who are convinced that they, personally, are doing good for the world. The stuff they’re working on isn’t that bad – we’ve got such beautiful intentions! – and it’s interesting work and the perks here are really good… You can kind of watch their eyes de-focus for a second when you bring it up; it takes them a minute to remember who pays for their laundry and snacks.

April 27, 2020

Side Scroller

Filed under: arcade,documentation,interfaces,linux,toys — mhoye @ 8:35 am

I’ve never met Ian Albert, but years ago he painstakingly scraped and pasted together a set of maps and backgrounds from a various oldschool games, an effort that’s helped me in a bunch of odd little ways over the years and for which I’m grateful. Of particular interest today are the original Super Mario Brothers maps; for the sake of this exercise, let’s start with world 1, level 1.

ImageMagick and FFMpeg are a pair of “classically-Linux” command-line tools, in terms of how insanely complex and opaque they appear until you’ve worked with them for a bit and can sort of see the logic of their approaches. Even then the documentation takes some getting used to – the man page should just say “don’t bother, go to the website” – and even then you’ve gotta kind of fumble your way towards competence if you want to use them day to day.

Well, maybe you don’t, but I sure do. In any case once you know they exist you muddle your way to doing a lot with them. In particular, “convert” from the ImageMagick tool suite lets you upscale some of those Mario-level gifs to PNGs, like so:

$> convert mario-1-1.gif -scale 300% mario-1-1.png

We’re doing this conversion because FFMpeg (apparently?) doesn’t like to pan over gifs as an input stream but is happy to do that with PNGs, and scaling it up gets you an image size better suited for modern screens. We’re admittedly scaling up and then compressing something that eventually gets upscaled again, which looks like it should bea waste of effort. I’ve tested it, though, and on this machine at least it looks like movie upscaling comes out a lot mushier than static image upscaling and this approach is quite a bit crisper.

In any case, then you run “file” on that resulting image to see how big it is:

$> file ./mario-1-1.png
./mario-1-1.png: PNG image data, 10152 x 672, 4-bit colormap, non-interlaced

Do a bit of loose math to figure out your frame width and subtract 16/9 * 672 – that is, the aspect ration of your monitor times the height of the image – from the length – to get the number you need to work with next – in my case rounding to 1200, it’s 8952.

That’s the number of frames you’re going to tell FFMpeg to pan across, like so:

$> ffmpeg -loop 1 -framerate 5 -i mario-1-1.png -vf crop=1200:672:n:0 -frames:v 8952 -pix_fmt yuv420p mario-1-1.mp4

Now, order of operations and operation context both matters in FFMpeg usage, which adds a degree of complexity to figuring out wtf you’re doing with it, but walking through that command:

the “-loop” option is specific to the image processing part of ffpmeg, and in turn specific to some image-processing formats, so “loop 1” might or might not error out saying “unrecognized option”, depending on where you put it in the command line and which image types you’re choosing to process, which is not super helpful. In this case, it works for .png input files, and it means “go through this set of input images once”. We’ll get back to “-framerate” in a moment.

“-i” is input the png of the mario level we made earlier. The rest of this command is where the proverbial action is.

“-vf” means “create a filtergraph”, which is FFMpeg-ese for “transform the set of input images you’ve decoded in the following way”. “The following” can get pretty crazy, as you might imagine, but fortunately for us this will be reasonably simple in intent, despite the somewhat daunting syntax.

In this case, it means “crop out a sub-image from the given input image, of with 1200 and height 672, starting at horizontal offset “n” and vertical offset 0. “n” in this case is implicitly provided by the “frames” part, as we iterate over the frames from zero to the value of “-frames:v”

The “-pix_fmt yuv420p” part – “pixel format”, is what that means – I don’t really understand, beyond the fact that FFMpeg can encode videos in way more formats than browsers can easily decode, and its’ default idea of “best” doesn’t work everywhere. This incantation seems to fix that, which isn’t particularly satisfying but is definitely part of the whole fumbling-towards-competence part I mentioned.

In any case, the “-framerate 5” part is the interesting bit. That’s there because about nine thousand frames – 8952 specifically – divided by the number of seconds in a 30 minute meeting is very close to five. Five frames per second is really slow, so the resulting output video is, as predicted by our basic arithmetic, a lazy 29 minutes and 50 seconds long:

… and that’s the story of how you make a videoconference background that scrolls slowly through a Mario level over the course of half an hour.

A few notes:

  • If you leave out the framerate option and just want to see it scroll by at a default 25 frames per second, the movie is five minutes and change, which is amusingly a few seconds longer than the best speedruns of the entire game.
  • That crop=1200:672:n:0 option elides a lot of possible complexity; there’s an entire mathematical-expression interpreter under the hood of of crop and all the other FFMPeg filters, so if you want a 1080p movie panning diagonally across some of the many classic and modern works of art that are available now from any number of places, you can roll your own with relative ease.
  • The temptation to edit these to say something like “Thank you, Mario! But Peach went to another meeting.” is strong; if I get around to that, the fonts are here or maybe here.
  • I really need to get out of the house more. I guess we all do?

Update: A friend points me at FFMprovisr:

“FFmpeg is a powerful tool for manipulating audiovisual files. Unfortunately, it also has a steep learning curve, especially for users unfamiliar with a command line interface. This app helps users through the command generation process so that more people can reap the benefits of FFmpeg.”

Thank you, Sumana!

April 13, 2020

Consequences

Filed under: documentation,fail,life,losers,vendetta — mhoye @ 3:18 pm

March 28, 2020

Magnanimosity

Filed under: a/b,documentation,fail,future,losers,lunacy,vendetta — mhoye @ 2:04 pm



March 18, 2020

Notice

Filed under: analog,documentation,interfaces,life,mozilla,work — mhoye @ 9:56 pm

Untitled

As far as I can tell, 100% of the google results for “burnout” or “recognizing burnout” boil down to victim-blaming; they’re all about you, and your symptoms, and how to recognize when you’re burning out. Are you frustrated, overwhelmed, irritable, tired? Don’t ask for help, here’s how to self-diagnose! And then presumably do something.

What follows is always the most uselessly vague advice, like “listen to yourself” or “build resiliency” or whatever, which all sounds great and reinforces that the burden of recovery is entirely on the person burning out. And if you ask about the empirical evidence supporting it, this advice is mostly on par with leaving your healing crystals in the sun, getting your chakras greased or having your horoscope fixed by changing your birthday.

Resiliency and self-awareness definitely sound nice enough, and if your crystals are getting enough sun good for them, but just about all of this avoiding-burnout advice amounts to lighting scented candles downwind of a tire fire. If this was advice about a broken leg or anaphylaxis we’d see it for the trash it is, but because it’s about mental health somehow we don’t call it out. Is that a shattered femur? Start by believing in yourself, and believing that change is possible. Bee stings are just part of life; maybe you should take the time to rethink your breathing strategy. This might be a sign that breathing just isn’t right for you.

Even setting that aside: if we could all reliably self-assess and act on the objective facts we discerned thereby, burnout (and any number of other personal miseries) wouldn’t exist. But somehow here we are in not-that-world-at all. And as far as I can tell approximately none percent of these articles are ever about, say, “how to foster an company culture that doesn’t burn people out”, or “managing people so they don’t burn out”, or “recognizing impending burnout in others, so you can intervene.”

I’ll leave why that might be as an exercise for the reader.

Fortunately, as in so many cases like this, evidence comes to the rescue; you just need to find it. And the best of the few evidence-based burnout-prevention guidelines I can find come from the field of medicine where there’s a very straight, very measurable line between physician burnout and patient care outcomes. Nothing there will surprise you, I suspect; “EHR stress” (Electronic Health Records) has a parallel in our lives with tooling support, and the rest of it – sane scheduling, wellness surveys, agency over meaningful work-life balance and so on – seems universal. And it’s very clear from the research that recognizing the problem in yourself and in your colleagues is only one, late step. Getting support to make changes to the culture and systems in which you find yourself embedded is, for the individual, the next part of the process.

The American Medical Association has a “Five steps to creating a wellness culture” document, likewise rooted in gathered evidence, and it’s worth noting that the key takeaways are that burnout is a structural problem and mitigating it requires structural solutions. “Assess and intervene” is the last part of the process, not the first. “Self-assess and then do whatever” is not on the list at all, because that advice is terrible and the default setting of people burning out is self-isolation and never, ever asking people for the help they need.

We get a lot of things right where I work, and we’re better at taking care of people now than just about any other org I’ve ever heard of, but we still need to foster an “if you see something, say something” approach to each others’ well being. I bet wherever you are, you do too. Particularly now that the whole world has hard-cutover to remote-only and we’re only seeing each other through screens.

Yesterday, I told some colleagues that “if you think somebody we work with is obviously failing at self-care, talk to them”, and I should have been a lot more specific. This isn’t a perfect list by any means, but if you ask someone how they’re doing and they can’t so much as look you in the eye when they answer, see that. If you’re talking about work and they start thumbing their palms or rubbing their wrists or some other reflexive self-soothing twitch, notice. If you ask them about what they’re working on and they take a long breath and longer choosing their words, pay attention. If somebody who isn’t normally irritable or prone to cynical or sardonic humor starts trending that way, if they’re hunched over in meetings looking bedraggled when they normally take care of posture and basic grooming, notice that and say so.

If “mental health” is just “health” – and I guarantee it is – then burnout is an avoidable workplace injury, and I don’t believe in unavoidable mental-health injuries any more than I believe in unavoidable forklift accidents. Keep an eye out for your colleagues. If you think somebody you work with is failing at self-care, talk to them. Maybe talk to a friend, maybe talk to their manager or yours.

But say something. Don’t let it slide.

Older Posts »

Powered by WordPress