Unix Names Explained

There doesn’t seem to be much going on today but, fortunately, we’ve not yet reached the end of the internet. Instead, I offer those of you who didn’t grow up with the Unix command line some insight into where all those weird command names came from.

Actually, it’s not me offering this insight but Indiana University. This page from their knowledge base explains what some of those command names mean.

Posted in General | Leave a comment

Online Privacy; Real World Privacy

I’ve been a big fan of Daring Fireball for years. Sadly, of late it’s devolved from being a tech blog that occasionally mentioned politics to a political blog that occasionally mentions tech. Nevertheless, Gruber can still bring it when a tech issue captures his imagination or raises his ire.

He’s at his best in this post about online tracking and privacy. He starts by mentioning the new anti-tracking features of iOS 14 and how the advertising industry—led by his bête noire, Facebook—is up in arms about the changes. So much so that there are rumors that Apple may delay enforcing the new policies for a few months.

I don’t understand why Apple would do this and neither does Gruber. Or if he does, he’s definitely not sympathetic. As Gruber says, the sense of entitlement of these people is unbelievable. They have no right to our private data and browsing habits but because they’ve been getting away for so long with taking them anyway, they find any attempt to stop them unreasonable.

Gruber notes that we wouldn’t tolerate this in the real world where it would most accurately be described as stalking. But because the tracking is invisible to most people, the adtech industry has been able to spy on us with impunity for many years. Now that Apple is threatening to put an end to this malignant behavior, the adtech industry is crying foul.

So what are these onerous changes that Apple is proposing? Simply that before allowing access to the iOS device ID—more accurately the IDFA: Identifier for Advertising—the user would have to okay the access. Nobody is going to agree to being tracked, of course, so the adtech miscreants are crying Danger Will Robinson, Danger.

My hope is that Apple does not delay this common-sense, user-friendly change and that when it is finally implemented it will strike a fatal blow to the adtech industry.

Posted in General | Tagged | Leave a comment

Avi Navigation

Over at the Emacs subredit, RecursiveTraverser says that of all the Avy navigation commands he likes avy-goto-char-timer the best and asks if anyone else agrees. Those who answered agreed with him but there’s no reason to prefer it to the exclusion of the others.

As I’ve written before, I often use avy-goto-char-timer but I more often prefer avy-goto-word-1, which works well for most cases. The important thing is to use these functions—or even isearch as recommended by Steve Yegge—rather than moving the cursor around by hand with Ctrl+n, Ctrl+p, Ctrl+f, Ctrl+b, or, even worse, the arrow keys.

The avy-goto-word-1 command is by far my most frequent way of navigating around a buffer. I’ll occasionally use avy-goto-char but that tends to be too noisy so I just use one of the other commands to get to the beginning of the word and then move to the proper character. This is one the times that avy-goto-char-timer is useful. You can specify a few characters and get right to where you want to be. I also use it when I have many words with the same prefix and want to go to one particular word. An example is my journal that may be showing a single, say, “Wednesday” but many instances of “Wed.” I can call avy-goto-char-timer and type “wedn” to go right to the word I want more easily than any other way.

The main takeaway from this post, though, is that you should definitely by using the Avy navigation functions. If you aren’t, you’re working too hard.

Posted in General | Tagged | Leave a comment

Gnus

I am really enjoying mu4e again after fixing the problem that caused it to be so slow. As I’ve said before, I’m very happy with mu4e and don’t have any desire to replace it. Nevertheless, I always find it interesting to read about other mail clients. The gorilla of them all is, of course, Gnus.

Everyone will tell you that Gnus is large and scary but very powerful. You can use it to read and send mail, to follow your RSS accounts, or use it for its original purpose of reading Usenet. I remember being impressed that John Wiegley, the Emacs maintainer and a Gnus power user, set a Gnus keyword flag in Gnus to bring any post in emacs-devel to his attention if it had “John?” in it. You can hear all about that and some of the other ways he uses Gnus in this Emacs Chat with Sacha.

