Archive for November 2006
Writing for Computer Science
There is a book with that title. Other good related resources are the links here, and (more general) here. Also, maybe at this course home page.
Too much choice?
Originally from Joel Spolsky’s article about the Shutdown menu, to a Slashdot article, and then these links:
Sheena Iyengar studies choice. This paper was suggested (by the poster) as a good place to start. Barry Schwartz has done some work too, and also written articles like this. A short article is here.
Update: There is a video here.
Some people (sensibly) disagree.
(BTW, Joel has also written about it before. And later?)
Is it just American high schools?
Linked-to from a post on this Slashdot article, is an article called The Six-Lesson Schoolteacher. This ties in with what I read in Paul Graham’s essay (some reactions).
Although it is nowhere as bad as that here, they’re still interesting to read. I doubt there is any actual conspiracy going on, but those are probably the “lessons learned”, intended or not.
String Theory
Between this and this and my reading of Feynman’s Rainbow today, I must say that my opinion of String Theory isn’t really… :-)
Update: Also (noting it down because I’m too busy/lazy to read the entire thing now): A Slashdot review of Smolin’s book mentioned above.
Another update: A reply by Joe Polchinski
PHD comics on astrophysics, largely the same.
And until I file this away in the proper place (along with Murphy’s laws, etc.), here is Tumbling toast, Murphy’s Law and the fundamental constants (not available), and the misanthropic principle.
BSNL DataOne’s DNS
The manual I got asked me to use 61.1.96.69 and 61.1.96.71 as the domain-name servers, but it appears that this is not really optimal. I found other sources, and confirmed by looking at one particular DataOne manual.
Here are the first few lines of my /etc/resolv.conf now:
nameserver 218.248.255.145 #BSNL, primary for South, secondary for North nameserver 218.248.255.193 #BSNL, primary for North, secondary for South nameserver 61.1.96.69 #BSNL, primary for East nameserver 61.1.96.71 #BSNL, secondary for West nameserver 218.248.255.177 #BSNL, primary for West, secondary for East nameserver 208.67.222.222 #OpenDNS nameserver 208.67.220.220 #OpenDNS
The first one is really faster slightly (about 63 ms instead of 79 ms, or so), but I doubt if it matters…
[Update, asked in the comments: use this on Windows.]
You just can’t kill some people, apparently
From a fortune quote:
The Least Successful Executions History has furnished us with two executioners worthy of attention. The first performed in Sydney in Australia. In 1803 three attempts were made to hang a Mr. Joseph Samuels. On the first two of these the rope snapped, while on the third Mr. Samuels just hung there peacefully until he and everyone else got bored. Since he had proved unsusceptible to capital punishment, he was reprieved. The most important British executioner was Mr. James Berry who tried three times in 1885 to hang Mr. John Lee at Exeter Jail, but on each occasion failed to get the trap door open. In recognition of this achievement, the Home Secretary commuted Lee's sentence to "life" imprisonment. He was released in 1917, emigrated to America and lived until 1933. -- Stephen Pile, "The Book of Heroic Failures"
I looked for, and found references to Joseph Samuels here.
The latter, John Lee, seems to have inspired even more curiosity: there is an account here, he gets a chapter of a book here, and the BBC had a programme about him, based on the work of someone who has done an incredible amount of research on the case, and even written a book! Quite interesting.
Emacs, keyboard, mouse, lies, statistics
There is a Woodnotes Guide to Emacs for Writers, also available as a PDF file. It’s an introductory thing; maybe I’ll skim over it someday to see if there’s something useful. There’s also Bram Moolenaar’s Seven habits of effective text editing, which I must read sometime. I’m sure the advice is just as valid for Emacs (or any worthy text editor) as it is for Vim.
There is Steve Yegge’s Effective Emacs, which is possibly an attempt to come close to the “7 habits” above, but most of the tips are either things I already know or relatively irrelevant. The “other things” list and the end, and some of the comments, are quite useful, though. Anyway, it appears that it ruffled some feathers, of someone claiming that using the mouse is always faster than the keyboard, referring to a study described on “Ask TOG” in Parts One, Two, and Three. The study claims that keyboard users forget the 2 seconds of cognitive effort they spend trying to remember which keys to use, and therefore it only feels faster, even though it isn’t. It is possibly true, but I doubt I really spend 2 seconds thinking about the keystrokes to use (for common tasks, at least). The number of times I hit C-x C-s when using something like gedit would certainly be an insignificant fraction of its current value if I spent even half a second thinking about it, I think. Besides, the study mentions the task they used to test:
Using Microsoft Word on a Macintosh, I typed in a paragraph of text, then replaced every instance of an “e” with a vertical bar (|). The test subject’s task was to replace every | with an “e.”
and says that
The average time for the cursor keys was 99.43 seconds, for the mouse, 50.22 seconds.
This task is something I can do in at most 4 seconds in Emacs with the keyboard (M-x replace-regexp, which I’ve bound to a single keystroke), and even in MS-Word with the mouse, in about 10 seconds, probably. (Navigate to the Search/Replace menu, type | and e, click Replace All.) If you make a study under artificial conditions, surely you’ll get artificial results?
The pefect (non-)markup solution
(This
I just found something that’s amazing in its simplicity, and yet neatly solves a problem. Maybe you’ve sometimes wondered how to markup your email (perhaps in cases where you want the same text to be reusable) and yet retain its readability. (I have a friend who sometimes writes email in TEX markup, which is just incredibly wrong and annoying.) There is a solution that is as close to perfect as imaginable: Markdown. Its Basics page was itself written in Markdown. The syntax is perfectly readable; it is available on Ubuntu and Debian, and can even be generated from HTML, in case one wants to go in the other direction. It even has a Wikipedia article, and (even without looking!) I’m sure it’s the best “lightweight markup language” there is. There seems to be a markdown mode for Vim, but no “standard” mode for Emacs yet. (But with such good and readable syntax, who needs an Emacs mode, anyway?) There is a comparison here. There are converters from MarkDown to other formats (such as LaTeX), see Pandoc (written in Haskell!) and MultiMarkdown.
Another thing that looks impressive (and even more useful, because it is well-integrated into Emacs) is Emacs Muse, can be published to a lot of formats, including DocBook and LaTeX. Documentation here, and someone’s personal notes here.
I haven’t tried either of them yet.
[Update] Emacs Muse is nice, but it’s really not polished enough yet. (Either that, or if it’s not going to change then I don’t like it.) There are no nested lists yet. (It does now.) Markdown says
The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email.
That doesn’t seem to be Emacs Muse’s “overriding design goal” to me (I need to figure out why I feel so, but somehow the syntax feels kludgy and seems to have many bad corner cases).
As I see it, the most powerful and compelling features of Emacs Muse are
- The entire publishing system, where you can take a document and publish to multiple formats based on syntax translation rules, keeping a daily journal, etc. (planner-el depends on Emacs Muse for some of its functionality.)
- Its integration with Emacs
Frankly, IMHO, the actual markup language is not one of its greatest features, and it would be great if they used — or allowed plugging in — other existing languages.
(Update-update: This does seem to be the idea, or at least was at some point of time. See this thread, which contains a file that provides some MarkDown support in Muse.)
[End update.]
Who writes Wikipedia?
More specifically, who contributes to the content of an actual Wikipedia page?
Wikipedia says: lots of things boiling down to nothing.
Jimbo Wales says: something like “The idea that a lot of people have of Wikipedia is that it’s some emergent phenomenon — the wisdom of mobs, swarm intelligence, that sort of thing — thousands and thousands of individual users each adding a little bit of content and out of this emerges a coherent body of work. But the truth is rather different: Wikipedia is actually written by a community … a dedicated group of a few hundred volunteers… I know all of them and they all know each other. Really, it’s much like any traditional organization.” (not his actual words, but somewhat close)
However, Aaron Swartz finds out, and describes in an excellent article, that the truth is that
- most of an article’s content is written by occasional Wikipedia contributors most of whose (very few) edits are probably on just that page (and perhaps related ones), and
- most of an article’s edits are made by regular Wikipedia contributors, who probably make minor changes such as formatting.
[After this, Slashdot says: the usual hodepodge of good, bad and funny, as usual. Also, some responses are collected here.]
This makes sense: people good at one particular subject write on Wikipedia on that topic, and people involved in Wikipedia, and aware of its syntax and conventions, make most of the edits. Which is why, if you use “number of edits” as a metric for contributions to Wikipedia (as Wales did), you will find that most of the edits are made by the regulars, a fact that, although true, obscures the equally true fact that most of the content comes from others.
(I don’t mean to say that the “minor fixes” contributors are less important than the others; in fact I’m one of them. :-) )
Offtopic: A random interview.
Linking to the New York Times
The New York Times have a policy whereby links to them from weblogs require no payment (nor registration, it appears).
Someone has put up a link generator here. Please use it when linking to the NYT from blogs.
Tracking down the Japanese “defective parts” anecdote
I’d heard this anecdote about the Japanese explicitly sending defective parts because the order allowed for it. (Search Google for “other sources”.)
I haven’t actually found it on the Globe and Mail as it claims, but that doesn’t mean anything.
Anyway, I guess this is as reliable a source as I can ever hope to find ….
Passwords
How does one keep up with having to have passwords at hundreds of places? (Literally: I just counted the number of saved passwords in my Firefox profile and it’s 54. Considering that I just cleared my profile recently, I’m sure that counting all sites I’ve ever registered at will easily take the number over 100.)
The recommended thing, of course, is to have passwords that are
- Hard for others to guess
- not nickname, dog’s name,…
- Hard to brute-force
- sufficiently long, containing both uppercase and lower case letters, digits, symbols,…
- Different for every site
- This is so that if some gains access to one, they don’t have access to your entire online life
- Changed every once in a while
- so that if someone gains access and doesn’t reveal it, they can’t continue to covertly have access to your information for ever — they’ll lose it the next time the password is changed.
- Not written down anywhere
- If you leave your password lying around, someone might see it.
No one does this, I’m sure. No normal person can possibly remember hundreds of obscure, randomly-capitalised strings—which is why it is a bad idea to advise people to do all of the above. Indeed, Microsoft’s Jesper Johansson argues that users should be encouraged to jot down their passwords. Not the best advice, but at least it recognises that people have trouble remembering, and that choosing strong passwords, different for every site, is more important.
So returning to the question: How does one keep track of multiple strong passwords?
- Writing down: others can get at it
- Password manager (software like KeepPass, or store on an encrypted USB keychain: won’t work everywhere): if you lose it, you’re locked out!
- Choose strong but memorable passwords: For example, use a phrase and take first letters: “Ask not what your country can do for you” → “anwyccd4y”, etc.
- Avoid having passwords at all, wherever possible: Bugmenot!
A good solution would be to remember a single password, and then use some secure way of generating passwords for different sites, based on the domain name for example. This had better be one-way, of course, so that someone who gets the password for one site won’t be able to get the other passwords.
Some people have done this, and there are solutions with varying levels of security and ease of use:
- Nic Wolff’s password generating page
- Zarate’s page, with more options
- A better version, and its even better version at hashapass.com.
- A cool-looking version
Note that the above two only draw characters from a 16-letter alphabet; I doubt if they are really safe.
But the one I would most trust to be secure is PwdHash, by Dan Boneh and others at Stanford. You can read their paper or PowerPoint presentation. Dan Boneh is one of the top researchers in Crypto and a great speaker (I have attended some lectures by him, one of which was on phishing and PwdHash and similar solutions.)
It aims to be a solution simple enough for your grandmother to use, and is actually developed as an anti-phishing tool, so it protects you from phishing as well as password theft. It is the one that integrates most perfectly into the “user experience”.
Here’s how it works: you remember just one password, and type your “common” password into a site’s password field, and PwdHash automatically replaces it with another password that is specific to that website, based on the domain name and the password you typed.
How to use it, in detail:
First, pick the single password that you want to remember. Make it begin with “@@”. (If the password you want to remember doesn’t begin with “@@”, you’re out of luck ;-))
- For changing your password on some site: Enter the old password as it exists, and for the new password, type the password you picked above. PwdHash will replace it with a hash based on your password and the domain name.
- For setting your password on a new site: Do the same thing! (Just type your generic password (the one that starts with “@@”, and it will replace it by a specific password.)
- For logging in to some site later: Do the same thing! (Type the generic password, and it will be replaced by the correct password.)
If you are in a place where the extension cannot be used, you can go to https://www.pwdhash.com and generate it there. (Just don’t type the “@@” there.)
Idleness, leisure, procrastination
Here is a very interesting article called Quitting the Paint Factory by Mark Slouka. Although, of course, I’m the one who needs it the least.
Anyway, at least it led me to the Wikipedia article on procrastination (nothing great there) and to discover that there is (at least currently) a separate article on academic procrastination!?
Reading Aaron Swartz’s essay today, I learnt that rewards and punishments do not work.
There are a lot of myths about productivity — that time is fungible, that focusing is good, that bribing yourself is effective…
He also quotes Alfie Kohn, who has written books and articles on related ideas, and especially quotes one particular article. Others agree: Wanting to do the tasks is most important. Even David Allen thinks so. There’s also Paul Graham’s essay, in which he points out that having a to-do list and doing the things on it — the minor, unimportant “errands” — is also actually a form of procrastination that avoids doing the really important things, and that most of us use the errands as an excuse, and make sure we don’t have time to do the important things.
Ubuntu/Debian have a nice small useful package called gtimelog.
There is also planner mode for Emacs, and Timeclock, and they can be used together. There is a step-by-step tutorial here.
, but I think I’ll check them out some other day and actually do something useful now, for a change. There is also org-mode; screenshots in the tutorial and manual here. Orgmode homepage, another howto, debian package?, and Sacha Chua’s unbiased comparison with Planner.el.