The Lumber Room

"Consign them to dust and damp by way of preserving them"

Archive for November 2006

The pefect (non-)markup solution

with 4 comments

(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

  1. 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.)
  2. 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.]

Advertisements

Written by S

Sun, 2006-11-05 at 21:18:55

Who writes Wikipedia?

with one comment

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

  1. 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
  2. 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.

Written by S

Sun, 2006-11-05 at 19:47:29

Posted in Uncategorized

Linking to the New York Times

leave a comment »

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.

Written by S

Sun, 2006-11-05 at 17:26:13

Posted in compknow

Tracking down the Japanese “defective parts” anecdote

leave a comment »

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 ….

Written by S

Sat, 2006-11-04 at 16:06:00

Posted in funny

Passwords

leave a comment »

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:

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.

Install it for Firefox here.

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.)

Written by S

Fri, 2006-11-03 at 08:39:30

Posted in Uncategorized

Idleness, leisure, procrastination

leave a comment »

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.

Written by S

Wed, 2006-11-01 at 17:52:24