Amazon and DRM

Over at Attendly.com John Birmingham has a provocative article entitled When It Comes To DRM, Amazon Is A Bottom Feeding Hell Beast. That is, to put it mildly, a bit hyperbolic but Birmingham has a serious point. A point that we’ve made here before: DRM is allowing Amazon to establish a virtual monopoly in ebooks.

Unlike many commenting on the situation, Birmingham has some skin in the game. He’s a fiction author who, one would think, has a lot to lose from people copying his books without paying. Indeed, he starts his article with a story of a women who had so enjoyed one of his early books that she photocopied parts of it and gave the copies to her friends. At the time he was not pleased but decided in the end that she probably earned him a couple of new readers. As Tim O’Reilly says, the typical author’s problem is not piracy but obscurity.

Regardless, he’s come to realize that the main effect of DRM is to make Amazon into a monopolist by trapping people in the Kindle ecosystem. Much the same can be said, of course, for Apple iBooks and the Barnes and Noble Nook ecosystems. Still, it is Amazon that everyone worries about. Notice who’s benefiting here. It’s not the authors and it’s not the publishers; it’s Amazon.

It is, then, an absurd irony that the authors and publishers are the ones insisting on DRM. Birmingham, for his part, is having no more of it and is now selling his books without DRM. We can only hope that the publishers will get on board before it’s too late.

Posted in General | Tagged | Leave a comment

Xah’s Unicode Gallery

Speaking of Unicode, as I did yesterday, Xah Lee has updated and rearranged all his pages dealing with Unicode and added a single, unified Unicode Gallery & Tutorial index page. I really like this because it provides a single page that serves as a portal to a vast amount of information about Unicode.

If, like me, you don’t use the rarer Unicode symbols everyday, this is a good resource to bookmark. If you are an Emacs user who often needs specialized Unicode characters, Lee lists some tools that may help. Regardless, it’s worth looking at the page just to see what’s there in case you need it later.

Posted in General | Tagged | Leave a comment

Encodings and Unicode

David C. Zentgraf over at Kunststube.net has a useful post about character encodings, Unicode, and UTF-X. The post is entitled What Every Programmer Absolutely, Positively Needs To Know About Encodings And Character Sets To Work With Text, which is a pretty good summary of its content. I’m confident that almost all Irreal readers will already know this material but if you’re confused about the difference between Unicode and UTF-8 or some other UTF encoding then you may find this post enlightening. Similarly, if you have non-technical friends who want a succinct explanation of why they’re getting a stream of gibberish characters in their browser this may be a good resource.

Posted in General | Leave a comment

Further Evidence for the Demise of Cursive

I’ve written a couple of times about the demise of cursive handwriting. Its proponents’ arguments have pretty much been reduced to (1) it is the apotheosis of all that is good and holy in written communication and (2) if we don’t learn to write in cursive, we won’t be able to read cursive. If you’re like me, you won’t find either of those arguments compelling.

Recently, I came across a column in The Washington Post Magazine by Gene Weingarten entitled Cursive, Foiled Again in which, with tongue firmly in cheek, he talks about cursive handwriting and how young people simply aren’t learning it. What struck me was the ages of the “young people.” I had imagined that today’s elementary school children weren’t learning cursive but Weingarten relates how neither a 28 year old colleague nor his son, also 28, had been taught cursive. Surprised by this, Weingarten checked and discovered that schools have been deemphasizing cursive for the last 20 years. Of course that will vary by state and school district but the trajectory is clear.

Weingarten’s column is amusing and worth a read. I especially like that he confirms my suspicion that the real reason the traditionalists maintain their death grip on cursive is, to quote Weingarten,

Why shouldn’t kids today have to suffer through learning cursive the
way we did, and from the same idiot book, which seemed to have been
designed by 19th-century French fops with perfumed doilies in their
sleeves.

Yes. I remember those books. Whether or not they were written by French authors, I recall that even as a third grader I found them annoying.

I am more than ever convinced that cursive—and probably all handwriting—is in a death spiral. It won’t bother me but there seems to be a lot of people for whom it appears to be the apocalypse.

Posted in General | 1 Comment

Some Common Sense on OOP

A few days ago, I ran across an interesting and commonsensical article on OOP by James Hague over at programming in the twenty-first century. In it he says that while OOP is sometimes useful, it’s not a fundamental particle of computing. Too often, he says, OOP is blindly applied to inappropriate problems. Problems that aren’t complicated enough to warrant its use and the difficulties that it brings.

It is, as I say, an interesting post and I was going to blog about it in a little more detail but Rob Pike beat me to it with his own post on OOP that makes the same point—and even mentions Hague’s post—in a more provocative way. Pike points to an example of OOP run amok that can be characterized only as terrifying. Pike says of it

Local discussion focused on figuring out whether this was a joke or
not. For a while, we felt it had to be even though we knew it wasn’t.

I can’t begin to describe the horror of it so you’ll have to go over to Pike’s post and follow the link that he gives.

The problem itself is to determine the operating system you’re running on and output a value judgment about it. As Pike says, this is a trivial problem that can be solved easily with a simple table look up in any language. Here it is in Elisp, for example:

(defvar systems '((usg-unix-v "UNIX" "good")
                  (gnu/linux "UNIX" "good")
                  (windows-nt "Windows" "bad")
                  (darwin "Mac OS" "far superior")))

(let ((box (assoc system-type systems)))
  (if box
      (message "This is a %s box and therefore %s." (cadr box) (caddr box))
    (message "This is not a box.")))

Simple, extensible, and not a class to be seen.

Posted in Programming | Tagged | 3 Comments

An Optimal .emacs File

I recently stumbled across this old post from Nickel’s Worth on optimizing your .emacs file. It’s from 2009 so it is, in some parts, dated but it still contains a lot of good ideas.

To me, the most controversial piece of advice is to avoid using load or require in your .emacs. I’ll let you read the post for the reasons for that but I will say that the suggestion is not without merit.

Another idea that solves a problem I seem to keep having is to use eval-after-load so that you can set various package-configuration variables without loading the package. For example, you might have the autoloaded package foo that requires that you configure the foo-blah1 and foo-blah2 variables. The way to do that is

(eval-after-load "foo"
  '(progn
    (setq foo-blah1 "some string")
    (setq foo-blah2 "some other string")))

That way, the setting of the foo-blah1 and foo-blah2 variables is not executed until the package is actually loaded so you won’t get a void-variable error. This suggestion alone makes the post worth reading.

This is a short post so there’s no reason not to give it a look. You may get some ideas that hadn’t occurred to you before.

Posted in General | Tagged | 9 Comments

Traveling Salesmen, NP, NP Complete, and NP Hard

Ron Hilton over at Absolutely No Machete Juggling has an excellent post on the traveling salesman problem. Hilton explains that when people say the traveling salesman problem is NP Complete they are almost always wrong. Almost because there are two formulations of the problem but only one of them is NP Complete and it’s not the formulation that everyone associates with the problem.

You can follow the link for the details but what I found especially interesting in the post was his explanation of the meanings of NP, NP Complete, and NP Hard. It’s one of the best explanations that I’ve seen. The short summary is

NP A proposed solution can be verified in polynomial time
NP Hard The problem is as hard or harder than any NP problem
NP Complete The problem is both NP and NP hard

but be sure to read Hilton’s more complete explanation. He also has a nice Venn diagram that shows how the three properties relate to each other.

You often see problems described as NP or NP Complete so if you have any doubt as to what that means, spend a couple of minutes on this post. It will be worth your while.

Posted in General | Leave a comment

Advanced Dired Tips

Xah Lee has updated his Emacs Advanced dired Tips page. I thought I knew all this stuff but Lee has some tips I wasn’t aware of. For example, you can configure what dired does when you try to copy or delete a directory. You can have it ask once for the top directory, ask for every directory and subdirectory, or not allow it at all.

At the bottom of the page he has a pointer to his Using Emacs’s “Dired+” (DiredPlus) Mode page. Almost every time I blog about a dired feature someone will comment that the feature doesn’t work for them. That’s because I use dired+. I’ve been using dired+ for so long I always forget that I’m running it instead of plain dired. Everyone should be using it. There’s no reason not to and it’s easy to install with ELPA. There’s virtually no configuration either. Here’s what I have in my init.el:

(require 'dired+)
(put 'dired-find-alternate-file 'disabled nil)  ;enable `a' command

The put command enables the 【a】 command that replaces the current dired buffer rather than opening an additional buffer when you move to another directory. If you don’t include that, Emacs will ask you if you want to enable it when you try to use it so it’s not necessary to include it.

Take a look at Lee’s Advanced dired page and for goodness sake install dired+ if you haven’t already.

Posted in General | Tagged | Leave a comment

Common Lisp Naming Conventions

Over at the newly redesigned Common Lisp Wiki, CLiki, they have an excellent page on Common Lisp naming conventions. Most people that have done a non-trivial amount of Lisp programming will be at least dimly aware of many of these conventions but there’s also a number of rarer conventions that may be new to many.

Most Lispers know the “predicate convention:” predicates end with “p” unless the predicate contains a hyphen, in which case it ends with “-p”. Thus it’s zerop and simple-vector-p. But what about string-lessp? That seems to violate the convention and I’ve always wondered why. It turns out that the actual convention has a third part that says if a new predicate is formed by adding a qualifying prefix to an existing predicate, then the new predicate is formed by adding a hyphen between the prefix and old predicate and the “p” or “-p” at the end is unchanged. Thus when lessp is qualified with the prefix string we get string-lessp instead of string-less-p. Follow the link for the rationale for this rule. Of course, there’s also the grandfathered-in predicates such as null and equal that don’t honor the p convention at all.

There are other interesting notes about the conventions so even experienced Lispers are likely to find the page interesting. If you program in Common Lisp you should check it out.

Posted in Programming | Tagged , | Leave a comment

Randall Munroe on XKCD

The MAA has a great interview with Randall Munroe on every geek’s favorite online comic. Being the Mathematical Association of America, the interview concentrates on the more mathematical of the cartoons. Munroe talks about how he comes up with the ideas for and how he solves the problems that the cartoons explore. You may be surprised at how he arrives at some of those solutions.

If, like me, you’re an XKCD fan, you should definitely take a look at the interview. It’s interesting and gives some insight into how Munroe produces our favorite cartoon.

Posted in General | Leave a comment