Red Meat Friday: Commit Messages Don’t Matter

One of our sacred notions—never to be questioned—is the importance of writing good commit messages. There are hundreds of articles on how to write good messages and how to properly format them. Magit will even enforce a length limit on the first line.

But do those messages really matter? When you think about it, all the information that the conventional wisdom insists you include is easily available in finer detail elsewhere. In the case of Magit, it’s only a keypress away.

Matt Rickard makes the case that commit messages don’t matter and that our time is better spent elsewhere. My personal policy is to give a hint as to what the commit does and leave the details to diff or other appropriate commands. Once you get out of code police mode, it’s pretty clear that Rickard is right. But, of course, none of us want to get condemned for apostasy so we pretend to agree with the received wisdom.

Posted in General | Tagged | Leave a comment

Why Use Emacs in 2022

Torstein Johansen has a short video that addresses the question of why he uses Emacs in 2022. The backstory is that every time he takes a new job or consulting position, the incumbents—who all use things like IntelliJ, Eclipse, or even VS Code—stare in disbelief when they see he is using Emacs and lecture him on how much more efficient he could be if he was using a Modern Editor™.

Johansen disagrees. Maybe, he says, there isn’t a button in Emacs to automatically refactor a section of code—although such a thing could be, and perhaps has been, implemented by any user who feels the need—but what Emacs offers is speed. Speed in the sense of being the shortest path between your brain and what appears on the screen.

Johansen also makes the familiar point that Emacs has a consistent set of shortcuts that work for virtually all the packages that run inside it. Those shortcuts allow efficient navigation of editing of whatever buffer happens to have focus. He notes that this is so comfortable that Emacs users typically try to stay within Emacs as much as possible.

This leads to the well-known phenomena of Emacs users trying to migrate as many tasks as possible to within Emacs. Johansen considers himself “a bit out there” because he handles his email from within Emacs. I found that amusing since I do the same and more. As I said many times, virtually all my tube time is spent in either Emacs or the browser and I’ve migrated as many Emacs shortcuts as possible to the browser and other macOS utilities.

The kids can say whatever they want about their fancy editors but the fact remains most serious programmers use Emacs or Vim.

Posted in General | Tagged | Leave a comment

Spacing in Displayed Mathematics

Most Irreal readers probably don’t have much need to typeset mathematics but occasionally the need does arise and if you’re like me, you want it to look as good as possible. Most of us will never be as good as the people who do this professionally but LaTeX gives us a good head start and learning a few style rules means we can produce typeset mathematics we can be proud of.

Nick Higham has a short post on his guidelines for spacing in the typesetting of displayed mathematics. It might seem like this is not something we should concern ourselves with or even something we can control in LaTeX but there is plenty of ways to control such things. Consider, for example, two equations on the same line: \[ax+b=c \quad x^2+y-d=0\] and \[ax+b=c \qquad x^2+y-d=0\] The second looks better because I inserted a double quad instead of a single quad between them. Higham has other examples of small spacing tweaks that makes the final text look better.

Take a look at his post. It’s short and easy to read and may help you produce better mathematical output.

Posted in General | Tagged | Leave a comment

DWIM Shell Command On Melpa

A quickie with some good news. Álvaro Ramírez’s excellent dwim-shell-command is now available for download from Melpa. I’ve written several posts on this package [1, 2, 3] and really like what Ramírez is doing with it so I’m glad to see it’s now easily installable.

Ramírez’s post says that the package should soon be on Melpa and when I checked, it was already there. Ramírez has links to his previous posts on his announcement so if you aren’t already familiar with it, you should take a look. His posts give you a good idea of what it can do. If you’re like me and want to make Emacs the nexus of your computer activities, this package is a boon.

Posted in General | Tagged | Leave a comment

Programmers and the Flow

Every programmer knows about the flow. They know about it even if they don’t know the word “flow”. Sadly, most other people are not familiar with the concept. Especially members of the management class. This cartoon captures the idea perfectly.

But there’s a practical matter. What should a programmer do about the clueless manager (or colleagues) who think nothing of toppling the carefully constructed tower of cause and effect?

Erik Dietrich has an answer. The TL;DR is that you should present your manager with a list of numbers and offer to buy lunch if he can add them up in his head within 30 seconds. Once he starts, you interrupt him with random questions and observations until he gives up in despair.

It’s a delightful idea and seems attractive but I’m not sure it would work. The problem with the type of interrupter we’re talking about is that they think whatever they imagine their current problem is, it’s special so the usual rules don’t apply. That’s true even if their current problem is, “when do you think you’ll complete that task I asked you to do.”

Still, it’s an amusing idea and worth a read even if you probably wouldn’t use it yourself. The hard truth, though, is that the only real solution is probably working late where there’s no one around to bother you. Perhaps working from home will be the ultimate solution.

Posted in General | Tagged | Leave a comment

Digital Nomads in 2022

Long time readers know that I’ve been fascinated by the idea of digital nomads since reading Mike Elgan’s article on The New Bedouins in 2007. Back then, it was mostly journalists and a few IT people who were able to live the life of the digital nomad. Since then, the practice has become much more common and there are now many companies that operate exclusively with remote employees.

