Fundamental Laws

For some reason there was a recent pointer to this 6 year post by Matthew Jones on some of the fundamental laws of software development. Most of them will be familiar to Irreal readers but it’s nice to see them listed along with their explanations in one place.

Jones lists 15 laws or principals. They are:

  1. Occam’s Razor
  2. Hanlon’s Razor
  3. The Pareto Principle
  4. Dunning-Kruger Effect
  5. Linus’s Law
  6. Robustness Principle
  7. Eagleson’s Law
  8. Peter Principle
  9. Dilbert Principle
  10. Hofstadter’s Law
  11. The 90-90 Rule
  12. Parkinson’s Law
  13. Sayre’s Law
  14. Parkinson’s Law of Triviality
  15. Law of Argumentative Comprehension

Some of these, like Hanlon’s Razor and the Dilbert Principal, are tongue-in-cheek while others, like The Pareto Principal and the Dunning-Kruger Effect, are serious, a précis of actual research.

Oddly, the most famous law of all, Murphy’s Law, doesn’t make an appearance. As every developer knows, it is always with us and operative. Regardless, the list is amusing and worth taking a look at if you’re searching for a momentary diversion.

Posted in General | Tagged | Leave a comment

Red Meat Friday: Emacs Sucks

As you can tell from the title, this is the rawest of red meat. The title comes from a post on reddit by BlackberryPerfect938 entitled Why Emacs Sucks. On the one hand, what else is new? Plenty of people try Emacs and decide they don’t like it—nothing wrong with that. There’s also the fact that after a while, the editor wars become boring. Still, it’s worth taking a look at BlackberryPerfect938’s arguments.

His major complaint, as I understand it, is that Emacs “feels old”. The reasons he thinks it feels old are:

  1. There are a lot of external packages that implement modes with overlapping and sometimes conflicting functionality with built-in modes.
  2. Many times these external packages implement capabilities that—BlackberryPerfect938 feels—should be built in. He gives LSP as an example that he finds particularly annoying.
  3. Emacs is “distracting”. He gives, the admittedly enjoyable, desire to tinker with your configuration as one example, and the existence of games as another.
  4. Legacy keybindings.
  5. The Emacs community consists mostly of “old folk” such as technical people, scientists, and professors.

You probably don’t need Irreal to call BS on those complaints but here at Irreal we live to serve so we will anyway.

  1. This is just an example of how Emacs can be configured or extended by anyone to meet their specific needs. Often, of course, others find those customizations/extensions useful so they’re made available to all through one of the repositories.
  2. This is Emacs evolution is action. Someone will write a useful package that gets used by more and more Emacers. Eventually, when the usefulness is confirmed, the package may get absorbed into Emacs core. Org-mode is an example of this.
  3. No one is forced to use any of the games. I don’t but they’re there if you want them. How is this a problem? The constant tweaking of your Emacs configuration just means that users adjust the editor as their needs change.
  4. No complaint about Emacs would be complete without whining about the editor not following the CUA bindings that came years after Emacs was introduced. And, of course, the complaints always forget to mention that a single line of configuration will, in fact, enable those CUA bindings.
  5. This seems to me to be the most bizarre of the complaints. It boils down to “People who are experienced and knowledgeable tend to use Emacs. Those who are younger and lack that experience do not.” Therefore…. It just doesn’t make sense.

The commenters were not kind to BlackberryPerfect938 as you can see by following the link. As I’ve said many times, there are plenty of reasons not to use Emacs but BlackberryPerfect938’s post doesn’t give any of them.

Posted in General | Tagged , | Leave a comment

From Unix Command to Startup

Matt Rickard has a whimsical post that really appealed to me. The idea, according to his title, is that every Unix command becomes a startup. His first example is grep. Grep’s a utility to search for a particular string in a series of files. That, of course, when extended to the Internet, became Google. He’s got a bunch of similar examples.Here’s another: rsync begot Dropbox.

As I said, it’s a whimsical but amusing post and it does make you think: perhaps all those successful startups really are merely extensions of Unix utilities from file systems to the Internet.

In any event, take a look at the post to see where all the popular Web sites really came from.

Posted in General | Tagged | Leave a comment

D. J.Bernstein on the NSA Corrupting Crypto Standards

