Wednesday, October 31, 2007

Happy Halloween!

This was our first Halloween at our own house, and it saw plenty of trick-or-treat traffic.

Our neighbors went all-out with decorations and special effects, which we couldn't match, but we did have a jack-o-lantern I felt mildly clever coming up with, and a cute little skull-on-the-grill display.

Happy All Hallows' Eve!

Wednesday, October 17, 2007

Approaching Democracy

I swore this blog wouldn't turn into a political soapbox. I'm breaking that for two reasons: I'm not taking any politically-charged sides here, and it's an idea that's simply too good to go unmentioned.

For as much as we throw around the term "democracy", what we (and all other "democratic" nations) have is a republic. We don't make the decisions; we elect people to make the decisions for us. That's no bad thing necessarily, but that layer of indirection has can be very thick and frustrating at times.

http://senatoronline.com.au/

This is brilliant. It's a hack for an existing republic to inject a bit of direct democracy. All registered voters may vote online on any and every issue that passes through the senate. The senator (human or software) then blindly votes accordingly. If the idea works, clones and variations of the system will also get elected, slowly replacing, to whatever extent citizens are comfortable with, the old republic with a true democracy.

Variations that deal with introducing bills in addition to just voting on them could be very interesting. How to best immunize these systems from party poisoning could become key in how useful and effective they might be in the long term. If nothing else, this conjures a mental image of replacing senators with small shell scripts, which should bring a huge smile to any geek's face.

Thursday, August 16, 2007

Them's Fightin' Words!

I've put up with a lot of crap since becoming a homeowner, but I don't think I've ever been directly insulted before. That changed yesterday. If I were to try to come up with the optimal, most derogatory insult per syllable, I don't think I could do much better than this:


Are they serious? "Utah driver"! What cruel joke is this?! Suffice to say, I won't be signing up for this particular brand of auto insurance. Not that I'd have considered it anyway, I suppose.

Next up:
  • Junk mail from cosmetics companies addressed to "Fugly Resident"
  • Church newsletters to "Hell-bound Soul"
  • Discount store catalogs to "Dirt-poor Pauper"
  • GED pamphlets addressed simply to "Dumbass"
  • Cologne and perfume ads to "B.O. McSmelly or current occupant"
I suppose it is possible that most people around here wouldn't take so much offense to being called a "Utah driver". ...But after further reflection, I just don't see how that could be so.

Thursday, July 05, 2007

The Best Wurst

That title's a Red Green-ism, by the way. Credit where credit is due. Anyhow, this post is mostly a pointless anecdote, but can also serve as a series of tips for any bratwurst-grilling newbie. :^)

We went to an Independence Day party last night, and I was charged with bringing and preparing the brats. This is a responsibility which I gladly accept anytime, and which I take quite seriously. After all, I'm representing Wisconsin out here. We cheeseheads are a proud, brat-grilling people. We have a rich tailgating culture. Here in Utah, though, there would be no beer dulling the senses of these Latter-Day Saints. Their taste buds would tell no lies. My brats had to stand on their own.

Luckily, I was not without help. A week or two ago, a work buddy introduced me to a local family-owned sausage shop, Colosimo's. A quick drive up towards Salt Lake scored us three packs of high-quality bratwurst. Not to knock the big-name brands; you can get a decent brat anywhere, but these small places survive by being the tastiest, not the most cost-effective and well-distributed. Not surprisingly, mom-and-pop sausage shops are a bit harder to come by in Utah than in Wisconsin.

Now, to someone like me, it's pretty non-controversial that in order to grill the best wurst, one ought to soak them in beer and onions at some point(s) during their preparation. Pre-boiling is common practice, for good reason. I didn't dare go that route though, as I didn't know if the various Mormons I'd be feeding would be comfortable with it. As it turned out, nobody objected to their brat having a good soak in some appropriately-patriotic Samuel Adams lager.

Cutting up an onion was murder on my eyes, but that was good - it meant the little bugger was potent enough to quickly impart its flavors to the hot brats swimming around in the pan. Surface area's the name of the game, the more thin slices the better. Tears of joy, right? :^)

