My Special Spatial Space
posted by chip on 2008-07-17 03:17:36
I just got done re-watching
Titan AE. I was mildly impressed with it when I watched it the first time, partly for its handling of adult themes, and partly for its pioneering work in combining hand-drawn animation and CG. They billed it as a kid's movie, of course, but I don't think that's fair. How many necks were snapped in the last kid's movie you saw? (If you're like me, that last movie was Wall-E, and the answer is zero) When re-watching it, I realized the
real reason I like the movie: Akima, voiced by none other than Drew Barrymore.
Ah, Drew... *swoon*
Since none of you have posted a reply lately, you probably haven't seen my new, improved, and even spiffier editing widget. The editing page now fills the full width of your browser instead of being crammed into my single column design. The live preview now scrolls in its own div, meaning that the edit area is never out of sight. But most amazingly, I added a little javascript magic so that the edit area and preview scroll in synchrony! I'm really happy with it. :)
And in the process of setting up a way to switch between full width and column modes, I re-did how the column layout works, and suddenly the column worked in IE. After tweaking a few formerly implicit values on the header, about 95% of the site now works in IE7. That's a whole lot better than IE6, which couldn't have rendered it worse if it threw all my HTML tags in a bag and pulled them out at random. Supposedly IE8 will get everything right (but I'll believe it when I see it).
And for those of you who like to spend Saturday night learning new and exciting algorithms for spatial indexing (and I know I do), please check out this site chock-full of Spatial Index Demos. It's got multitudes QuadTrees and K-d trees for storing and quickly finding points, rectangles, lines, and regions, all demonstrated in a powerful Java applet that allows you to step through and see the logic of the algorithm involved. It pleases me in that special part of my brain that was permanently scarred by discrete math during my CS education.
Speaking of brain damage... POSITION TO DESTROY!
0 comments reply permalink
Git: The Social VCS
posted by chip on 2008-07-13 02:32:02
The other day, I was explaining the nature of Git to Andrea's boyfriend Alex. Git, I explained, is a distributed VCS — each developer has a full copy of the repository, and changes flow back and forth between these repositories. "Seems like an antisocial development system," he remarked.
When put that simply, "Every developer has their own copy of the repository," it really does sound antisocial. One imagines each developer working in solitude on their copy, with interaction kept to a minimum. I suppose it's not impossible for that to happen, but the assumption that "distributed" implies "isolated" isn't necessarily true. To illustrate the difference in Git's approach, I'll fabricate an example.
Two developers, Amos and Butch, are working on a search engine project called Quantum Effort Distribulator (or QED for short). Amos is the lead dev, and Butch is helping him out. Butch checks out a working copy from the QED subversion repository, spends a day hacking, and commits two or three vital changes to the ranking algorithm. Amos makes some changes to the ranking algorithm later and tries to commit them, only to have his commit rejected because of a conflict. This is the first that Amos has heard of Butch's changes, but it doesn't surprise him — Butch is a prototypical hacker, and doesn't like announcing his changes. Amos updates his working copy, resolves the conflicts with his new changes, and commits them.
In a parallel universe, Amos and Butch are using Git instead of Subversion. Butch clones Amos's repository, spends a day hacking, and commits two or three vital changes to the ranking algorithm. Because Butch's repository is a clone, his commits only appear in his repository, not Amos's. Butch sends a message to Amos telling him that he has made changes, and that Amos should pull those commits from Butch's repository. Amos pulls Butch's commits into a tracking branch of his repository and looks over the changes. Satisfied, Amos merges the changes into his master branch. Later, Amos makes some changes to the ranking algorithm and commits them.
The difference should by this point be clear: The distributed nature of Git promotes social coding precisely because it requires human interaction to move code changes around. With the way Amos and Butch use Git, Butch cannot be a lone hacker. He is required to notify Amos of his work, and as a result, Amos is better able to direct Butch's work. Seemingly paradoxically, Git's "antisocial" model actually encourages social interaction.
Granted, this is a contrived example, but I think it adequately demonstrates the cultural differences between Git and its peers. Of course, there are technical advantages, too, but that's the subject of another post. :)
0 comments reply permalink
TIME PARADOX
posted by chip on 2008-07-10 00:40:27
Inspired by
a letter to the future self of someone I don't even know, here is a letter to me, ten years in the future.
Dear 36 year-old Chip,
Do you remember me? You probably don't. I can barely remember what I had for breakfast. Oh, yeah, it was those Cocoa Puffs with the vanilla puffs mixed in. Cocoa Puffs Combos. They're like a racially homogeneous party in my mouth, and everyone is invited (as long as they're black or white). But seriously, they're not bad.
Since you don't remember me, here's a short recap:
Right now, you wake up in the afternoon, do some work for an internet startup called SpiderOak, and then play Playstation for most of the day. You live with your parents, but are moving back to Champaign in August with your friend Erickson. He probably still looks older than you, unless you've gone gray by now. A year and a half ago, your brother Brian killed himself, and you've decided that staying close to the rest of the family is a good idea. You're brilliant, but lazy, and still a bit scared to live life to it's fullest.
You still think about a girl who doesn't even think about you anymore, and wonder if it's even worth the trouble of finding another girl to think about. Maybe you've found that someone who is crazy enough to like you for who you are.
...*snork*
HAHAHAHAHA. Ok, I think we both know that's bullshit. Maybe by the time you read this they'll have robot love slaves.
Your main claim to long-lasting fame right now is a terrible internet video show called Video Free Somethingrather. Yes, you spelled it wrong. The people who have seen it generally like it. But that's only like ten people, including you and your other five family members. Still, you're refining your cinematography skills, and that's hopefully paid off for you.
You're pretty awesome at driving. In fact, you've never had an accident. People call you "Red Lightning" because of your downhill mountain racing skills. Also, you're wicked badass at shooting, able to take off someone's ear at 200 yards with a .22LR revolver. Little kids talk about you in hushed whispers, a legend of their time.
In your spare time, you write books that are international best-sellers in the romance, sci-fi, fantasy, mystery, and gardening self-help genres. Critics describe your work as "A tour-de-force not to be reckoned with," and "The most profoundly touching stories ever written by man." Your latest novel, "A Dragon Loves Briefly in the Crab Nebula: A Guide to Growing Ficus" has just recently outsold the Bible. Your books are so popular that no one reads or even remembers books by that hack J.K. Rowling.
Last week, you were given a mysterious stone that, when you shout the magic incantation, gcc -march=i686 -funroll-loops -Wall -I/usr/local/include -L/usr/local/lib -lm -lsuperpowers -lperl -lSDL -laudiofile -ldb -lfftw3 -lpng -ljpeg -lgif -lfreetype -lncurses -logg -lvorbis -lssl -lz Sailor.c -o Sailor, transforms you into the sailor-suited paragon of justice, Sailor Byte! With your bit-flipping ray and massively parallel SIMD attack, you fight justice and still have time for late-night hacking. Also, when transformed, you have super endurance for the ladies. And there are lots of ladies. *wink wink*
Like just this other day, there was this evil NaN monster...
Chip continues babbling as the men in white suits take him away.
0 comments reply permalink
Wonderful!
posted by chip on 2008-07-08 23:35:03
I've seen quite a few
Project Wonderful ads on the webcomics I read, and for good reason — Project Wonderful was created by Ryan North, The Most Awesome Man in the World. It creates a completely new method for web advertising: you bid on the time your ad is shown. The highest bidder at any time gets their ad shown. No cost per click, impressions, or fraud. Advertisers get exactly what they pay for, and sites get advertisers to compete over their space. I wondered, then, what exactly
are my favorite sites worth? I took a survey.
It's harder than you'd think to compare, because different sized ads will fetch different prices. Ad sizes range from the button, a 117x30 box to the skyscraper, a 160x600 tower. Also represented in my survey was the square, which is 125x125, and the classic 468x60 banner. Dollar amounts are in "Cost per Day," which measures how much it would cost you to secure an ad spot for one day. Some sites had more than one type, so I've laid out the data in a tabular format.
The clear winner here is Something Positive, which is demanding over $60 a day for their skyscraper ad. I suspect, though, that their lead is only due to xkcd not having any ads. :)
2 comments reply permalink
Odds 'n' Ends
posted by chip on 2008-06-28 18:54:26
A while back Erickson told me that the Live Preview function on the blog didn't work in Opera. My response at the time was "meh," since I didn't use Opera, and he was the only person I knew who did. Since then, I've used Opera a bit, and I admire its elegance. Because of that, I've decided to give a little more effort to making things work with Opera.
Unfortunately, the Live Preview function used the non-standard innerHTML property, found in Firefox and IE, but not Opera. Since I'm using Opera right now, I decided to STFW to see if there was a portable way to DOM-ify an arbitrary text string. There isn't, but as it turns out, Opera has moved faster than I have. As of Opera 9.50, the innerHTML property works. :D Now all they need is proper tab operation on the address bar, and a plugin system so I can get an ad blocker, and it might be a viable browser. I've also changed the Live Preview so that it only updates a short time after you stop typing. This will prevent unnecessary repetitive page loads, especially for embedded iframes or flash, which don't tend to load in time and hose your browser.
I spent the night at my sister's last night, and woke up at 10:30 or so, so that she could drop me and my brother off at home. I was drinking a glass of water, and one of her cats was sitting on a chair, looking curiously at me. I proceeded to maneuver my cup over the cat, and poured a small stream of water on its head. After the cat scrambled for the floor and fled the room, I reflected that my actions were a bit mean and completely unprovoked. This is why I don't wake up in the morning. That little part of my mind that prevents me from doing mean things does not activate until the sun reaches its zenith in the sky. I am not nice in the morning. }:->
Mom has picked a pile of cherries, and was pondering what to make with them. "Is there anything I can make with cherries that you'll eat?" she asked. I'm not a fan of fresh cherries, or most cherry-flavored things. The closest I'll get is the occasional cherry Dr. Pepper. I told her, though, that if she made a bacon cherry pie, I would eat it. I was not joking.
Your move, Mom. :)
2 comments reply permalink
Back Home Again
posted by chip on 2008-06-22 02:04:08
Aaaaaah. It's good to be back home. I do appreciate Springfield, MO more now than I did when I got there, but I'd definitely rather be here. The air is fresh, the food is great, and when I look up at the sky, I can see the stars.
All of them. That last part is why I will always come back to the nearly-deserted countryside. The city always feels a little claustrophobic to me — not because of the buildings, or the people, but because when you look up at the sky, you can't see all of it. There's something in the way, and that makes it feel boxed in.
I've actually been back for two days now, but I've been taking advantage of the free Team Fortress 2 weekend on Steam. It's a pretty great game. I would get it, but I already have the other two thirds of the Orange Box, and buying TF2 by itself would be a waste of money. The whole Orange Box is $40. I've already paid $20 for Portal, and $20 for Episodes 1 and 2. Paying another $20 for TF2 basically means I've lost $20. Valve really should just give me TF2 after I bought the other two. Such is life.
I don't know if I've talked about Steam very much, but it's simultaneously a steaming pile of shit and a great leap forward in content delivery. The software of Steam is (according to a knowledgeable acquaintance who ran it under a debugger) hideously inefficient, functionally bloated, and arguably disgusting to look at. It implements what everyone feared about the future software industry -- a vendor-controlled platform that dictates when and where you can play your games. Unlike physical copies, bought games are non-transferrable. Once you've bought it, it's yours. And sometimes, the service just doesn't work that well.
But on the other hand, Valve has been very responsible with their digital marketplace. Anything you buy on Steam is installable on as many computers as you want, with the caveat that you can only use one at a time. So long as you have your account, you can download and play any game you've bought (though they could change that at any time). And some games that have physical copies (mainly Valve games) can be "activated" on Steam, giving you a fully up-to-date copy on your account. This sometimes gives you unexpected bonuses: I put in the CD key for Gunman Chronicles, a game I bought at a garage sale for $2, and it gave me the whole Half-Life Platinum Pack (Half-Life, HL: Blue Shift, HL: Opposing Force, HL: Deathmatch, Day of Defeat, Team Fortress Classic, and Ricochet). There is an offline mode for times when you don't have internet access, like when you're on your laptop while traveling. They even allow you to back up your games so that you don't have to suffer through multi-gigabyte downloads after you (inevitably) re-install Windows.
Valve has avoided enough of the potential evils that I've trusted them with about $50 worth of software so far. As long as Valve stays independent, I can see it staying that way. And Steam seems to be the de-facto internet distribution system for games on PC. Quite a few third parties have signed on, including notables such as id, SEGA, Epic, Rockstar, and Activision. It's also hugely convenient to pay for a game with Paypal and have it downloaded within hours. When I think about going to the store and buying a game in a box with a plastic disc inside, the idea seems hilariously quaint. Oh, and it works in Wine. :)
On my way back home, I stopped by Friar Tuck's, who now carries New Belgium Brewery beers, as well as other great Colorado breweries like Fort Collins Brewery, Left Hand, and Great Divide. I picked up a six-pack of New Belgium's Mothership Wit, a delightfully cloudy Belgian wheat beer, and headed over to Erickson's for some Mario Kart. While there, I picked up some of Mrs. Erickson's (his mother, not his [nonexistent] wife) one-time-only Bacon Chocolate Fudge. It's one-time-only because Mrs. Erickson finds the idea of bacon fudge disgusting. It was delicious nonetheless.
Erickson and I hold to a somewhat popular theory that anything can be made better with the addition of bacon. For lots of things, this makes perfect sense. Bacon cheeseburgers, BLTs, and bacon omelets are perfect examples of bacon in action. For others, though, some adventurism is necessary. Most people would recoil at the idea of a Bacon Chocolate Bar, but I assure you, it's delicious. The bacon fudge is an experimental foray in this field, with more to come. And we are not alone.
Mmmmmm, bacon.
0 comments reply permalink
Now You're Playing With Source Control
posted by chip on 2008-06-14 04:08:39
I've just finished moving my website into a git repository and cleaning up a few things. I now have a complete separation between beta.bytex64.net and the main site, so I can test features before launching them on my production site, and if they blow up, nothing bad will happen. Of course, nothing serious has happened thus far because I'm both incredibly skilled and incredibly lucky. The eventual goal is twofold, to both have a cleaned-up form of my site's code that I can distribute, and to allow myself to test even crazier ideas now that I have a suitable safety net in place.
This project has really seen my appreciation for git come into full bloom. I've been using it a lot lately as a better-designed alternative to subversion, but its distributed nature and superior branching and merging makes this task so much easier. My "master" branch is the one running beta.bytex64.net, and a clone of that is running the main site as a "production" branch. The code is identical, but the configuration is different as each site points to a different physical location and a different database. These changes are committed in the production branch -- they're not just local changes floating free. When I make a change, I write and test it on the master branch and commit it as I normally would. On my production branch, I simply pull from the master, merging my new change in with the existing differences. Two sites, a common base, local changes, and all of it tracked in source control.
Granted, I could do that with subversion, too, but branching and merging with SVN is so much more tedious and stupid that it merits little consideration. If I wanted to get really fancy, I could rebase the production changes on top of the master, but there's not much reason to do that for my personal purposes.
I'm pretty sure everything's running as it should, but if anything is out of the ordinary, please let me know.
0 comments reply permalink
An Automotive History Lesson
posted by chip on 2008-06-13 06:20:26
I couldn't sleep, so I figured I'd share a couple of finds of mine. You might think that my 1988 Honda would be the oldest car in the parking lot. With 186K miles and 20 years, there's not a lot left in that age bracket that's still mobile. Well, at least right here, I've been soundly beaten by a decade and a half. Sitting nearby my car is a 1972 or '73 Toyota Corona Wagon that is in very good condition for its age. Behold:
That car is at least 35 years old, folks. My car is nearly old enough to drink, but this car is married with three kids and a mortgage. I had help ID-ing this from the wonderfully detailed toyotareference.com. If you want to know something about a Toyota, go to that site first.
I'll bet you didn't know that Toyota is based in Toyota City. I'm not even making that up, click the link.
I've always known that my CRX is a Made In JapanTM Honda, but I never knew exactly where. I got my VIN number, and with a little Wikified help, I learned that it was built in Suzuka, Japan. Some of you may know that Suzuka is home to Suzuka Circuit, a historic race track and home of Honda motorsports. To illustrate exactly how closely related Honda is to Suzuka Circuit, I've created this little Google Maps widget. Click on the blue markers for more information.
View Larger Map
The widget doesn't show the scale, but that's about 1.2 miles between the factory and the race track. That's where my car was made.
1 comment reply permalink
The Mystery of the Ignition Coil, part 2
posted by chip on 2008-06-12 20:14:15
We now return you to The Mystery of the Ignition Coil...
Lady Etrescu once again queried the Detective. "Then who did it? Who killed the ignition coil?"
The Detective puffed slowly now, for effect. "The killer... is the Distributor Cap."
Murmurs and muttering filled the room once again. At least one "Poppycock!" was heard.
Master Black addressed The Detective. "That's not possible, Detective, I replaced the distributor cap."
The Detective replied incisively, "Oh, I'm not talking about the one currently in your car. I'm talking about the one you replaced. You determined that the earlier problem was due to a broken piece of the distributor cap, yes?"
"Yes."
"Said broken part must have prevented the spark from getting to the plugs, causing the misfire, yes?"
"Yes, but I..."
"Which means that a spark was being generated in the coil, but it had no place to go. An electric potential, however, can not just disappear! No, it must find some way to ground. And if that way is not through the distributor on the way to the spark plugs, then where must it go, Master Black?"
"Ah... To the frame, through the insulation. I'm beginning to..."
"Precisely!" The Detective cut Black off, "And on its impromptu journey through a high resistance material, that electric potential generates a tremendous amount of heat. And that heat began to destroy the coil. And as the coil deteriorated, it caused increased resistance, which in turn caused more heat and lower output voltage, until we see the misfire you mentioned."
"That makes perfect sense. Thank you, Detective, for solving..."
"Which is why it's always important to check the rest of your ignition system whenever you find a problem."
"Well, thank you very mu..."
"Any failure could cause other gremlins in the system, so one..."
"Detective!" Black shouted.
"Ahem, yes?"
"That's quite enough."
"Erm, yes. Good day." The Detective gathered his hat and left.
Black muttered under his breath as The Detective left, "Know-it-alls..."
0 comments reply permalink
Your Tax Dollars at Work
posted by chip on 2008-06-10 16:17:19
I was watching
hulu, and the end-of-episode ad caught my eye. See if you can find the mistake. (Hint: it has nothing to do with the obvious Orwellian implications of the ad)
And the Air Force is the intelligent branch of the military.
UPDATE: Firefox Ad-Block had blocked the ad picture above even though it's on my server (presumably because it ends in ad.jpg). I've fixed it.
5 comments reply permalink