Math Puzzle of the Day…

Consider all the powers of 2: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, and so on…

The unit digits follow the progression 1, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6… Nothing too amazing, a nice cyclic relationship, and except for the priming 1, all evenly distributed. But consider the leading digit. In the limit, what are the distribution of the leading digits? I computed a table:

Leading Digit Percentage
1 0.3010299956639812
2 0.17609125905568124
3 0.12493873660829996
4 0.096910013008056461
5 0.079181246047624776
6 0.066946789630613179
7 0.057991946977686726
8 0.051152522447381332
9 0.045757490560675129

The puzzle is to verify and to explain this distribution. Neat stuff.

Patent of the Day – Slinky!

Slinky, SLinky!Some patents are just too much fun, and the pat2pdf script allows you to look them up and get a look at them. Today’s fun patent is for the Slinky. The real invention was the machine that can take 80 feet of steel wire and coil it into a Slinky in 10 seconds. Now that’s an invention.

In the modern era, these things are made of plastic, which just seems too wimpy for me. Give me the classic, brittle spring steel version every time. They are also really good at teaching kids about transverse waves or experimenting with odd sounds generated by suspending them like this one.

EFF: What Peer-to-Peer Developers Need to Know about Copyright Law

Fred von Lohmann has published an interesting article on the intricacies of law surrounding the development of P2P software entitled: What Peer-to-Peer Developers Need to Know about Copyright Law. It is a good article which tries to clearly describe what direct, contributory and vicarious liability means, and how developers can potentially avoid legal pitfalls in the development of these kinds of P2P software. Given the findings in the Grokster case, it would behoove potential authors of P2P software to read and understand each of the points raised. In particular, he believes that the Betamax defense (that it is enough to show that there are substantial non-infringing uses) is under concerted attack (like the INDUCE act) and in his words:

In short, the law surrounding the Betamax defense remains in flux, putting P2P developers (and all technologists) on unpredictable legal ground.

In the end, the article concludes with 10 bits of advice for potential P2P developers.

These are steps you can take that may: (1) reduce the chance that your project will be an easy, inviting target for copyright owners; and (2) minimize the chances that your case will become the next legal precedent that content owners can use to threaten future innovators.

Worth reading, especially if you are interested in developing P2P applications.

Sigh, A’s fall to second place…

No Joy in Muddville!Well, the A’s fall a game behind the Anaheim Angels with 4 games left to play. I like Jim Mecir, but it seems to me that you just can’t make him the guy you hang your season on. Nobody is really fooled by that screwball anymore (the pitch, not Jim), and you are risking a passed ball when you bring him in to pitch with a guy on third. Sigh. Well, for the first time in 50-something games, the A’s are in second place. Let’s see how they close out the rest of the season.

Woohoo! Validation!

I was surfing this morning and noticed that Dave Slusher, the Evil Genius, had provided a link to this site in the announcement of his audioblog. So, I synched my iPod and set off for the drive to work, eagerly awaiting the mention of this humble blog. What would he say about me? Did he have some criticism? I know I’ve had technical problems. Did he find some particular rant that I’ve made in the last two days interesting? What could it be?

It was simply this:

“Like brainwagon? Love it.”

I think that’s going to be my new motto.

50th Anniversary of “The Catch”

Mays makes the over the shoulder catch at the wallOn this day in baseball history, Willie Mays made this spectacular over the shoulder catch at the wall to rob Vic Wertz in Game 1 of the 1954 World Series. The New York Giants would go on to upset the Cleveland Indians in four games: the last time the Giants franchise won the World Series. Damn, even in this grainy black and white, it’s a sweet catch.

You can read the scorecard and the play-by-play on Wertz was four for five, with a double and a triple. Mays’ catch preserved the 2-2 tie in the eighth, and the Giants would go on to win in the tenth.

SFGate ran a more complete article 50TH ANNIVERSARY / Mays’ ‘catch’ might not rank among his greatest.

According to SFGate, Willie has been in the hospital for hip-replacement surgery, but is expected to return home today. Best wishes, Willie, and damn, that is one sweet catch.

Shake, rattle and roll.

Just a few minutes ago, I felt a couple of gentle rolls that usually indicate an earthquake. I mentioned it to my wife via IM, and she felt it too (in Pleasanton). I then did what I always do: I hit the USGS Realtime Earthquake site. Apparently a magnitude 6 event happend near Parkfield, right along the San Andreas. That’s about 170 miles or so from here, so it must have been pretty bad.

