Wednesday, August 05, 2009

Quicksilver Solves Emacs vs vi

This will get geeky. First some background. Way before word processors, computers had text editors and two in particular came to prominence. Both vi and Emacs were written in 1976 and I think vi vs. Emacs really was the first Internet flamewar and it's still going on.

This was long before menus and mice so both text and editing commands had to be entered via the keyboard and it was even before arrow keys. But since you need to be able to type all the letters, numbers and punctuation, where do you put the commands like uppercase word and move forward a sentence? This was even before arrow keys so there wasn't that solution either. And both of these editors have a lot of commands (though I think it's fair to say Emacs has many more and vi users see that as a detriment).

In Emacs, commands have names like forward-word which moves the cursor forward a word. You can execute it by typing M-x which stands for hit the meta key and then x and typing forward-word. (Keyboards used to have a meta key, now usually the alt key stands in its stead or you can hit esc and then x.) Or for the more common commands (and even many uncommon ones) they are bound to a keystroke, in this case M-f. Emacs is famous for binding commands to crazy keystrokes like C-M-s (search forward for a regular expression pattern) or C-x C-s for save (type x while holding down control then type s while holding down control). You really do get used to it, and you can learn commands at your own rate but it's easier if you turn your caps lock into a control key.

vi is different, it has two modes: a command mode and an edit (aka insert) mode. In edit mode you type and the letters go into the document. In command mode, the various letters stand for commands. Famously (as many games still use this), the h, j, k, and l keys stand in for the arrow keys as left, down, up and right. $ is the end of the line and ^ is the beginning of a line. Type these and the cursor moves as commanded. w moves to the beginning of the next word, e to the end of it. 4w moves to the beginning of the 4th word following the cursor. etc. /string searches for "string" in the file. vi users are really good at switching between modes.

So real programmers use either vi or emacs. I've been using emacs since 1983. My friend Sean uses vi. I long ago got over the flamewars. An editor is only as good as you know it. If you're proficient at emacs you can be just as efficient as someone proficient at vi. But the flamewars continue.