The practice has become so mainstream that even Bloomberg has taken notice. They’ve published an article that serves as an update on digital nomadism. Being a digital nomad is a little different from what’s become known as “remote work”. The digital nomads don’t want to work from home; they want to go to exotic, usually warm, places. They’re very apt to move on after a few months for somewhere new so they’re not digital expats either.

Of course, being Bloomberg, the article makes the point that the digital nomadic life may not be for everyone and can be fraught with difficulties. There are local laws and tax issues to deal with and as the article observes, the beach is just about the worst possible work environment.

If, like me, you’re fascinated with the idea of working from exotic, pleasant places, take a look at the article. They even have a list of the top five destinations (for various values of “top”).

Posted in General | Tagged | Leave a comment

The Case for Emacs, Vim, and Nano

Over on the Red Hat site there’s a post that makes the cases for the Emacs, Vim, and Nano editors. That may seem like blasphemy to some but different people do have different needs and expectations from their editors.

The first problem is that the post begins with the quote, “Text editors. They aren’t something that most users put a lot of thought into.” Huh!?! Sometimes it seems like that’s all we think about. As ESR once said, programmers spend most of their tube time in their editor so of course we spend a lot of time thinking about them.

I’ve used all three of those editors, although I’ve used Nano only when building a Gentoo Linux system until I could get a real editor installed. The section on Nano pretty much supports this: It’s a simple, straightforward editor that’s intuitive and easy to use. I’m not sure why any serious developer would use it other than to bootstrap a system where other editors aren’t available.

I thought the section on Vim was the best and most compelling. The writer, Ricardo Gerardi, makes a good case for Vim and details all its advantages. It’s fast, light weight, and has the wonderful composable command set.

Sadly, the Emacs section was the least persuasive. As I’ve said many times before, if you want a fast, flexible, intuitive editor, Vim is for you. If you want a programming environment that serves as a sort of operating system—or more to the point, a sort of Lisp Machine—then Emacs is for you.

As for Nano, I suppose you could think of it as a replacement for ed in those situations where you need an extremely lightweight editor to get things going but I can’t imagine using it in my day-to-day work. Of course, other folks disagree. The nice thing is that there are plenty of editors that will meet almost anyone’s needs.

Posted in General | Tagged , | Leave a comment

Red Meat Friday: Seek Help

Here’s a stunning example of retro abuse. I get that it’s fun—for some people—to revisit old tech but if this looks good to you, seek help. I’m old enough to have worked with those terminals—both the green and amber versions—and I can tell you, unequivocally, that there’s no way I’d choose to go back.

Emulations like this are fine for pranking that annoying guy at the office but I can’t imagine anyone choosing to use it. But that’s me. Judging from the comments, there are a lot of folks who disagree. Whatever floats your boat as they say but I’m happy running Emacs in GUI mode and failing that in a decent, modern terminal.

Of course, all this from a guy who yearns for his very own Lisp Machine.

Posted in General | Tagged , | Leave a comment

Mickey On Shells & Emulators

Mickey from Mastering Emacs has posted an excellent summary of shells & emulators in Emacs. The subject can be a little confusing—mostly centering around the difference between a shell and an emulator—so if you’ve ever been uncertain if you should be running shell, term, or ansi-term be sure to check out his post.

If you’ve used any of those you know that they all have limitations. Mickey’s post tells you how to work around some of those limitations and how to do things like change the default shell or stop the duplicate echoing of shell input. He also discusses Vterm and Eshell.

Mickey’s first recommendation is to consider whether you need a shell at all. Emacs, after all, has Dired for file manipulation, Magit for Git interaction, built-in network utilities, and the compile function to compile and test your code. Even as a long time command line guy, I’ve found that I rarely need to invoke a shell these days.

If you do need a shell, Mickey recommends either shell or eshell. These have the advantage that you’re working in an Emacs buffer so you have all the usual Emacs capabilities available for working with the text. I like Vterm because it gives a much better emulation than the others but as Mickey says, you won’t have the valuable Emacs features available for working with the buffer.

Finally, there’s a long list of comments that are also worth reading. Especially Ramin Honary’s comment on using coterm for better terminal emulation. As always with Mickey’s posts, this one is very much worth reading

Posted in General | Tagged | Leave a comment

Google and Your Data

I’ve told you, and told you, and told you but some people aren’t listening. Here’s a tweet from a graduate student who, as part of a Digital Archiving class, had a list of people running in a local election and stored it on her Google drive. Google, of course, deleted it.

The tweet itself is bad enough but follow the thread by clicking on “Read the full conversation on Twitter.” In particular, take a look at this response:

Years of data lost because some Google algorithm got it wrong.

Kramer appears to be pursuing a graduate degree in Library Science so you’d think she’d be a little bit more savvy. Google has a well established track record of doing this sort of thing and as someone interested in digital archiving you’d think she’d know this. Or at least that her professor would.

As I’ve said before, I used to feel sorry for these people but no longer. If you keep committing your data to a service that thinks it’s their duty to delete your data for various dubious reasons, you’re going to get what you deserve. At least backup your data on a portable drive. They’re dirt cheap: even a grad student should be able to afford one. Just don’t expect tears from me.

AFTERWORD

After I wrote this but before I published it, this story appeared. Just think: a million words lost. Irreal knows about a million words and it is, believe me, a lot to lose. To be sure, this is in China but the principle is the same. Commit your work solely to someone else’s computer and you’re going to suffer.

Posted in General | Tagged , | Leave a comment