ESR: An Open Letter To Chris Dodd

Eric Raymond has posted An Open Letter to Chris Dodd concerning Big Media’s approach to the Internet. It is, I think, an important letter and one that most hackers and Irreal readers will agree with. That’s not the same, of course, as Dodd taking its message to heart or even reading it but I urge you to give it a read if you haven’t already.

Posted in General | Leave a comment

Reproducible Science

Ars Technica has an interesting article up entitled Nature Editorial: If you want reproducible science, the software needs to be open source. I’ve written a couple of times about reproducible research and how Emacs and Org Mode make it particularly easy so I was interested in what the article had to say.

The article talks about an editorial in Nature that strongly urges authors of papers to include the source code for the software that supports their papers. I was a bit taken aback because it would never occur to me not to do this. Perhaps it’s just being part of the open source movement or maybe it’s a reaction to the East Anglia CRU fiasco but if you are doing science then you must enable others to reproduce (and thereby validate) your results. My position—and that of most scientists not doing climate research—is that if you don’t make your data and methodology available then you’re not doing science.

With the really great tools that are available today, like Emacs and Org mode, there really is no excuse not to do this. Keeping everything together in a single file would, in most cases, makes the scientists’ research easier and then there is only a single file to submit to the journal. It has the LaTeX source for the paper itself, research notes, data, and software in it. In some cases involving huge data sets or code bases the author may want to add a link to the actual data or code rather than include it but the principle is the same.

The editorial makes a good case that even offering an executable version of the software is not enough. Often the software plays a fundamental roll in the research and should, itself, be examined for errors or other problems. As Irreal readers know to their sorrow, bugs are a part of any non-toy piece of software so it is not a trivial objection to say that an executable version does not suffice.

One of the alternatives to open sourcing the code used by some journals is to have the author provide a “rigorous” natural language description of it in terms of the algorithms and mathematics used. I’m sure that any Irreal reader would find this a non-starter for obvious reasons but the editorial has a large section that discusses and dismisses this as impractical.

The editorial presents and discusses several objections or difficulties to providing the code but I found only one persuasive: concern on the part of the researchers or their organizations that the code represents a marketable commodity and should therefore be withheld. The editorial authors say that’s a tough problem and that perhaps such papers should be marked as not having the necessary items for complete reproducibility. Actually, I’d be fine with saying, “We don’t accept papers that don’t include everything needed for reproducibility.” In the case of publicly funded research, this should not even come up. The public paid for it, the public owns it. Of course, I’m not holding my breath for that to happen.

Posted in General | Tagged , | 1 Comment

Multiple Editors And Markdown

I’ve written many, many times about how much I love writing in Org mode. I write a plain text file that I can then export to HTML, LaTeX, or several other formats. I can even, theoretically, write an Org mode document with some editor other than Emacs. But Org mode isn’t the only way of doing this. Another is Markdown a similar system that probably inspired the Org mode mark-up syntax.

One of the advantages of Markdown is that you can use it with any editor. Many editors, including Emacs, even have special Markdown modes that enable highlighting and interface with the Markdown script. I’d certainly be using it if I didn’t have Org mode so I read The Markdown Mindset by Hilton Lipschitz over at the The Hiltmon blog with particular interest. Lipschitz gives the usual list of benefits for Markdown: editor agnostic, plain text, flexible, exports to multiple formats, and so on.

But here’s what I don’t get. Lipschitz goes on about how he writes his programming notes using Markdown in BBEdit, his blog posts using Markdown in Byword, his manuals and related documents using Markdown in Scrivener, and his readme files using Markdown in TextMate. I don’t object to him doing this—whatever works for him—but I can tell you for sure that I’d be drooling and babbling incoherently if I tried something like that. After 5 years, I still have flashbacks to Vim and try to go up a line with 【Ctrl+k】 or something similarly hilarious. I simply can’t imagine trying to use that many editors. One of the advantages, to me, of Emacs is that I can stay in the same editing tool almost all the time. On my Mac I even have a special file that gives me (mostly) Emacs keybindings so that everything works pretty much the same even when I’m not in Emacs. Love them or hate them, there’s only one set of bindings to worry about. (Yes, yes, I know that statement gets muddied a little when considering some modes but it’s basically true).

