Going Dark: How Many Locked Phones Are There?

In news that will surprise exactly no Irreal readers, the Washington Post and Techdirt are reporting that the FBI has been lying about the “going dark” problem. One of their favorite refrains is that terrorists, pedophiles, drug dealers, and whatever today’s fourth horseman of the Infocalypse is have been using their encrypted smartphones to frustrate the FBI’s ability to keep us and the American way safe. Their latest estimate is that they are currently locked out of nearly 7,800 phones. Therefore, the next line goes, we need a law that gives us a backdoor into that encrypted information.

Everyone who knows anything at all about the matter knows that this is all nonsense and that the backdoor or golden key or whatever the current euphemism is would make us less, not more, safe. Now it turns out that even the underlying fact for these claims is wrong. Critics have long been suspicious of the 7,800 phones that the FBI claims they can’t access. Now the FBI has admitted that the actual number is probably around 1,200.

It wasn’t that they were lying, they say, it was merely an error. It was, in fact, the ever popular “computer error” that caused the miscount. They mumble about multiple databases and phones being counted more than once. But here’s the thing: According to Wikipedia, there are just 56 FBI field offices in the U.S. What’s wrong with calling them up and asking, “How many locked phones are you currently trying to access?” One agent, or even secretary, could easily get that done in a day or two. Remember that these phones are evidence and are thus recorded in chain of custody logs. I find the claim that it’s hard to suss out this information to be disingenuous if not absurd.

The FBI is not having a good year. Practically everything they’ve told us has turned out to be false. At the same time, they appear unable to handle even routine investigative tasks like following up on the tip that Broward County, Florida school shooter Nikolas Cruz wanted to “kill people” and that there was a potential of him being involved in a school shooting. That potential was realized when Cruz killed 17 people and wounded 17 more. The FBI lied about that too, of course.

Posted in General | Tagged | Leave a comment

Reproducible Research for Management

The utility of reproducible research and literate programming methods in engineering and science is clear and well known by now but we seldom consider how the techniques might be extended to other disciplines. If, however, you think about what you’re trying accomplish with those procedures—documentation of process, tracking of changes, the ability to reproduce your work product and conclusions, and a self-contained file containing all the relevant data and calculations—it’s clear that almost any endeavor could profit from applying these techniques.

Derek Feichtinger has an interesting post in which he describes the application of reproducible research and literate programming to management problems. As an example, he considers generating a budget for a pair of related projects. His workflow is to first generate an outline describing his goal and the information he has and to refine that with subheadings as more information becomes available. That provides a history of the project and automatically tracks changes.

Feichtinger has written some Elisp that extracts the relevant data from the outline and puts in table form. That table can be used for further calculations, graphs, and other output. The results can, of course, be exported in a variety of ways according to what is needed.

If you are in management or you have to produce reports for management, you should take a look at Feichtinger’s post. There are a lot of good ideas in it even if you don’t choose to follow his exact workflow. As Feichtinger says, using these techniques is far superior to the usual management practice of doing everything with Excel.

Posted in General | Tagged , , | Leave a comment

Reproducibility Using GNU Guix

Regular readers know I’m fond of reproducible research and occasionally write about it. Unfortunately, I often write as if reproducible research is simply a matter of firing up Emacs and Org mode. It is, of course, a lot more complicated than that. Using Org mode puts everything in one place and makes it clear what you did and how you did it but that may not be enough for another researcher to duplicate or expand on your work.

The bioinformatics group at the Max Delbrück Center has an interesting preprint available that illustrates some of the problems and their solutions to those problems. The TL;DR is that they use the GNU Guix package manager to be able to precisely rebuild the software environment used for their experiments. This gives them a way of working with a common software stack for subsequent experiments or to allows others to reproduce their work. The goal is to provide a way of producing a bit-identical software base.

They illustrate this by packaging up 4 analysis pipelines used to process data and produce publishable tables and graphs. The abstract of their paper is available at bioRxiv along with a link to the paper itself.

