A Short Org Table Tutorial

Someone tweeted a link to this very nice Org table tutorial from 2013. Even though it’s fairly old, the information is still up to date and useful. I learned a couple of tricks that I either didn’t know or had forgotten. One such trick is how to add a line under the current row. I always struggle with that and end up doing it in a less than optimal fashion. It turns out to be simple: just type Ctrl+c -.

There are other shortcuts that you may not know about so it’s definitely worth a look. It can also serve as a cheat sheet so you might want to bookmark it if you do such things.

Posted in General | Tagged , | Leave a comment

Vivek Haldar on Why He’s Video Blogging

I’ve written a few times about Vivek Haldar’s Read A Paper videos. They’re vlogs that “read” a seminal paper in Computer Science. They’re really great. If I’ve already read the paper, that particular vlog serves to remind me of the details. If I haven’t read the paper, the vlog familiarizes me with the content and perhaps inspires me to read it on my own. If you don’t like actually reading papers, the series is a painless way to get many of the same benefits you would from reading them.

In a (regular) post, Haldar explains why he is vlogging and what he wants to accomplish. It’s a nice adjunct to the videos themselves. One of the things he said really resonated with me. He has, he says, deep misgivings about popular coverage of technology. We’ve all experienced that. Often, despite knowing better, we’re attracted by some click-baity headline about technology and discover that the story behind it is sensationalized, misrepresents the actual situation, or is flat out wrong. The only solution, Haldar says, is to read the source documents to get the real story.

Of course, that can be hard—or even impossible if it concerns a field of which we have no knowledge—so Haldar is trying to make reading some of the important papers in our field accessible by helping us through them. Dijkstra’s “Go To Statement Considered Harmful” paper is a good example: the advice to avoid gotos has become received wisdom but if you haven’t read the paper you won’t know his arguments and understand when using a goto is appropriate. Haldar’s video on the paper is an easy way to become conversant with Dijkstra’s arguments.

The videos are short and definitely worth watching when you have a few minutes.

Posted in General | Tagged | Leave a comment

Vivek Haldar: Global Variables

Vivek Haldar has been blogging up a storm with his video readings of seminal CS papers. I’ve written about a few of them but there’s lots more. See his blog for an up-to-date list. A recent post was about the paper Global variable considered harmful by Wulf and Shaw.

As suggested by the title, this paper has some connections with Djkistra’s famous paper Go To Statement Considered Harmful. The connections are much deeper than the shared title meme. Both papers argue that the construct they’re deprecating is harmful because it makes it difficult to understand the dynamic structure of a program.

The paper’s main argument is that variables should be scoped as locally as possible. When a function can have side effects—when it can modify variables that aren’t local to the function—the dynamic nature of the program becomes very difficult to understood. This is one of the principal arguments for functional programming. Wulf and Shaw go further, though, arguing for a stricter variable scoping that attempts to isolate the effects a variable change can have to as small an extent as possible. Take a look at Haldar’s video—or read the paper—for the details.

As with the admonition to avoid gotos, the idea that we should avoid global variables has become a sort of catechism that we recite but don’t understand. There are excellent reasons for the precept but if we don’t understand what they are, we can’t know when they don’t apply.

Posted in General | Tagged | Leave a comment

The Power of Vanilla Emacs

There’s an interesting blog post by bendersteed that discusses the power of vanilla Emacs. Emacs, he says, has a lot of useful packages but we shouldn’t underestimate the power of built-in commands that have nearly the same function. He notes, for example, that Magnar Sveen’s expand-region is a wonderful package but Emacs offers at set of commands (Meta+@, Meta+h, Ctrl+Meta+@, Ctrl+Meta+h, and Ctrl+x h) that do pretty much the same thing. Likewise, abbrev can perform many of the functions that yasnippet is often used for.

You may or may not be convinced to give up expand-region and yasnippet but bendersteed’s post is useful for two reasons. First, it serves as a reminder of that built-in functionality, which, in some circumstances, may be more appropriate than invoking the package and second, he’s got a nice section at the end of the post that lists some of the built-in functionality that he’s discovered. Two and a half years ago, I wrote about eww-search-words, which will search the Web for the highlighted region. I’d pretty much forgotten about it and that’s a shame because it’s really useful for checking a word that doesn’t appear in whatever local dictionary you’re using. It was nice to be reminded of it. That alone makes the post worth reading.

Posted in General | Tagged | Leave a comment

The Dream Draws Nearer

If you’re a hardcore Emacser or Lisper, you’ve probably always drooled over the famous space-cadet keyboard. Just think, you’d have keys for all four bucky bits, not to mention a multitude of other keys with no apparent use if you aren’t on a Lisp machine. From time-to-time some manufacturer will offer keycaps from the space-cadet but that’s always struck me as sort of pointless.

Now, Kono is considering making a modern version of the space-cadet keyboard. There are no details on the site so it’s not clear how such a thing would work or what computers it would work with but it’s nice to see someone’s thinking about it. Because I really want those Hyper and Super keys1.

Footnotes:

1

Yes, I can—and do—overload the fn and ⌘ Cmd keys on my Mac to provide the same functions but it’s not the same thing.

Posted in General | Tagged , , | Leave a comment

How Uber Debugged a Latency Problem

Even though I’m an Uber user, I’ve never thought very much about their IT infrastructure other than to form an (hilariously) simplified mental model of what it probably looks like. It turns out to be a pretty sophisticated operation that has, among other things, a dedicated “Observability Team” that takes care of building and monitoring Uber’s telemetry subsystems. The system gathers fairly fine-grained metrics on what’s happening and these are monitored to spot problems and reveal opportunities to tune the system for better performance.

