Zen Not Zen

On my day off, I was browsing the Internet and came across yet another nonsensical use of the word “Zen” to adorn a programming project. This isn’t the first time I’ve seen this in the wild. A quick search of GitHub shows an undeniable pattern. Even GitHub itself is complicit.

A quick glance at some of the (sometimes grating) descriptions and documentation for these projects reveals the use of “Zen” to connote simplicity, ease, and minimalism. Especially minimalism. I think the idea is to evoke harmony—with nature, with the user, with the computer, or with whatever—and peace, inasmuch as that can come from a computer.

(Searching the Internet some more, I came across a wonderful term, a “dharma-burger”, to describe this combination of Buddhism and pop culture via marketing.)

I am not a Zen teacher, practitioner, or student. However, I have to try to imagine what sort of dialogue I might engage in, were I on a team of engineers who were all white and raised in the West.

Listen, everyone, I don’t think naming this product “Zen” is a good idea. I know that we’re all white here, and when we hear the word “Zen,” we think of a certain minimalistic, natural aesthetic. We definitely want that sort of aesthetic, too. We want our product to feel good and be second-nature to learn.

I don’t think we can use “Zen” as a shorthand to refer to that aesthetic or philosophy, though, because there are a lot of people who have very different associations with the word. The bottom line is that we need to make a decision, now, before we ship, whether we want those people to be among our users or even among our team in the future.

In short, to my mind, it’s needless and offputting baggage. In other words, “Zen arts without Zen study is just cultural junk.”

What’s Mozilla Doing These Days?

I’m inclined to forget about Google. I’ve mostly completed the steps that I need to transition away from their services. I’m sitting on the fence about transitioning my mail (which would be the biggest and final step).

I got to thinking about all that today after I remembered that my RSS subscriptions existed and started reading through those, when I fell down a rabbit hole leading from Google’s disregard for the XMPP standard (sorry about the Google Plus link) to a depressing discussion about PNaCl.

Google has built an empire upon the web, and for a few years there, I got this sense they were really going somewhere remarkable, like there was some shining, beautiful future just over the horizon built out of community standards and driven by smart, passionate engineers. Any day now, I thought, they’d unite Gmail and Talk and Voice and Reader into some amazing community platform and usher in the future. Yep. Any day now. Just got to wait.

Yeah, I’m not sure that’s going to happen anymore.

Sorry. This post isn’t even about Google. It’s about the web. The web doesn’t need a company—it never needed Google, at least. But there are a lot of companies, organizations, and communities that need the web. The web is going to tend towards openness, no matter what we do, if history is any indication. It was created with open standards, and we need it badly to remain that way.

Earlier today, I tweeted:

Open question: Can Mozilla become (or is becoming) what Google has failed to realize?

I’ve written this blog post to elaborate (more or less) on that thought. Twitter is a pretty poor medium for this kind of discussion. What I really meant to ask is, can Mozilla fully embrace its role as a good steward for the web and by extension the web’s role in our lives and communities?

I suppose this would imply Mozilla competing more directly with Google and creating services for productivity and interactivity in some fashion or another. I’m not even sure that this makes sense for them. But given the Firefox OS and their Persona single-login identity service, it feels to me like a logical progression to begin offering cloud services to compete with Google and Apple.

All of this, of course, assumes Mozilla’s making strategic moves into a competitive space they haven’t shown much interest in so far. And maybe they don’t have to. Does the web need a steward?

Location, Location, Location

I’ve been making a concerted effort to recenter my online life around a user name that makes more sense for me. For me, this user name is “emilyst”. It’s a pretty straightforward adaptation from my name. That’s usually how I sign things, in fact, just the first two letters of my last name there.

By this point, I’m using it on GitHub, Twitter, and on IRC, among other places.

I managed to register emily.st and have pointed it at the same server as my old domain lilix.name. I’ve moved my blog to the new URL under emily.st/log (now emily.st). The old location will still mirror the blog with updates until I decide to let the domain expire, and then it won’t lead anywhere. Consider this your warning, if you’re trying to follow me at all.

Finally, I’ve decided not to bother with SSL for the time being. This means that the HTTPS version of my site no longer works for the new domain (the old domain will continue to work until next year with HTTPS).

