Ten Coding Fonts

A perennial topic of interest to programmers is their coding font. I’ve been using Inconsolata for as long as I can remember. I adopted it when I was still a Vim user and carried it over to Emacs. In my more than 17 years with Emacs, I’ve never used anything else.

Shockingly, to me at least, I started using Inconsolata before some Irreal readers were born. Still, every time I see an article about someone’s favorite coding font(s) I invariably have to look. As I’ve said before, my main requirement for a font is that I can discern the difference between 0, O, o, i, I, l, L, and 1. It’s surprising how many fonts get this wrong.

Jordi Ollé Ballesté has some excellent font porn in a post that lists his 10 favorite fonts. Some are paid and some, like inconsolata, are free. As usual, I didn’t see anything that made me want to move from Inconsolata but your mileage may vary.

It is, in any event, worth taking a look. Maybe you’ll find a new font but even if you don’t you’ll probably enjoy looking at the possibilities. As Ballesté says, your choice of font can make a big difference in your coding experience. Articles like Ballesté’s show you the possibilities.

Posted in General | Tagged , | Leave a comment

Nothing Today Because I’m Exhausted

Yesterday was a lost day. I haven’t been happy with my WiFi router so I got a new one and yesterday was the day that I was going to spend an hour or so installing it and updating my network. Installing the router and updating computers, phones, and tablets] wasn’t too much trouble although the router app was less than clear on a couple of issues. All that did indeed take less than an hour.

Then came the hard part. The Irreal bunker runs on Apple Home Kit and has several smart light switches, a TV, and a security camera all running on the network. I was hoping that once I updated the hub (aka the Apple TV) everything else would fall into place. Yeah right. Nothing worked and it took me all day to figure out what to do.

In the end, I had to delete each device and readd it. But that means I had to figure out how to get the device to go through pairing procedure again. It was, to say the least, not easy. The smart switches were particularly opaque but I finally figure out the spell.

That left the camera. You’re supposed to be able to stick a paper clip in the reset hole and do a network reset that allows it connect to the new network. As if. After some more research, I discovered that you could do a complete reset by holding the paper clip in for more than 10 seconds. After I did that, the camera connected to the new network and all is well.

I’m sure there’s an easier way to do these things but I couldn’t discover them. It should be a bit easier because, after all, changing your router isn’t all that unusual. Maybe it is, but I couldn’t find the spell. In any event, the Irreal bunker is back on line and assiduously pursuing our goal of world domination.

Posted in General | Tagged | Leave a comment

Why Isn’t Lisp Used More In Production Redux

I just came across an excellent Medium article by Kenichi Sasagawa that addresses the question of Why Isn’t Lisp Used More In Production that I wrote about the other day. My post took the somewhat cynical view that Lisp lost the language wars for the same reasons that Betamax lost out to the technically inferior VHS.

Sasagawa has a different view. He considers Lisp an “intellectual toy” in the good sense of bringing joy and fun to its users. Languages like Python, he says, bring to mind drudgery more than fun. Still, Python is very popular because it makes it easy to generate a lot of code easily. The batteries, as they say, are included.

I agree with Sasagawa completely about how much fun it is to use Lisp and I agree that it brings me a joy and pleasure that other languages don’t. What I don’t agree with is his implication that these other languages are more efficient than Lisp in the sense that it’s easier to generate code. My experience has been just the opposite: it’s easier for me to generate code with Lisp than it is with other languages.

Sasagawa’s article also speaks to another of my recent posts, Marlinspike On What’s Wrong With Software Development. Marlinspike claims that current development processes—largely imposed from above—have robbed all the joy from software development.

If you care about Lisp and software development, take a look at Sasagawa’s article. It’s short and a very interesting read.

Posted in General | Tagged | Leave a comment

🥩 Red Meat Friday: Toilet paper

Toilet paper? Wha? Most of us can go our entire lives—modulo COVID induced shortages—without ever thinking about it. You buy it, you use it, you buy some more. But COVID did make us think about this everyday item and wonder why something like COVID, that didn’t seem to have any direct connection with toilet paper and its production, would so dramatically affect its supply.

Once you start asking questions and looking into things, the next thing you notice is that the sheet count of rolls keep shrinking. It’s really hard to track this because the rolls are described with terms like “super duper mega size” rather than an actual sheet count.

