« | » Main « | »

Why Edison lost the record business

Wednesday 30 April 2003

Michael Tsai draws a parallel between Apple's online music biz and Edison's attempt to sell records.

I think getting the big players on board is a necessary first step to getting the concept accepted. It reminds me of Don Norman's story about how Edison's phonograph lost.

The Edison story is good, and shows how the old genius made the same business mistakes as plenty of other geeks: he put too much faith in technical superiority.

Looking for heap tools

Tuesday 29 April 2003

I'm looking for tools for understanding how memory is being allocated and freed in my C++ heap. mpatrol looks very full-featured, but perhaps a bit too grungy to get going. I like that it is free, but would feel more optimistic about my chances with it if it mentioned Visual C++ anywhere in its documentation (it's very GNU-centric).

Does anyone have any recommendations for good tools that aren't too expensive (free is ideal!), can report on leaks, fragmentation, etc, and is fairly painless to get started with?

Here's a list of such tools, though I get the sense that it is a few years out-of-date.

Summer of 5

Sunday 27 April 2003

The weather is turning nicer, and you know what that means: more juggling. I have long enjoyed juggling (my father taught me so long ago I don't remember learning), and have kept it up enough that my skills have continued to improve. A few years back I learned the three-ball shower (where the balls go in a circle, cartoon-like, rather than the standard over-under cascade pattern). Last year I finally mastered four balls, which I previously never liked because of its split-screen feel, since at its simplest, the balls stay in their assigned hand. (As with any specialized discipline, there is way more to juggling than the person in the street would guess. Take a look at some Juggling Animations to see what I mean).

This year, I'm going to try to get to a five-ball cascade. I've been approaching it from a few different angles for a while now, and think I may have enough basics to just go ahead and do it. We'll see. Maybe this public declaration will force me to master it.

In preparation and as incentive, I've ordered five Todd Smith beanbags. Wish me luck!

MIME message structure

Friday 25 April 2003

You'd think after 18 months of working on the Kubi Client, I would be able to do MIME structures in my sleep. But I had to look it up again today, so I'm putting this here so I can find it again. Also, I figure if I need to look something up, someone else out there may find it useful.

There are three commonly-used Content-Type headers for structuring MIME messages:

  • multipart/mixed for adding attachments to a message,
  • multipart/related for combining inline images with a message, and
  • mulitpart/alternative for collecting different representations of a message.

» read more of: MIME message structure... (3 paragraphs)

Hand-rolled blogs

Thursday 24 April 2003

Tantek talks about hand-rolled blogs. I'm interested, because I fall into his second category ("folks who rolled their own blogging content management system"). Photomatt followed on, with insightful comments that neatly step over the class warfare between the out-of-the-box people and the hand-rolled people, to get at the important point:

Whatever you do should put as little as possible between yourself and whatever it is you love about creating your little corner of the independent web. ... Tantek is happy writing the code for his page, just as I get a buzz typing in a box and having everything else happen automagically. ... Do what makes you happy.

This site is hand-rolled because I love understanding how web sites are built, and writing tools to create web sites. Some days I would like not to have to worry about it, but on those days I can just ignore the tools that are in place and working. On the days when I want to make something happen differently, I can hack on the tools.

BTW: many of the hand-rollers seem to do it because they care passionately about the style and structure of the markup (that is, the tags themselves, rather than the page they produce). I can understand that passion, and would like to be able to partake in it. If you look at the HTML that produces this page, it is nothing to be proud of. Someday I will get rid of all the tables and 1-pixel gifs and do a real 21st-century CSS-driven accessible layout. But not yet. I don't have the time, focus, or stomach for the multi-browser debugging that would take.

The whole thread got started by Zeldman railing against RSS feeds (because they homogenize the web experience), something I myself have felt before. Even when I use an RSS reader, I use it more as a bookmark manager with update notification than as a way to read the bodies of entries.

Chandler and Vera

Tuesday 22 April 2003

No, it's not an episode of Friends about cheating on Monica. Two open-source projects became availble recently.

Chandler 0.1 was released yesterday. It is very very early, but I applaud OSAF's determination in getting this out, and their courage. There will be many naysayers for this project; I for one am glad to have it in the mix.

Vera is a collection of typefaces from Bitsteam for use in open-source projects. They look good, and should provide relief from the never-ending clones of Times and Helvetica.


Saturday 19 April 2003

OpenEXR is a new image format developed by Industrial Light & Magic to accomodate the needs of film makers. For example, the data is recorded at a higher dynamic range (using 16-bit floats) than the typical 0 (black) to 1 (white) that most image formats use. I have no need for this technology, but it would be cool if I did, and I like keeping up with advanced CG stuff.

Gardening and agility

Friday 18 April 2003

Two related links about the philosophy and practice of programming. They are both good, but I have my reservations about each of them.

Programming is Gardening, not Engineering is a portion of an interview with Dave Thomas and Andy Hunt (you know, the Pragmatic Programmers) about how programming is more like gardening than engineering. It's an interesting read. But when are we going to stop trying to make programming be like something else? These analogies are a good way of exploring different facets of programming, but don't be lulled into thinking they are complete. Programming is, on the whole, different from other endeavors, no matter how much certain aspects of it may be like other things.

The Manifesto for Agile Software Development is a manifesto for a certain way to look at developing software, written by, among others, Dave and Andy. I like it, but it is hard to get fired up about a "manifesto". This isn't capitalism being replaced with communism here. Agility is a great thing, but the manifesto isn't so different from other inspirational pieces about software that have come before it. It seems evolutionary rather than revolutionary.

Mutexes and critical sections

Wednesday 16 April 2003

I'm annoyed by the fact that Win32 has two separate synchronization primitives, one called a mutex, and another called a critical section. I'm annoyed because these two work exactly the same, except one can be used across processes, and is therefore more heavyweight, than the other. Except for that, they are the same.

So why were they given those names? These are both mutexes. The name "critical section" doesn't even make any sense for an allocated object that can be locked and unlocked. What is it a section of, and in what sense is it critical?

The name "critical section" comes from the concurrent programming idea of a chunk of code that cannot be entered simultaneously by more than one thread. It is a critical section of code. Of course, a mutex is a good way to protect a critical section, and critical sections need not be protected across processes, so you can see how the term came to be misused for a lightweight mutex.

The Win32 definition of the term is being presented as authoritative in some glossaries, which is unfortunate. If you've learned about thread programming on Win32, try to remember: Microsoft's names for these things are a little off.

Time cover archive

Monday 14 April 2003

Time magazine has an on-line archive of their covers. It includes every cover they've ever printed, starting in 1923. The thing that fascinated me was how many of the cover faces in 1923 I'd never even heard of. The first was Joseph G. Cannon, who it turns out, was Speaker of the House. Next was Warren G. Harding (I've heard of him: he was president once). I had to look up Hugo Stinnes (German industrialist), and Mustapha Kemal Pasha (first President of Turkey, better known as Kemal Ataturk).


Sunday 13 April 2003

I've posted the Python module I use to upload this site to my hosting provider: FtpUpload.py.

I didn't want to upload the entire site every time I made a small change. But since I do regenerate the entire site every time I make a change, I couldn't use a timestamp approach to detecting which files to upload. FtpUpload uses MD5 hashes of the contents of the files to determine what files have truly changed since the last upload.

Innovative music software: Noodle and Hyperscore

Saturday 12 April 2003

Two programs that experiment with new ways of creating music on computers.

Noodle is a a clever sound loop palette. A dozen or so "instruments" are presented in a zodiac-like arrangement. Clicking on the instruments start them playing. Each instrument has a few different sounds it can make. The sound loops are expertly constructed so that any combination of them sounds good together. The genius of Noodle is that you can't go wrong. Also, the interface is totally unique: distance from the center "sun" controls volume, dragging the sun capsule to the edge saves the current configuration, and you quit by clicking through a tear in the screen to the OS below.

Hyperscore is a different beast, more of a real music construction kit. First you create snippets called "motives" (motifs?), and assign them to pen colors. Then you draw with the pens on your music canvas to construct scores. A few different harmonies can be automatically applied.

Both are worth checking out for their unusual approaches to interacting with music. Noodle gives the impression of playing with art to make music. Hyperscore feels like the ultimate intuitive interface to writing music.


Thursday 10 April 2003

Jake Howlett wrote about self-googling (which he accurately describes as vain). Googling on his whole name, then his last name, and finally his first name, he was first, second, and 27th in the respective listings.

When I tried the same experiment, I was struck by how similar my results were: I'm the first Ned Batchelder, the second Batchelder (the first is actually a 404), and the 25th Ned. What does this mean about me and Jake? Or about blogs? Or about the web? Is this just a coincidence? What do other people get for similar queries?

Verbose Python regular expressions

Thursday 10 April 2003

Latest Python tidbit: the re module has an option to write regular expressions in re.VERBOSE format. This means that whitespace can be used to layout the regular expression in a more readable style, and comments can be included with hash marks.

For example, this regular expression:

logFmt = '\[[0-9]{8}T[0-9]{6}\.[0-9]{3}Z:[0-9](/[0-9]*)?\][ ]*.*'
logFmtRe = re.compile(logFmt)


logFmt = '''
    [0-9]{8}T[0-9]{6}\.[0-9]{3}Z          # the date
    :[0-9]                                # the severity
    (/[0-9]*)?                            # a possible facility
    [ ]*.*                                # the message

logFmtRe = re.compile(logFmt, re.VERBOSE)

Admittedly, regular expressions are pretty dense no matter what you do, but at least this way you can try to pull them apart a little for future readers of the code (which includes yourself starting tomorrow).


Thursday 10 April 2003

I've enabled comments here, thanks to enetation. I would rather have hacked something together myself, to learn more PHP and MySQL, but this works, and enetation has done a good job providing an off-site service, so what the hey.

The (react) links that used to send me email now bring up the comments window.

enetation logo

Smoke test

Tuesday 8 April 2003

We software engineers are familiar with the term "smoke test": it's a quick test you can run that verifies that the latest changes haven't broken something really big. But where does the term come from?

The most popular guess is from the old days of building electrical equipment, where a smoke test consisted of plugging the thing into the wall to see if it smoked. Another possibility comes from duct work, where to check air-tight-ness, smoke can be pumped in to see where it comes out. These are both reasonable and plausible origins, but I like the typographic answer best.

» read more of: Smoke test... (5 paragraphs)

dispmode can set the refresh rate

Sunday 6 April 2003

I have a new IBM T30 laptop, and it is very nice, but the video adapter has a strange quirk: it can support a ton of different resolutions, and for each of them, it can drive a monitor at lots of different refresh rates, except: the LCD's natural size (1400 × 1050), where it can only do 60Hz. Grr. This means that when using an external monitor, I have to choose a different resolution, or the monitor flickers.

So I switch resolutions when I switch displays, and my dispmode utility can do that, but now I have to also switch between refresh rates. So I added that to dispmode, and all is well.

Chaco and MakeMenu

Sunday 6 April 2003

Chaco is a full-featured plotting package built on Numeric and wxPython. It looks very interesting in its own right, but here's the thing that caught my eye: MakeMenu.

In the demo script (wxdemo_plot.py), I saw this code:

plot_demo_menu = """
      Open | Ctrl-O:             self.on_open()
      Save as
         Single page...:         self.create_file(None,0)
         One canvas per page...: self.create_file(None,1)
         One value per page...:  self.create_file(None,2)
      Exit | Ctrl-Q:             self.on_exit()
      Undo | Ctrl-Z [menu_undo]: self.undo()
      Redo | Ctrl-Y [menu_redo]: self.redo()
   #(etc, 30 more lines..)

and then later:

self.menu = chaco.wxMenu.MakeMenu( plot_demo_menu, self )

Very cool: a single string to define an entire menu tree, including the Python code to execute when the item is picked, with the whole menu constructed by a single call with the string.

H. S. M. Coxeter, 1907–2003

Thursday 3 April 2003

The greatest geometer of the 20th century, Harold Scott MacDonald Coxeter, has died (obituary). He was a math uber-geek, with connections to an amazing list of other luminaries, including Bertrand Russell, Wittgenstein, and Escher.

I first heard of Coxeter as one of the authors of The 59 Icosahedra, which sounds like a Hitchcock movie, but is actually a treatise on the stellations of the icosahedron. The image below is a diagram of the stellation face of the icosahedron (more information and pictures here).

He contributed authoritatively to all areas of geometry, from introductory textbooks to expositions on non-Euclidean geometery, to his specialty, extending the concepts of uniform polyhedra to higher dimensions.

As an example of his old-school style, he apparently never used computers, writing his papers in pencil. Just being a professional geometer interested in shapes made him seem like a throwback. Whenever I try to catch a whiff of what recent geometry work is like, it seems more like complex algebra or number theory than actual geometry (aren't there supposed to be shapes in there somewhere?).

Stellation face of the icosahedron

Disappointed in "XML names and addresses"

Wednesday 2 April 2003

Sean McGrath has written an article entitled A study in XML culture and evolution. It starts out well, making interesting observations about the differing culture between "document" people and "data" people. "Data" people believe in unique ids (names) for data, "document" people are satisfied with uniqueness among all the fields (addresses). Good point.

Being a "document" person, he doesn't see the need for unique ids for his data. Fair enough. But then he tanks, making some sort of leap to the conclusion that since his data doesn't need names, his XML doesn't need namespaces. Huh? I'm hoping Sean was mis-edited, or maybe just had an off day. He seems otherwise to know what he is talking about. To confuse names for data with namespaces for names of attributes seems pretty basic to me.

Robustness Principle

Tuesday 1 April 2003

A few kind readers answered my implicit plea for the classic quote about the differing responsibilities of producers and consumers. Mark Mascolino was the first to send a pointer to the IETF RFC it first appeared in: Jon Postel's RFC 793 - Transimission Control Protocol (that's TCP to you and me), where it appeared in a section of its own, and was even given a name (Robustness Principle):

be conservative in what you do, be liberal in what you accept from others.

Charles Miller wrote to point out the downside of the philosophy: that being liberal in acceptance means bad implementations are allowed to flourish, leaving the burden on all future implementations to forever pick up the slack. He has written about it before: Grisham trumps Postel.

The XML standard took the exact opposite approach: implementation must be extremely strict, to prevent the sort of slop that HTML allowed.

So what's the right thing to do? To paraphrase the witticism about standards, That's the great thing about design principles: there are so many to choose from.


Tuesday 1 April 2003

FontLab produces TypeTool 2, a low-cost font-editing program. I've long been fascinated by typography (I still have the printer's type specimen book my mother used briefly at the Village Voice, with my red crayon scrawls in it). TypeTool seems to be a solid if not luxurious font editor. If I only had the time (and inspiration and artisitic ability!) I would try my hand at it. Let a thousand faces bloom!

« | » Main « | »