You don’t have to have a background in bioinformatics to read most of the paper. You can skip the descriptions of the pipelines and concentrate on the description of the build system and the problems it addresses.

Posted in General | Tagged | Leave a comment

Python Doctests, Literate Programming, and Org Mode

If you’re a Python programmer and like to have built-in tests for your functions, you probably know about doctest, a way of embedding one or more tests in the docstring of a Python function. Normally, they don’t do anything but if doctest is loaded as the main program or one of doctest’s methods are called, the tests are run and the results are printed to stdout.

John Kitchin likes the idea but found that the nit-picky formatting of the tests was annoying so he didn’t use them very often. Of course, being Kitchin he soon fixed that and in a clever way that leverages Org mode. Rather than fuss with the formatting of the tests, he just put a noweb marker where he wanted the test to be and then included the test as a normal Org mode code block later in the file. He added in a bit of Elisp to reformat the test code so that when the file is tangled it becomes a Python script that can be invoked in the normal way to run the tests.

Kitchin thinks of this as an example of literate programming, which it is, of course, but I prefer to think of it as another example of the power of embedding code in an Org file. The function tests can be run from the Org file to get the expected results for the tests, explanatory text can be added, and when you’re finished you just tangle it to an output file. That file can be invoked as a script to run the tests or imported into another Python file to access the functions in the normal way. Very impressive. Kitchin’s post includes a short video so you can see the system in action and get a better feel for how things work.

Posted in General | Tagged , | Leave a comment

Introduction to Using Git

If you’re in the intersection of Emacs and Git users, you are almost certainly using Magit and probably don’t think about version control very much: it just works. But suppose your version control experience is restricted to CVS, SVN, or even no version control at all. If you’re like me, your first thought is probably that that’s a pretty small set but when I stop to think about it, I realize that I know lots of people stuck in CVS or even not using version control of any type.

The Lazy Dev has a nice post that will help get those folks up to speed. The post, Unleash your version control skill in 10 minutes, takes a version control neophyte from getting Git installed, setting up a repository on a remote server (GitHub is used as an example), initializing a project, and keeping things in sync regardless of where a particular change is made.

This is an elementary discussion so Emacs and Magit don’t come into it but Emacs users will have no problem jumping to Magit once they get an elementary knowledge of Git. If you’re new to Git or know someone who is, this post is worth taking a look at.

Posted in General | Tagged , | Leave a comment

Capturing Code Snippets

The other day in my post about Alain Lafon’s talk on playing Emacs like an instrument—you have watched that video, haven’t you?—I mentioned that one of the things I picked up was an Org capture template for capturing code snippets. That’s very nice and just the thing when you want to put some code in a journal or log entry.

Right after seeing the video, I saw a post from Nick Barnwell that had an even better template for capturing code snippets. His template automatically captures the language for the code block, and the file and line number from which the code is being extracted. That minimizes the amount of text that you have to enter manually.

You may have to autoload which-function if you aren’t already using something like which-function-mode. Also note that the template is assuming you’re going to be grabbing the code snippet from a file you have open in Emacs. That’s probably almost always true for a capture template of this type.

When I first started using capture templates, they were described as a way of quickly recording a note or thought while you were busy with something else and then getting back to the job at hand. That’s still true, of course, but I find that they’re just as useful for entering data related to your current task. For example, when I’m reading an article that I’m considering writing about on Irreal, I capture a link to the article and any thoughts I have about it with a template that adds the information to my blog queue. Once you start using capture templates, you keep finding new uses. Barnwell’s post is another example of that.

Posted in General | Tagged , | Leave a comment

A Tip for Org Mode N00bs

Wilfred Hughes serves up some useful advice for those just starting out with Org mode:

I’ve given this same advice before but it’s worth repeating. Org mode is a huge and complex package with many capabilities. If you try to learn everything at once, you’ll get discouraged and possibly even abandon Org.

