Chrome Incognito Mode

Why oh why won’t you listen to me? I keep preaching the gospel but you keep ignoring me. It’s not the end times, exactly, but there is an important point to be made. That point is: STOP USING GOOGLE CHROME OR ANY OTHER GOOGLE PRODUCT. Google is not your friend. Their sole purpose is to exploit you and capture as much data about you as possible in service of their advertising empire.

This latest tirade is prompted by this and this article that discuss Google Chrome’s incognito mode. The problem is that Chrome’s incognito mode is not very incognito. Don’t take my word for it, read the article and see what Google’s engineers say about it. The discovery from a lawsuit reveals emails from Google’s engineers making jokes about how insecure the mode is and saying that it should be compared to Guy Igcognito from the Simpsons. Again, this is not outside critics saying this, it’s Google own engineers. Go ahead. Read it and see what Google’s own people think about Chrome.

I don’t use Chrome so I can’t speak authoritatively about it but from everything I’ve read, it’s a pretty good browser except for the fact that it vacuums up everything you do and reports it to Google. Stop enabling this sort of psychopathy; use a browser that at least pretends to respect your privacy. If you’re on macOS, Safari isn’t a bad choice. If you’re on Linux or (shudder) Windows, consider Firefox. Firefox really has made strides in protecting their users’ privacy. There are plenty of others too, but I don’t really know much about them so I can’t make any intelligent comments about them.

One thing for sure: you need stop using Chrome. It doesn’t bring anything other than spyware to the table that you can’t get elsewhere.

Posted in General | Tagged | 3 Comments

Emacs Keystrokes in macOS

This is your periodic reminder that you can get most of the Emacs editing keystrokes in any macOS application. I usually publish this reminder when I see a tweet or post from someone who has discovered that the Emacs cursor movement keystrokes work in macOS.

Here’s the tweet that inspired this post:

That’s great, of course, but you can do much better. You can, in fact, arrange to have most of the Emacs editing commands available everywhere in macOS. Here’s my original post that explains how to do that. The links in that post lead to a Harvard server that sometimes is not available. If it’s down when you try to get the keybindings file, you can get it here. If you prefer using Esc instead of the ⌥ Opt key for Meta, get this file instead.

Having those keystrokes available takes some of the sting out of having to leave Emacs to use some Apple specific application. I don’t know Leo Shimonaka and I’m not on Twitter so if any of you do know him, please point him at this post or otherwise let him know what to do to get all the Emacs goodness possible.

Posted in General | Tagged , | 1 Comment

Red Meat Friday: Europe Brings the Regulation

There’s an old joke about some proposed device that would benefit the world. The U.S. said, “We’ll bring the design.” China said, “We’ll bring the manufacturing.” Europe said, “We’ll bring the regulation.” That’s a bit unfair, of course, but like all satire it has a kernel of truth.

Case in point. The EU has finally made good on their crusade to make everyone use the same charger cables. It’s easy to feel that this a largely a good thing. After all, it will reduce the number of different types of chargers and make users’ lives marginally easier. We here at Irreal are not fans of this sort of thing.

First of all, the diverse cables are not really much of a problem even by first world standards. Yes, it’s a minor inconvenience but in the Irreal bunker we have MacBooks, iPhones, and iWatches all of which use different cables but it just never occurs to us to complain or think the different cables are an imposition.

Secondly, this is the classic case where the market really does work. If people actually feel strongly about this issue, they’ll punish those companies—and let’s be honest, we’re talking about Apple here—that don’t offer a standard interface by buying from their competitors.

Finally, and most important, why in the world would we let a bunch of bureaucrats with no real knowledge of the technology involved decide what type of electronics can be offered? You can be sure that these people all had the time on their DVRs flashing all through the 90s and perhaps even today. They are the absolute last group of people any rational person would want making these types of decisions.

Judging by the comments on the issue, the Irreal position is not the popular one but it is the correct one.

Posted in General | Tagged | 0 Comments

The Ethics of (Self) Job Automation

Back in January, I wrote about the story of a developer who automated his job with some scripts and then spent the next few years pursuing his own interests at work while letting his scripts do his job.

Many people have an immediate reaction that this isn’t right, that the developer was somehow cheating his employer. That idea is deeply ingrained in us but consider: the job that the employer was paying for was getting done and probably with fewer errors than before. The total benefit to all concerned was increased so why was it dishonorable? Yet the feeling of unease persists.

In 2018 The Atlantic published an article—since resurrected by Pocket that explores this issue. Surprisingly, even among the developer community the reaction was pretty much equally divided with half feeling that such action was cheating and half failing to see the problem.