I also made sure to capitalize on my tendency to micro-manage the grill. Rather than turning once or twice, I made sure every brat got plenty of rotation, including being balanced sideways. (You can actually see that going on in Proby's picture up there.) A curved brat can't be cooked perfectly evenly, but it's pretty easy to do better than two charred sides and pink everywhere else.

Using cheese as a brat condiment is a very Wisconsin-y touch. If you ask me, get plenty of colby-jack melted between the bun and the sausage, and there's no need for mustard or sauerkraut or anything else. Cheddar was more popular yesterday, and I won't argue with cheddar. That would be folly. Point is, cheese and brats go together like ... actually, I can't think of much else that goes together that well. Beer and brats, maybe. Or beer and cheese. Oh, got it. Cheese and bratwurst go together like fireworks and the 4th of July.

I received a whole bunch of compliments on the brats, so I must have done something right. We got to digest while watching lots of pretty fireworks go off, both amateur and professional. Celebrating the nation's birthday with grilled meat and explosions, who could ask for more? :^)

Prior Art

One of the memes buzzing around the hippie geek community lately is a way to stick it to those greedy corporations who think they can own math and such, and who bully everybody with patent infringement lawsuit threats and backroom licensing agreements. How? By brain-dumping ideas publicly. If proof exists of prior art or even that an idea has been published, a patent on it can be struck down.

I don't have any brilliant ideas, but i have some mundane ones that are much more clever than half the crap that gets awarded patents these days. So here they are, at least the ones I can remember off the top of my head, and if any greedy corporation is reading, go ahead and make these things happen, but you can't have patents on 'em. Not for long anyway. They're braindead ideas, documented here as prior art.

Video Projector With Smart Auto-Adjust
Implementation 1: Infrared beacons or reflective tape is built-in or can be attached to all 4 corners of any reflective screen, a small infrared camera in the projector (much like the one in a Wii controller) detects the positions of the screen corners, and software distorts and adjusts the projected image to be the correct shape and size.
Implementation 2: No beacons, but a small camera built into the projector feeds data to software that scans for a big, bright, 4-sided polygon, and adjusts the projected image. Probably the better implementation for most cases. A single unit could be capable of using both methods.

Product Placement in Photo/Video/Art Sharing Sites
My friend's Flickr account contains a photo of someone clearly holding a branded pop can. He deserves ad revenue-per-view as much as advertising agencies do. Better yet, pay individuals for stuff like this and stop polluting broadcast and print media with loud and obnoxious ads.

Non-Fling Fingernail Clipper
The otherwise-standard clipper has a soft, spongy clamp behind the blades, which holds a clipped nail until released, rather than ejecting it at a random, high-velocity trajectory.

Pi Compression
(see earlier post)

AI-Engineered Codecs
(see earlier post)

Tuesday, June 05, 2007

Incompetence Profile: Dish Network

Oh Dish Network, how I loathe thee. Let me count the ways...

Advertising: incompetent
Lies, damned lies, and Dish Network promises. Free installation, they say! "Setup fee" though, that's different. And not mentioned until you've signed up. Up to 4 receivers free, they say! "Free" apparently means "extra $5 a month" in certain contexts. Only $30 a month, they say! Well, $40. Same thing right? $45 if you'd like local channels. No hidden fees, they say! Well, except for a $10 per month "programming access fee" if the phone line isn't hooked up. Even if the installation techs promised that's not the case. Which brings us to...

Installation technicians: incompetent
New house, no TV sets there where they will be yet. Not a problem, says the phone rep. Different story in person. They only have a big utility van full of equipment; it would be silly for them to include a little TV for testing. So my wife, already wasting her day waiting for these jokers, had to drive back to the apartment, grab our small TV, and drive it back, while these guys poked around on the roof and in the utility room, where they knocked out our DSL just to be cute. "One dual receiver in the bedroom, another in the basement" was the order. But my earning-her-3rd-college-degree wife probably didn't know what she was talking about, so they called me at work. Yes, I built a DVR so we want a dual tuner downstairs. As for the other, we might add a TV somewhere else at some point, and the dual tuner costs the same as a single anyway. Bedroom, basement. You install, I'll take it from there. So, naturally, they installed one in the bedroom, and the other ...in the office, two floors away from the basement. My wife was understandably sick of dealing with them by then, so I sorted things out when I got home, no thanks to their unmarked cables. Well, to be fair, a few cords had labels on one end. Not correct labels, but still.

Phone maze design: incompetent
I don't even need to go into details here. All phone mazes are defective by design. Any organization that installs such an abomination is incompetent. No exceptions, no excuses. We'd all honestly rather be on hold listening to muzak if the alternative is trying to appease some robot telling us to punch numbers and speak and roll over.

Customer service: incompetent
Beyond the phone maze await more robots, this time in the form of human beings in India reading from a flow-chart script. The phrase "I do apologize for the inconvenience sir" is used as punctuation, and to fill the silence when calling up the next part of the script. I'm not looking for an apology. Just take this fee, which you promised wouldn't be here, off my bill.

Hardware engineering: incompetent
Ahh, a nice compact dual tuner. What's this? S-Video output? Cool beans! Oh wait, it only works on the RF-remote tuner, which would by definition be elsewhere in the house, tuned to a UHF channel. Well, whatever. Composite's not so bad. No home automation control port, huh? That sucks, but I guess I can get an infrared blaster for my MythTV box. Oh, lovely. The tuner's IR sensor is fickle and ignores digits when it feels like it. Great job guys, wouldn't want to build a sensor that's a few % forgiving, 'cause surely your $3 made-in-Taiwan remote control powered by two AA batteries has more accurate signal timings than a friggin' PC motherboard.

Software engineering: incompetent
Finally, everything's set up and mostly working. Wait, what? We recorded a friggin' screensaver with a bouncing Dish logo instead of our shows? Every night in the wee hours, program guide updates are downloaded and the tuner reboots and comes up not with the last-tuned channel, but with this ridiculous "press select to continue" mode. This also happens if you don't press any buttons for 4 hours or so. Augh! There's an inelegant workaround I can and do use, but would it really be that hard to just boot up into the last tuned channel? Or update channel listings without a reboot? (What is this, Windows 95?) Or allow numbers to be punched in instead of ignoring all but a "select" signal? Or not have that useless screensaver mode in the first place?

It smells a bit of conspiracy theory, but Dish offers their own, reportedly-awful DVR (for a monthly fee, of course) which could explain the hardware and software issues that make it such a pain in the ass to set up a Dish receiver with an external recorder. Who knows if DirecTV would have been any better; their pricing lies were even more infuriating than Dish's. Don't you just love the "freedom" of choosing between two corporate overlords?

Dish Network. We put the F.U. in T.V.

Wednesday, May 30, 2007

The Great Beeping of '07

My wife and I got home later than usual last night, welcomed by six smoke alarms blaring just as loudly as their manaical speakers would allow. According to the neighbors, this had been going on for a good long while. Just to get it out of the way, no, there was no fire. There were no dangerous levels of carbon monoxide. There was just noise. Massive, massive decibel levels of noise.

I flipped the breaker ever so helpfully named "Smokeys" or some lame thing, and we set about hunting down each of the unholy ear-gouging devices. Grab, twist, pull it down, yank the AC plug, flip open the side and rip out the 9-volt. As if to add to the surreal nature of this process of systematically finding and killing these hateful abominations, several of them hissed with static and gasped with high-frequency squeals as the last watts bled from their capacitors. Die! Why won't they just DIE?!

Our poor cat was already neurotic and jittery, so this whole episode was just terrific for her. I hate to think what being showered in that acoustic magma feels like after hours and hours, let alone for a critter of super-sensitive hearing. My tinnitus is noticeably worse, my wife could barely focus on her homework, and our neighbors would be quite justified in either pitying us or hating us, all because someone thought it would be smart to design a system of smoke alarms that:
  1. Never shut up no matter how long they're raised
  2. Connect to each other and all go off if one is triggered
  3. Are each, individually, deafeningly loud
  4. Cannot be turned off remotely by cutting power
  5. Give no hint as to which unit's faulty sensor started the whole mess
Yes. Brilliant.

So far, home ownership has been just fantastic. What's next, I wonder? Wait, I know. All the light bulbs simultaneously explode, raining sparks down on carpet and furniture and starting fires on every floor. The smoke alarms aren't replaced yet so nobody is warned, the pipes all magically route natural gas instead of water, and the entire place goes up in a huge plume of smoldering annihilation. Oh, and then our insurance company turns out to be a subsidiary of Enron and vanishes without a trace, our cat miraculously survives only to sue the bejesus out of us, and the homeowners association fines us for burning without a permit.

Friday, May 04, 2007

mv /home/apartment /home/house

Moving sucks. Never again, at least not until we can afford to hire movers. All my stuff and all my wife's stuff is at our new home, though most of it's still globbed on the main floor, waiting for us to muster the energy and the giving-a-crap to move things to more sensible places.

I did figure out a good way of explaining RAM and some other concepts to people who aren't computer literate, though. RAM is your computer's tables and counters. If you've got lots of counter space, you can do things. Things like put down a plate, remove the lid of a peanut butter jar and set it down, little luxuries like that. When all your counter space is full, you need to start swapping. Typically you have to swap stuff from the table (RAM) to the floor (hard disk). Holding things in your hands (CPU registers) is handy for juggling a few things at a time, but you have to set them down sooner or later.

The analogy is silly, but its implications are even sillier...

When we first moved in, all our stuff was compactly stored in two rooms on the main floor - the beginning of a disk. We're now seeking to fragment our housedrive on purpose, moving things bit by bit off into the far corners of our available space.

The seek time on our house is ironically much slower than in the old apartment, even though we have three platters as opposed to just one. Then again, the head count hasn't increased so that still makes sense.

DMA would be awesome. If things could get from any floor space to any counter or table space without having to be carried by our sore CPU registers, that would save a lot of time and effort, which I suppose is the entire point of DMA.

Wouldn't it be nice if extra hard disk space could be turned into RAM just by putting a table there? Not swap, but actual, useful RAM. Growing extra registers would be very useful too. Most people would just wind up using them to play solitaire though.

Our cat is a virus who will indiscriminately puke on both RAM and the hard disk. Her runtime is some sort of virtual machine which doesn't make any distinction between the two, it's all just trottable and sleepable surface area.

~ mv /home/apartment /home/house
Permission denied.
~ sudo mv /home/apartment /home/house
~

"Sudo" must be the 16-foot truck we rented. It was powerful and a little intimidating to use. A person could get used to that level of power and potential disaster, but most of us should stay in user mode most of the time, and only fiddle with the stuff we own.

Monday, March 19, 2007

Does Not Compute


I grew up with an Apple IIe. Six expansion slots, color graphics, dual 5.25" floppy drives, but most importantly, BASIC in firmware. I was writing programs before I even really understood what that meant. To use the computer was to program it, and I couldn't have been happier. Sure, pre-compiled programs like Print Shop and Mario Bros were fun, but making my own stuff, that's what I liked best. That's where the magic was.

I was really, really lucky. I grew up at just the right time. To own a computer was to be a computer enthusiast. It wasn't a means to an end; the point of having the thing was to mess around with it. It could certainly be used to do useful work, but it was every bit as common (and easy) to use it as a toy.

(Begin hearing the "old man" voice in your head at this point.)

Modern computing does not compute! Computers nowadays don't come with any (programming language) interpreters built into ROM. Or pre-installed on their hard disks, as might be more appropriate. The closest you can come to writing programs out-of-the-box today is to use a featureless text editor to write some javascript and run it in a web browser.

<script type="text/javascript">
alert("Hello World, this sucks!");
</script>

Now, the way I learned to be a programmer isn't the only right way. But doing BASIC, being taught C, and picking up on everything else was a pretty fun and natural progression. There are entire college computer science tracks now that don't teach C at all anymore, instead using Java or something. It's not bad to learn Java, but I would argue that learning C is more important, if what you care about is computer science. If you care about crafting cookie-cutter corporate apps quickly, Java's where it's at. But if you care about what's going on, or if you like the idea of a computer as a toy, C is really important. The rub is that it's an awful language to write your first program in. My brain, anyway, wasn't ready for it until I'd done something simpler first.

That's where BASIC came in, and where something like Python could come in today. A person's first program shouldn't be graphical. It shouldn't be run in a web browser. It would be nice if it didn't have to import any libraries. And it would be great if there was a realtime interpreter console, something to try out commands and code chunks before saving them in a file. Apple's flavour of BASIC did all of that, and Python does too.

Python is free in all senses of the word, and runs on any platform. The only problem is, it's not just waiting there on any computer one might buy. Before you can do anything with it, you must learn of its existence, find it, download it, and install it. To me, that's tragic. That's depriving little 5-year-old me's all over the world of something really special. It would be trivial to include in any desktop operating system, and could be presented much more nicely than BASIC was back in the day. In the Start menu, or the Apple menu, or on the desktop, or at whatever handy spot user consults regularly, there ought to be a "Create Programs" menu/folder/whatever. It should contain an interpreter, a decent text editor, a language reference, and a quick start guide to explain what those other things are and how to use them. Why isn't this done?

I understand there's not much consumer demand for this kind of thing. Joe Schmoe wants to buy a computer in order to click around on web pages and print term papers, not as a toy to write his own programs for. But I think that could change, if it was widely understood that software can be made by individual people in a matter of minutes. Sure, it won't be the same as software that comes from big corporations on 18-month release cycles, but why does that matter? MySpace pages, YouTube videos, and blogs, aren't the same as designer-comissioned websites, Hollywood films, and professional journalism. It doesn't matter. Joe Schmoe cares about that stuff anyway.

Microsoft, Apple, Dell, HP, somebody... Put Python on the desktop! Add a notice that you don't provide Python support, with a link to python.org, and you can forget all about it. It wouldn't even have to be Python, that's just my opinion of a good introductory programming language. But for cripe's sake, make it happen! There should be a way to be introduced to programming on every computer out there. The fact that there isn't, just doesn't make sense. It's illogical. It doesn't add up. ... Oh, surely there's a phrase that explains the situation.

Monday, January 29, 2007

Token Microsoft Rip

I'm feeling sick today, which has several direct consequences. Firstly, I bet I'm wicked-good at Tetris. Haven't tested that, but generally the worse I feel, the more mad spatial skills I possess. Secondly, and more to the point, my brain scatters when I try to convey a message. It logically follows that this is a perfect time for a blog post. :^)

I was complaining to a friend that a link he sent wouldn't work for me, on either my workstation (GNU/Linux) or my other test box (Mac OSX-point-something). I conjectured that the site authors assume a homogenous world comprised only of those who have drunk the Microsoft kool-aid. Rather than to stay on-topic, I was compelled to rant thusly:

The Windows keys were just the first step, you know. "Vista" keyboards will have no letters, but instead, pictures of various barnyard animals. When the user presses one, a soothing Microsoftie voice will say, "The cow goes, 'Moo'!" And then the system will reboot.

I had gone almost two days without teasing Microsoft about their depressingly shitty software, and maybe it's just my illness-ridden state of mind that leads me to find it amusing, but the idea of a barnyard-noises keyboard to compliment the shiny-jingling-keys UI was too delicious not to share. ...You know, with ...all two of you who will read this.

Friday, January 12, 2007

Unanger

I haven't been a faithful viewer of the Daily Show with Jon Stewart or its younger sibling The Colbert Report, but every once in a while I'll catch something on one of them that really hits home. Mixing political news with comedy is really healthy, I think, and certainly has made the news easier to stomach on those particularly groan-worthy days.

The other day, Stewart had on a guest author, Mike Huckabee, and his book "From Hope to Higher Ground: 12 Stops to Restoring America's Greatness". If I may paraphrase / butcher his own words, Huckabee is "conservative, but not angry about it". He talked about how our elected officials often get distracted with politics and power at the expense of practical matters, and in so doing are failing at their duties to help their people and their homeland. His passing comment about being conservative but not angry about it was a good light-bulb moment for me.

Politically, I would label myself progressive, if I were to pick one label, and as often as not during the last several years, I've been pretty angry about it. Looking at things practically is much more effective, though, and would let me have less heated and more fruitful arguments.

A good example might be my beef with the restrictions on stem cell research. We could argue about when life begins and the ethics of using of embryonic cells until we're blue in the face, but the reasons I think the research should be given some liberty are actually entirely practical. My wife is type-1 diabetic, and I want us to grow old together. I know and have known several cancer patients. I'm fully aware that stem cell research is no guaranteed silver bullet for magically healing these people, but I think that their lives are worth a great deal of effort in trying to save. We owe it to ourselves and to each other not to dismiss or over-restrict science with this much potential. Now, I have no doubt that practical arguments can be made against my position as well, but I'd rather discuss and weigh those than political and religious arguments; all those seem to accomplish is to stir up anger.


In any case, I have a late New Year's resolution, and that is to be less angry where I could instead be practical. Here's hoping a few politicians give the idea a try, too.

Thursday, December 28, 2006

Chow Anecdote

I wouldn't even bother posting this, except that it involves cheese. All which involves cheese is worth speaking of.

It came to me in a dream: I was making some broccoli cheese soup, and added too much milk by mistake. Milk is of course a good thing, but too much of it screws up the viscosity of the soup; I like it good 'n thick. So, unconscious problem solving prompted my imagined self to add some flour. That thickens stuff up, right? Not bad for dream-logic.

So the next time I made broccoli cheese soup in waking life, sure enough I added more milk than I'd intended. Applying the well-worn scientific principle, "oh-what-the-hell", I mixed in one of those little fancy measuring spoon's worth of flour.

Worked like a dream.

Friday, December 01, 2006

GPL: DRM for source code...?

Over a very nice lunch with a gang of work buddies, the topic of GPL3 and proprietary versus open versus Free came up, and eventually led to a comment that the GPL is "DRM for source code". If you know me, and you know what that means, then you know that it rubbed me the wrong way. :^) Granted, this was said by someone who is no stranger to playing a devil's advocate role, but it got me thinking, and it's been a while since I've posted anything with even the slightest hint of substance.