Mark Dent has looked into it and has tried to make sense of how much toilet paper we’re really getting. The news isn’t good. He shows that, in fact, the sheet count has been shrinking for years—long before COVID. For example, in 1966 a roll of Charmin had 650 sheets. Today it has 224. The price per square foot has increased 800%.

It’s practically impossible for the average buyer to track this because comparisons are to products that are no longer available. Not all of this can be laid to price gouging. The wood pulp market that the manufacturers depend on is notoriously volatile and industry practices make it hard to nail down a stable price.

The manufacturers, rather than simply increasing the price per roll when necessary have resorted to stealth increases by decreasing the amount of product while keeping the price constant or increasing it only slightly.

After COVID, most of us are just happy to have a reliable supply and don’t think too much about the cost. Of course many people don’t have the luxury of being blasé about the price. They need roughly the same amount as the rest of us so this stealth inflation is a real issue for them.

For years, the government has been making noises about fixing this but, of course, things are the same. Take a look at Dent’s article. It’s enlightening.

Posted in General | Tagged | Leave a comment

On Sharing The Benefits Of Emacs

Most experienced Emacsers recognize the futility of proselytizing for our favorite editor. Basically, no one but the already convinced want to hear about it. They’re sure the bling, menus, and mouse actions offered by those other editors are superior to an editor that’s older than most of them. But they lack something we have: experience with both their chosen editor and Emacs.

My own proselytizing is mostly confined to Irreal. I very rarely try to convince people one-on-one anymore. Of course, Irreal readers are mostly Emacs users so I’m largely preaching to the choir. Still, we do what we can do.

Gene Goykhman over at Flaky Goodness has a similar story. One thing I liked about his post is that he quotes Prot on the compounding benefits of learning Emacs. Yes, there is a learning curve and it’s (relatively) difficult for beginners to get going but before too long the compounding sets in and, as Prot says, we start to get more out of studying Emacs than we put in.

Of course, we can’t tell anyone this because they don’t want to hear it.

Posted in General | Tagged | Leave a comment

What Is Emacs and Why Should You Use It

Explaining Emacs to non-users is challenging. A first order explanation is that it’s a text editor but as we all know that’s a pitifully inadequate explanation. As you’re all aware, my default explanation is that it’s a light-weight Lisp Machine but that’s probably not very useful to anyone who doesn’t already know the answer.

Over at The Art Of Not Asking Why JTR attempts to give a simpler answer to the question. For him, as for most of us, the defining characteristic is Emacs’ configurability. JTR uses the metaphor of a coffee maker that not only brews your coffee but makes toast just the way you like it, orders coffee from your favorite roaster, and loads a crossword puzzle tailored specifically for you onto your smartphone. That’s Emacs. It does just what you want in just the way you want to do it.

With Emacs, your code becomes part of Emacs, virtually indistinguishable from the code that comes with the distribution. That means you have almost complete control over what Emacs does and how it does it. It’s hard to think of any other piece of software for which that’s true.

We all have our Emacs story and why we love it and JTR’s is a nice example of the genre. Probably no one but JTR will be completely satisfied with his story because, as I say, we all have our own.

Posted in General | Tagged | Leave a comment

Working From Home: Is The Dream Over?

I am so tired of reading the same excuses and nonsense from psychopathic control freaks on why it’s absolutely necessary for the good of the company/city/country/world/universe that all workers return to the mothership office.

The latest horrifying example is from the City of Philadelphia. The Mayor, Cherelle Parker, is convinced that worker presence in the office is necessary for equity because it promotes stronger social connections, better collaboration and fairness in the workplace. She didn’t mean it, of course. That silliness about connections and collaboration has been debunked over and over by actual research as opposed to the “gut feelings” relied on by the control freaks whose “leadership philosophy” boils down to having everyone in their seat so that the managers can be sure they’re really working. “Fairness” appears to mean that because not everybody can work from home, no one should be allowed to.

In what amounts to a Kinsley gaffe, Mayor Parker explained her goal with the program is to revitalize the downtown. In other words, to bring people into the downtown who will patronize restaurants, shops, and other city businesses. She’s also hoping that the city governments policy will shame the private sector into doing the same.

