Prosecuting the Press

As you all know, Irreal doesn’t think very highly of journalists and the press. What Irreal likes even less is know-nothing politicos who nevertheless feel fully qualified to opine and pass judgment on technical matters. The Congressional hearings on social media companies are an excellent example of the phenomena.

Brian Krebbs provides us with a particularly egregious example. Suppose you’re the head of a large organization and that your organization’s Website embedded the social security numbers of over a hundred thousand of your employees in the site’s HTML. Suppose further that when an area newspaper informed you of this problem and held up their story on it until you could fix the problem, your response was to complain how much it would cost to fix the problem and to seek criminal prosecution of the reporter who worked on the story.

The story beggars the imagination and is made worse by the fact that the “large organization” is the State of Missouri and that its head is, of course, the Governor, Mike Parson. The level of cluelessness about how the Web works, what constitutes “hacking”, and the First Amendment to the US Constitution is astounding.

I have no idea about the politics of the St. Louis Post-Dispatch—Media Bias/Fact Check says they’re left-center—but Parson is a Republican so it’s a reasonable suspicion that he and the Post-Dispatch have had an adversarial relationship. But even if the Post-Dispatch has been a thorn in Parson’s side—even if they’ve been unfair to him—that doesn’t justify his ridiculous reaction. If his staff doesn’t fill him in on reality, the courts surely will.

If you live in Missouri, you might have a few questions. Two such questions are:

  1. What kind of people do you have building the state’s websites? Why would anyone think it okay, safe, or secure to embed social security numbers in the HTML?
  2. How can it possibly cost 50 million dollars to fix this?

If you’re a Missouri resident, you can probably think of a few more questions.

Posted in General | Tagged , | Leave a comment

Lets in Elisp

John Kitchin has a short video in his Scimax channel that considers another Elisp construct. This video talks about let and its siblings. One of the first non-trivial things a new Lisper learns is how to deal with local variables using let.

If that didn’t make sense to you, Kitchin’s video explains it all. If you’re familiar with any of the Lisp dialects, you’ll also be familiar with let. It turns out, though, that there’s still a bit to learn. Elisp has additional let constructs that are reminiscent of Common Lisp’s destructuring-bind.

The first, let-alist, binds each car of an alist to its corresponding cdr. If you have to deal with several entries in an alist, it’s a way of referring to an alist value by name instead of the normal assoc/car/cdr dance.

The second, seq-let, is similar except that it takes two lists. The first is a list of symbols that are bound to the corresponding items in the second list. This is basically a scaled down version destructuring-bind.

Finally, Kitchin mentions pcase-let, which binds patterns to values. It’s much more complex than the others so Kitchin doesn’t discuss it in depth.

This is a short video, 12 minutes, 12 seconds, but it’s really useful for Elisp n00bs and those not familiar with let-alist, seq-alist, and pcase-let. If you fall into either category, be sure to take a look.

Posted in General | Tagged , | Leave a comment

Zamansky-79: Project.el

Mike Zamansky, on the heals of his last video, has another offering in his Using Emacs Series. This time it’s about the new Project library built into the latest Emacs. If you’re familiar with Bozhidar Batsov’s Projectile package, you can think of Project as a pared down, built-in Projectile.

Zamansky is refactoring his Emacs configuration and trying to keep down the bloat. Since he doesn’t use the Project/Projectile functionalities very often it makes sense for him to see if he can replace Projectile with Project.

The video takes us through the Project workflow and concludes that, at least for Zamansky’s needs, it’s a decent replacement for Projectile. There’s no doubt that Projectile is more complete and polished at this point but Project will no doubt evolve to meet the needs of its users.

Projectile has long been a popular project and many people swear by it. I’ve never felt the need for what it offers so I have nothing to offer in the way of informed advice. By way of uninformed advice, I’d say try out Project and if it works for you, investigate Projectile.

The video is 11 minutes, 39 seconds so you can probably fit it into a coffee break. The good news is Zamasnsky is promising more videos in the near future.

Posted in General | Tagged | Leave a comment

How Kitchin Uses Elfeed

