Counting Check Marks

Here’s my solution to the last EmacsGolf challenge. I used the apparently little-known how-many command. I normally use how-many in Elisp to count the occurrences of some regex. Here’s an example from my old blog that leverages some code from the always useful EMACS-FU. It turns out that how-many is a command and thus callable interactively. That makes the solution straightforward.

Meta+xhmReturn Call how-many
cbMeta+/ cb → ✓
Return result returned in minibuffer

That does the job in 8 keystrokes.

The excellent flx-ido mapped hm to how-many on the first try despite the fact that I hadn’t used how-many in several months (and never before interactively). I map 【Meta+/】 to hippie-expand, which takes care of expanding the abbreviation.

Posted in General | Tagged | 3 Comments

Experience With flx-ido

After watching Sacha Chua’s interview with Magnar Sveen, I wrote that Sveen had demonstrated some Emacs features that I wanted to try out. One of those was flx-ido. The flx package was written by Le Wang to bring Sublime Text’s fuzzy matching to Emacs. Wang describes it as fuzzy matching with good sorting.

The ido package already supports fuzzy matching, of course, so the advantage of flx-ido is the improved sorting of prospective targets. You can see flx-ido in action with comparison searches using ido flex in this screencast from Wang. It nicely illustrates the advantages of flx-ido in a way that writing about it can’t.

I’ve been using the package for about 3 weeks and, after some acclimation, really like it. Initially, I used it like I did ido flex but that gave me suboptimal results. Once I started typing the first character of each word—some-fancy-command → sfc—I got excellent results. If you decide to try it, give yourself a bit of time to get used to it and train yourself to type appropriate abbreviations.

The other thing that I find a huge advantage is ido-vertical-mode. It lists your ido choices vertically instead of the default horizontal method. That makes it much easier to see the choices and pick the correct one. This was one of those things that I was pretty sure I wasn’t going to like but I got used to it right away and wouldn’t want to go back now. Even if you decide not to try flx-ido, do yourself a favor and give ido-vertical-mode at try. I think you’ll like it. You can see it in action in the Sveen interview or in an animated gif at its project page.

Posted in General | Tagged | Leave a comment

The NSA and Terrorism Fear Mongering

Whenever ordinary folks push back against—or even question—the NSA’s extralegal surveillance of innocent citizens they are always told that it’s to protect them from terrorists. “Don’t let there be another 9/11,” they say. “Really,” they assure us, “it’s for your own good.”

It’s all nonsense, of course, and now the EFF has published an interesting article that puts the lie to those claims. In reality, the EFF says, terrorism is only a narrow aspect of the NSA’s broader activities and interests. Their own talking points memo advises spokesmen to continually invoke 9/11.

In truth, the NSA spends most of its efforts spying on foreign heads of state, foreign businesses, the World Bank, the UN, and just about everything else. You may or may not think that such activities are justified but one thing for sure, there’s a lot more going on than just protecting the world from terrorists.

Posted in General | Tagged | Leave a comment

What Does It Take? (European Edition)

Just in case those of you in Europe think that you don’t have reason to be as mad as Americans should be, you might want to reconsider.

Posted in General | Tagged | Leave a comment

An Easy EmacsGolf Challenge

Here’s an easy EmacsGolf challenge that came up today. I have an org file in which some of the headings have a check mark (✓) at the beginning of the heading (but after the stars). The file is quite long and I want to count how many check marks there are in the file.

For clarity, the file looks something like this

 * Level 1.1
 ** ✓ Level 2.1
   blah blah blah
 ** Level 2.2
   blah blah blah
 * Level 1.2
 ** Level 2.1
   blah blah blah
 * Level 1.3
 ** ✓ Level 2.1
   blah blah blah
 ** Level 2.2
   blah blah blah
 ** ✓ level 2.3
   blah blah blah
...

Here are the rules:

  1. There are no check marks in the body of the text, only at the beginning of some headers.
  2. You may assume that there’s an abbreviation, cb, for ✓.

The challenge is to find the total number of check marks in as few a number of keystrokes as possible.

Posted in General | Tagged | 3 Comments

GPG/PGP Best Practices

The Privacy and Authenticity Outreach Workgroup of we.riseup.net have published an excellent list of OpenPGP Best Practices. Most Irreal readers, I trust, have already installed and configured GPG/PGP even if most of their usual correspondents haven’t.