It turns out that such automation is surprisingly frequent. Unsurprisingly, most of the developers who have done so have kept their actions to themselves feeling that far from being rewarded, they would be punished for their initiative. They may have a point. There are several stories of those who automated their jobs being fired because, after all, there was nothing left for them to do.

When you hear stories like that, it’s harder to be on the “it’s cheating” side. Take a look at the article and see what you think.

Posted in General | Tagged | 0 Comments

Org-mode Is Easy

Gavin Freeborn posted a video in which he argues that Org-mode is easy. The reason it’s easy, he says, is the same as I’ve often written: You don’t have to learn it all or even large parts of it to make effective use of it. It has so many aspects that it’s possible to treat them almost as disjoint applications. There’s the outlining functions, the TODO/agenda functions, the write once publish everywhere functions, the code block/literate programming functions and much, much more.

Serendipitously, Freeborn’s video offers proof of this, at least to me. He demonstrated some of the features that were most useful to him and those features are not the ones I find most useful. I don’t even use some of his “most useful features”. This despite the fact a huge portion of my Emacs work is done in Org-mode.

So, as I’ve said before, the way to learn Org-mode is to use one tiny aspect of it to solve a particular problem. Once you’re comfortable with that, use some other aspect to solve another problem. After a while, you’ll find that you’ve learned most or even all of Org. I’ve heard lots of people say they couldn’t get into Org or didn’t see the point but I’ve never heard someone who knows Org decide it wasn’t worth it. Believe me, it is worth it.

The video is 19 and a half minutes long so plan accordingly.

Posted in General | Tagged , | 0 Comments

A Formula for the nth Prime

As some of you know, I was trained as a mathematician. I’ve always been a bit of a math nerd and read about mathematics even as a child. Long ago, probably when I was still in elementary school, I read that there was no closed form formula for calculating primes. That is, there was no formula that you could plug n into and get the nth prime as a result. That fact has been an article of faith for me for essentially my entire life. Except it isn’t true.

In 1964, C.P. Willans produced such a formula. Here it is:
pn=1+i=12n(nj=1i(cos(j1)!+1jπ)2)1n
where pn is the nth prime.

There are a couple of things to notice about the formula:

  1. It uses only elementary mathematical operations. The most complicated one is the cos function.
  2. It’s hugely computationally expensive. That first sum has an upper limit of 2n, which grows very quickly and the inner sum has a factorial which is also computationally expensive for large n.

The second thing is why the formula isn’t really very useful. It just takes too long to make the calculation for even moderately large n.

Even more interesting is why the formula works. Primes, after all, are distributed randomly so the existence of such a formula is a surprise. The reason it works is the most surprising thing of all: it’s essentially a program that tests each integer for primality, producing a 1 if so and a 0 if not. When the (outer) sum is n, you’ve found the nth prime.

That sounds complicated but it’s really simple. Eric Rowland has a video that explains the formula in very simple terms that any Irreal reader will understand. It’s less than 15 minutes and definitely worth watching is you have even a little bit of interest in these things. If nothing else, it’s an example of a simple mathematical formula implementing a program.

Posted in General | Tagged | 0 Comments

Extract Captions From a Youtube Video

Ag Ibragimov had a problem that many of us have experienced. He learned a term from a video but later couldn’t recall the term. We went back to the video to search for it but couldn’t find it. What to do?

Ibragimov realized that he was working too hard and that what he really needed to do was capture the close captioning from the video. This was meant to be a one-off to solve a specific problem so he didn’t do anything fancy. He used youtube-dl to grab the video and wrote a bit of Elisp to extract the actual text.

After a while he realized that it was generally useful and bundled everything up into an Emacs package. Since then he’s added timestamps to the output. He’s not yet pushed it to Melpa but perhaps that will come later when he feels the package has stabilized.

This package, like many, resulted from a small itch that Ibragimov scratched by leveraging an existing command line app and writing some Elisp to process the data that it retrieves. It was later that he realized that he could use it again for other videos and that it might be useful to others too. It’s something to remember when you consider whether it’s worth writing some code for a task that you could do manually. Maybe you can’t amortize your time with a single use but it’s also possible that you and others will find it generally useful.

Posted in General | Tagged | 1 Comment

Mandated Editor

I recently came across a truly awful post to the Emacs subreddit. It wasn’t the post itself; it’s what it revealed. The post asked how to counter FUD from users of the bling-centric editors that Emacs was old technology that couldn’t hope to compete with “modern” editors such as VS Code and Jetbrains. There’s nothing wrong with that, of course. As keepers of the faith, it’s our duty to counter and shutdown that nonsense whenever it raises its head.

Rather, it was the backstory that was disturbing. The story is about his old company and a friend who is still there. That company has recently decreed that all developers have to use VS Code: it’s the new company standard.