When I switched to the mac I discovered the program Quicksilver. It quickly became my favorite program of all time, even more so than emacs. It's easy to use but not obvious and it's unfortunately very difficult to describe just how powerful it is. And I've tried, I wrote a 120 page manual for it and a one page quick reference sheet. This tutorial is a good intro, but basically it's a launcher. No matter what you're doing on the mac, type a configurable keystroke like command-space and it brings up the Quicksilver command window. Then you type to bring up the thing you want. It can be a program, the name of a file, or a song in iTunes or a person in the address book, or a bookmark in your browser, or an album in iPhoto or just about anything. Most launchers stop there, you bring up the thing, hit return and it opens (Spotlight works like that). Quicksilver's power comes from the second pane in the command window where you can enter a verb. Sure the most common one is open, but you might use Copy, Move To..., Email to..., Add to Playlist, Hide, etc. If I bring up a contact from the address book in the first pane I can choose actions like Compose Email to start an email or Email Item to then choose a file to send (it will just do it I don't even have to open Mail) or IM... or Video Chat... or Edit Contact, etc.
Picture 2 1.png
The intangible part of Quicksilver is that after you get used to it, you start all your actions on the computer with it. It almost becomes the interface to your mac, and it's very difficult to use someone else's machine that doesn't have it.

There's a lot more to it but one more thing to mention is triggers. You can bind commands to keystrokes to make them even faster to run. E.g., if I type option-command-f (I said I was an emacs user) Quicksilver appears and prompts me for text to search in imdb for. I look up movie titles and actors all the time using this. I don't have to first go to the browser and then visit imdb or choose a search engine from the search box drop down. One keystroke, type and see the results in my browser. If I add shift to the keystroke then I can first highlight text and hit and it searches for the text. So if I'm reading an article about a director, I can find his or her imdb page without ever having to type or even copy and paste the name, just highlight and type a keystroke. I used a trigger (control-shift-command-i) to resize the above screenshot to be 400 pixels wide to post on the blog. I use that trigger all the time.

Sean started using Quicksilver recently and is adding new commands and uses to his repertoire over time. I was describing a trigger I used all the time (hide the current application by moving the mouse to the top right corner of the screen) and he said "i don't use many key-combo triggers", he mostly just uses the Quicksilver command window and types in nouns and verbs. I replied that it "must be my emacs background" that I use lots of triggers. He said "vi has command mode which may be why I'm so comfortable in QS's noun-verb mode and rely less on combos, QS is like command mode for my OS" I thought that was a really nice description and added "and triggers are like emacs key bindings". The nice thing is that you can choose to use it either way. Quicksilver is really flexible in how it lets you use it and in its own way, it solved the emacs-vi war.

After we had this epiphany in chat he said "TO TWITTER!" and we both laughed and realized this wasn't going to fit in 140 characters. We both ended up blogging it. Here's Sean's writeup of this. He takes the analogy further and introduces perl.

Don't Republicans Know The Government Runs Medicare Already...and Well!

Art Laffer of Laffer curve fame, on CNN: "[J]ust wait till you see Medicare, Medicaid ... done by the government":

The Story Behind Clinton's Trip to North Korea

CNN has some facts about The story behind Clinton's trip to North Korea.

The key one seems to be: "During a phone call with their families in mid-July, the journalists told their relatives that they had been informed by the North Koreans that they would be willing to grant them amnesty if an envoy like former President Clinton would come to Pyongyang to secure their release."

I wonder if this was all about Kim Jong Il wanting a pic with a current or former US president before he died.

Anyway, it's good that Ling and Lee are back, and I'm anxious to hear them tell their story.

Obsessing Over Rashomon

Matt Shepherd tries to figure out Kurosawa's classic film in, In Which I Ruin Rashomon For Everyone, Forever. It includes detailed maps like this one:
RashoGraph_Main 1.png

and a few crazy theories, including an appearance by Swamp Thing. At least by the end he shows he does get it.

Apple Censors an iPhone Dictionary

The way you buy apps for the iPhone is by using Apple's AppStore. Apple has a policy of reviewing all the apps before letting them be sold. This might well be good to prevent viruses and malicious code from making it onto iPhones. They also review and rate apps for content much like movies have ratings. Unfortunately their review policy has been question and various apps have been rejected for really stupid reasons.

Daring Fireball describes the latest and I think worst example of this in Ninjawords: iPhone Dictionary, Censored by Apple "Apple requires you to be 17 years or older to purchase a censored dictionary that omits half the words Steve Jobs uses every day."

One of my favorite features of the mac is the built-in system wide dictionary provided by The New Oxford American Dictionary. It's also easy to use, hover the mouse over a word in just about any app (well any cocoa app) and hit option-command-d and a definition appears in the popup. This comes free with all macs. It has all the words listed as objectionable in the article; including their "vulgar" definitions. Apparently the parental controls has a “Hide profanity in Dictionary” checkbox.

Seems like the equivalent for the AppStore would be an uncensored 17+ version of the dictionary and a censored all-ages version. Since it seems that such reviewing mistakes happen weekly at the AppStore, it would also be reasonable to replace someone running the review policy.

Tuesday, August 04, 2009

Good Stuff on TCM

Turner Classic Movies is showing some good stuff this week. Tonight at 8pm is The President's Analyst, a really funny film with James Coburn. Tomorrow is a Harold Lloyd marathon of 19 films. If you haven't seen Safety Last (10:30am), you need too. Also on Thu morning at 4:30 they're showing The Sin of Harold Diddlebock that I mentioned the other day.

Krugman on the Media

Paul Krugman wrote today, Shape of planet blogging "Long ago I said that if liberals said the Earth was round, while conservatives said it was flat, the news headlines would read ‘Shape of the planet: both sides have a point.’ But I encountered a new wrinkle today."

Birthers Fall for a Fake Birth Certificate, Ignoring Real One

Daily Kos writes Debunking the unbearably stupid and points to even more at Third Obama birth certificate appears in court.

Some older stuff... Apparently birthers are mostly southerners.

Bill Moher wrote this week's New Rules as a very funny op-ed.

FYI, here's FactCheck.org's view on The truth about obama's birth certificate. "FactCheck.org staffers have now seen, touched, examined and photographed the original birth certificate. We conclude that it meets all of the requirements from the State Department for proving U.S. citizenship. Claims that the document lacks a raised seal or a signature are false. We have posted high-resolution photographs of the document as "supporting documents" to this article. Our conclusion: Obama was born in the U.S.A. just as he has always said."

The 100 Greatest Sci-Fi Movies

Total Sci-Fi has a list of The 100 Greatest Sci-Fi Movies that's actually quite good. It's easy to nitpick and the comments point out that they left out AI, War of the Worlds, and a couple of others. I think if you're going to include comedies, Mars Attacks would make the top 100.

I've seen all but 14 of their listed films. If you've seen any of these and think they're good, I'd like to hear about it in the comments:

16) Silent Running (1972)
38) The Fantastic Planet (1973)
40) Things to Come (1936)
43) Quatermass 2 (1957)
44) This Island Earth (1955)
47) Dark Star (1974)
50) Stalker (1979)
51) Tetsuo: The Iron Man (1989)
54) It Came From Outer Space (1953)
69) A Boy and his Dog (1975)
78) The Quiet Earth (1985)
79) Invaders From Mars (1953)
91) Explorers (1985)
99) Trancers (1985)

