I had thought that charging customers different prices for the same thing was unfair and the result of pure greediness. But Hal Varian explains why “differential pricing” might be better than fixed pricing, especially in industries with high fixed costs. One of the arguments boils down to: if some people are willing to pay more than others and the fixed costs are high, then you can end up in a situation where it is worse for the consumers (as a group) to all have the same price than to have different prices. The producer usually benefits from differential pricing, but in many (most?) situations the consumer does too. One case in particular is when the producer would go out of business without differential pricing; there is no benefit to the consumer of losing the opportunity of purchasing a product or service.

My sense of fairness says you should charge the same amount for the same thing, but the math shows that society is (overall) better off with less fairness.

Pay as you go.

I’ve also been thinking about fixed payments vs. charging for usage: road taxes vs. toll roads, unlimited vs. per-minute telephone charges, subscription vs. per-story newspaper fees, unlimited vs. micropayment for surfing the web, packages vs. pay per channel cable television. In all of these cases, I’m sure I would save money by having a choice to pay less (and get less), but I think the cost of thinking about each of the decisions would mean I’d end up less happy. I would have to question each phone call. I would miss out on some TV channels that I wouldn’t pay for if I had a choice, but occasionally offered something I want to watch. I would click on fewer links and view fewer web pages. I’d read fewer newspaper articles. I’d drive less, even at times when it’s worth it. I suspect (but have no good way of knowing for sure) that paying for use (which increases fairness, since everyone pays the “right” amount) would be worse for society than fixed payments.

Cost of decision making

When I started using gmail, I realized that over the years I’ve thrown away a lot of messages that I would’ve liked to have kept, because there is a cost of keeping it (exceeding quota, having to file them into folders, etc.). I have had to make thousands of tiny decisions (“do I keep this email?”) each day, and I sometimes I got them wrong. I probably would have been better off paying more, getting a much larger quota, and keeping everything. But at every email, there was no reason to pay for a larger quota.

Quicktime is so annoying. Quicktime for Windows uses the Mac interface. Blech. (I much prefer the Mac, but I would rather have consistency when using Windows than to have one app using a Mac interface.)

Anyway, it kept pestering me to upgrade itself. I’m sure that when it upgrades itself it will hook itself deeper into my system, but after many months of pestering I finally upgraded.

The license agreement includes:

THE APPLE SOFTWARE IS NOT INTENDED FOR USE IN THE OPERATION OF NUCLEAR FACILITIES,
AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL SYSTEMS, LIFE
SUPPORT MACHINES OR OTHER EQUIPMENT IN WHICH THE FAILURE OF THE APPLE SOFTWARE
COULD LEAD TO DEATH, PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE.

So are they worried that nuclear facilities are going to be critically dependent on Quicktime?

Wikipedia formatting rules, which include using inline HTML tags (which is different from what I had been thinking of doing—treating everything between tag pairs as raw HTML).

