I found the site last night while looking for information about Unicode U+2024 ONE DOT LEADER, which was referenced in an article about mdash, ndash, hyphens, and other typographical characters in HTML. SIL’s site promised me “here is the true story of U+2024.”

Branch to the Right: an article about writing (one of fifty; I will not read them all this weekend)

Country Codes used by various organizations; I found this while trying to understand Great Britain (GB) vs. United Kingdom (UK), why ISO assigns the code GB to the United Kingdom (ick), and why the top level domain for the United Kingdom is .uk instead of .gb (since it’s supposed to match ISO)

For those of you who aren’t yet scared of Python, maybe these will help:

Recipe 299,777: subclass dict, assign self.__dict__ to point to self. I can’t believe this really works. For those of you wondering: __dict__ points to a dictionary that contains the fields of an object. By making a dict’s __dict__ point to itself, it exposes all of the dictionary’s mappings as fields of the dictionary itself. Ooh it’s all twisty.

Recipe 66,531: make a Singleton by having all instances share the same __dict__. Normally you make a Singleton class that constructs only one instance. Here instead you allow lots of instances, but make them share state. Brilliant.

Recipe 303,057: intercept name lookup in a specially marked method to provide Prolog-like functionality in Python. This uses Python 2.4 decorators to intercept method definition. It inspects the methods, finds out what names it refers to, and points those names at Prolog-like variables. I don’t quite follow everything going on in this recipe, but I like it!

I found these on Oliver Steele’s post about Python becoming Lisp. I studied Scheme, not Lisp, and I have to say that the above examples are not Schemish. Python has its own flavor of demonic insanity.

Oliver Steele offers some good thoughts on IDEs vs. editors. I admit I am a “language maven”, but I’ve also tried using IDEs. There are some really cool things that you can do with an IDE and I would like to use them. Most recently I used Eclipse to build a Java applet. Given that I am not a Java pro, it was definitely easier to use an IDE that knew all the black magic to compile applets than if I had used Emacs with command line Java tools. The trouble is that in my everyday work, I am working with Java, C++, Python, text files, XML, HTML, CSS, Javascript, shell scripts, and a little bit of Perl. I use Windows XP, Windows 98, and Linux. So I have to choose between using one tool for all of these, or using maybe 12 different tools, each specialized for one task. I keep returning to the one “swiss army knife” approach.

Computer people like hierarchies. File system folders, HTML/XML/SGML, Java packages, class hierarchies, Usenet groups, the Windows registry, domain names, IP address assignment, software version numbers (1.1.5 comes before 1.10), GUI widget container hierarchies, URL paths, and hierarchal menus are some examples. Hierarchies are expressed using tree data structures, and trees are pretty cool. So we tend to want to use them when we see a new problem. It’s a structure taught to all computer scientists. It’s an old familiar friend.

Sometimes a tree isn’t the best structure for the problem. On the Internet you see some things that are not hierarchies, like email addresses (user@domain), the web (a directed graph structure), and IP routing tables. Sriram’s post got me thinking about overusing tree structures, and in particular, the A <i> b <b> c </i> d </b> e problem in HTML.

HTML uses a containment model: when you write <abc>xyz</abc>, xyz is contained “inside” the abc element. In a containment model, A <i> b <b> c </i> d </b> e is an error. In contrast, Emacs and XEmacs use an overlay model. Instead of a containment relationship, an overlay is attached to any span of text, and overlays can overlap. In an overlay model, A <i> b <b> c </i> d </b> e should be rendered A b cd e. There’s no problem. The text selection is also something that is hard to express in a tree structure. It’s just another overlay in Emacs.

But overlays don’t seem to be the right fit for larger structures, like paragraphs, sections, documents. For those containment makes more sense. Within a block however, overlays make sense. I think the difference may be between things that can be nested (a div can be inside another div) and things that can’t (it makes no sense to put an i inside another i), but I’m not really sure.

An argument can be made that supporting A <i> b <b> c </i> d </b> e properly at the expense of no longer having a uniform model (which is used by DOM, XSLT, etc.) isn’t worth it, but that argument should be made explicitly. Every use of a tree structure should be justified, because there is a natural bias towards trees among computer folk.

I am quite impressed that they left it subtle instead of highlighting it. It reduces the short-term impact but is much cooler in the long term. Things that take some effort or luck to notice are the things that people will remember. If it’s easy to see, it’s easy to forget.

For a few years now I’ve been wondering what subjects I would have liked to learn in high school. I got very little out of Literature or History, but I love learning history from The History Channel. Typing was a great class. I hated it at the time but it has been quite a valuable skill. Physical Education (a.k.a. Gym) made me hate exercise. :-( I’m quite happy I took Math and English. Two subjects I wish were mandatory:

When two prices are charged, people paying the higher price (often in the United States) believe that if the firm were forced to charge one price, it would charge the lower one. Unfortunately, that is not always the case. Sometimes mandating a single price results in just choking off the small market, rather than lowering the price in the large one.

These will display a blue ◇ next to unvisited links, a purple ◆ on visited links, and a red ↷ on links that have another URL embedded inside (usually indicating a tracking redirect), a red ✉ on email links, and a red ✇ on javascript links.

You can pick lots of fun shapes and symbols from Alan Wood’s Unicode page (note: there are lots more pages on his site with lots more symbols). To use a different symbol, just put in its Unicode hexadecimal value in the CSS, with six hex digits (i.e., use a leading 00).

I don’t know if I will keep these customizations, but it’s fun to play with. You can put any text or the value of any attribute before or after any HTML element. Mix this with hover effects for lots of fun! Opera users can also have fun with generated counters (for example, to number all the links on the page).