I 'd break up the films as follows. The numbers are the rankings from the article, and while I've made some attempt to group the better films towards the top of each section, it's hard to produce a completely linear ranking. I'm considering a few things in these rankings: film quality, sci-fi elements, fun, historical significance.

Here are the best sci-fi films:
8) Planet of the Apes (1968) - I think the best all-around
3) Star Wars (1977) - great fun and the most significant sci-fi film
2) 2001: A Space Odyssey (1968) - the most technically accurate, mind-blowing and advanced for it's time, though dull at times
4) Alien (1979) - the best suspenseful horror movie in space
13) The Empire Strikes Back (1980) - is this best sequel of all time?
21) The Matrix (1999) - a great action film and a great idea
7) The Terminator (1984) - I still debate between this and the sequel
6) The Day the Earth Stood Still (1951) - the best of the 50s films
1) Blade Runner (1982) - gorgeous and influential but a little dull at times

Here are great sci-fi films:
19) Star Trek II: The Wrath of Khan (1982)
32) Terminator 2: Judgement Day (1991)
15) Aliens (1986)
9) E.T. (1982)
17) Brazil (1985)
5) Metropolis (1927)
12) Forbidden Planet (1956)
25) Jurassic Park (1993)
27) A Clockwork Orange (1971)
35) Return of the Jedi (1983)
36) Back to the Future (1985)
37) WALL-E (2008)
88) Serenity (2005)
83) Twelve Monkeys (1995)

Here are really really good sci-fi films:
10) Solaris (1972)
11) Close Encounters of the Third Kind (1977)
20) Total Recall (1990)
90) Primer (2004)
75) Dark City (1998)
45) Eternal Sunshine of the Spotless Mind (2004)
46) Delicatessen (1991)
48) The Andromeda Strain (1971)
71) Donnie Darko (2001)
80) Fantastic Voyage (1966)
95) Galaxy Quest (1999)
67) Star Trek VI: The Undiscovered Country (1991)
68) Outland (1981)
98) Predator (1987)
23) The Thing (1982)
29) La Jetée (1962)

These sci-fi films I had some problems with but they're still worthy of being in a list of the top 100:
28) The Fifth Element (1997) - everyone in the future is an idiot, but nice visuals
57) Minority Report (2002) - good film, but the premise doesn't work, the evil plot was find someone willing to die and that's it
34) Mad Max 2 (aka The Road Warrior) (1981) - not my cup of tea
70) Mad Max (1979) - not my cup of tea
66) Children of Men (2006) - nice filmmaking and allusions but not enough story
74) Moon (2009) - nicely done but I didn't relate to the lead
93) Star Trek (2009) - good characterizations and some good fun, but stupid plot and some dumb scenes
60) The Fountain (2006) - some nice ideas but overwrought.

