Scientific American on Piracy

David Pogue over at Scientific American has an interesting article that makes a point that most Irreal readers are familiar with: Hollywood encourages piracy by not making movies available legally. Pogue points out that many popular movies are not available to rent online and that none of the 10 most pirated movies can be viewed online legally. The result of this, of course, is that users—who are not at all inclined to be denied—simply download the movies illegally netting Hollywood no income from the viewing.

It doesn’t have to be this way. The music industry has already figured this out. Some people will pirate regardless of availability but the vast majority of people simply want to see the movie and would happily pay for it if it was available. Of course, this is well known and was neatly captured by the now famous Oatmeal cartoon. The industry mumbles about existing agreements and protocols as if these things were out of its control. Of course, they aren’t—it’s Hollywood for goodness sakes.

As I said, none of this is news to the people around here but it’s significant that we’re now reading these opinions in organs such The New York Times and Scientific American. It’s one thing to have nerds pointing out the obvious but quite another when the establishment media starts mentioning the same inconvenient truths.

Posted in General | Tagged | Leave a comment

Jon Bentley on Quicksort

One of my heroes in Jon Bentley. If you don’t know who he is, this post is for you. If you do know who he is, this post is also for you. Bentley is one of the original Bell Labs researchers from the Lab’s golden age. Many of you will know him through his Communications of the ACM Programming Pearls columns and the three books that recapitulated those columns.

Bentley is a guy who is vitally concerned with algorithms and how to optimize them. If you haven’t read Programming Pearls and the two sequels, you’re really missing out. I can’t emphasize enough how influential these books were on my development as a programmer. If you haven’t read them, you need to do so immediately. Really.

Bentley recently gave a talk at Google in which he attempts to answer the question “What is the most beautiful code you’ve ever written?” Being Bentley, the answer is not simply X but rather a careful and extensive exposition of his reimplementation of the quicksort algorithm. Nothing I could say can begin to give justice to this talk. It is, really, a distillation of what makes Bentley Bentley. You really MUST watch this video. Believe me, you won’t be sorry. This is a great talk and you WILL learn a lot.

Posted in Programming | Leave a comment

A Malware Debugging Tool From Google

After Irreal’s recent malware incident I’ve been keeping an eye out for ways to avoid any further exploits and for taking remedial action in case Irreal is reinfected. The particular piece of malware that attacked Irreal was only interested in Windows machines running either Internet Explorer or Firefox and therefore only injected code for those systems.

One of the problems with that is that it’s hard for those of us running other OSs or browsers to test for and find infected sites. As it turns out, Google offers a useful tool that does just that. The fetch-as-google tool allows you to see the site as the Google crawler does. This is a really handy debugging tool and one that everyone maintaining an Internet site should be familiar with.

I learned about it from this post on Matt Cutt’s blog. The tool itself is available from the Google Webmaster Tools, which has many useful tools for webmasters. Again, if you’re responsible for a Web site be sure to take a look at Cutt’s post and checkout Google Webmaster Tools.

Posted in General | Tagged , | Leave a comment

A Small But Nice Change to the Org-Mode Build Process

As regular readers know, I’m a great admirer of Org-mode; I use it everyday to, among other things, write these blog posts, maintain my todo list, manage projects, and keep several other files up to date.

I generally track the development Git repository but I haven’t updated since 7.8.03. Today I upgraded to 7.8.11 and noticed a small but very nice change. The procedure after doing a Git pull is to run make in the Org-mode directory and then do a 【Meta+xorg-reload to load the new software. The problem is that Org’s Makefile doesn’t work with OS X because the Emacs executable is stored in a Mac specific place.

I wrote a small shell script to modify Makefile to account for this but then the next pull would fail because there was a modified Makefile in the directory. I tried to remember to delete the modified file before the pull but, of course, I seldom did. It wasn’t a big thing, just a minor annoyance.

Today when I did the pull I noticed the Makefile had changed. Now, you’re not supposed to edit the make file itself but just put your changes in local.mk. Since local.mk is strictly local it doesn’t get overridden by the pull and there’s no need to fix things up every time you update. As I said, it’s a small change but it eliminates an annoyance and makes updating just a bit more frictionless. Many thanks to the Org maintainers for making my life easier.

Posted in General | Tagged | Leave a comment

Imagine That

For years the music industry has been whining about the digital apocalypse in general and streaming in particular. They were steadfast in their refusal to consider embracing new business models and held firm to the model that had always worked so well in the past.

Now All Things D is reporting that streaming accounted for 25% of Warner Music Group’s revenue in the last quarter. Significantly, the increase in streaming revenue did not come at the expense of traditional digital sales such as iTunes. Also significant is the fact that the increase in digital sales is greater than the decrease in the sale of physical media.

As many of us have said for years, the industry would have been much better off to devise and deploy new business models rather than suing their customers and third party enterprises that were trying to deliver music in new and efficient ways. None of this means that the music industry is changing its ways, of course, only that they’ve lost one more excuse for their shortsightedness.

Posted in General | Tagged | Leave a comment

Emacs Coding Systems

Those of us with, ahem, extensive experience can remember when ASCII was pretty much all there was. Happily, things are much different and better today. Now Unicode is all but universal and, in the U.S. at least, UTF-8 is king. Emacs now uses UTF-8 as its internal format and for most of us UTF-8 is our preferred coding system. Sometimes, though, UTF-8 isn’t enough and we have to use some of the other coding systems. Happily, most of us seldom, if ever, encounter this need but when we do Emacs is up to the challenge.

