An Open Letter to Online Political Activists

I’ve noticed something lately. My inbox. It’s full of crap.

I don’t mean spam. It’s also full of spam, but beyond the spam, it’s still full of crap. Issues. Political rally cries. Chicken Littles.

It doesn’t matter where you fall on the political spectrum. You’re probably getting the same whether you’re on the left, the right, or in the middle.

My inbox suggests I’m somewhere between the middle and the left. I get a lot of mail from various levels of the Democratic Party, candidates’ campaign committees, and third parties shouting into the darkness about circumcision, gun control, food additives, dead bees, and chemical fertilizer.

The thing is, if you pick any one of these issues and talked to me about it, I am quite likely in line with their message. I do think we need to reform U.S. gun laws in some way. I do think we need to figure out how to save the bees (and, by extension, our food crops). I do think circumcision is pointless, and that we put a lot of dangerous garbage into our food supply, and that various factions of the political right are becoming dangerous.

But.

It’s very hard to give a shit anymore. Should I take the time to read the message and “Sign the Petition!”, or should I just hit Delete? Multiply this question by fifty or so, every day.

For a while, the Internet increased people’s political engagement. It became a method to draw in the apathetic populace, especially the younger generation, and make them care about issues again. Get involved, petition, and vote.

But, at least for me, the sheer volume has become drudgery. Every day I almost unsubscribe from various lists. I feel guilty, as though this would be selfish.

In closing, I would like to address everybody who runs an advocacy campaign on the Internet and say this: if you are tempted to pen a mass email to your audience, and its only message is “all I wanted to say is: thank you!” — close your email program and go outside for a while. The rest of us will thank you. We have enough of your cohorts’ correspondence to slog through already.

Signed, Everybody

tmux and mouse mode

UPDATE 17 March 2013: I am placing this post into the public domain so people are free to incorporate it into their existing files which may be in the public domain already.


As I commented in my last post about tmux, tmux mouse mode left some things to be desired. Namely, there are two problems.

First, it completely takes over the mouse. Meaning that you can no longer do a simple “mark text and copy” operation on the native OS. There are patches over this problem, like reattach-to-user-namespace, but that is only helpful if you are running tmux on your Mac. I practically never do that, because most of the usefulness of tmux for me is in leaving active sessions to remote servers. I work on remote servers over ssh connections, detach from tmux, and stick my laptop in its bag. I come back to the session later. That would not be possible if tmux were running on my Mac, so I am almost always running it remotely on a Linux server.

Second, there is the pane problem. If you turn mouse mode off, and try to copy text in a pane that has another pane to its side, the terminal will just copy across the boundary. iTerm has no idea that the pane boundary exists; it’s just another character printed in the terminal window.

These days, I have mouse mode turned on by default in .tmux.conf. It’s just too useful to not have it on. If my hand is already on the trackpad, switching between windows or panes, or doing pane resizes, is very handy with the pointer. It’s also usually much faster to do a mark/copy operation within tmux by using the pointer.

1
2
3
4
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on

But I do often want to do an OS-native mark and copy. So, I have defined two hotkeys to make it easy to turn mouse mode on and off.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Toggle mouse on with ^B m
bind m \
  set -g mode-mouse on \;\
  set -g mouse-resize-pane on \;\
  set -g mouse-select-pane on \;\
  set -g mouse-select-window on \;\
  display 'Mouse: ON'

# Toggle mouse off with ^B M
bind M \
  set -g mode-mouse off \;\
  set -g mouse-resize-pane off \;\
  set -g mouse-select-pane off \;\
  set -g mouse-select-window off \;\
  display 'Mouse: OFF'

UPDATE 20 July 2012: @aristidesfl points out that you don’t need to bind anything for mouse mode disable in iTerm2, simply hold option down and iTerm2 turns it off temporarily.

That makes it easy to switch between the two states (mouse mode on or off). But there is still one nagging situation: I want to do OS-native copy and paste, but it’s in a pane. Even with mouse mode off, things break because the terminal does not know what a tmux pane is. Once again, key bindings come to the rescue.

