Metadata and Privacy

By now, I hope, no Irreal reader believes the “it’s just metadata” mantra from the nosey Parkers intent on snooping into every aspect of our lives. A recent study from Stanford quantifies the privacy-stripping power of metadata (you can read the study itself at the Proceedings of the National Academy of Sciences website).

The study shows that with a very small set of telephone metadata it is possible to identify the participants from publicly available records. The researchers also demonstrate that they could accurately infer when a subject was in a relationship and then (trivially) identify who the other person in the relationship was.

They were also able to correctly infer that one of the participants had a specific heart disease and that another owned a semiautomatic rifle. Read the report to see the wide range of sensitive data that can be teased from metadata.

Actually, all you need to know about metadata is what former CIA and NSA head Michael Hayden famously said about it: “We kill people based on metadata.” Remember that the next time you hear your Aunt Millie or one of the nannies say, “It’s just metadata.”

Posted in General | Tagged | Leave a comment

Something Wrong

At least they know who we’ve been calling.

Posted in General | Tagged | Leave a comment

The Truth About Open Offices Revealed

Succinctly.

Posted in General | Tagged | 1 Comment

Count Days Between Dates

Álvaro Ramírez points out that Emacs has the built-in capability to calculate the number of days between two dates. It’s easy to do; the tl;dr is:

M-x calendar
<mark the region between the two dates (inclusive)>
M-= (or M-x calendar-count-days-region)

Ramírez has some animated screen shots that show how it works and also a shortcut for going to the endpoints of the date range.

It’s a nice trick and it’s all already there. Read the post and try it out.

Posted in General | Tagged | Leave a comment

Schrödinger’s Backup

Posted in General | Tagged , | Leave a comment

What’s Emacs

This is exactly how I think of Emacs

It’s almost a cliché but Emacs really is much more than an editor. It’s the way I organize my workflow.

Posted in General | Tagged | 1 Comment

Sabotaging Your Competitors

Charlie Stross was browsing through an old, recently declassified OSS manual on sabotaging the enemy’s production and started wondering about how you could apply the same principles to sabotage your competitors by injecting bad policies into their environment. He lists 10 policies that, if adopted, would tend to destroy an organization.

First on the list is Irreal’s longtime favorite policy for destroying morale and productivity: open plan offices. The others would be equally effective at causing mayhem in your competitors’ offices. Be sure to read the list.

Then read the comments. Warning: there are a lot of them—155 at the time of this writing. The comments are in response to Stross’ solicitation of further ideas. The result is a catalog of all the dysfunctional ideas that “management consultants” and other criminals have foisted off on our work places. You’ll probably start off laughing but by the end you’ll be shaking your head with tears in your eyes.

Most of these ideas are so ridiculous that your first thought is that no one would implement them. Then you’ll remember about open plan offices. Or, if you’re really unlucky, you’ll remember that awful company you used to work for—or maybe still work for—that does have policies like these. One of the most telling comments notes that the commenter no longer considers Dilbert funny because it just documents what is happening in many companies.

It’s an enjoyable post made all the more so if you have time to browse through the comments.

Posted in General | Tagged | Leave a comment

Quitting with SIGUSR2

The other day I wrote about using the SIGUSR2 signal to quit Emacs. It’s usually enough to unjam Emacs and get you into a state where you can at least save your work and restart Emacs.

Marcin Borkowski (mbork) has a very nice post that explores the use of SIGUSR2 and how it interacts with the debugger. If you’re developing in Elisp and often find yourself hung, some of mbork’s techniques may help you figure things out. It’s an informative post and well worth taking a look at.

Posted in General | Tagged | Leave a comment

Tail Recursion in gawk

Once you’ve used Lisp—especially Scheme—you come to regard tail recursion as a natural and necessary technique. Perhaps even a God given right. Sadly, leave the Lisp world and you’re pretty much out of luck. Of course, you can always make a tail call but that quickly fills up the stack. What we’re talking about is sometimes called tail call optimization (TCO). With TCO, the function call in the tail position is replaced by a goto and nothing is pushed onto the stack.

Marc Simpson over at 0branch blogs about one of the rare exceptions to the Lisp-only rule about TCO. In gawk—but not in nawk or mawk—there is a limited type of tail call optimization but you have to take steps to enable it and it only works in restricted situations. Still, it’s nice to know it’s available if you really need it. Head over to the post for the details. They’re not earth shattering but it is nice to know.

Posted in General | Tagged , | Leave a comment

Remote Shells with Tramp

Howard Abrams has a nifty video on his setup for invoking remote shells. Those of you who have followed his recent videos know that he works with a lot of virtual machines and it is convenient for him to be able to swiftly connect to them—from within Emacs, of course.

To do that he first builds a hash table (this happens automatically) mapping host nickname to IP address or fully qualified domain name. Then he does a completing read to get the nickname, and hence the IP address or FQDN, of the host he wants to connect to. The rest is easy: he essentially executes the code

(defun remote-host (host)
  (let ((default-directory (format "/%s:" host)))
    (shell host)))

where host is the result of the hash table mapping.

Notice the nice trick here. By setting default-directory to a remote host, tramp is automatically invoked and you’re running a shell on the remote machine. By setting default-directory to something like /ssh:host|sudo:host: you can invoke the shell as root. See Abrams’ code for the details.

Naturally, his setup is a little more complex but this captures its essence. He also has a function to run a command on a remote host using the same strategy but calling shell-command instead of shell. He even shows how to run the same command on a list of remote hosts all automatically. You can see how this would be useful if you’re administering several machines.

In the video, he doesn’t spend a lot of time going over the code so you’ll want to check it out at on his github. The video is only 6 minutes 42 seconds so you can enjoy it during a coffee break. Highly recommended.

UPDATE [2016-05-13 Fri]: Fixed link to the github code. Abrams → Abrams’.

Posted in General | Tagged | Leave a comment