These films I have some fond memories of or at least don't hate, but it might be because I saw them a long time ago:
30) Sleeper (1973)
33) Westworld (1973)
42) The Abyss (1989)
49) The Omega Man (1971)
52) Escape from New York (1981)
63) Logan’s Run (1976)
65) Repo Man (1984)
72) Soylent Green (1973)
81) Barbarella (1968)
86) Altered States (1980)
89) Dune (1984)
92) THX 1138 (1971)
94) Flash Gordon (1980)
97) Stargate (1994)
100) Rollerball (1975)
96) Cocoon (1985)
22) Tron (1982)
56) Invasion of the Body Snatchers (1956)

These films didn't do it for me, but 100 is a big number and something has to be at the bottom
18) Akira (1988)
64) Ghost in the Shell (1995)
77) A Scanner Darkly (2006)
14) A Trip to the Moon (1902) - historical significance but not great today
31) The Fly (1986)
24) RoboCop (1987)
26) Invasion of the Body Snatchers (1978)
39) The Man Who Fell to Earth (1976)
41) 20 Million Miles to Earth (1957)
53) The Invisible Man (1933)
55) Godzilla (1954)
58) Alphaville (1965)
59) Gattaca (1997)
61) Them! (1954)
62) Videodrome (1983)
73) Cube (1997)
76) Starship Troopers (1997)
82) Fahrenheit 451 (1966)
84) Event Horizon (1997)
85) Independence Day (1996)
87) The Stepford Wives (1975)

Ok, tell me what I got wrong...

The White House Blogs Facts

I really like that The White House in Facts Are Stubborn Things is using the internet to try to stop disinformation about health care reform. I wish it would go a little further.

Rather than just allude to the disinformation, show the clips that are going around, show Fox news clips with lies about health care reform. Jon Stewart did a wonderful job last night in calling out the lies about the "Cash for Clunkers" program, particularly in describing The Crank Cycle about how Fox states something, a viewer restates it and then fox reports on the restating:

The Daily Show With Jon StewartMon - Thurs 11p / 10c
Master Rebators - The Crank Cycle
www.thedailyshow.com


Maybe the White House shouldn't stoop down to calling out the media, maybe you just show lies the republican congressmen and senators are saying.

Also I wish they would be a little more truthful and comprehensive, it would make them more convincing and give the opposition less ammunition to use. The fact of the matter is that today, most Americans can't necessarily keep health insurance or doctors they like. Since they get their health insurance via the employer, if the employer changes plans, most likely to save costs, the employee is forced to change. As near as I can tell, that won't change in the current proposals. It is different if you get your own insurance independent of an employer, or are in a successful government run plan like Medicare or the VA or if we had a single payer system.

Monday, August 03, 2009

Movie Review: The Hurt Locker

The Hurt Locker is an atypical war movie. It follows a bomb disposal unit in Iraq; these are people who walk up to bombs and try to diffuse them. It's extremely high stress work and the film shows this while exploring the type of person who would do this work and the effect of the stress on them. The opening quote is telling: “The rush of battle is often a potent and lethal addiction, for war is a drug.”

The first hour and half or so are four big set pieces of missions the unit goes on with just a little connecting them. The reality quotient seemed really high and I was on the edge of my seat the whole time. There's a lot of handheld camera work and a lot of effort is made to make you feel you're in the situation and raise your own stress levels. Like Full Metal Jacket and Black Hawk Down, you get a real sense of the terrain and the location of all the characters in a scene; not enough films do this.

The last 40 minutes adds more to the running story and the tense scenes are shorter. It's an unusual story telling technique, without clear arcs or even a climax. I'm sure this is deliberate to reflect lack of climax in a tour duty, particularly as there's a countdown shown on screen.

The film mostly follows Staff Sergeant William James who's an expert at his job but also quite reckless. This annoys the rest of his unit who fear that he is endangering them. He doesn't say much and yet the film is a skilled character study telling much more with actions than with words.

My biggest gripe with the film is the casting. They were all very good, particularly Jeremy Renner as James, but as the leads were unknown to me, I was more drawn into their story and the reality of the situation. My complaint is with the more well known actors in smaller roles. I didn't recognize Guy Pearce or David Morse, but when Ralph Fiennes and Evangeline Lilly appeared on screen I was immediately taken out of the picture.

The list of great war films is very very long, but it's now one film longer.

Movie Review: Moon