Update: It now appears there have been two quakes, magnitude 5 and 5.9. Hope everybody is allright.

Update2: Apparently it’s still shaking down there pretty good. I haven’t felt any aftershocks, but the USGS maps are showing new sizeable quakes.

Update3: Here are a couple of realtime seismograph dumps of the event, as recorded by two seismic stations:

Mount Umunhum
Stanford Telescope

Here is the log of our IM conversation:

(10:17:12) ***myself wonders if that was just an earthquake.
(10:17:25) mywife: i thought i was tripping
(10:17:41) myself: you felt one too?
(10:18:04) mywife: yes
(10:18:25) myself: slow roller?
(10:18:31) mywife: slow
(10:18:33) mywife: rolling
(10:18:46) myself: nothing as yet on the realtime map.
(10:19:21) mywife: that was a weird one. 2 other people had the same reaction. “i thought it was me!”
(10:20:28) myself: still nothing on the earthquake map.
(10:21:16) mywife: 5.8 down south
(10:21:31) mywife: The magnitude 5.8 event occurred 14 km (9 miles) NNW of Shandon, CA.
(10:21:33) myself: ow! it just appeared!
(10:21:40) myself: That’s a big one.
(10:22:32) mywife: yes
(10:22:49) mywife: oh, now it says 6

What goes wrong in recording audioblogs…

Yesterday I reached a minor milestone: the tenth of my audioblog entries, and I have a strong suspicion I may have had more than ten downloads. I also chose to wrote up a brief description about how I make these entries, and I hope that some people found it useful. After another minor glitch in yesterday’s recordings, I thought it might be useful to also write up all the problems that I have. You can consider this a set of gotchas to watch out for, and also as a wishlist for creating tools that make recording these shows less error prone. Toward the end, I give some advice which I try to obey myself as I go into the future of audio weblogging.

Mixer Dialog!Sound card configuration: I mentioned this a bit yesterday in the text blog, but I reiterate with a bit more detail. On the Mac, many people use WireTap, but on my PC I have found that many soundcards have the ability to record directly from their internal mixer. If your lucky, when you open it and look under the Options > Properties > Recording dialog for devices, you get something that looks like the image on the right. You generally want to record from the Stereo Mixer, not the microphone. Then anything you play back through PC should get recorded by your recording application.

This was actually pretty straightforward to setup on my laptop, but my new Media PC has 7.1 sound, which means that instead of a single sound card, it looks to WinXP as if there are four or five separate devices, and some of these devices reconfigure themselves automatically when speakers and headphones and microphones get plugged in. This results in a larger space of possible settings to search, and some of them inexplicably don’t work. I’m still trying to figure out the rhyme and reason of the whole thing myself, so don’t be discouraged if you can’t seem to make it work right off the bat.

Levels: Of course what invariably happens is that even when you get the recording devices setup, the levels and loudness of things are completely inappropriate. The single thing you want to do is avoid clipping: I suspect that the artifacts in my closing music yesterday were due to the final clip being too hot, and clipping off. Sometimes minor clipping isn’t bad, but it can introduce both popping and when you reencode at fairly low bitrates, all sorts of bizarre artifacts. I try to monitor the audio levels using Audacities record meter, and often jigger the recording levels on the fly. It’s most convenient to do that using the mixer, which you will want to leave open anyway so that you can mute the microphone (yes, I didn’t mute the microphone during one of my openings a couple of days ago, and you can hear me thumping around). I usually set the record levels at their midpoint setting, and then manipulate the playback levels during the “performance”.

What is needed: Both of the above problems could be ameliorated by an audio recording wizard followed by a profile manager. You’d like the smarts of audio configuration to be encapsulated so that it would automatically configure the recording and playback settings and their levels, and then be able to save and restore these settings all at once. Then you wouldn’t have to go through the error prone setup each time you changed your settings for some other purpose.

Try to have a plan: I don’t script my audioblog entries (could you tell?) but I do find it useful to generate a short checklist of the major points I want to cover. When I don’t have a plan, I panic as I try to fill dead air, and my speech becomes filled with all the classic irritations.

Resist the urge to over edit: I have pulled out short problems in my recordings as a courtesy to my listeners, but you learn more by mistakes than you do by trying to produce “the perfect recording”. I find even the worst audioblogs to be better than 90% of commercial radio, if only because people are always talking about something they are passionate about. Don’t bother trying to be too professional: it is the professional media that has bored us into trying broadcasting for ourselves.