I’d be interested in hearing what others think. Can you easily handle multiple editors routinely the way Lipschitz does or does leaving Emacs to use some other editing tool make you uncomfortable and less efficient?

Posted in General | Tagged , | 9 Comments

Data Hogs

For a long time the wireless carriers have been complaining about “data hogs” who suck up inordinate amounts of bandwidth by downloading movies and whatever to their mobile devices. As a result, AT&T, Verizon, and T-Mobile have instituted data throttling. AT&T and, I think, Verizon have eliminated their unlimited plans for new subscribers offering tiered pricing instead.

I’ve long suspected that a lot of this was self-serving on the part of the carriers. After all, who wants to watch a movie on an iPhone? Sure, maybe you’re stuck at the airport or the DMV or someplace and you while away the time with a movie or that episode of 24 that you missed but how often does that happen? Maybe it’s just me but I find squinting at that small screen to watch even a short YouTube video painful.

Now an article in yesterday’s New York Times suggest that those suspicions were justified. The times reports on a study by Validas that looked at 55,000 cellphone bills and found that the top 5% of data users (those that the carriers label data hogs) use essentially the same bandwidth as the tiered plan users. In other words, if you have an unlimited plan you get your data rate throttled for using the same amount of data as a tiered plan user.

The report speculates that the real reason for the throttling is to force customers onto the tiered plans. Whatever the reason, it’s clear that it’s not, as the carriers claim, to prevent a melt down of their networks.

Posted in General | Leave a comment

They Never Learn

By now, most everyone has heard about the YouPorn Chat break in. John Graham-Cumming has the details. Due to very sloppy security YouPorn exposed the email addresses and passwords for many of their customers who signed up in 2008 and later. I’m guessing that there are a lot of very nervous spouses about now.

The story is actually a little worse than that according to Graham-Cumming. In addition to the email addresses at least some of the records included phone numbers, date of birth, username, and country. All of this information was in a plain text file. With no encryption. On a public server. How does this happen? Did Sony and the others teach these people nothing?

I suppose the good news for YouPorn Chat is that few, if any, of their customers will be inclined to anything public—like filing a law suit—about this and given the nature of their service, they may not even lose many customers. Still, there really is no excuse for this sort of behavior on the part of Web services and all it takes is one angry, single, customer to take these guys to the cleaners. If that happens, it will be hard to avoid the schadenfreude.

Posted in General | Tagged | Leave a comment

Site Outage

My hosting provider has informed me that Irreal.org will be down for maintenance from 12:01 am to 4:00 am on February 25.

Posted in Administrivia | Leave a comment

The Solution To Piracy: Cartoon Version

A while ago I wrote a post on Paul Tassi’s Forbes article You Will Never Kill Piracy, and Piracy Will Never Kill You. That was a great article with many cogent arguments but if it was TL;DR for you, here’s the cartoon version.

Update Removed superfluous “that”.

Posted in General | Leave a comment

Using Emacs

Vincent Foley over at Occasionally sane has an interesting post entitled Why I Still Use Emacs. Foley lists the usual suspects (extensibility, Org Mode, GUI or CLI operation, excellent built-in documentation, configurability, Tramp, and all the other reasons we love Emacs) for his decision to forgo IDEs, such as Eclipse, in favor of Emacs.

One of the things I have found throughout my career is that serious programmers pretty much stick to one of two (arguably three) editors: Emacs or Vi(m), and on OS X, TextMate. When I see an engineer using one of those editors I can be pretty sure that they know more than a single language, care about their tools and take the time to optimize their work flow around those tools, and care about speed and making development as frictionless as possible. When I see someone using notepad or a similar abomination, I can be pretty sure the above does not apply.