J. Bernsein is my type of guy. He’s opinionated, crabby, curmudgeonly, and brilliant. He’s particularly brilliant when it comes to matters of cryptography. One of the things about being curmudgeonly is that you have little tolerance for lies and nonsense so of course he’s a regular antagonist of the government and, in particular, the NSA.

These days, nobody trusts the NSA but NIST is supposed to be different. Their job is to promulgate standards that benefit commercial entities and private citizens. In the cryptography realm they’re supposed to develop, test, and standardize cryptography primitives that allow companies and citizens to protect their private—predominately commercial—interactions from criminals and fraudsters.

It hasn’t always worked out that way. After getting caught conspiring with the NSA to corrupt the Dual Elliptic Curve Deterministic Random Bit Generator, NIST promised to clean up their act and be more transparent. It was an important promise because their credibility with the crypto using public was on the line.

I, naively, took heart with their promise to be honest brokers going forward. Sadly, according to Bernstein, it hasn’t worked out that way. It appears that they are once again conspiring with the NSA to compromise to corrupt crypto standards and doing everything in their power to cover up that fact.

After having several Freedom of Information requests ignored, Bernstein finally resorted to filing suit to force NIST to reveal their collaboration with the NSA. Follow the link for an excellent history of NIST/NSA collusion from the early days of DES to the current debates about post-quantum algorithms.

It’s sad that the public can’t trust their government to have their backs on cryptographic matters but as Bernstein demonstrates, that’s where we are. I don’t know the answer. I just wish the NSA would put the pubic above their own convenience.

Posted in General | Tagged | Leave a comment

Paul Graham on SciHub

Paul Graham remarks on SciHub and how broken our current system is that everyone’s advice for getting research results is to use a pirate site.

There’s not even a pretense that the proper method is find a library that has access to the needed journals. That doesn’t make sense even in a first world country but imagine you live in a third world country. It’s basically something like SciHub or go without.

Smart people who can change the world live everywhere—even in third world countries—and it’s simply crazy to deny them the resources they need to help humanity. Our current system is completely dysfunctional and just doesn’t make sense. That’s especially true when almost all of this research is being financed with public funds.

Sadly, the university system is collapsing and, even now, many researchers are choosing to publish in open access journals so things may improve but it’s too bad that it takes the destruction of our educational system to bring a little rationality to scientific publishing.

Posted in General | Tagged | Leave a comment

A Graduate Student Research Workflow

Koustuv Sinha is a PhD student in machine learning and natural language processing. Because much of his time is devoted to reading research papers in his field, he’s devoted significant effort into optimizing his workflow.

The TL;DR is that he’s used Emacs and Org-mode to develop an efficient method of discovering and curating interesting papers. It starts with the discovery. For this he uses Elfeed to subscribe to various Arxiv feeds in his areas of interest. He uses the elfeed-score package to rank these papers in the approximate order of his interest in them.

When he reads an abstract in the Elfeed results that seems interesting, he fires off a process that captures the paper’s metadata to his bibliography file; grabs a copy of the paper, renaming it to the bibtext key, and storing it in a central repository; and adds it to an Org file listing the papers we wants to read.

A lot of this is accomplished by leveraging John Kitchin’s org-ref. He calls org-ref functions directly to get and store the paper’s data. It’s a nice example of reusing someone else’s codebase in your own.

Sinha provides a huge number of details in his post so be sure to take a look. If you have similar needs, this is an excellent starting point for your own workflow or even something worth stealing wholesale.

Posted in General | Tagged , | Leave a comment

Remote Work At The Doctor’s Office

If you’ve been reading Irreal for more than the last 5 posts you know that I’m a big supporter of remote work. There are many many jobs that can be done remotely and there’s no reason for many employees to be on-site. Still, there are some jobs that intrinsically require an on-site presence. It’s hard, but not impossible, to imagine a store clerk working from home. Some jobs, though, just seem to require an in-person presence.

One such job is medical provider. To be sure, COVID-19 has seen the rise of virtual appointments but sometimes doctors really do need to be able to put their hands on you to do their job.

The other day, I went to one of my doctors for a yearly checkup and when the doctor came into the examining room, he had an iPad with an active video session. He told me that that the woman at the other end was a medical transcriptionist who was based on the other coast of Florida. During the exam, the transcriptionist reminded the doctor of past findings from tests and recorded the current findings.