First of all, I would define most implementations of DRM the way Richard Stallman and the rest of us pinko hippies do, as "Digital Restrictions Management", as opposed to its intended expansion of "Digital Rights Management". Chunks of code and signed keys wrap the stuff you buy on iTunes, the DVDs you buy, and other things where some party is claiming exclusive "rights" to the distribution of whatever we're talking about. The effect is that you can't use the thing you paid for in just any old manner you see fit. (Say, making a copy.) You can only do with it what the rights-holder sees fit. To me that smells more like "restrictions". It's an artificial and arbitrary limitation. I understand why it's done, but I find it insulting, so I whine about it.

The GPL is something of a bill of rights that someone can apply to the software they write. The Linux kernel is GPL. The GNU utilities are GPL. My silly game Tong is GPL. The authors of those programs have decided to use a software license that says, "I give you this program and its code, which you have the freedom to use and modify as you see fit." Most importantly, the GPL also states that if you turn around and give the program (as it was, or your modified version) to someone else, you must afford them all the same freedoms. Technically speaking, that is also an artificial and arbitrary limitation.

So yes, the GPL places restrictions on what can be done with a program's source code: I can't modify it and/or pass it on without also passing on the right to modify it and/or keep passing it on. (That should already sound pretty different than DRM.) The still-being-drafted GPLv3 adds some further stipulations, because people (well, businesses) have found ways to distribute GPL code while following the letter of the GPLv2 but not actually passing on those freedoms in practice. Tivo is the obvious example. It runs GPL software inside (GNU/Linux), but if you grab the code, tweak it, and try to run that, the hardware won't let you, because it only runs software digitally signed by Tivo's developers. You still have the right to modify it and/or pass it on, but now, that doesn't do you or anybody else any good. GPLv3 spells out that doing that sort of thing is cheating, and closes those loopholes. This is naturally upsetting to businesses who gain from their use of GPL code but don't agree with the spirit of the GPL, so they whine about it.

