Time for Internet Pirate Radio?

March 13th, 2007

Personally I listen to hardly any Internet radio, or much radio at all for that matter except when I’m driving; and being a New Yorker that’s almost never. However people who do listen to the radio seem incensed over a recent decision by the Copyright Royalty Board to dramatically increase fees Internet radio station pay for broadcasting music. Some are even calling it a death sentence. I’m not so pessimistic, and here’s why.
Read the rest of this entry »

Another Reason Java is Faster than C (maybe)

March 12th, 2007

Paul S. R. Chisholm points out a new reason virtual machine based languages such as Java may sometimes outperform statically optimized languages such as C:

Portability depends on architecture (for example, x86 vs. PowerPC), but high performance depends on microarchitecture (for example, Pentium M vs. Athlon 64 X2). Today’s Core 2 chips have many high performance features missing from the 1993 original Pentiums. A good compiler like gcc can take advantage of those additional features. This is bad news if you’re using a binary Linux distribution, compiled to a lowest common denominator. It’s good news if you’re building and installing Linux from source, with something like Linux From Scratch or Gentoo/Portage. It’s also good news for just-in-time compilers (think Java, .NET, and Mono); they’re compiling on the “target” machine, so they can generate code tailored for the machine’s exact microarchitecture.

This sounds plausible in theory. What I don’t know is whether Java takes advantage of this in practice. Has anyone looked at the JIT source code lately? Can anyone say whether it makes any microarchitecture-specific optimizations?

C|net: Just how random is random?

March 9th, 2007

C|Net accuses Apple of favoring iTunes songs over CD-ripped songs in iTunes random playlists. Unfortunately they don’t have the statistical chops to prove anything or do any real analysis:

It’s obviously difficult to tell whether back-room marketing deals or just dumb luck were responsible for the results we saw, but it appears that we can safely lend credence to the suspicions of myriad iPod users around the world. When it comes to choosing songs, ‘random’ clearly is relative.

Actually folks, it’s totally possible to figure out whether your results are random luck or not. For one thing, try repeating the experiment. But what you really need are better statistics. In particular try calculating the chance your results would occur by pure randomness. You haven’t published the raw data, so I can’t do it for you; but this should be well within the reach of anyone whose taken a couple of undergraduate courses in statistics. In fact, it would make a very nice final project for a statistics course. I don’t think it quite rises to the level of an undergraduate thesis though.
Read the rest of this entry »

FireWire Killed My Mac

March 8th, 2007

I’m about 99% certain that the various problems I’ve been having on my main desktop Mac lately can all be traced to a misbehaving LaCie d2 external hard drive. (I leave 1% open for the possibility it’s the FireWire cable or controller, but I really don’t think so.)

Partially I blame LaCie for this, and perhaps EMC, but mostly I blame Apple. There is no excuse for allowing a misbehaving external hard drive, from which I have not booted, to affect the operation of the rest of the system. Mac OS X should be robust against any signal, valid or otherwise, from external devices. It should be equally prepared to handle the case where a device does not respond within the expected time frame.
Read the rest of this entry »

Defining Block Level Elements

March 7th, 2007

I know what an HTML block level element is, but I’m damned if I can say it in a concise, correct, obvious way (which it so happens I need to do in Chapter 4 of Refactoring HTML). In HTML, block level elements include p, blockquote, div, table, ul, ol, dl, h1h6, and a few others. Generally speaking a block element has a line break before and after it, but that’s really only true in a particualr visual representation. The notion of line breaks doesn’t make a lot of sense in a screen reader, for example.

The HTML 4.0.1 specification defines block elements thusly:

Certain HTML elements that may appear in BODY are said to be “block-level” while others are “inline” (also known as “text level”). The distinction is founded on
several notions:

Content model
Generally, block-level elements may contain inline elements and other
block-level elements. Generally, inline elements may contain only data and
other inline elements. Inherent in this structural distinction is the idea that
block elements create “larger” structures than inline elements.
Formatting
By default, block-level elements are formatted differently than inline
elements. Generally, block-level elements begin on new lines, inline elements
do not. For information about white space, line breaks, and block formatting,
please consult the section on text.
Directionality
For technical reasons involving the [UNICODE] bidirectional
text algorithm, block-level and inline elements differ in how they inherit
directionality information. For details, see the section on inheritance of text direction.

That’s not a great definition though. These seem more to be consequences rather than defining characteristics of block level elements.

Can anyone offer a more precise definition of block element that does not presume a particular rendering? Just what is a block anyway?

Dawn in Santa Clara

March 6th, 2007

I’m just now realizing that the new earlier daylight savings time is going to play havoc with the planned Birding BoF at SD 2007 West in a couple of weeks. Sunrise isn’t going to happen till about 7:00 A.M., and I was planning to get going at 6:00.

Can anyone currently birding in Santa Clara County give me a heads up to let me know what’s the earliest you think we could reasonably start on March 21? We could push back the start time a little, but I don’t have much time before I have to get everyone back to the hotel for the 8:30 A.M. first session. Possibly instead of walking back to the hotel, we could simply bird Sunnyvale Baylands Park and then take cabs back. Here’s another question for locals: last year the park gates were open well before their scheduled opening time. Is that reliable? If we drive over, can we be confident we’ll be able to park?
Read the rest of this entry »

Currently Reading