If the transcriptionist had been in the exam room, I wouldn’t have thought twice about it but the fact that she was far away made the process seem unusual and strange. But that’s just silly. She could see and hear everything that was going on—we even waved goodbye when the exam was over—so was able to capture all the relevant data just as well as someone who was in situ.

There isn’t anything really surprising about all this. It’s just that we don’t often think about medicine as a field ripe for disruption by remote work. It is, however, already happening.

Posted in General | Tagged | Leave a comment

Org-mode Versus Jupyter Notebook

John D. Cook, a consulting mathematician, who runs the TeX and Typography Twitter feed as well as several similar—mostly mathematically focused—feeds has two posts that consider using Org-mode instead of Jupyter Notebook. It’s interesting because it comes from someone who is neither a developer nor a dedicated Org user.

The first post considers Org-mode as a light weight Jupyter Notebook. It stresses how easy it is to mix text, LaTeX markup, code, and the results of running that code in a single file. That’s a real win if you’re trying to do reproducible research or simply trying to simplify your workflow. Since everything is text, it’s easy to integrate it into your version control system.

The second post is reminiscent of Mike Hamrick’s video of using Org and Org Babel to create documents that automatically maintain their consistency as parameters change. Cook’s post covers exactly that: how to specify parameters separately from their use in order to maintain consistency as things change.

If you’re a hardcore Emacs/Org user or even a long time Irreal reader, none of this will be new to you but it’s a really excellent introduction to one tiny aspect of Org’s power. It’s definitely worth your while if you’re new to this aspect of Org-mode.

Posted in General | Tagged , | Leave a comment

Red Meat Friday: PHP Is The Right Choice

One thing you have to say for Daniel Abernathy is that he’s not afraid of the heavy lift. He’s got a post that presses the claim that PHP Is the Right Choice in 2022 and Beyond. It’s hard to find more people than you can count on one hand who will admit to liking PHP but, of course, its popularity gainsays that popular wisdom. Still, it’s fair to say that PHP is the Rodney Dangerfield of programming languages.

Even Abernathy admits the post’s title may be a little overstated but he does make the case that there’s a lot to like about the language and ecosystem and that it’s not like it used to be.

Manuel Odendahl seems to agree but some reddit commenters are less obliging. One comments that “As much as I despise java, at least a group of allegedly competent engineers took the time to actually design the language and its type system, as opposed to hacking together a bunch of stupid shit workarounds on top of an already hacked together brain-damaged non-designed crap, which is the case of php.”

I’m completely agnostic on the matter because I don’t know the language at all. I’ve written exactly one line of PHP and that was because of exigent circumstances. I only got away with it because it’s sufficiently C-like that I could fall back on my mental muscle memory.

Regardless, hating on PHP is well entrenched and nothing Abernathy or Odendahl can say will do much to change that. That’s why Abernathy’s fearless, if ultimately futile, defense of the language has earned him a coveted spot on Irreal’s Red Meat Friday.

Posted in General | Tagged | Leave a comment

Mickey on Evaluating Elisp

Mickey from Mastering Emacs has an excellent post on the various ways of evaluating Elisp in Emacs. As Mickey says, there are several ways of doing it depending on the context and it pays to be familiar with them all.

The most familiar way is probably eval-last-sexp (Ctrl+x Ctrl+e). It’s really useful because it will evaluate almost anything: s-expressions (of course) but also numbers, strings, and most special forms. The situation for special forms has improved a bit in Emacs 28 so be sure to take a look at Mickey’s post to get the details.

There’s also eval-buffer and eval-region, which do as their names suggest. These commands generally don’t evaluate special forms such as devar, defface, and defcustom. That’s generally what you want so it’s a feature instead of a bug. Again, see the post for the details.

The method that I always tend to forget about is eval-defun, bound to Ctrl+Meta+x. It’s especially handy for evaluating functions because, unlike eval-last-sexp, you can call it from anywhere within the function instead of needing to be at the end. If you call it with the universal argument, it will turn on debugging for the function. It’s worth reading Mickey’s article just for the section on this command.

Finally, there’s Eshell and IELM. Most Eshell users know you can evaluate many Elisp expressions there but when you want a real Elisp REPL, IELM is what you want. It’s perfect for experimenting with code that’s longer than a single expression. I use it fairly often and love it.

Like all of Mickey’s posts, this one is definitely worth your time and effort.

Posted in General | Tagged | Leave a comment