Wilfred Hughes pointed me to this post by Richard Artoul over at the Uber Engineering blog that tells the story of how after a recent deployment of some updates, the latency for collecting and filing events increased from about 10 seconds to 20 seconds. They reverted the change and went looking for the source of the latency. That turned out to be harder than you’d guess because the obvious strategies, like profiling, failed. Furthermore, the problem only manifested in the production system so they had to debug on the live system rather than one of their testbeds.

What follows is a tale of some impressive engineering and debugging. Even when they located the offending code, it was hard to understand how it was causing the latency. Before they were finished, they even instrumented the Go compiler to help with understanding what was happening. When they were done, they completely understood the problem and had made a change to one of their algorithms to prevent it from happening again.

If you write code, you really should read this post. It’s an example of debugging at its best.

Posted in General | Tagged | Leave a comment

Emacs Future History

I was reading this post on some Ivy hacks and it reminded me of another post that I’ve been meaning to comment on. Over at the CollBox blog, Cameron Desautels writes about the Emacs concept of future history.

The idea is that Ctrl+m used to move to the next minibuffer history entry is overloaded to move beyond the current entry to a future entry. What it does is bring up any DEFAULT value(s) specified in the call to read-from-minibuffer or read-string.

That’s handy but what I found most interesting was the fact that Desautels started the post with: you can use the same mechanism to edit a default value offered by a prompt. Take a look at Desautels’ post for the details and some examples.

Posted in General | Tagged | Leave a comment

Refactoring Prose With Org Mode

Edmund Jorgensen over at Edmund’s technical ramblings has a really excellent post on leveraging Org mode in a nontrivial way for writing prose. Jorgensen is a software developer by day and a novelist by night. He’s published two novels and a book of short stories so he’s familiar with the problems that authors face.

His latest novel, World Enough (And Time), was in some trouble. He had several subplots going and when it came time for revision, he had a difficult time keeping track of the subplots and how a change in one might effect the others. Because he belongs to the school of writers who let their novels evolve—often in unexpected ways—his revision process frequently involves substantial changes as he gets new ideas from what he’s written so far.

Being an engineer as well as a writer, he naturally sought a technical solution to help him get control of the chaos. His first attempt was to track chapters and scenes in a spread sheet. That helped initially but became unwieldy. Jorgensen, however, was a serious Org mode user and he suddenly realized that Org held the answer to his problems.

I’ll let you read his post for the details. It’s worth reading even if you aren’t a novelist because his workflow could easily generalize to other situations. As usual, I learned something that I started using immediately: org-match-sparse-tree (or more generally, org-sparse-tree) allows you to filter for entries in an Org file containing a tag or combination of tags. It’s really useful, and as I say, I’ve already used it. I definitely recommend Jorgensen’s post.

Posted in General | Tagged , | Leave a comment

EmacsCast: The Video

Rakhim Davletkaliyev, whose EmacsCast podcast I’ve written about many times, has published a video on his Emacs configuration and workflow. As you know by now, I always enjoy seeing how others use Emacs and most often learn something new or get a good idea for my own workflow.

Davletkaliyev’s workflow and the Emacs packages he uses are much like mine. Well, except for the keybindings. I’m almost always content to use the default keybindings but Davletkaliyev has aimed to make his bindings as much like that of the other software he uses as possible. Since he’s on a Mac, that means using the ⌘ Cmd key in many of his commands. For instance, he uses ⌘ Cmd+o instead of Ctrl+x o to switch to the next window.

My first thought was that I should be doing something like that too because it would decrease the number of different bindings for similar operations among the applications I use. Then I realized that

  1. Almost everything I do except for the browser is done in Emacs.
  2. For the browser and any other extra-Emacs application I may need, I have Emacs keybindings configured for all the mac commands.

So in a sense, I solved the problem in exactly the opposite way: rather than adapt the Emacs keybindings to be like native app bindings, I configured the native apps to have Emacs keybindings. Either way, it reduces the cognitive load when switching applications.

Davletkaliyev’s video is about 16 and a half minutes but well worth watching. If you want to see exactly how he has things configured, there’s a link to his configuration.

Posted in General | Tagged | Leave a comment

Microsoft Is Closing Its Ebook Store

Microsoft is closing its ebook store. Who cares? The people who have bought books from them care because they will no longer be able to read their books. Microsoft, to its credit is offering to refund the purchase price but why not just keep the authentication server running? How much could it cost?

The author of the linked article paints a dire picture of where all this is leading. It’s a bit overwrought but it’s worth examining the current practice and whether it makes sense. The legal fiction is, “We’re just selling you a license to read the book, not the book itself. We can revoke that license at our will.” Except that hardly anyone thinks like that when they’re buying an ebook.

I’ve written many times about my ongoing efforts to be completely paperless. Part of that is buying ebooks rather than physical books. I really love books and appreciate all the arguments about how they feel and smell but, really, ebooks are just so much more convenient in almost every way that “real” books just don’t make much sense anymore. That, of course, puts me at odds with another of my deeply held “digital tenets:” Keep all important data in an open format.

My guess is that even the hidebound publishing industry will come to see that DRM is against their own interests and give up on it as the music industry has. Whether that happens before Amazon finishes eating their lunch is still an open question.

In any event, the closing of the Microsoft book store should serve as a warning to us all: let someone lock up your data and you could lose it at their whim.

Posted in General | Tagged | Leave a comment