There’s nothing wrong with VS Code, of course, although users may want to think twice before committing. The problem is telling developers they have to use VS Code. Can you imagine trying to tell a surgeon they had to use a certain brand of scalpel? You’d be told to go pound sound before you could draw your next breath.

I’ve told the story before about the clueless technical manager who proposed such a mandate at a company I once worked at. I and the other senior developer were able to explain the facts of life and aborted the disaster before it occurred. As you all know, we here at the Irreal bunker are all in on Emacs but we believe that choosing an editor is like choosing a mate: others may disagree with your choice but it’s none of their business. More succinctly: choose whatever editor works best for you. Everyone else should butt out.

Mandates like this are always imposed by people who don’t actually do development. They imagine they’re encouraging a shared development culture but what they’re actually encouraging is a mass exodus. I don’t know about you but I’d be out the door in an instant if some suit presumed to tell me what editor to use.

Posted in General | Tagged | 2 Comments

Dictionaries and Emacs

Somewhere in 2014–2015, I came across James Somers’ beautiful article on Webster’s 1913 dictionary and why it’s the right choice. It was a revelation to me, opening my eyes to a wonderful resource that ever since has helped me find just the right word when I’m writing. I loved the article and even put it in my “blog ideas” queue although I felt that it wasn’t something most Irreal readers would care about.

In that, as in so many other things, I was completely wrong. In 2015, I finally found a hook for the post—DuckDuckGo bang shortcuts—and published Draft #4 about it. That article and the others in the series have, judging by engagement, turned out the be arguably the most popular posts in the Irreal corpus.

It probably seems strange have a series of articles on this subject but it was necessitated by the disappearance of the dictionary from the University of Chicago website and a desire to make it available from within Emacs. Somers’ article itself has proved to be tremendously popular—Somers says it has been read over 130,000 times—and people are constantly discovering and commenting on it. There always seems to be something new to report about it.

The latest thing was something I’ve just discovered: As of Emacs 28.1 you can access Websters 1913 from within Emacs without loading any packages or data. That’s really great because it means, essentially, you get the dictionary for free. The above post gives you the TL;DR on how to do that.

There turns out to be more to the story and, of course, Mickey over at Mastering Emacs has all the details. The new Emacs capabilities depend on a client/server protocol for dictionary lookups that Emacs implements in dictionary.el. There are more capabilities than the dictionary-search function that I wrote about. There are also some navigation shortcuts to make moving around easier. If you prefer local copies of your dictionaries, you can arrange to run a server on your own machine. Take a look at Mickey’s post for all the details. The short story is there’s a lot more to dictionary.el than I thought.

Posted in General | Tagged | 2 Comments

Red Meat Friday: Is The FSF Fighting The Previous War?

This is a bit genuine red meat and perhaps a little sensitive for some people but it does raise a point that deserves discussion. A shorthand for that point is the title of today’s post. A more descriptive way of describing it is, “Is the FSF’s demand for purity actually harming the users they’re striving to protect?”

Some people obviously think so: that’s why we have the OSS movement. I don’t know anyone who doubts the goodwill or sincerity of RMS and the FSF. I certainly don’t. But it’s still worth asking if the policies they’re pursuing are helping or harming the goal to which they’re devoted.

Ash, over at gay robot noises, has a post that explores how she thinks RMS and his insistance on purity are hurting the Free Software movement. She, as do I, has tremendous respect for Stallman but worries, as the title suggests, that he’s fighting a war that’s no longer going on. I disagree with her conclusion that the FSF has lost the battle. I believe that while they haven’t won it, they certainly haven’t lost it either. Take a look at her post and see what you think.

Ariadne Conill makes a similar case for hardware. She says that strict adherence to the FSF’s Respects Your Freedom program means that you’ll be using only obsolete and probably broken hardware. No one but a Free Software Aesthete is going to do that so the FSF is crippling their crusade for free hardware.

I have my own data point in this discussion. Back in May, there was a long thread on Emacs-Devel about removing ns-do-applescript from the Next Step branch. The problem, according to the instigator, was that applescript runs only on macOS which is not a free operating system—although it does represent over 25% of Emacs users—and therefore ns-do-applescript should not be in Emacs. Notice that code was already there so the poster was proposing more work just because of a purity issue. When I objected on the grounds the code wasn’t hurting anyone, was useful to Mac users, and that it didn’t make any sense to make Mac users lives more difficult, I was told that the FSF was not interested in making Mac users lives easier. On the contrary they wanted to make it more difficult so those users would abandon macOS and move to Linux. I’ll let you draw your own conclusions. If you’re particularly masochistic, here’s the start of the thread on Emacs-Devel.

I understand the FSF’s insistence on “no inch given” but I do think that it may be time to explore how well that’s working out.

Posted in General | Tagged , | 3 Comments