1
2
3
4
5
6
7
8
9
10
11
unbind +
bind + \
  new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\
  swap-pane -s tmux-zoom.0 \;\
  select-window -t tmux-zoom
    
unbind -
bind - \
  last-window \;\
  swap-pane -s tmux-zoom.0 \;\
  kill-window -t tmux-zoom

These bindings (^B + and ^B -) are a “zoom” feature. Focused on a given pane, ^B + will promote the pane to be its own window. Then you can do OS-native mark and copy all you want, no panes to worry about. When you’re done, just use ^B - to turn the window back into a pane, right where it was before.

I’ve chosen to keep these two things separate, but with a little tinkering, you can create a binding that does both operations together: zoom a window, turn mouse mode off, and another binding to do the inverse.

As always you can find my current .tmux.conf file on GitHub.

iTerm2 keymaps for tmux

UPDATE 17 March 2013: I am placing this post into the public domain so people are free to incorporate it into their existing files which may be in the public domain already.

UPDATE 16 July 2012: I have updated this post to reflect my current keymaps, which I settled on after writing the original post.


As I’ve said before, I’m a huge fan of iTerm2. I am also a huge fan of tmux, the terminal multiplexor. If you’re not familiar with tmux, it’s conceptually the same thing as GNU screen, with some differences, and (in my opinion) some advantages. For example:

  • In screen, each instance is its own completely separate process. With tmux, the first time you run it, you start a server, but subsequent runs will instantiate clients that connect to that existing server. Why does that matter? Because it means you can lop a window off of one tmux session and glue it onto another. It also means you can view the same session from multiple clients simultaneously (say you left tmux attached at the office, you can attach to that same session at home without disrupting the session you left attached at work). You can even share a session with someone else. All of that’s possible because it’s all going on in the same server process.

  • tmux supports multiple panes within a window, where screen supports only windows.

  • If you don’t set a window title, tmux will auto-set it for you based on what you run in that window. So it might start as “bash” and change automatically to “vim” or “top” or “tail” depending on what you run inside. That is pretty handy to tell what’s going on in what window even if you don’t take the time to set a name for it.

It so happens that the authors of iTerm2 are tmux users as well, and they have integrated a tmux mode into iTerm2. It’s an early stage thing, so you have to forgive it, but at this point it still has some drawbacks. I am not going to talk about that integration much in this post, but I wanted to point out that it exists, that I know about it, and explain why I don’t use it.

  1. You can only connect iTerm2 to one iTerm2-aware tmux session at a time.

  2. They communicate via a special protocol. In practical terms, this means you “spend” a window for that channel. It sort of sits around lingering. To be fair, they added an option to auto-hide it on connect so it goes away by itself.

  3. Because this is still under development, you currently have to run the right version of iTerm2 with the right version of patched tmux. That can be a headache if your server side is used by multiple people. It also means an upgrade to iTerm2 sends you off to recompile tmux before you can use it in integrated mode again.

For these reasons, I have set aside the iTerm2 tmux integration and I’m just using regular tmux again. I’ll check it out again someday after it has matured (and preferably been built into tmux mainline so I don’t have to patch a copy myself).

But after using the integration, I found I was longing for easy hotkeys to navigate around my windows and panes in tmux. (Using the integrated mode, you use the iTerm-native hotkeys because it treats the tmux windows and panes as native iTerm tabs and panes).

I was frustrated by this because in tmux you use a prefix key for everything, so going to the next window means using Ctrl-B n and going to another pane might be Ctrl-B H. You can remap a lot of things, but it’s never as easy as native keys like Shift-Cmd-Right or similar that we are used to using on Macs and PCs.

At first, I played with the tmux mouse mode. It’s actually pretty nice. Assuming you send mouse events through to the server, tmux will recognize them (if you turn on the appropriate options), allowing you to select windows and panes using mouse clicks. You can even resize panes. Unfortunately, that comes at a cost: it breaks using normal mouse selection to copy from iTerm2 window into other programs on your Mac. Not good.