Moon got a lot of reviews as one of the best serious sci-fi films since 2001 and Solaris. That's high praise indeed. Some time in the future, 70% of Earth's energy needs are met by fusion powered by He-3 mined on the far side of the moon. A mining facility is staffed by just one man, Sam Bell who's a few weeks away from the end of his 3 year contract stint. He's aided at the facility by Gerty a robot voiced by Kevin Spacey. I won't give away the plot, but strange things start to happen.

Sam Rockwell plays Bell and gives the very good performance you would expect. It was made for just $5 million and it's very impressive on that account. The sets are sparse but reasonable and add to the sense of isolation. The film worked for me though I had a hard time relating to Sam. It could have just been me, but I found his reactions to some events rather baffling. Maybe it was just denial spurred on by the isolation, but I'm not sure why I should care about that. I wish the ideas presented were taken a little further, but I can also see how people would be very happy with this film. If you're a sci-fi fan you should certainly see it.

Friday, July 31, 2009

How Wolfram Alpha could change software

InfoWorld has an article about How Wolfram Alpha could change software. "Try cutting and pasting from the results page. You can't, and with good reason. According to Wolfram Alpha's terms of use [5], its knowledge engine is 'an authoritative source of information,' because 'in many cases the data you are shown never existed before in exactly that way until you asked for it.' Therefore, 'failure to properly attribute results from Wolfram Alpha is not only a violation of [its license terms], but may also constitute academic plagiarism or a violation of copyright law.'"

I haven't used it much since it first came out, though I did use it the other day to find out went sunset was. Instinctively I typed in "sunset boston" and it gave me the sunset times that day for Boston, MA and Newton, KS. Oh yeah, it can probably figure out from my IP address I'm in Newton, MA and it's supposed to assume that for location-awareness in the search. So I typed in "sunset" and yep, it gave it to me for Newton, KS. That makes no sense at all. They can copyright the sunset in Kansas for all I care.

Everything You Ever Wanted to Know About Birther Claims

McClatchy writes, Here's the truth: 'Birther' claims are just plain nuts.

The 2009 Perseid Meteor Shower

NASA reminds us about The 2009 Perseid Meteor Shower "Earth is entering a stream of dusty debris from Comet Swift-Tuttle, the source of the annual Perseid meteor shower. Although the shower won't peak until August 11th and 12th, the show is already getting underway."

"For sky watchers in North America, the watch begins after nightfall on August 11th and continues until sunrise on the 12th."

"The 55% gibbous Moon will glare down from the constellation Aries just next door to the shower's radiant in Perseus. The Moon is beautiful, but don't stare at it. Bright moonlight ruins night vision and it will wipe out any faint Perseids in that part of the sky."
C163F374-5CE3-466B-8CB5-9FC917D24E44.jpg

Thursday, July 30, 2009

Afghanistan Update

Spencer Ackerman wrote about What’s Missing From Miliband’s Afghanistan Speech. "U.K. Foreign Secretary David Miliband gave a speech to NATO headquarters in Brussels about the Afghanistan war, and it might be the most thorough and explicit explanation of coalition military and political strategy offered by a senior official of either the U.S. or U.K. government. There are just two big holes"

Podcasting Patented!

Ars Technica walks through the latest stupid patent award. Podcasting patented! VoloMedia claims major tech patent

"Hold onto your iPhones—a company called VoloMedia was yesterday granted a patent on a "method for providing episodic media content." Or, as the company puts it in today's announcement, VoloMedia now owns the "US patent for podcasting."

"The patent in question "was filed in November 2003, almost a year before the start of podcasting. This helps underscore the point, that for nearly six years, VoloMedia has been focused on helping publishers monetize portable media... Today, podcasting is 100 percent RSS-based. However, the patent is not RSS-dependent. Rather, it covers all episodic media downloads. It just so happens that, today, the majority of episodic media downloads are RSS-based podcasts, which is why we titled our announcement the way we did.""

Dave Winer provides some prior art of the work he did with Adam Curry in 2001. That's what I remember as the first podcast, or episodic media (in this case audio) download.

And, doesn't a six year lead time in processing a patent application seriously impede its usefulness?

Why Americans Hate Single-Payer Insurance