If you’re wondering whether or not to start using Gnus, there are a lot of resources to help you decide. There’s the Emacs Chat a linked above, another Emacs Chat with Wiegley that also discusses Gnus, and, finally, a recent video by Protesilaos Stavrou.

Stavrou has recently moved from mu4e to Gnus. The video discusses how that has helped his workflow but most of the video is a demonstration of Gnus and some of the things you can do with it. One of the really great things about Gnus is its scoring of posts and emails. It brings the most important content to the top of your lists and can even hide threads, say, that you no longer have any interest in.

Take a look at Stavrou’s video to get an idea of some of Gnus features. If you’re still interested watch the two Emacs Chats. Watch them anyway; Sacha’s chats are always worth your time.

Update [2020-09-06 Sun 12:14]: GNUS → Gnus.

Posted in General | Tagged | Leave a comment

Grading With AI

The Verge has a story that is at once hilarious, infuriating, and deeply disturbing. In this time of COVID-19 much education has moved online. Except for scale, this isn’t really new. It’s been possible for many years for children to get their education online. Some students—especially high school students—prefer that option to dealing with all the nonsense a traditional high school education entails.

Now, of course, we’ve had to scale up to include almost everyone and those providing that education are new to dealing with online learning. It’s hard for teachers used to the classroom but not impossible. I have a family member who is a middle school teacher and she has mostly tailored her classes to run through Zoom. Mike Zamansky, of Using Emacs fame, is a university teacher and he, too, has adapted to running his classes online. Neither he nor my family member thinks it’s as good as in-person teaching but they’ve adjusted their teaching to provide the best pedagogy they can.

Sadly, not everyone has adapted as well. The Los Angeles Unified School District, for one, has attempted to automate the teaching and grading of several courses. That’s not necessarily bad but, as the article relates, the “AI” grading of short answer tests involved merely scanning for keywords. Of course, the students immediately discovered this and started gaming the system by simply answering the question with a word salad of any keywords that might be applicable to the question. Sometimes, even just cutting and pasting the question into the answer would work.

The school district has, of course, tried to frame this behavior as cheating but I think it merely demonstrates that the students are way smarter than the school district. If you’re going to test students, then you’re morally obligated to carefully and rigorously evaluate the answers to those tests. When you outsource that to a simple minded algorithm that simply scans for keywords, it’s you who is cheating and you should shut up about students who found you out and responded appropriately.

As I say, it hilarious that the students discovered this and reacted suitably. But it’s also infuriating and disturbing that those charged with educating our children would do so with such an inadequate and immoral system. There are plenty of teachers who are proving daily that we can do much better.

Posted in General | Tagged | Leave a comment

Wireless Charging Problems with the iPhone

Apologies to those of you who aren’t members of the cult but this is another post on Apple products. For the last year or so I’ve been using a wireless charger for my iPhone. I like it because it’s easy to pick up the phone if it rings at night or when I’ve set an alarm. When I used a wired charger I always got tangled up with the cord and ended up flexing the cable.

A couple of weeks ago, the wireless charger stopped working. It was an inexpensive Anker that had worked perfectly for me so I just ordered a new one. Sadly, the wireless charging still didn’t work. My next thought was that it must be the power supply but before I changed that out, I put my wife’s iPhone on the charger. It worked fine.

I spent a day or two wondering what to do when it occurred to me to do what I should have done in the first place: I asked DuckDuckGo. It turns out it’s a known problem as explained here. The TL;DR is that you need to do a hard reset on your iPhone. Apparently, just restarting the iPhone sometimes helps but it didn’t in my case. As soon as I performed the hard reset, everything starting working again.

The only problem is now I have two wireless chargers. I’m sure I’ll find a good use for it. This post will probably be of no interest to most folks but if you were wirelessly charging your iPhone and it stopped working, try a hard reset. Also take a look at the link above.

Posted in General | Tagged | Leave a comment

Finite State Machines in Python