John Kitchin has been vlogging up a storm. He’s producing so many videos, Irreal is having a hard time keeping up. One of his recent offerings is a really great1 video on one of my favorite Emacs packages: Elfeed. Elfeed, of course, is the Emacs RSS reader. My use of it is pretty much out-of-the-box: it had everything I needed and in any event there weren’t any obvious ways of customizing it short of digging into the code. Kitchin, of course, showed that for the nonsense it is. He’s made numerous tweaks without touching the Elfeed source code.

The first thing that struck me was that he set up a timer to update his feed database automatically, much like email. Elfeed doesn’t have that built in but it’s a trivial one command addition to the Elfeed config to implement it.

He also sets some font faces so that article headlines display in a different color depending on their subject matter. The latest Elfeed README has some guidance on how to do this. If this appeals to you, it’s easy to do and Kitchin explains one implementation.

For most people, Kitchin’s biggest tweak is probably his implementation of scoring. He used to have a home-grown solution for that but now uses the elfeed-score package. It provides Gnus style scoring so that articles that are of the most interest to you are at the top. If you have lots of feeds, seldomly check them, or have limited time to deal with them, scoring is an excellent way of concentrating on the ones most important to you.

Being a researcher, Kitchin also has several functions to do things like email an RSS entry to a colleague, capture an entry into his bibliography database and store links for later use.

If you aren’t an Elfeed user, you should be. If you are an Elfeed user, you should definitely watch Kitchin’s video; it has a ton of useful ideas to make your workflow better and easier.

Footnotes:

1

The video mentions Irreal, which is gratifying but not why I think it’s great. For more on that, read on.

Posted in General | Tagged | Leave a comment

Zamansky-78: Grading Workflow

Mike Zamansky has come up for air and after a long hiatus, he’s back with another video in his Using Emacs Series. This video is about his project grading workflow. That may not seem to interesting to some folks but, as usual, he leverages Emacs and some new packages that he hasn’t discussed previously.

If you haven’t been a teacher, you probably have no idea what a chore grading is. If you want to evaluate your students fairly, you have to bear down and can’t just phone it in. Therefore, anything that eliminates routine chores and makes the process run more smoothly is a real win.

To a first approximation, Zamansky use GitHub and GitHub Classroom to handle his homework and project assignments and their grading. GitHub provides a very nice infrastructure for teaching and coordinating with students. That was true before COVID-19 and is probably more true now. The problem with it is that it’s Web based and involves a lot of clicking when you’re dealing with several students and their repositories.

Zamansky deals with this by cloning all the student repositories to his local machine. That’s a win because he can then deal with everything from inside Emacs. For example, if he wants to compile and run some student code, that’s easy from within Emacs.

A typical workflow is grading a project. Zamansky first runs consult-find to find all student programs implementing the project. He can direct all the paths to a separate buffer from which he can visit each in turn. There’s no navigating to each student, then to the proper project, and finally to the code. Everything is right there so he can simply step through the list. This is handled through the consult package.

Likewise, he can communicate with a student by leveraging the forge package to raise an issue in the student’s repository. Similarly, a student can raise an issue that can be downloaded with forge. Finally, Zamansky can use the Embark package to render PDFs or link in a separate utility, although he usually prefers to render it directly in Emacs.

If you’re interested in this sort of thing, you can also take a look at this 2014 blog post and video from John Kitchin on how he handled things then: blog post, video. I’m sure he’s evolved his system subsequently but it was already pretty powerful and completely Emacs based.

Zamansky’s video is 18 minutes, 39 seconds long so plan accordingly. It’s interesting even if you aren’t a teacher. In any event, it’s nice to have Zamansky back.

Posted in General | Tagged | Leave a comment

Discarding Git Commits

Guangwang Huang (Whatacold) has an instructive video on how to discard commits using Magit. There are three methods:

  1. Hard reset
  2. Revert
  3. Soft reset

They all have advantages and disadvantages. A hard reset is fast but the discarded commits are deleted. The other two methods are safer but involve more typing. You can get all the details by watching the video.

Using either reset can seem like a scary proposition but Whatacold shows that they are both straightforward and easy to understand. If they still seem too fraught, you can always use revert. It generates more commits but doesn’t seem as scary.

