Should We Stop Avoiding Politics?

If you’re familiar with Betteridge’s law of headlines you know that the answer is “no”. Every engineer recognizes politics for what it is: A process used by the unscrupulous to achieve ends that benefit no one but themselves and their cohorts. This is glaringly clear on the national level where politicians will do things against the public weal or even against their own interests simply to prevent their political enemies from benefiting.

Politics operates everywhere, of course, even within engineering departments. Over at Terrible Software, Matheus Lima has a post arguing that we, as engineers, should Stop Avoiding Politics. After all, he says, politics is just how people coordinate in groups and get things done.

Did you see the slight of hand? This is a redefinition of what most of us mean by “politics”. It’s used, mostly by politicians, to obscure what’s really going on. Regular people understand politics as the corrupt process I described above not as the everyday interaction between people that Lima describes as politics. Eschewing politics doesn’t mean refusing to interact with your colleagues or refusing to offer your opinions, it means not indulging in Machiavellian machinations to achieve your desired ends even if they’re arguable good.

If we did the things that Lima describes, we’d all be better off and things would move more smoothly but let’s not pretend that doing so makes us politicians. It just makes us something other than jerks.

I get the point that Lima is making. It’s important for us to engage and offer our best opinions about important issues but that doesn’t make us politicians or mean we’re practicing politics in the generally accepted sense of the word.

Posted in General | Tagged | Leave a comment

RSS Readers

Following up on my recent posts about RSS [1, 2] here’s an article on everything (and probably more) that you ever wanted to know about RSS readers. It turns out that there’s all sorts of readers: paid, hosted, self hosted, on device, browser based, and more.

The article considers readers along two axes:

Deployment Mode
on device, browser extension, hosted, self hosted
Business Model
free, one time fee, subscription

In other words, where the data is stored and how much you pay. The article looks at over 30 RSS readers, classifies them according to the two axis, and briefly describes many of them.

They don’t, of course, talk about the best feed reader, elfeed. That’s understandable. Not even I would expect someone to adopt Emacs just for an RSS reader. I’ve used Reeder and Feedly and they were fine. When I used it, Reeder was free but is paid now. Feedly was always paid but I have a lifetime subscription from getting in early. They’re both hosted solutions

For me, elfeed hits to sweet spot. It’s free, on device, has a ton of features, and since it’s open source can be customized as needed. If you’re an Emacs user, you really should be using it. And who knows, maybe Org mode, magit, and elfeed will be enough to get you to give Emacs a try.

In any event, if you’re looking for an RSS reader, this is a useful article to find out what’s available and what their capabilities are.

Posted in General | Tagged , | Leave a comment

Using Eshell To Output To A Buffer

As many of you know, your can output to a buffer directly from within Eshell by redirecting the output to a #<buffer ...> structure like this

Welcome to the Emacs shell

~/org/blog $ echo "Hello World!" > #<buffer hello-buffer>

That naming convention may seem weird but it’s exactly how Emacs refers to buffers. As Christian Tietze says in this post about redirecting output to a buffer you can see this by executing the current-buffer command (it’s not an interactive function so you have to call it as (current-buffer) in some Elisp context).

Tietze covers all this in his post but the interesting thing is that he hates having to remember and type the #<buffer ...> structure. I can sympathize. I got it wrong at least once while preparing this post. Tietze has the solution. He wrote a function, new-buffer, that generates a temporary buffer and returns it just as if you had specified it with the buffer notation. Then he can write Hello World! into a temporary buffer like this

Welcome to the Emacs shell

~/org/blog $ echo "Hello World!" > (new-buffer)

That’s a bit easier to remember and less clumsy to type than the #<buffer ...> construct.

Of course, as Tietze says, all this makes sense only if you’re already in Eshell. Otherwise, you can achieve the same result by simply using shell-command or async-shell-command. Regardless, Tietze’s post is interesting and worth a couple minutes of your time.

Posted in General | Tagged | Leave a comment

Red Meat Friday: Emacs Startup Time Again

I’ve come realize that, sadly, I’m addicted to posts about Emacs startup time. Every healthy person knows that Emacs startup time doesn’t matter. That’s because, of course, experienced Emacs users seldom restart their editor. They just leave it running all the time. Some, like me, just have it running in a dedicated work area, others run Emacs in server mode and invoke it when needed by calling emacsclient.

Everyone knows all this so you’d think that we’d all get on with our lives and stop worrying about Emacs startup time. We don’t, of course. As soon as I saw this post by No_Cartographer1492 over at the Emacs subreddit, I had to jump in. It’s not that Cartographer1492’s post was objectionable. He was just trying to figure out how to structure his configuration for minimum startup time. There’s nothing wrong with that but whatever figure he announces you can be sure that someone else will announce that their Emacs loads a tenth of a second faster and we’re off to the races.