The incomparable Mickey over at Mastering Emacs has an excellent post on how to deal with coding systems in Emacs. If you find yourself needing to use alternate (meaning non-UTF-8) coding systems this post has the information you need to get the job done. He even presents a bit of Elisp to set environment variables specifying the coding system for other applications automatically. Even if all your work is in the ASCII subset of UTF-8 it’s worthwhile bookmarking his post against the day that you need to deal with other systems.

Posted in General | Tagged | Leave a comment

The Many Faces of Regex

One of a programmer’s most useful tools, Jamie Zawinski notwithstanding, is regular expressions. In a strictly Lisp world, s-expressions solve an astounding number of problems but in the real world of mixed technologies regexes are an incredibly useful and necessary tool. The problem is that there is no single “standard regex” syntax.

Even in the Unix world, where regular expressions made their first beachhead, there are two versions of regulars expressions: basic and extended. Today there are probably dozens of versions of regular expressions but for most of us there are really only four:

  • Unix basic regular expressions
  • Unix extended regular expressions
  • Perl regular expressions
  • Emacs regular expressions

Of the four, Perl regular expressions are probably the richest variety but they all have their advantages. In an ideal world grep, egrep, perl, and Emacs would all support Perl regular expressions plus whatever useful features the others have. Sadly, that is not the case so we must deal with multiple versions.

For the weak minded proprietor of Irreal, it’s always a challenge to keep the differences in mind. One of the ways that I’ve used to overcome this is Xah Lee’s Regex Tutorial. Lee has recently updated this so I’m mentioning it again for the benefit of those who missed my previous discussion of it. I have it bookmarked and if you, like me, need some help remembering the details of the various subtypes, you should too.

Posted in Programming | Leave a comment

Two Factor Authentication for Gmail

Mat Honan’s terrifying tale of being hacked should make all of us examine our digital security closely. If, like me and many others, a significant part of your life is lived or stored on-line, Honan’s story makes clear how vulnerable you can be.

I’ll probably have more to say about the Honan debacle later but suffice to say there are a couple of really important lessons to be learned. The first is that you must have reliable and continuous backup if you care at all about your data. Read Honan’s story to see how devastating, on a personal level, its loss can be.

The second lesson is that you must secure access to your on-line accounts. Honan was the victim of social engineering but there were still things he could have done to help mitigate the damage. One of those things is to lock down your Gmail account. These days, almost everyone has at least one and they often channel multiple accounts through a single Gmail account so that it is their gateway to all their email. The loss or compromise of your Gmail account can be devastating.

One way to prevent that is to use two factor authentication on your Gmail account. That can work in a couple of ways. The simplest is that when you sign on and give your password, Google will send an SMS message to your phone with a code that you have to enter in addition to the password. You can configure this so that Gmail will trust your computer for 30 days or more so that it isn’t as inconvenient as it might seem at first.

Matt Cutts, the head of the Google Web Spam team, has a nice post and video on how to set things up and some of the ways you can work with the system. I really recommend that you check out his post and video and that you implement two factor authentication. As Honan’s ordeal makes clear, the downside of failing to do so is just too horrible.

Posted in General | Tagged | 2 Comments

More You Can’t Make This Stuff Up

One hardly knows what to make of the Megaupload fiasco. On the one hand, Kim Dotcom hardly seems the picture of innocence. On the other hand, the worst that could be said of him is that there is some evidence he was involved with copyright infringement. Why, then, was it necessary to send an elite counterterrorism unit—complete with a helicopter injection and serious combat weapons—to raid his New Zealand home and arrest him? Now, thanks to a judicial review of the raid, we have the answer.

It seems the FBI was convinced that Dotcom, Blofeld like, had a doomsday device that would erase all evidence of his piracy off all servers all over the world. I’d love to believe that story but, of course, it’s complete nonsense. Leave aside the fact that the FBI had already seized those servers and shut them down, how exactly would this work? In the event it took the task force several minutes to locate Dotcom in his home’s panic room, giving him adequate time to unleash his doomsday machine. Needless to say, neither the NZ government nor the FBI could produce any evidence of the putative device.

It seems clear that the New Zealand government and the FBI got caught flatfooted with their overreaching and made up a story that only a teenage Bond fan could believe. One needn’t be sympathetic to piracy and those who engage in it to recognize that this whole raid was way over the top. Assault weapons and helicopters for copyright infringement? Really?

Posted in General | Tagged | Leave a comment

Whither TextMate?

Allan Odgaard recently announced that he is open sourcing the popular Mac editor TextMate. I’ve long considered it one of the few editors suitable for serious programmers so I treated the announcement as good news. It means that (what I consider) the three most important editors are open source.

Others, however, were not as sanguine. John Gruber of Daring Fireball writes “Pretty sure this is it for TextMate…” and Josh Kerr says that this is what happens when you set out to rewrite your codebase. Marco Arment joked that TextMate was just sent to retire on a farm upstate. My friend Watts Martin agrees that this is the end for TextMate.

All these naysayers are smart guys and may well be correct but it will be a shame if they are. One of the things that most everyone agree really hurt TextMate was the 6 years without a major update while Odgaard rewrote the code. Now that the source is available, it’s at least conceivable that a critical mass of developers could coalesce around that codebase and provide the regular updates needed to keep TextMate a major player in the field of text editors. Certainly, there are a large number of developers who have a huge investment in the muscle memory and mental model for TextMate. Of course, most of those developers won’t have the time or inclination to take on a maintainers role but perhaps a few will. In any event, I hope so. TextMate is a great editor and deserves to lives on.

Afterword: Odgaard speaks out and insists that he is not abandoning TextMate. Indeed, he says he will continue working on it as long as he is a Mac user.

Posted in General | 1 Comment