That being said, try to improve: I listen to my audioblogs probably more than anyone else, and I try to do so critically to see if there are systematic things I can do to improve the quality of both the technology and the presentation. I also listen to other audioblogs to get ideas for things that are working for others, and try to adopt them into my own presentations.

Don’t worry! The worst thing that can happen? Nobody listens to you. But nobody was listening to you before, so you haven’t lost anything. 🙂

Remote broadcast, and a review of Shaun of the Dead

Wherein your host experiments with a remote on-the-street feed, thanks his patient and benevolent listeners for their comments, and reviews the British zombie comedy Shaun of the Dead. Download the MP3 for the complete review, but the summary is: it’s a terrific zombie movie and a terrific comedy welded together to make a really great film.

I like Dave’s new habit of posting URLs relevant to his audioblog, so I think I’ll copy him.

Ob. mistake for the episode: odd mp3 artifacts of the Monster Mash at the end. Please visit the Misfits and download their version directly from their website.

Update: actually, the entire thing sounds a little hot and clippy. I will figure out a better way to set levels. I will…

HOWTO: Produce Your Own AudioBlog

Andrew Grumet asked in one of my comments what hardware and software I used to produce my audioblogs. Since I thought this might be of general interest and would be the kind of thing that people might like to find via search engines, I thought I’d actually write down the nuts and bolts of how I go about it.

I’ve used two different machines to do my audio recording: the first is my rather generic HP laptop (2 Ghz processor, 512M of memory, 30gb disk space), and the other is my HP multimedia PC (2.8ghz processor, 512M memory, 160gb disk). In both cases I use a cheap stereo headset with microphone such as you might use for audio conferencing via Skype. The other day I also purchased a $25 Plantronics headset: I have yet to use that for recording, so it remains to be seen whether it will result in better sound quality. Occasionally I do notice breath noises on the cheaper one, so there is room for improvement, but generally the audio quality is acceptable.

Both of my machines are currently running Windows XP (hiss!). There really is no reason why you couldn’t use Linux or FreeBSD (my personal favorite), but since ultimately the goal of these things is to interface well with the vast majority of consumer hardware, it seems to me that means Windows. I actually did some early tests using Audacity on FreeBSD, and it works quite well for recording. I also experimented with using gnupod on FreeBSD to make my own sort of “geek ipodder”, which worked very well without using any Microsoft products whatsoever, so it can be done.

The key bit of software I use is Audacity, which is a pretty nifty little sound recorder application you can download from sourceforge. It has versions for Windows, Linux, FreeBSD and even Mac OS X (so I’m told, I haven’t got a Mac). I set up a project for my audioblog that records new tracks at 22050Hz, 16 bits per sample, and has some default tags that are the same on every post I make so that I can just click a single icon and begin recording.

If you’ve been following Adam Curry’s explorations, you know that most of his problems has to do with wanting to record other “generated” sounds together with his microphone simultaneously. The reason you want to do this is so that you can incorporate other sources (iTunes, Quicktime and even Windows Media) into your audioblog just by playing them on your computer. This relies on a bit of cooperation from your soundcard. I’m not sure if all cards have this capability, but both of my machines do. The trick has to do with the mixer application. You want to examine the various recording inputs, and configure it so that you are recording not just from the microphone, but from the output of the stereo mixer.

Here is where it gets confusing: if you click on the mixer application in your taskbar, you can get access to all the playback and recording devices. First, look at the playback devices. If you are lucky, there is some kind of microphone input. If you unmute it, and crank up the levels (and perhaps turn on the Microphone Boost that you find under “Advanced”), you should hear your voice coming through the mixer when you talk into the microphone. If you set the gain too high, you might get the squeal of feedback. So far, so good. Trim the overall levels back a bit.

Now, go to the recording devices. If you are lucky, there is something called Stereo Mixer or some such. Set that to be your recording device, not the Microphone. Now, fire up Audacity, and try to record something. Try talking and playing a tune from iTunes or whatever. Both should be recorded. You may need to adjust levels to prevent clipping. I’m still experimenting with how to do that.

That’s really all there is to it. Except that my desktop PC is considerably more complicated.