The video is 9 minutes, 25 seconds so it should be pretty easy to fit in.

Posted in General | Tagged , | Leave a comment

Spell Checking Kitchin Style

John Kitchin has another video up in his Scimax series. This one is about how he handles spell checking in Scimax. As I watched the video, I thought that his setup was really new and different but it turns out that it’s all built on top of flyspell and Aspell with some help from flyspell-correct and flyspell-correct-ivy (included with flyspell-correct).

Watch the video to see how it all works. There’s no reason you can’t integrate Kitchin’s system into your own. There’s not a whole lot of code involved as you can see from scimax-spellcheck.el. The hydra that he discusses in here.

The video is 7 minutes, 23 seconds so it should be easy to fit into a coffee break.

Posted in General | Tagged | Leave a comment

Red Meat Friday: Spaces After a Sentence

Today’s Red Meat Friday is about the “correct” number of spaces after a sentence. Irreal has written about this before, most recently here, but all of you were familiar with the controversy long before Irreal opined on the matter. Oddly, the question still has stubborn partisans who will jump into any discussion of the matter to hotly defend their chosen position.

Here’s the latest fusillade, this time from Barton Swaim who reminds older folks that it’s 2021, we don’t use typewriters anymore, and there’s no need for two spaces after a sentence. Lifehacker doubles down on this and says that putting two spaces after a sentence marks you as a geezer.

It’s very true—at least according to the experts—that with modern proportional fonts, one space is the correct answer but it’s also true that it doesn’t really matter because your typesetter or rendering engine is going to use one space no matter what you input. Two-space partisans point out that given your input might very well use a monospace font and that your output will be correct however many spaces you use, two spaces make sense because they make your input easier to read and easier for a script to parse out sentences.

Of course, none of this will change anyone’s mind; that’s why this is a Red Meat Friday item.

Posted in General | Tagged , | Leave a comment

Playing and Logging a Random Album

Garjola Dindi has a delightful blog entry on how he leverages Emacs to enjoy his music. Dindi was nostalgic for the days when listening to music meant putting a vinyl disk on the record player. Back then, the friction of listening to recorded music meant you put on an album and listened to whole thing. These days, of course, Dindi’s music is digitized and lives in his computer.

Part of that means that now it’s possible to listen to a single track from one album and then switch to another track on some other album but Dindi wanted to experience the whole-album experience again. He uses EMMS to listen to his music so it was pretty easy to do what he wanted. He simply brought up an EMMS buffer with a list of his albums, used the random function to choose a line number, and goto-line to go to that album and then played it. He also logged it to an Org file so he would know what albums he had listened to.

All you Emacsers out there are jumping up and down and screaming, “Automate it. Automate it.” Of course, that’s exactly what he did. It turned out to be really easy: he basically just wrote some Elisp to call the same commands he was using to do it manually. He also added some code to make the log entry.

The code is simple but the point, as Dindi points out, is that with Emacs it’s possible to combine different applications that weren’t designed to work together to solve whatever problem you’re having.

Posted in General | Tagged , | Leave a comment

They Don’t Want to Return

CNBC has an interesting article about large-organization CEOs’ frustration at trying to get their workers back into the office. Workers have little interest in returning. Part of that is fear of COVID-19, of course, but many, having experienced the freedom and increased productivity of working from home, are in no hurry to return to the more constrained environment of the office with its meetings and micromanagement.

The obvious observation is that maybe the CEOs are asking the wrong question. Most of them have spent their whole working lives in a well defined, perhaps even regimented, system in which of course employees came into the office to work. How could it be otherwise? But perhaps the right question is, “How can we get our jobs done with a remote work force?”

Meanwhile, over at Medium, CodeX says that the office exodus is a movement. This article is specifically about developers but the same principals probably apply to other disciplines. Senior developers are leaving companies to go out on their own. Those who are staying are demanding remote work as a sine qua non.

Managers who believe or hope that things will go back to the way they’ve always been are probably kidding themselves. COVID-19 will be with us for a while longer and even afterwards people are going to be loath to return to their cubicle farm—or worse, open plan office. The smart CEOs will be asking themselves how to best take advantage of the new reality.

Posted in General | Tagged , , | Leave a comment