Now, suppose that all media and all programs were public domain. Neither DRM nor GPL exist, and there are no artificial or arbitrary restrictions on any set of bits. Film studios don't try to equate copying movies with robbery and murder on the high seas, and Richard Stallman doesn't get his undies in a bundle over businesses locking up and selling their own secret-ingredient versions of the software he and the rest of the Free Software Foundation's contributers created. That's total freedom. It isn't particularly respectul, but it's complete and unrestricted freedom.

I bring up respect because that's the key conceptual difference between the licensing restrictions of DRM'ed media and GPL'ed code. DRM respects only the initial provider. DRM says, "You can't do that, because I must have total control." GPL respects everybody, on the condition that everybody also respects everybody. GPL says, "You can't do that, because everybody must have control." I guess they both say, "you can't do that," but it hardly seems like the same deal.

There's another face for all this, the unsettling idea of using legal agreements to dictate ethical behaviour. In principle that's not desirable, at least to me, given the number of legal agreements made by parties whose ethics I would call into question. As it works out, however, I would much rather (and have done) enter a license agreement that tries to guarantee freedoms for myself and others, than one that leaves me and my activities at the legal mercy of, say, a large publisher. Now, if someone can come up with an ethical argument against the effects of the GPL that's not a form of "but I want money!", then I'll be glad to entertain it. (If money's what you want, then Free software is at best a means to an end for you, not an end itself.) Otherwise, at least it's a positive set of ethics that the license is imposing.

In any case, I can see an abstract similarity. But look into it from any direction, and I just don't see GPL and DRM having anything substantial in common. I guess they're both buzzy TLA's.

("Three-letter acronyms." I was attempting to make a joke...)

Monday, November 20, 2006

Wii!

As of 8:05 yesterday, I'm a proud owner of a shiny new Nintendo Wii.

Along with two friends (and some 40+ strangers) I actually camped in a line outside a local Target to get my hands on this thing. Even as a gamer, I've never camped out for high-demand stuff before. It's a completely insane thing to do, but my justification for it was this:
The Legend of Zelda: Twilight Princess. I've always been a sucker for Zelda games, and this one may well be the best yet. I've played enough already to have myself convinced that waiting out in the cold all night was worth it. The controls are both natural and precise, the story's progression is surprisingly powerful, and the art direction is like nothing I've ever seen before. But I didn't expect that I would also be playing a lot of this:The included-for-free Wii Sports, tennis in this case. Turns out, my wife can't get enough of this game. And there are good reasons. It's ridiculously simple to play - just use the Wii remote as you would a tennis racket. We got to create and play as little caricature versions of ourselves, which are pretty amusing even when they're not doing anything. So when an instant replay flashes in showing a little plastic me (Mii, actually) jumping and swinging wildly at the ball only to land hard on its exaggerated face, and my wife's avatar stepping in to save the day with a scoring lob, laughter ensues. Very simple elements, but very rewarding gameplay.

I'm not posting to make any point really. I just had to shout out, "Wiiii!" :^)

Monday, October 23, 2006

Pi compression

This idea I've had for a long time, and if it were mathematically and computationally feasable, it would probably have already been done. But never mind all that. I still like the idea, and I'm still going to spout it off.

I chose pi because I just like it, but e or any of those other fun infinite-digit, non-repeating numbers would probably work, and possibly be better. An unfathomably good pseudo-random number generator might even work. But let's call it pi for now, because the important thing is that it's this infinite sequence in which, theoretically, every possible sub-sequence exists. Somewhere in that infinitely-long series of digits, there'll be a hundred sequential zeros. Somewhere, there'll be a million. And somewhere, there'll be a sequence that matches the sequence of ASCII values for this blog entry, and every other text you've ever read (and ever will read... but that's a different story).

The idea is, whatever data you have, your term paper, that movie you swear you didn't download, or that log of leaked AOL searches, that data is already encoded somewhere in Pi. It may be several centillion digits out, but it's there. Theoretically, you just need to let a grep algorithm slide along Pi until it finds a match, and then just remember the offset and the length to get it back out. Suddenly all files, all volumes, all anything, can be represented by two numbers.

Parts of this have already been implemented, though on a scale much too small to be useful. (Four billion binary digits of Pi? Pff, weak sauce.)
Finding sequences in pi:
http://pi.nersc.gov/
Getting hex digits (half-bytes) out of pi:
http://www.geocities.com/hjsmithh/Pi/PiQPCpp.html

Our CPUs' abilities to crunch numbers aren't advancing as fast as our networks' abilities to pump big bunches of data around, so this whole thing isn't terribly practical. Still, you could back up your whole hard drive on a floppy diskette. The idea is fun even if it wouldn't be worth doing.

Let's take it a little further, though. Maybe we can still do something useful with those first four billion binary digits. Play around with that Pi-search link above. It only uses a 5-bit character set rather than ASCII's 8, but let's experiment anyway. I'm going to search for "penduin".
In 5-bit-per-character binary, that's:
10000001010111000100101010100101110
The sequence is found at 8748556 binary digits in. 8748556 in binary is:
100001010111111000001100

...that's a noticably smaller sequence than the binary representation of "penduin". Our data is 7 "bytes" long, which in binary is:
111
Those two numbers, the offset and length, happen to take fewer bits to represent than the string "penduin", in ascii or even in 5-bit characters. Houston, we have compression! But hang on, let's say that sequence didn't happen within 4 billion bits of pi (according to that site, an arbitrary 7-character sequence has just an 11% chance of being found that early). We could still find "pend" and "uin", though - the odds of finding three or four letters are essentially 100%. If we do that, though, we'd need more bits than the raw ascii just to keep the two offset/length pairs, let alone any padding we'd need for any sanely-packed descriptor.

That packed descriptor would be 35 bits per chunk: 32 bits (maximum value:
4,294,967,295) for offset, and 3 bits for length. Why 3? We're unlikely to find an arbitrary 8-letter pattern (8 is 4 digits, 1000 in binary) in just the first 4 billion bits of pi, so our algorithm won't even try. So every 35 bits in our "compressed" file points to the next up-to-7-letter chunk of our data. On a good day, that'll beat ASCII, which would take 56 bits to store 7 letters. But, we're still playing with 5-bit characters, a paltry subset of ASCII. We're also playing with odds where only 11% of our chunks will be able to point to the maximum 7 characters.

Looking at hex digits instead of 5-bit letters gives us a better picture of how useful this might be. Any byte (8 bits) can be expressed in 2 hex digits. Any four sequential bytes has about a 60% chance of being found in these first four billion bits of pi, and sequences of three and a half (7 hex digits) are pretty much guaranteed. 7 was the maximum length of our chunks from before anyway, so let's keep using that. So, to recap:
With our 35 bits descriptor, we can know where in pi to find up to three and a half bytes, or 28 bits, of data.
...
As far as compression algorithms go, that doesn't seem particularly good. :^) But we're chopping into 3.5-byte pieces or less because of the near statistical certainty of finding any 3.5 bytes in the first half-gigabyte of pi (four billion bits). Give us twice as many digits of pi, and we'd only need one more address bit, plus another bit or so for length, as longer patterns would have improved odds of being found. Keep bumping up the searchable pi digits and we could eventually hit a sweet spot beyond which we'd actually be able save disk space. Once that happens, we can keep on increasing the available pi digits to achieve better compression, but more interestingly, we can add another layer of logic in which we take our packed bits, chunk them up, and look for those sequences in pi. If we're going to do that, we need to pack an extra bit for each chunk to say either "I point to data" or "I point to a pointer", but if we've got so many pi digits to search that we're actually saving space every time, we can still wind up with simply a pi digit offset and size, which would lead to a lot more lookups, and eventually, chunk by chunk, the data we care about.

A tip of the hat to the first person to find this post within pi. It's there! Extra points if you also find my next post before I post it. :^)

edit from much much later:
I'm glad people keep finding this post and having fun with the idea!  I'm sorry to have gotten anybody's hopes up, but this is one of those fun ideas that is impossible in practice.  (Well it's possible, it just can't achieve any data compression.  :^)  See the comments below, including my own, for reasons this doesn't and can't work.

Free Driver's Ed, part 2

Lesson # 2: Speed Matching
Here we go again, Utahns. You can keep right on driving like that, but I'm gonna keep on complaining and attempting to educate you. Because I know that under your tough facades, at the bottom of your low-mileage hearts, you really do give a rat's ass.

Merging
Picture this. You're not on the freeway, but you want to be. You find one of those big ramps that gets you there. Great! You notice the right lane of the freeway isn't moving. Dumbasses. You zip past all those slowpokes and merge in either at the very last moment or several hundred yards past where that line painted on the road suggested. You can do this, because you are the single most important person on Earth.

But wait! The story isn't done! Turns out, those dumbasses weren't moving because several people in front of you were also the most important person on Earth. Rather than matching speed and slipping in undisruptively, they waited until the last moment or went several hundred yards past the line. The "dumbasses" who were already on the freeway had to give them room to merge, and the dumbasses behind those dumbasses, not wanting to crash, had to slow down too. Maybe they're not the dumbasses after all.

The merging technique that involves the least amount of dumbassery is, astonishingly, to match the speed of the lane you're about to merge into. If they're booking it, you should too. If they've come to a grinding halt, you should too. I know, you're super-important, you deserve to dart ahead so you can be "first", but that leads to the dark side... and to you being a dumbass. If even a small fraction of you 'Tahns would merge correctly, everybody's commute would be an awful lot smoother.

Thunderbirds
Behold, the amazing Utah formation-driving Thunderbirds! You can't help but smile as you approach these adorable blockades. The perfectly-synchronized motion soothes the soul. And it doesn't stop there -- you too can be a Thunderbird! Find your buddy in the next lane, and maybe even the lane on the other side, and lock in! If they speed up, you stay right beside 'em. If they slow down, you make damn sure to follow along. Herd behaviour is a sure path to safety, as well as a live exhibit of your vast intellect. Unison! Parity! Brotherhood! Thunderbiiirds!

Come on. Formation driving is about as cool as Utah Valley's bar-to-church ratio. If you don't want to speed up when you use the passing lane, then don't use it.

Thursday, October 19, 2006

Lemma

lem-ma [lem-uh]
noun; a situation requiring a choice between desirable alternatives.

Tuesday, August 29, 2006

AI-engineered codecs?

Someone else has probably had this idea, and someone else has probably explained it better than I'll be able to. Someone else yet has probably proved that the whole thing's implausible. Nuts to them; I have a fleeting thought and I'm going to publish it! :^)

I'm not very well-versed in either genetic algorithms or neural networks, but neither are those just buzzwords to me - I have written genetic and neural equivalents of "Hello world". The techniques differ, and stacking layers of these algorithms has different effects, but the thing that makes them interesting (to me, at the moment) is that we wind up with a computational system without the programmer having to actually solve the problem. A typical neural network will take a piece of input (say, a scanned image of a paper) and produce some output (say, a set of bounding box coordinates of each interpreted dark blob on the image). These outputs may then be the input of another neural net which produces some more output (say, ASCII characters interpreted given those dark blobs) and/or a non-neural algorithm that just looks for patterns (say, a spellchecker). Writing an actual algorithm to turn an image of a paper into a text stream would be massively hard, but writing and training some neural nets is much less painful. Let the computer do the computing.

In the world of Free software (free as in liberty), a world in which I happily live, there are some struggles happening around various proprietary formats. A while back, Unisys declared to the world that they owned math and thus we all had to pay royalties if we wanted to use .gif files. That particular software patent has since expired, but nowadays there are companies convinced that they own the math necessary to encode and decode MP3's and such, and even worse, there are widely-used formats like Apple's "Sorensen" QuickTime and Microsoft's Windows Media for which no Free codecs exist. There's not much motivation for someone to hack such things up, either, as they'd be sued into oblivion the moment their code became useful. God bless the US, eh?

Forget reverse-engineering, forget exploiting the closed code, and especially forget paying big corporations royalties for the privilege of doing math. I propose that it might be possible and worthwhile to write some AI to figure out these pesky formats for us. We have input, say a QuickTime .mov file, and we have the desired output. (Scrape all the raw bitmap image data and all the output audio. It'll be huge, but that's our target.) I don't know what sort of scale, how many layers, or what ghastly amounts of memory and floating-point muscle it would take to set up and train a neural net to get from point A.mov to point B.raw for any given movie, but I doubt it's impossible. Flip the input and output to train an encoder. Not too shabby!

I know even less about genetic algorithms than I do neural nets, but maybe they are better equipped to solve the problem. Plenty of other AI techniques are out there too; perhaps some combination of them would be the optimal approach. The idea is to have a program reinvent codec wheels for us, since others won't share their wheel understanding.

Shackles begone! One way or another, we need to get to the point where the format is irrelevant, only the data matters.

Wednesday, August 23, 2006

Save your ears if Mars attacks

I like to say positive things, to point out, "hey, this is cool" or "try this out". But sometimes, something will come along that requires a little negativity. Sometimes you have to be cruel to be kind. In this case I feel obligated to put up a little warning, a warning about a band whose music is capable of decreasing the quality of your life, and should thus be avoided.

The Red Hot Chili Peppers put on a good show. The music is great, and the multimedia display is mind-boggling. The band that opened for them on this tour, however, was bad enough that I feel motivated to urge you to avoid them. The Mars Volta, as they're called, apparently have plenty of history with the Chili Peppers, but that's no justification for what they did to my eardrums. And my wife's eardrums. She was about ready to leave and hide in a nasty bathroom until they left the stage.
Edit: After hearing more about this band from a friend, I'm willing to permit that this show may have been a very, very off night. It warrants further investigation, but it does not change our first impression...
'Nother Edit: Yeah, they sound much better on their albums. Still not really my thing, but entirely listenable. This warning post stands, however. They put on a crap show once, they could do it again. :^)
To illustrate our criticism of he band's sound a bit more clearly, allow me to list some things their noise managed to remind us of:
  • The voice of any adult in a Charlie Brown cartoon
  • "Freaky Outie", a song performed by 8-year-olds in Home Movies
  • A room full of people playing Electroplankton without headphones
  • Master Shake's misguided birthday song
  • Family Guy's stoned talent show performance (at the end of this clip)
Some of the songs themselves sounded fine, at least until the singer piped in. Like his fellow Texan "The Decider", this guy would do well to just shut the hell up. But worse than the songs themselves was the painfully drawn-out chaos that happened in between. I understand the desire to bridge songs, especially during a live show; that can be lots of fun. Less so, however, when the many members of the band do not figure out beforehand which song they'll actually be bridging into.

Each instrument was normally doing something decently musical on its own, but the band members didn't seem any too interested in what the other guys were up to. Maybe it was some high-minded eclectic design style applied to music. I don't know. But it didn't work. I suspect even the band members realize this. At one point the singer was convulsing on stage - a seemingly epileptic fit from which he unfortunately recovered, and went on to do some more shrieking.

So we had a shrieking, unintelligable singer, and instruments feuding over which song was being played, all while two bizarre images like this were shown on a screen behind them. All that was stuffed through the most irritating reverb effect I've ever heard. Somewhere around two or three hertz, its presence was, sadly, the most consistent part of the band's sound. During relative calms in the traumatic bridging progressions, there was an almost whale-like quality about the effect. As a result, I think I actually hate whales.

If I have failed in my warning to you, or if you are morbidly curious (in which case I have also failed) you may hear some of the things I apparently heard here:
http://www.themarsvolta.co.uk/
The samples on the site haven't been stuffed through the aquatic reverb, nor is anything being bridged to several acoustic destinations at once, but it's still pretty hard to follow.