The story, from NPR, is centered around a city employee, Andrew DiDonato, who reviews construction plans for the City’s licensing authority. There’s no reason, of course, that he can’t do that from home. Indeed, he’s been doing exactly that for the last four years. During COVID, the city was forced to allow DiDonato and other employees to work from home and DiDonato discovered that he was able to be a better parent and husband by being there to help get the kids off to school and to support his wife.

Sadly, all that’s coming to an end. DiDonato loves his job but is considering leaving rather than have his life disrupted. The city will lose a good worker but at least citizens can be sure that their city workers are being monitored.

Posted in General | Leave a comment

Elfeed Org Links

As most of you know, I’m a huge fan of Elfeed and, of course, Org mode. I use Elfeed to read my feed and I do all my writing and note taking in Org mode. It’s natural, therefore, that I’d want a way of capturing Org links to the Elfeed content. You can sort of do that by killing the current content URL to the kill ring and then yanking the link into some other document. That works but it’s not as convenient as simply calling org-store-link and inserting the link with org-insert-link because the saved link doesn’t live in the kill ring and use using the Org functions will automatically format the links in Org format.

Jeremy Friesen decided to do something about this. He wrote a surprisingly simple function that allows you to call org-store-link directly from within Elfeed. The generated link will be to the target URL not the RSS entry so it’s ideal for generating a link to the actual content.

If you use Elfeed to collect and curate interesting content and often—or even sometimes—want to save a link to the content in an Org file, Friesen’s solution is just what you need. The post is short and the code is minimal so you should definitely take a look.

Posted in General | Tagged | Leave a comment

Emacs Registers

Over at the Emacs subreddit, kosakgroove has just learned about Emacs registers and considers it a game changer. His post is little more than a headline so all the action is in the comments. Surprisingly—at least to me—many of the commenters were unaware that registers even existed.

For me, registers are useful in two situations:

  1. I want to save my current window configuration so that I can run some function—eshell, for example—in full screen, and reinstate my previous window configuration when I’m done.
  2. Saving values or counters in keyboard macros.

For example, here’s how I run eshell:

(global-set-key (kbd "H-e")
                (lambda (exit)
                  "Bring up a full-screen eshell or restore previous config.
With a prefix argument, exit eshell before restoring previous config."
                  (interactive "P")
                  (if (string= "eshell-mode" major-mode)
                      (progn
                        (when exit
                          (insert "exit")
                          (eshell-send-input))
                        (jump-to-register :eshell-fullscreen))
                    (progn
                      (window-configuration-to-register :eshell-fullscreen)
                      (eshell)
                      (delete-other-windows)))))

The important thing to notice in this example is the use of :eshell-fullscreen as the register key. That’s a trick I learned from Magnar Sveen. In interactive use, the key has to be a single character but because of an implementation artifact, any symbol will do from within Elisp. That’s nice because you don’t have to worry about having a user write something over your saved window configuration. I use this same trick a lot in my init.el.

Here’s an example of using a counter register in a keyboard macro. Both of these example are a bit specialized. You can simply save some text or a position in a register and insert it later when needed. Registers really are an almost magical power and it pays to get familiar with them.

Posted in General | Tagged | Leave a comment

Marlinspike On What’s Wrong With Software Development

Moxie Marlinspike is a legendary figure in security and software development. I last wrote about him and his fight to keep our data safe from governments and other prying eyes 9 years ago. He’s still at it.

At the recent Black Hat Conference, Marlinspike took a few minutes to give his views on the state of software development. He blames its current deplorable conditions on Agile but what he really means is layers and layers of abstraction that prevent the developer from understanding what is really happening with their software.

His message really resonated with me. I have long thought the same, at least about the layers of abstraction (I have no experience with Agile). You see this dynamic with MIT abandoning their famed SICP course in favor of teaching about using libraries to control robots or something. My problem with that—putting aside the offense of getting rid of SICP—is that students aren’t learning the fundamentals of computer science and what the machine’s really doing.

I addressed this same issue in my Is C Useful For Understanding How Computers Work. If you only know how to use high level languages and libraries that are black boxes to you, you will never understanding what’s really going on with your software.

The difficulty is that our corporate industry leaders love this stuff because it enables them to produce loads of software faster and easier. The problem is that no one, including the developers, really understand what it’s doing. The result is exploit after exploit. And, as Marlinspike says, a lack of joy on the part of those writing the software.

Posted in General | Tagged | Leave a comment