That was certainly my experience. When I first started, I used Bernt Hansen’s excellent Org Mode – Organize Your Life In Plain Text! as a guide and tried to configure everything at once. The result was that I didn’t understand anything and mostly didn’t use Org at all. When I started over, I configured only a small subset of the capabilities and got familiar with them through repeated use. Later, I added more functionality as I found new ways to use Org in my workflow. That process is still going on even though Org mode is at the center of most things I do on my computer.

Do yourself a favor and start with just a couple of Org’s capabilities. You’ll have much better results that way.

Posted in General | Tagged , | Leave a comment

Some Dired Tips

Tim Visher, who used to produce the popular VimGolf in Emacs Videos, has a couple of useful tips about using dired:

As a clarification, note that w copies the file name not the file itself into the kill ring. You can do several files at once by marking them.

I don’t think I’ve seen any of them before and they certainly aren’t on the dired cheat sheet that comes with Emacs. You can, of course, find the ‘w’ command in the dired help buffer but as far as I can see you have to check the documentation for dired-copy-filename-as-kill to get the information on the prefixes.

Posted in General | Tagged | Leave a comment

California Stores the DNA of All Babies Born in the State

What could go wrong? The iron law of data collection, that’s what. It’s been a while since I’ve written about the iron law, so here’s a quick recap: The iron law states: Whenever the government (or anyone else for that matter) collects data, two things are guaranteed:

  1. No matter the reason given for its collection, it will be used for more and more purposes.
  2. It will inevitably be abused.

Through the years, I’ve provided several examples of the iron law in action. California’s collection and retention of babies’ DNA is only the latest and it exactly parallels what happened in Sweden1: the DNA was collected with the rationale that it was needed for the testing and treatment of genetic diseases. It wasn’t long before law enforcement started showing up with warrants. In California’s case, the state can even sell the data to third parties for “valid scientific studies.”

Although California mothers are supposed to be told that they can request that the data be destroyed, they often aren’t and even when they are it’s with a mass of other new born baby information that all but guarantees it won’t be read. Efforts to have parental consent be opt in was beaten back by vested interests. You can read the article for the details.

The point, though, is what it always is: if you allow the data to be collected it will eventually be abused. The only way to prevent that abuse is stop the collection or in the case of such things as testing for genetic diseases that the samples be destroyed as soon as the analysis is completed.

Footnotes:

1

Ironically, in that post I said that such collection would be blatantly illegal in the U.S. That shows what I know.

Posted in General | Tagged | Leave a comment

Emacs Tools for Writers

As you all know, I’m fond of posts that show the versatility of Emacs by documenting its use by writers. At first glance, writing—a novel, say—seems to be the direct antithesis of what most of us use Emacs for. But when you think of it, it’s all just wrangling text and we all want to do that in the most efficient way possible. That’s were Emacs comes in.

Scott Nesbitt has a nice post entitled 5 Emacs modes for writers. Those five modes are:

  1. Muse,
  2. Org mode,
  3. Flyspell,
  4. WC mode, and
  5. WriteGood mode.

I depend on three of the five. I use Org mode for virtually all of my writing these days so I don’t need Muse. Applications like WriteGood mode remind me of my eighth grade English teacher so I avoid them for admittedly emotional reasons. I use a different app for word counting—also called WC mode—but either one will serve. Any or all of these tools will make whatever writing you do easier.

Nesbitt also mentions Fountain mode (if you’re doing screen manuscripts), Markdown mode (if you prefer Markdown or have to use it in some instances), and Writeroom mode (if you want to write on a blank screen). Years ago, Jerry Pournelle used to sing the praises of an editor called (I think) WRITE. It was for CP/M and would doubtless be considered primitive today but it had the virtue of being distraction-free by offering a blank screen with no tool bars or other widgets to seduce your attention. If that sounds attractive, give Writeroom a try.

Posted in General | Tagged , | Leave a comment