The best answer was from Lalylulelo who simply observed that they stopped worrying about startup time the day they discovered server mode and emacsclient. But really, you don’t even need that. Only the realization that you can simply leave Emacs running and only restart it when you reboot the system and update Emacs and that tenths of seconds or even tens of seconds in the startup time just don’t matter.

So please, help me get better by not writing about Emacs startup time. We all know that except in special circumstances it simply doesn’t matter. You might like to pretend it does but it doesn’t.

Posted in General | Tagged , | Leave a comment

Bending Emacs – Episode 2

Álvaro Ramírez is back with the second video in his new series. This video is about making some simple UI adjustments to Emacs to bend it into looking and acting in a way meets your needs. That doesn’t sound too exciting except that Ramírez shows all this by doing something that many of us will find useful: He starts a separate Emacs instance and arranges for the changes he specifies in the first instance to appear in the second instance.

That’s actually easier than it seems. Starting the second instance is just a matter of calling Emacs with some command line arguments to specify where to find init.el and where to put temporary Emacs variables, such as the lock files and socket pointers. If you need to invoke independent instances of Emacs, it’s probably worthwhile capturing the command into an Emacs function or shell script.

Arranging for commands to take place in the second instance is also easier than you might think. For that Ramírez defines a macro that takes the command as an argument and makes a call to the other instance via emacsclient asking it to execute the command. If that sounds mysterious, take a look at the code. It’s straightforward and easy to understand.

Looking at the code for all these snippets is easy because Ramírez has it all in a blog entry. You can capture the code for invoking another Emacs instance and the macro for sending commands to it and use them in your own work.

The particular customizations that Ramírez makes are beside the point. They’re what works for him and even if you want to steal some of them, your ideal Emacs UI almost certainly differs. The real value of his video, I think, is that it shows you an easy way to set up an environment to try prospective changes.

The video is 14 minutes, 37 seconds so it should be reasonably easy to fit into your schedule. It’s definitely worth 15 minutes of your time.

Posted in General | Tagged | Leave a comment

Why RSS Is The Right Thing

Tom Burkert has a nice post in which he extols the virtues of RSS. You might wonder what there is to extol. RSS is a simple protocol—the “simple” is in its name, after all—and it’s pretty easy to implement. That and the fact that it was free and open source was why it beat the industry attempt to preempt and monetize syndication.

Like many people, Burkert started off using Facebook to locate and consume content but he soon found that Facebook was making choices on which content he should see that he didn’t agree with. The problem with Facebook and most other social media is that they consider you the product, not the customer. That means that everything they do is focused on increasing engagement and serving ads. You and your needs don’t matter at all, only your eyeballs do.

As Burkert says, the solution to the junk content and user hostile feed algorithms, ironically, predates social media. It is, of course, RSS. There are no algorithms mandating what you see: you are in complete control.

I, of course, use the excellent elfeed to read my RSS feed from within Emacs but you don’t have to be an Emacs user—Burkert doesn’t seem to be—to enjoy the advantages of RSS. There are plenty of RSS readers available for all platforms and despite Google’s attempt to kill RSS by abandoning Google Reader, the protocol is still in wide use because, it seems, not everyone likes being a product.

Take a look at Burkert’s post for more reasons that you, too, should embrace RSS and for some suggestions for getting started with RSS if you’re a new user. If you’re stuck on Facebook or some other social media for your content, you really need to take a look at his post. And if you’re an Emacs user you really need to check out elfeed. Take a look at these excellent videos [1, 2, 3] from Mike Zamansky if you want to learn more and see it in action.

Posted in General | Tagged , , | Leave a comment

Printf Style Debugging Of Elisp

All the cool kids use debuggers for debugging their code. In most situations that’s the right answer. After all, you can set breakpoints, step through your code, and examine values at each step. If you want a detailed view into what your code is doing, debuggers are the best solution.

Sometimes, though, they’re a bit heavy weight and way more than you need. Often all you need is a few strategically placed printf​s to get the necessary information to solve the problem. Sometimes, for various reasons, you can’t use a debugger so you’re forced to fall back on printf.

Marcin Borkowski (mbork) has a nice example of the latter. He was debugging an Elisp function that messed with windows and that interfered with Edebug’s use of those windows. The answer, of course, was to fall back to the printf method. The natural solution was to use the Elisp message function but there were some problems. The first problem was easy. The messages appeared in the minibuffer and disappeared before he could read them. He fixed that by wrapping message in a function that waited for a key press before continuing.

Then he noticed that virtually all his invocations were of the form (message "var1: %s, var2: %s" var1 var2), and that it made sense to abstract that a bit into a new function. That brought a couple of new problems but they were also easily dealt with.

Mbork’s post is well worth reading and his code is worth a bit of study too. I like the way he just digs in and solves the problems without too much worry about whether or not it’s the best way. At the end of the day, he solved his problem and that’s what matters.