One of my favorite development strategies is using finite state machines. They’re not right for every type of problem but they have greater applicability than you might think. I’ve written several FSM-based applications almost always in C. C isn’t the only possibility, of course. You can write an FSM in nearly any language.

Arpit Bhayani has an interesting post that describes writing FSMs in Python. That language is fairly powerful and offers several possible implementation strategies but Bhayani suggests a particularly nice one: coroutines.

I think of coroutines as being the inverse of generators. Rather than having yield return a value and suspend executions as generators do, in coroutines, yield suspends the execution and waits for other code to send it a value. It’s very much like a blocking read.

Each time the FSM gets a new event, it sends it to the coroutine representing the current state through the send/yield mechanism. The coroutine uses the event to determine the next state and do whatever processing is necessary for the state transition. Bhayani offers several examples illustrating the technique. Take a look at the post for some actual code.

Posted in General | Tagged | Leave a comment

Two Clicks Needed for Menus on macOS

This is another one of those posts that are of interest only to folks using Emacs on macOS. For some time, the Emacs menus haven’t been working right for me on macOS. In previous versions of Emacs/macOS, there would be significant delay before a menu would activate. With Emacs 27.1/Catalina, it requires two clicks on a menu to activate it. I use the menus so seldomly that I’ve never bothered to investigate the matter.

Serendipity intervened, though, and I’ve discovered the cause of this problem and how to fix it. Well, actually, I did neither but st3fan complained on reddit about the problem and MorningtonCroissant explained that it’s a result of the Mac’s privacy control mechanism. The answer is to enable Emacs control of the computer—see the reddit post for the details.

That’s not the end of the story though. I already had this enabled and Emacs (or perhaps macOS) was still requiring two clicks. Onetom commented that it might be necessary to remove and add Emacs from the permission list because the permission might still be pointing at an old copy of Emacs. I did that and everything starting working just fine.

Again, this has low importance for me because I don’t use the menus much but if you are an Emacser on macOS and having problems with the menus, take a look at the reddit post and see if it clears it up for you.

Posted in General | Tagged , | Leave a comment

Typing and Bottlenecks

Today is one of those days when life intervened and I’m late in getting a post out. Life may be intervening tomorrow too so be warned. Today I saw an interesting post by Thorsten Ball that considers the argument that doing things to increase your typing speed or skills is a waste of time. The argument that it’s a waste of time says that as developers we spend a minuscule amount of time typing in code. That typing is not a bottleneck in our workflow.

That’s a beguiling argument especially if you’re not a good typist. What does Steve Yegge know anyway? As Ball points out, we may not spend a lot of time typing code but we do spend a lot of time typing other things: reports, emails, commits, and so on. He concludes that it all boils down to a matter of effort: if it’s an effort for you to type, it will adversely affect your work.

You can check out his post for the details of his argument but, really, we all know that we’re better off and can do a better job if our typing doesn’t get in the way.

Posted in General | Leave a comment

Zamansky 74: Eglot

Mike Zamansky is back with another video in his Using Emacs Series. It’s worth noting that this is number 74. That’s a huge corpus of first rate videos serving the Emacs community. If you’re in NYC and run across Zamansky, be sure to buy him a beer. He’s earned it.

In any event, the latest video is about Eglot, an alternative to lsp-mode. Zamansky was drawn to Eglot because he found lsp-mode hard to configure and, more importantly, too noisy. That mattered to him because he’s using it in his teaching and didn’t want all the popups to distract his students. With Eglot, the configuration was easier and the output wasn’t so busy.

It turned out to be pretty easy to configure for C++ an Python but, of course, Java was more difficult. But not too much more difficult. After a bit of research, Zamansky found an issue on the Eglot repository that resolved his issues with the Java configuration and now he has a consistent interface across C++, Python, and Java.

Take a look at the video to see Eglot in action. If you’re looking for an alternative to lsp-mode, take a look a Eglot. The video is just over 17 and a half minutes so plan accordingly.

Posted in General | Tagged | Leave a comment