I’ve written before that installing and setting up a default configuration of GPG is not, as often claimed by the press, difficult and that even your Mom could do it. What these best practices do is tell you what you should do after installation to make sure you’re getting as much security as possible. I learned a couple of things I didn’t know so it’s a worthwhile read even if you’re an experienced GPG/PGP user.

Posted in General | Tagged | Leave a comment

The Iron Law of Data Collection Confirmed

Just in case you needed more proof of the iron law of data collection, consider this McClatchyDC story about how almost 5000 people had their personal information swept up and shared with nearly 30 federal agencies because they ordered a book.

The book was about how to beat lie detectors and the government was not amused. Apparently they were a little confused about the First Amendment and worried that maybe some of their employees had used the information to beat their employment polygraph tests. Let’s put aside, for the moment, that the diversion techniques—let alone polygraphs themselves—have yet to be proven effective or reliable.

Many of the 4,904 people on the list had nothing to do with the Federal Government so you would think their names would have been deleted and their personal information expunged. Just kidding. Of course you wouldn’t think that and, of course, their information wasn’t deleted. Instead, the government has decided to hold onto it “just in case.” To understand how illegal this probably is, consider the rationale for the Department of Defense’s retention of the data: the DOD Inspector General says that they can retain information on non-DOD personnel “when their activities have directly threatened the functions, property or personnel of the Department of Defense.” When they have to stretch the facts this far, you know you’ve caught them with their hands in the cookie jar—remember, we’re talking about purchasing a perfectly legal book.

There’s little doubt that this data will be further abused and it’s entirely likely that it will find new uses, just as the iron law demands.

Posted in General | Tagged | Leave a comment

What Does It Take?

Are you angry yet?

How about now?1

Footnotes:

1

To be fair, there’s some controversy associated with this claim and it doesn’t even seem possible—given that Linux is open source—until you remember the greatest hack of all time.

Posted in General | Tagged | Leave a comment

On Open Space Offices and Idiots

A few days ago, Michael Flowersky wrote a blog post that asked the question, What’s the difference between an advocate of open space office and an Idiot? It was an amusing read but I wasn’t going to comment on it until I saw that it kept popping up in my feed. I wasn’t going to comment because it’s hard to see where the controversy lies.

It’s not much of a spoiler to reveal that Flowersky’s answer is “none.” Really, what else could it be? There’s really only one positive thing you can say for open space offices: they’re cheaper. Any other justification you hear is nonsense. “Oh, but it will improve communication and help team building.” Translation: “They’re cheaper.” You can be sure that anyone spouting the improved communication silliness has never had to work in one.

Many small startups have this type of office, of course, but that’s because they’re, you know, cheaper and these companies are barely Ramen profitable. Once they have sufficient income and, more importantly, once their team grows beyond the founders and one or two hires they pretty much have to do something different. That may be a conventional office arrangement or remote working or something similar. As Flowersky says, you can’t get much creative work done in an environment that guarantees continual interruptions and noise.

The ideal office arrangement for our type of work is, of course, private offices with a door. They’re definitely not cheaper. That’s especially true if the company is in, say, San Francisco with hideously large office rents. Perhaps the best solution is to maintain, if you need it, a small office for people to come to and for the occasional in-person staff meeting and otherwise let people work when and where they are most comfortable.

Posted in General | Tagged | Leave a comment

Delay Update

Just a quick note to bring you up to date on my efforts to fix the slow page loading that’s been plaguing Irreal lately. As I mentioned in my last update, the problem appears to be page generation not server response. Watching the transfer with tcpdump, I see that the server response and actual transfer of data is very snappy. It’s the time between the GET and when the transfer starts that the delay happens.

To deal with this I installed the W3 Total Cache but visitors were still seeing the delay. I tuned the cache a bit and now it seems to be working pretty well for me. Right after I push a new post, I’ve been loading the home page to get it into the cache but it occurs to me that many of you are coming to Irreal through RSS or Planet Emacsen and going directly to a single page. Therefore, I will also load each new page alone to get it into the cache as well.

If you are still consistently seeing a delay of over 20 seconds for the home or current page please let me know and I’ll try something else. Thanks for your patience and for those of you who have taken the time to let me know about the site performance that you are seeing.

Posted in Blogging | Tagged | 1 Comment