Posted in General | Tagged , | Leave a comment

Capturing Fleeting iOS Notes Org Mode

Over at the Emacs subreddit, ValuableBuffalo is looking for a way of taking what he describes as “fleeting notes” on his iPhone and capturing them to an Org file in his Git repository. As soon as I saw that, I immediately thought of Álvaro Ramírez’s Journelly. It’s an app that Ramírez describes as “like tweeting but for your eyes only”.

Irreal readers know that I’m a huge fan of Journelly and have written about it extensively. My use case is similar to what ValuableBuffalo is looking for: I use Journelly as a memo book so I capture random notes during the day and they are automatically exported to all my Apple devices. My typical is invocation is to bring up Journelly, press the dictation button, record my entry, and save it. Journelly captures the time and my location automatically so I don’t have to worry about that.

Ramírez himself answered ValuableBuffalo and pointed him to working copy to help with the Git interface. I’m happy to have my entries collected in a single Org file on my laptop so I don’t bother with collecting them into Git directly. I suppose I could capture the journelly.org file to Git but I haven’t yet bothered.

Another user, JDRiverRun, mentions using the Apple Notes app for capturing the notes. That’s what I used to do but Journelly automatically adds a date/time stamp and records my location when taking the note. Journelly really is much better for this type of application than Notes.

If you have a need similar to ValuableBuffalo’s, take a look at Journelly. You’ll probably find that it’s a good fit for your needs.

Posted in General | Tagged , | Leave a comment

How RSS Beat Microsoft

As many of you know, I’m a big fan of RSS and use it everyday to scour the Internet for potential Irreal topics and also just for topics that I find interesting or useful. I was there at the beginning—although I wasn’t an early adopter—but I’d never heard of its erstwhile big company competitor Information and Content Exchange (ICE). Big name companies like Microsoft, Adobe, CNET, and others early on smelt the potential for monetizing content syndication and financed the development of ICE.

It was the typical big company fever dream: large, complicated, expensive, and with a protocol that had lots of fields that worried about things like licensing the content. A year later, RSS hit the scene and was an immediate success with “small” publishers like bloggers. Unlike ICE, it was small, easy to implement, and open. Anyone could, and did, make their own implementation.

This interesting, but little known, story is told in a blog post over at Buttondown.com. The post makes the comparison of RSS versus ICE to that of VHS versus Betamax. Although there are all sorts of theories as to why VHS won that particular battle, the Buttondown post claims that it was because VHS was cheaper, simpler and open. Just like RSS.

It’s a story that we see repeated often in our field: some basically freelance guys for their own reasons and often on their own time put together an ad hoc solution to some problem and their solution takes over the world. Even the OSI-TCP/IP wars can be squeezed into this paradigm. The large, complex, government committee designed OSI protocols were expected by many to swamp the TCP/IP upstarts and yet many of today’s younger engineers have probably never heard of OSI and certainly don’t know any of its details except, perhaps, for its famous 7 layer model.

The ICE-RSS wars is an interesting story that I haven’t come across before. It’s definitely worth a couple of minutes of your time if only to see Microsoft and other big companies taking their lumps.

Posted in General | Tagged , | Leave a comment

Ashton Wiersdorf On Organizing Papers For Research

Ashton Wiersdorf has a nice post on how he organizes papers, notes, and citations for his research. Of course, Emacs is at the center of that process and it’s another aspect of Emacs use that fascinates me. A couple of weeks ago I wrote about Kiran Gopinathan’s method of doing paper reviews, which overlaps considerably with Wiersdorf’s post. Two and a half years ago, I wrote how John Kitchin does the same thing.

Wiersdorf is a self-described Emacs maximalist but he is, nevertheless, also a heavy Zotero user. I’ve written about Zotero many times before. It a package for storing, managing, and building the bibliographies for papers. See this Wikipedia article for details. Wiersdorf’s post describes how he combines Zotero and Emacs to manage his research papers.

He also recommends the citar package for handling citations. John Kitchin’s Org-ref is another excellent choice for this but the citar package works well with Zotero. Lots of folks swear by Zotero and if you’re one of those people, citar may be for you.

The other major package that Wiersdorf uses is Protesilaos Stavrou’s Denote. He describes it as a Zettelkasten-like package. Gopinathan uses Org-roam for the same thing so you should take a look at both packages to see which you like best.

Finally, Wiersdorf uses the citar-denote package to integrate denote and citar. It ties citar and denote together and allows you to easily access papers from their citation. Take a look at Wiersdorf’s post for some details.

The most important thing, Wiersdorf says, is to use Emacs to build your own system. It’s not an editor, he says, but a toolkit to build your ideal editor. That’s differs a bit from my usual definition but is certainly a good description. Regardless, the goal is to make Emacs into an editor that meets your exact needs.

Posted in General | Tagged | Leave a comment