Can I also just say how awesome it feels to have a vanity domain that feels like it makes sense and which I won’t get tired of after a few months? I feel pretty sure that I won’t waffle about this user name because it’s not actually some weird word or pun or inside joke on my part.

Change Your Cursor Shape on the Fly in Zsh’s “vi-mode”

Note: I no longer use the configuration below, and I no longer maintain it, so I provide the information as is.

I decided to switch to using something called “vi-mode” when using Zsh. If you’re into using the command line a lot, and you’re using Zsh, then you might find this interesting.

If you’re using “vi-mode” — and this entry isn’t really about using “vi-mode”, so I suggest you look elsewhere on what that is and how to use it — then you might desire to know offhand what mode you’re in when you look at your shell prompt. This is probably a natural desire, and it’s what occurred to me when I made the switch. I took a look at the vi-mode plugin that comes with oh-my-zsh. It has some nifty thing that can be inserted into the prompt.

I wanted something subtle, so I made it change the color of my lightning bolt. I wasn’t satisfied, though, because I remembered a Vim tip that let me change the cursor shape on the fly in exactly the same circumstances when using Vim proper. It uses a trick that works in iTerm2 (and evidently Konsole over on Linux), using a proprietary escape sequence.

I searched a little bit more, but I only ever saw information about this escape sequence in the context of Vim, so I’m evidently the first ever to want to use this escape sequence outside of Vim. I think it’s actually pretty useful, so I thought I’d jot down how I did it.

First, here’s what it looks like…

vi-mode-cursor-shape

Now, as for how I did it. This is the relevant excerpt from my ~/.zshrc, omitting all the other things I have in there that accomplish the color change and other features I like.

function zle-keymap-select zle-line-init zle-line-finish {
  case $KEYMAP in
    vicmd)      print -n -- "\E]50;CursorShape=0\C-G";; # block cursor
    viins|main) print -n -- "\E]50;CursorShape=1\C-G";; # line cursor
  esac

  zle reset-prompt
  zle -R
}

zle -N zle-line-init
zle -N zle-line-finish
zle -N zle-keymap-select

That’s about it. Again, this only really works if you’re using iTerm 2 on a Mac.

Update:

I noticed one pernicious drawback of the methodology I outlined above. Whenever executing a command, it would use the line-style cursor just as a matter of course, since that’s what the shell had set earlier, and there was nothing to reset it when a command were issued.

For this reason, I split out the above Zsh widget functions so that the block cursor is always restored when the shell finishes reading a line of input. That is to say, I choose the line-style cursor when initializing a prompt to accept a new line of input (or when $KEYMAP changes), but as soon as I finish reading in input and move on to execute a command, I restore the block-style cursor. Here’s what that looks like:

function zle-keymap-select zle-line-init
{
    # change cursor shape in iTerm2
    case $KEYMAP in
        vicmd)      print -n -- "\E]50;CursorShape=0\C-G";;  # block cursor
        viins|main) print -n -- "\E]50;CursorShape=1\C-G";;  # line cursor
    esac

    zle reset-prompt
    zle -R
}

function zle-line-finish
{
    print -n -- "\E]50;CursorShape=0\C-G"  # block cursor
}

zle -N zle-line-init
zle -N zle-line-finish
zle -N zle-keymap-select

You can always find the most recent version of my settings in my .zshrc configuration script.

My Zsh Prompt

Not that anyone asked, but I decided to tell you guys a bit about my zsh prompt. If you care to check it out, it looks like this (with the text size blown up a bit to make it easier to read):

20130421093752

Couple of things here. I moved almost everything over to the right side, and I decided to keep everything on a single line. My rationale was that zsh does a rather clever thing when the command runs into the right prompt and makes it disappear. That’s pretty much ideal for me. All the information I could like when I’m looking at the prompt, and when I go to enter a command, it gets out of the way and lets me focus on the command itself.

I kept the left side minimal for that reason. It just has my old lightning bolt: It feels like a call to action.

I do make one concession to length and truncate the path at thirty characters. Seems like enough, but maybe I’ll update it at some point.

If you’re curious to check out the whole thing (which makes extensive use of the oh-my-zsh framework for git information), you can see its current incarnation here.