Paul Krugman explains Why Americans hate single-payer insurance. He points to a Washington Post story that included this quote: "At a recent town-hall meeting in suburban Simpsonville [SC], a man stood up and told Rep. Robert Inglis (R-SC) to ‘keep your government hands off my Medicare.’"

He doesn't spell it out that people are idiots and that the Republicans are lying to them but he does complain about the fear-mongering.

"We already have a system in which the government pays substantially more medical bills (47% of the total) than the private insurance industry (35%)."

If in 10 minutes Jon Stewart can get Bill Kristol to admit that the VA is a great health care system that's run by the government, imagine what could happen in say an hour long debate on healthcare between the sides (well by sides I mean the one trying to do something and the one lying to try to do nothing). Imagine if there was some forum, like an all day news channel, that could afford the time to have detailed debates between experts about health care. Or maybe some institution with a large building in our capitol where leaders could meet and discuss issues at length. Nah, they'd probably just screw it up.

Cellphone Gripes

David Pogue follows up last week's rant against The Irksome Cellphone Industry with detailed instructions on How to Bypass Stupid Voicemail Instructions. When you look at the industry overall, it's pretty ridiculous.

Wednesday, July 29, 2009

Real Controversies Result in Burgers

"The arrest of and ensuing debate over Harvard professor Henry Louis Gates Jr. has resulted in one positive thing: a new burger at Cambridge's signature burger joint [Mr. Bartley's]."

Years From Now, He Will Show This at His Wedding

Woot blogs, "Cute-blogging isn't usually my thing, but how could I resist this 5-year-old boy playing guitar and singing "Folsom Prison Blues"? Warning: not recommended for those with low cute tolerance."

Recreating Fenway

A friend had an extra ticket for the Red Sox at Fenway last night and invited me along. I hadn't been in a long time and it was fun, even though the Sox lost. The seats weren't great, in the right field grandstand under the upper deck. At some point we got to talking about what you'd need to do to recreate the full experience at home.

First, put some wood slats over the seat on your couch. Also install some arm rests in the middle and make the seats very narrow. Better yet, just swap out the couch for small wooden lawn chairs. You're also going to need to install one row behind you and two rows of seats in front of you.

It's optional, but to fully recreate section 7, install a large vertical metal beam in front of your TV. To get really complicated it should be on a moving platform that blocks the same view on the TV regardless of the camera angle being shown. This also varies by section, but for section 7, the seats should face 90° away from the TV.
Fenway 1.jpg

Invite strangers over to sit in the extra seats. Instruct them to randomly stand up and down, but only during plays and not between them. Also instruct them to synchronously stand and raise their hands above their head and cheer at random times starting after the 4th inning. About once every other inning have someone walk by you, forcing you to stand to let them by.

The people behind you should be talking most of the time about random things; but not about the game. The person to your left should be sitting with a wide stance for no reason. People on both sides of you should be using the arm rests. At random times you should pass food and money back and forth along the row. Also, people need to walk by in front of the TV at random times. Some of them should have large coolers on top of their head and should be shouting the name of one item from the concessions menu at Fenway. Half of these people should stop to block the view of the TV not covered by the large vertical beam you installed.

This could vary throughout the year, but during July and August turn on the heat and make the room really hot. Make sure the strangers sitting around you have not showered. The room should also smell of stale beer and sausages; you might have to set this up a day ahead of time.

Turn the sound down on your TV. Have one of the strangers announce only the name of the player at bat and of players coming into the game. You'll have to get all the rest of the information about the game visually. Close your eyes during the instant replays of all close plays; you only get to the see the replay of non-controversial ones. Having the sound down should also ensure that you don't know why a coach is arguing with an umpire.

In the middle of the 8th inning, everyone should stand up and sing Sweet Caroline. Then have a third of the strangers stand up and wait in the dining room. When the game ends, have them return and join everyone else in the living room. Everyone should stand up around you and not move for 10 minutes. Then have everyone walk slowly around the house three times. Then, to recreate the experience of getting home via the T, have them all move very slowly into the bathroom or a large closet and stand there very close to you with one arm raised above their head. After 45 minutes, they can all go home.

Every third game, have someone throw a beer on you.

Tuesday, July 28, 2009