You see, my desktop supports 7.1 sound and has all sorts of whacky recording and playback devices. To the PC it looks as if this single device was multiple sound cards, so Audacity needs to be configured to use the right ones for input and output (the defaults don’t work very well). To be honest, I’ve got a setting that works, but it was mostly trial and error and I’m still not sure that I understand how it works, so explaining it to you would probably be difficult. The general idea remains though: use the mixer application to configure your sound properly, and Audacity should do the right thing.

I use a couple of other features of Audacity that you might explore:

  • Audacity allows you to record or input multiple tracks, rescale their amplitude, slip them in time to align them, and then mix them down to a single stereo track. This is a useful way to record intros and exits, although I usually just ride the volume controls like an amateur and record it live.
  • You can select regions of the recording, play them, and delete them. I use this to delete complete asides and idiocy that is too great to share with others.
  • You can do fade ins and fade outs. Very nice.
  • You can pause and unpause during recording to gather your thoughts when flustered.

When I am done, I usually play back the recording to check it once again, and then export it as an MP3. Since I do 22050hz recordings, I usually do 64kbps MP3 encoding, which frankly sounds indistinguishable to me from the live encoding under virtually all circumstances. I then upload the recording using the PuTTY scp client PSCP to the /audio subdirectory on my webserver.

To get these in my weblog is actually just the crudest hack. I use WordPress as my weblog system, which has a feature called “custom fields”. These are name/value pairs that you can associate with any post. I add two fields, audiolength and audiourl, which point at the length and url for the uploaded mp3 file. I then modified the index.php and wp-rss2.php to look for these tags and generate links and enclosures.

That’s pretty much all there is to it. I’m actually going to write some better tools to help automate this process (I want to make a gadget that when i drop an audio file into a given directory, it mirrors it automatically onto my website and creates an unpublished article that references it so I can edit it later), but it isn’t enormously difficult to do audioblogs that sound fairly good with this basic level of sophistication.

If anyone has any questions, feel free to post questions or email them, and I’ll try to be helpful.

I feel just like Jonathan Frakes on Futurama

Now, not appearing, Jonathan Frakes!While driving into work this morning and trying to catch up on my audioblogs for the weekend, I noticed that Dave Slusher had mentioned the comment that I left on his weblog regarding the idea of giving fees to the record labels in exchange for making filesharing legal. Woohoo! I feel just like Jonathan Frakes! Front Row!

Sadly, while trying to find a screencap of this stupendous achievement in Mr. Frakes’ career, I found that the screen captures at was just slightly early, and so he doesn’t appear. Sorry Jonathan!

Lessee now, if Dave is an C class blogger, and he cites me, that means… well. My blog still is a bottom feeder. I’ll keep trying though. Perhaps the patina of coolness (or at least novelty) will eventually rub off on me.

In the end, I think that Dave is right: we are in near complete agreement. His argument as expressed in his audioblog was more convincing, and closely followed Lessig’s own about using fees to compensate old media while the disrupting new media take its place. The key difference in the situation that exists now versus the past is that the terms and scope of copyright protections have gone far beyond where they were in the early days of film, radio, or even the VCR. Under the law, record labels can sue you for copyright infringement for even the most minor infractions, even infractions which would fall under fair or unlicensed uses if you could afford to bring them in front of a judge. The only way to prevent this from happening is to make legislative changes which prevent them from doing that. It would be within the scope of the legislative power of Congress to attempt to make that balance, perhaps by instituting a statutory license and fees to balance the scales between producer and consumers as they did in the case of licensing for radio broadcast. I suppose that I could in fact support such a notion: my reaction was mainly to the fact that Dave didn’t mention these legislative changes: only their desired effect.

There are still many questions to be answered, such as exactly how record labels would divide up this booty, and whether it is fair to small or independent record labels. I also still question exactly where Congress should draw the line between the interests of the music business and the citizenry at large, and given the way they are funded, where they are likely to draw that line, but I suspect now that Dave’s opinion and mine differ only in detail, not in substance.

Thanks for the mention in any case Dave!

Blogger fooled, news at 11.

Not a computer of the futureYour beloved editor (that’s me, in case you didn’t realize) was apparently taken in by an Internet hoax. The image of the “computer of the future” envisioned by Rand scientists in 1954 is in fact a cleverly edited photograph from a Navy website which shoes a full scale mockup of a nuclear submarine’s maneuvering room. I smelled a rat when I blogged it: I should have known better. There were certainly lots of clues to suggest that it was a photoshop job. I remember questioning the odd scale differences between the foreground teletype and the human.

Increment my shame counter.

It was really cool though. To the original creators: kudos!