Are there exceptions? Of course but I think the generalization is a good one. Sure, the guy in the next cubicle uses Emacs to program in Basic and not very well at that and the polyglot wizard on your team turns out to prefer Nano for reasons that no one can understand but

serious_programmer == uses {Emacs | Vim | TextMate}

is a pretty good first order approximation.

Interestingly, the users of those 3 editors sometimes switch but almost always to another editor on the list. I’m guilty of that myself having been a Vim user for many many years and then switching to Emacs as I started to do mostly Lisp and Scheme programming. Others near and dear to me started with Emacs and switched to Vim. Likewise, I’m sure a lot of programmers switch to TextMate when they start using a Mac. I’ve never heard of anyone switching from Emacs to Notepad though.

Do I think using Emacs/Vim/TextMate makes you a better programmer? Possibly but the more likely explanation is that a craftsman picks the best tools available. Do I think everyone should use one of those editors? Frankly, it’s hard to see why they wouldn’t but choosing an editor is like choosing a mate and others had best stay out of the matter. I remember the feeling of horror I had when a manager from long ago suggested we settle on a standard editor. Happily I and some of the other senior engineers were able to explain the facts of life in time to prevent a mass exodus.

I’d be interested in hearing if my experience matches that of my readers. Do you find that most serious programmers use the Emacs/Vim/TextMate? Do you disagree with that observation for some reason other than hurt feelings? If so, leave a comment.

Posted in General | Tagged | 10 Comments

Lisp In The Debian Distribution

This is interesting and sort of surprising. James Bromberger over at JEB’s Blog takes a look at Debian’s forthcoming Wheezy distribution and, among many other interesting facts, reports that Lisp is the 8th most popular language for developing the packages in the distribution.

It’s not like this means that Lisp is becoming the go to language but it is nice to know that it’s solidly represented.

Posted in General | Tagged | Leave a comment

Not Macros; Read

James Long has an interesting post up at his blog entitled Lisp: It’s Not About Macros, It’s About Read in which he argues that what makes Lisp so powerful is not really macros but the read function. The reason for this is that read is really a parser that converts an input stream into Lisp objects. For example in

ELISP> (read "(+ x 1)")
(+ x 1)

read takes the string "(+ x 1)" and turns it into the Lisp S-expression (+ x 1). That may seen like a distinction without a difference but consider

ELISP> (car (read "(+ x 1)"))
+

This is another example of code equaling data that we’ve discussed here so often. We’ve taken a piece of data, "(+ x 1)", and turned it into a bit of Lisp code.

Here’s a more substantive example taken from Long’s post and converted from Scheme to Elisp. Consider the two line function

(defun parse-defun (forms)
  (list 'fset (cons 'quote (list (cadr forms)))
        (cons 'lambda (cons (caddr forms) (cdddr forms)))))

When we apply it to a defun expression

ELISP> (parse-defun (read "(defun add1 (x) (+ x 1))"))
(fset 'add1
      (lambda
        (x)
        (+ x 1)))

we get the Elisp code to make a function. Note that parse-defun will work with any function defined with defun. We haven’t merely rearranged some text here. It’s much more:

ELISP> (eval (parse-defun (read "(defun add1 (x) (+ x 1))")))
(lambda
  (x)
  (+ x 1))

ELISP> (add1 3)
4

When we evaluate the code from parse-defun we really do get a function. That’s pretty impressive for the amount of work that we did. If you’re not impressed, ask yourself if you could (easily) do this in C, or Python, or Ruby, or whatever your favorite non-Lisp language is.

Long says that the real power of macros is that they allow us to install functions like parse-defun into the Lisp compiler. When the compiler reads a macro name it passes the forms to the function that the macro represents and then processes its output. That’s a rather obvious point once someone points it out but I think it’s a profound one that helps place macros in their proper place in the Lisp universe.

If this stuff excites you, as it does me, be sure to head over to Long’s blog and read his post. You won’t be sorry.

Posted in Programming | Tagged , , | Leave a comment