Alternative syntax for links, with the main variants being inline links, such as [http://www.ibm.com/ IBM Corporation] and out of line links, such as `IBM Corporation`_ and later .. _IBM Corporation: http://www.ibm.com/. This page also has some comments about character substitutions, such as -- turning into — and `` ... '' turning into “ ... ”. I’d like to have such features, but I don’t yet know how easy this will be.

There are lots of good ideas out there, and there are a lot of issues I hadn’t thought about. My own notes tend to be formatted so that I can easily edit them with XEmacs and filladapt-mode. Where I don’t have particular conventions already established (like named links), I would like to use what’s already out there.

For allowing HTML in my notes, I was originally thinking that I’d require XHTML, but this note about XHTML made me realize that all I wanted was a way to find closing tags, and not all of XHTML. I plan to require all tags to be closed (<X> ... </X>) or self-closing (<X />), but I do not plan to require other aspects of XHTML.

I envision three levels of parsing:

At the top level, a notes file is composed of several notes separated by some marker. The marker may contain some information. For my notes files, the marker is [bracketed text] on a line by itself, and the text inside brackets is the name of the note.

At the block level, there are four types of blocks:

Lists begin with a bullet (*, 1., etc.).

HTML blocks begin with an HTML block-level tag (<p>, <div>, etc.).

Preformatted text begins with spaces for indentation. All subsequent lines indented at least that number of spaces will be part of the preformatted text block.

Any other text (including HTML inline tags) begins a paragraph.

At the inline level, there are three types of spans:

HTML spans begin with an HTML inline-level tag (<img>, <a>, <abbr>, etc.) and end at the corresponding closing tag.

Markup spans begin with some markup character (*, `, \) and typically end with the same markup character. However, the rules are tricky because markup characters sometimes occur in contexts where they are not being used for markup. The \ character is used for escaping in contexts where the following character would otherwise be treated as a markup character. (This seems complicated.)

Text spans begin with any text.

Indentation plays a key role in parsing preformatted and list blocks Implementing this may be trickier than I initially expected, especially because my notes were not written with these rules in mind.

ReStructuredText and Twiki have had a lot of good work put into them, and it’s silly to reinvent it, unless I’m trying to solve a different problem. I have to remind myself that my main goal is to parse my existing notes, and my secondary goal is to be able to write new notes easily. If the syntax of old and new documents is going to be different, then perhaps my approach should be to write a parser for my old notes that converts everything to my new note format, or perhaps I should manually convert everything.

I’ve been looking through my old notes and have realized that like many other people, I follow certain conventions when writing text files. I’d like to publish some of these notes to a web site. The simplest thing to do would be to upload the notes as text. The second simplest thing to do would be to upload the notes as HTML, with a <pre> around the entire note. However, it would be cooler if I could take advantage of the conventions I've used to write something richer than text.

There are lots of systems that allow you to write text and produce HTML. I wrote one a few years ago to turn this text into this set of HTML pages. ReStructuredText turns text into HTML; see the sample page. Wikis turn text into HTML as well. Of these, the goals of structured text were the closest to my own: intuitive, simple, readable. However, none of these actually worked with my own text formatting conventions. My A* pages use { ... } for formatting. Wikis use lots of ` backquotes `. For example, see this set of rules, including “Use five single-quotes, or triples within doubles, for some other kind of emphasis.” ReStructuredText conventions are the closest to what I've used in the past.

My goal was to have a system that could read my existing notes for the past 15 years. I didn’t want to go back and edit all those notes to fit some formatting convention. In particular, these are some differences between my conventions and ReStructuredText:

I often use indentation for preformatted text. ReStructuredText uses indentation for indented paragraphs (using <blockquote>—ew!) and :: for preformatted text.

I use *bold*, /italics/; ReStructuredText uses **bold**, *italics*. I don’t think this would really matter though.

I don’t have a good convention for sections. In the last 5 years I’ve been using [header] on a line by itself, but I don’t have any way to have subsections. I have been writing short notes, not documents, so I never really needed subsections. ReStructuredText uses text with a line underneath or on top to mark section headings. It seems like a nice convention, but my existing notes don’t use it.

I don’t have a way to include images, because I am just writing simple notes. ReStructuredText has this:

At this point, I started wondering why I would want to write ReStructuredText instead of HTML: <img src="images/biohazard.png" height=100 width=200 alt="alternate text">.

I have no way to include links with anchor text. I do include URLs and email addresses, often but not always surrounded by <...>. ReStructuredText uses ` and _ characters, with several nice ways to avoid writing URLs inline in the document body.

Looking over my notes, I’ve realized that this task is harder than it initially seemed. For example, my notes mix plain text with code/output. I’d like plain text to be rendered in proportional font and code/output to be rendered in monospace font. I don’t have a good way to solve this for my existing notes. For future notes, I could use ReStructuredText’s convention of ``text``.

I have two problems to solve: how do I read my existing notes, and what do I do for new notes? I’m not trying to write documents (I am comfortable writing HTML); I’m looking for something simpler for quick notes. The ReStructuredText format for images made me realize that it’s really a new markup language. Simple things like paragraphs and lists are close to what I’d write naturally, but most of the formatting conventions are not. Then it hit me: if I need a markup language anyway, why not use HTML?

The problem with HTML (especially for quick note taking) is that it’s cumbersome for the simple things: text, paragraphs, lists, code snippets. For less common things (images, tables, anchor text), it isn’t as much of a win to invent a new language. So my plan is to parse text with the most common text formatting conventions (paragraphs, lists, etc.), but allow any HTML tag to “escape” into HTML mode. That way if I want to do anything complicated, I can drop into HTML, but if I want to stay simple, I can write plain text.

Why doesn’t ReStructuredText do the same thing? StructuredTextNG includes a rule to let people use SGML, but it didn’t seem to get much attention. I suspect it’s because they do not want to assume that HTML is the output format (it might be PDF or XML) and the target audience is less comfortable with HTML. TWiki also has both structured text and HTML. The original Wiki does not, and there is a discussion about pros and cons.

It will take some time to play with this system before I know whether I like it. I might end up finding that I do want to avoid HTML altogether, or that I want to write entire documents in text. I am likely to find that some of my old notes are ambiguous and cannot be parsed easily. It may be easier to go through them and fix them up instead of writing a more complicated parser.

Update: [2011] It seems that Markdown has won, not only for me, but for lots of other people. It also allows embedding HTML for when Markdown isn't enough. As of 2011, Markdown is being used by an increasing number of tools and apps.