Then, I found “Send Hex Code.”

Angels rejoiced. Benjamins fell from the sky. My doctor told me to eat more ice cream.

Send Hex Code is just an unassuming option in a pulldown in the iTerm key mapping preferences. But when I saw it, I knew it was the solution to my problem. The thing is, you can represent any ASCII character as a hex value, and sending a sequence of ASCII characters is exactly what I needed to do.

I looked up some ASCII and ANSI hex values.

My first goal was to navigate between windows. The default maps for that are:

1
2
^B n        next window
^B p        previous window

Let’s rewrite those as hex bytes.

1
2
0x02 0x6E   next window
0x02 0x70   previous window

Next goal: navigate between panes in all four directions. This was stickier because it involves arrow keys, but! arrow keys are just escape sequences. So a few more hex bytes are all we need.

1
^B <arrow>      move to pane in <arrow> direction

The ANSI arrow sequence is <Esc>[<direction> where direction is one of [A, B, C, D] (mapped to [up, down, right, left]). Rewritten as hex:

1
2
3
4
0x02 0x1B 0x5B 0x41     move to pane above
0x02 0x1B 0x5B 0x42     move to pane below
0x02 0x1B 0x5B 0x43     move to pane at right
0x02 0x1B 0x5B 0x44     move to pane at left

Lastly, I wanted to be able to resize any given pane in any direction using key bindings. I added some bindings to ~/.tmux.conf (borrowing directional keys from my favorite editor, Vim).

1
2
3
4
bind-key J resize-pane -D
bind-key K resize-pane -U
bind-key H resize-pane -L
bind-key L resize-pane -R

Those bindings rewritten as hex values:

1
2
3
4
0x02 0x4B   resize upward
0x02 0x4A   resize downward
0x02 0x48   resize leftward
0x02 0x4C   resize rightward

Armed with all of my hex sequences, I headed to the iTerm2 preferences. Under the “Keys” section, you can add new items to the global shortcut list. (You can also do this in a profile’s key settings if you have a reason to not want bindings to be available to all profiles.) I added the below sequences, binding them to hotkeys.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Mac hotkey      Hex sequence            Purpose

Cmd-Left        0x02 0x1B 0x5B 0x44     Move to pane at left
Cmd-Down        0x02 0x1B 0x5B 0x42     Move to pane below
Cmd-Up          0x02 0x1B 0x5B 0x41     Move to pane above
Cmd-Right       0x02 0x1B 0x5B 0x43     Move to pane at right

Cmd-Opt-Left    0x02 0x48               Resize leftward
Cmd-Opt-Down    0x02 0x4A               Resize downward
Cmd-Opt-Up      0x02 0x4B               Resize upward
Cmd-Opt-Right   0x02 0x4C               Resize rightward

Ctrl-Cmd-Left   0x02 0x70               Move to window at left
Ctrl-Cmd-Right  0x02 0x6E               Move to window at right

But I am a Vim user. h,j,k,l have been mapped into my fingers for more than a decade, and they are on the main keyboard, so I don’t need to move my hand to the side. Why not map those as well?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Mac hotkey      Hex sequence            Purpose

Cmd-H           0x02 0x1B 0x5B 0x44     Move to pane at left
Cmd-J           0x02 0x1B 0x5B 0x42     Move to pane below
Cmd-K           0x02 0x1B 0x5B 0x41     Move to pane above
Cmd-L           0x02 0x1B 0x5B 0x43     Move to pane at right

Cmd-Opt-H       0x02 0x48               Resize leftward
Cmd-Opt-J       0x02 0x4A               Resize downward
Cmd-Opt-K       0x02 0x4B               Resize upward
Cmd-Opt-L       0x02 0x4C               Resize rightward

Ctrl-Cmd-H      0x02 0x70               Move to window at left
Ctrl-Cmd-L      0x02 0x6E               Move to window at right

The panel to enter each key binding into looks like this.

And this is what my final key map looks like.

Now I can move between tmux windows with Ctrl-Cmd-{direction}, move among panes with Cmd-{direction}, and resize with Cmd-Opt-{direction}. It’s really nice, and I can use Vim keys (H,J,K,L) or arrows.

(Yes, I am aware that this overrides certain keymaps. You will lose the “Hide” hotkey, Cmd-H, but I never use that so I didn’t care. iTerm also maps Cmd-{left,right} to navigate between tabs, but Cmd-{digit} and Shift-Cmd-{left,right} will still work.)

Lastly, a few finishing touches for my tmux.conf. The colors I use here assume Solarized Dark for the iTerm color scheme. They may look awful with another color scheme (or they may look fine).

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Watch background windows for activity
setw -g monitor-activity on

# Make the active pane more visible
set -g pane-border-bg default
set -g pane-border-fg colour245
set -g pane-active-border-bg default
set -g pane-active-border-fg colour46

# Make the active window's name stand out
setw -g window-status-current-fg brightwhite
setw -g window-status-current-bg black

# Use color to indicate activity in a background window
# (Note this is inverted, fg means bg and vice versa.)
setw -g window-status-activity-fg white
setw -g window-status-activity-bg brightred

You can always find my current .tmux.conf file on GitHub.

Tablet Computers Take Wait Out of Waiting Tables

Wouldn’t the better solution just be to have an app, or web app, that users pull up on their phone? That is: why should a restaurant pay to provide the hardware that most are already carrying with them?

No.

A geek would happily install an app on their phone. To us, it would seem nifty, fun, and easy.

A regular person would walk in, find out they have to install an app on their personal phone to order lunch, then walk out and find a restaurant whose head was not up its own ass.

When even the death penalty doesn’t deter copying

A bit of history to give some perspective on our modern issue of piracy (music and movies):

A few centuries ago, the penalty for unauthorized copying was breaking on the wheel. It is a term we’re not very familiar with these days, but it was a form of prolonged torturous death penalty where the convict first had every bone in his body broken, and then was weaved into the spokes of a wagon wheel and set up on public display. The cause of death was usually thirst, a couple of days later.

Back then the issue was duplicating popular fabric patterns. Yes, that was really a thing. And note that this didn’t happen to only a handful of offenders. Sixteen thousand people suffered this fate. Over fabric patterns.

The brutality of our forebears never fails to amaze me.

But it’s the end result of this practice that I find the most fascinating:

Capital punishment didn’t even make a dent in the pirating of the fabrics. Despite the fact that some villages had been so ravaged that everybody knew somebody personally who had been executed by public torture, the copying continued unabated at the same level.

I guess some things never change.

And When Even The Death Penalty Doesn’t Deter Copying — What Then? | TorrentFreak

This is why your newspaper is dying

Ryan Cash complains about online newspaper sites:

Another HUGE complaint I’d like to add to Brad’s list is when these websites draw a story out over 10 pages.

Welcome to the Internet — a place where physical pages don’t exist, and there’s no such thing as “no space left”. There is absolutely NO REASON for any story to span over more than one single page.

I wholeheartedly agree.

But the problem here isn’t cluelessness on the part of the editors. The problem is that newspapers aren’t in the business of providing news, and they never have been. They are in the business of gathering page views. They used to call it circulation, and they used to sell half-page ads, classifieds, and coupon inserts, but it’s the same game as it ever was (except less profitable).

Back in the 90s, I toured a local NBC affiliate’s offices with a friend who was in the news business. Two things I heard that day have informed my opinion of commercial news ever since.

My friend, a local news producer for many years:

How we decide what’s on tonight’s news: News is whatever I say it is.

Down in the bowels of the building was a room where two men watched a wall of monitors. A videotape robot busily swapped tapes behind them. This room aired the commercials.

This is the only room in the whole building that matters. What you think of as TV is just the stuff we cram in between commercials to keep you from changing channels.

This is Why Your Newspaper is Dying

The Internet is not an elephant

Now and then you hear an old-timer rant about how we young people never sit down and write a real letter anymore. (Young in this case is probably defined as under 75.) We’re too busy with our email, our Twitter and Facebook, our IMs and texts.

Clearly, they are technically correct. Nobody writes letters anymore. It’s archaic, a relic of a bygone era. It’s simple economics. In the old days, a letter was the best option to reach across a great distance and communicate with someone. Technology has changed the equation; many better options now exist.

Think of the oldest person you know. Consider life when they came of age. That’s when we set our expectations of how the world is supposed to work. I’ll use my wife’s grandmother as an example. She will turn 91 in a few weeks, meaning she was born in the spring of 1920, in rural Poland. Since then she has seen a lot, including the inside of a Nazi work camp.

What was life like when she came of age? Well, she lived in the country. She probably walked everywhere. Maybe she had a bike, maybe not. There was no Internet. There were no mobile phones. The television would not be invented until she was eight years old, but I suspect she did not personally see one until she emigrated to the United States after World War II. A trip to the next town over would probably have been a major undertaking, let alone a long trip (even one to a country next door, a fairly short trip by modern first-world standards).

I am not saying she rants about people not writing letters; I can’t say I have ever heard her say anything on the subject. But within her life experience, a letter was the best option for most of the time. Only after she was entering her 70s were better options coming into play: cheap long-distance rates and the Internet.

As I age, I find myself thinking about the longevity of the information artifacts we generate. In the beginning, I was mostly worried about digital photos. How could I ensure they survived? Unlike film negatives, digital storage technology changes quickly. Think fast: here’s a ZIP disk. Can you read it? No? What about this 5.25” floppy? 3.5”? What is the likelihood that the JPEG format will be readable by computers in common use when I am a grandparent?

These days, I am concerned about digital artifacts as a whole. My life is ever-increasingly digital, as it is with all of us. I have scanned and shredded most of my file cabinet. I get my bills via email. I communicate with everyone online, leaving no persistent trail (or so I hope). I haven’t used a film camera in years. My magnetic-tape videocamera is in a bag somewhere, but my Flip Mino and my iPhone shoot video all the time.

For the past ten years, I have been a member of Distributed Proofreaders, whose mission is to help Project Gutenberg digitize public domain works for safekeeping and distribution. We scan old books using OCR software, and then the hive mind goes to work. I and many others proofread scanned text. Others take the output from proofreaders and add formatting markup (italics, footnotes, etc.). After several rounds of work, a completed ebook is handed off to Project Gutenberg for publication. It is, for me, important work that I am happy to help with. Time will destroy all old books eventually; I believe they should be preserved for future generations.

I am currently working on a biography about William Cowper, a writer and poet who lived during the latter half of the 18th century. As with many such books, it is full of correspondence, which tells the story of his life. You get a feel for who he was, how he lived, how his relationships worked. I had never heard of William Cowper before I began scrutinizing these scans for errors, but I now find myself fascinated with his story.

I wonder: will anyone be able to write such books about us in a hundred years? How would they go about it? There will be so little left behind. Will your blog still be running for someone to analyze? Where will your emails be accessible? Your tweets? God help you, your Facebook photos from college?

They say the Internet never forgets, but I’m not so sure. I suspect that over a long enough period of time, the Internet will in fact forget. It will forget us all.

Changes

1992:

Friday, 3am. I wake up. Groggy, confused. This isn’t my bed. Where am I?

Conclusion: PAAARRRRTTTTYYY!!!

2011:

Friday, 3am. I wake up. Groggy, confused. This isn’t my bed. Where am I?

Conclusion: Must have fallen asleep in my kid’s room at 8pm again.

Xooming into the future

… by which I mean that if you buy a Xoom and want all its whiz-bang features, you’ll have to wait a while until the future catches up.

The Xoom has an impressive list of features that will only come to work by way of future upgrades.

  1. 4G LTE support, which will require you to ship the tablet back to Motorola for over a week.
  2. The microSD slot is not functional (they blame this one on Google).
  3. Adobe Flash isn’t there. Wasn’t that the “big thing” that made this better than an iPad? Hmmmm?

Oh, and you can’t charge it via USB.

I can’t wait … to order an iPad 2.