Log in

No account? Create an account

Fri, Dec. 26th, 2008, 03:02 pm
Freezing Ants

Years ago, I lived in a place with a cheap refrigerator which had a seal which broke. This place also had an ant problem. Somehow, one of the ants signalled to the rest of them that there was food in the fridge, and there proceeded to be a long line of ants which marched into the freezer, froze, and never came back out again (gross, I know, but I have a real point here).

I suspect this was caused by an accidental hacking of the ants's signalling mechanisms, caused by freezers not existing in the ants's natural environment. Normally when an ant gets harmed it releases order telling other ants to stay away, but when an ant gets frozen it doesn't get a chance to indicate that it's harmed (actually, it might not be - we didn't try unfreezing the ants to see if they still worked).

My thought is that one could use this effect intentionally. If there was a custom-built freezer with a  line of ant pheremone leading into its entrance, it could immediately attract the local ant colony, then lead them all into a black hole until the colony was depleted of resources and died.

Anybody know if this has been tried before? For that matter, anybody know what the mass of all the ants in the local ant colony is likely to be? I can pretend to know the typical size of an beehive, but not an ant colony.

Mon, Dec. 22nd, 2008, 11:16 am
Improved (?) Stirling engine cycle

The Stirling engine cycle appears, to my eye, to have thermodynamic losses happening all over the place. Compressing a chamber which is being heated, expanding one which is cooling, transferring between chambers in a haphazard manner when both are having their temperature moderated, that sort of thing.

Here is my idea for a much cleaner (or at least much easier to understand) cycle which may be an improvement.

There are four piston chambers A, B, C, and D. Gas flows in the direction A->B->C->D->A, and the corresponding chambers which gas flows between have connections with valves controlling whether gas can flow though each of them. The pistons are opposing, so A and C expand while B and D contract, and vice versa. There's a heat source continuously warming up A, and a sink continuously cooling down C. All pistons are the same length, but A and C have the same diameter while B has a larger one and D has a smaller one.

The cycle is in four phases. They're all done by a single reciprocating piston motion, but I'll explain how one of the two unconnected regions of gas behaves to make things clearer.

First, chamber A is fully expanded and B is contracted. The valves between the pair A and D and the pair B and C are shut, while the one between A and B (and also C and D) are open. Heat from the source causes expansion of the gas, which forces B to expand and A to contract (remember that B has greater diameter than A and that the piston motions of the two are directly connected). When B is completely expanded and A completely shut, the valves are flipped, so that the valve between A and B, as well as C and D are shut, and the valve between B and C (and D and A) are open. The cooling in C will then cause the piston to go the other way, emptying B and filing C as the overall volume goes down. Then the valves are flipped again and the gas flows from C to the larger D due to further cooling, then the valves are flipped one last time and the gas flows from D to A as heating expands the gas, and then the cycle repeats.

In a complete system there will be two cycles going at all times in two mostly unconnected regions of gas, but leaking between the two regions is no big deal. The two going at once has the nice property that the heating chamber is expanding at all times and the cooling chamber is compressing at all times.

This approach has the added complexity of having actuated valves, but that's not such a big deal. Internal combustion engines rely on valves and they work just fine.

This mechanism appears too simple to not have been thought of before. So my question to everyone is: Are stirling engines just more thermodynamically efficient than they appear to my uneducated eye, or are there some losses in my proposed system I'm unaware of, or has this mechanism been thought of before and simply not used because of its greater mechanical complexity? Or is this actually a possibly useful innovation?

Update: My intuitions about thermodynamics were a bit off. This design will work, but heating during expansion and cooling during compression turn out to be no-no's from an efficiency standpoint.

Sat, Dec. 6th, 2008, 01:58 am
Fusing Deuterium

The basic trick behind current nuclear fusion research is that the binding energy of helium is a significant outlier in terms of being high, so if you fuse together a deuteron and a triton they form a 4He, a high-energy neutron, and a large amount of energy. The main problem with this is the high energy neutron - those things tend to turn everything in the surrounding area into radioactive waste over time. My question is, what's wrong with simply fusing together two deuterons to form a 4He with no extra neutron? Is there no such reaction (my guess is there is, and it emits a neutrino or something), or is the activation energy simply high enough that we can't or don't want to deal with it? If the problem really is activation energy, then if it's within an order of magnitude then rather than getting all excited about current fusion technology and building prototypes working towards commercial reactors as we are now, I'd rather wait until we've got a working all-deuterons system which is completely and totally clean before trying to commercialize it. The engineering behind that would be totally normal energy pressure and heat stuff, with none of that radioactive waste or gradually destroyed and corroded machinery crap.

Fri, Nov. 28th, 2008, 06:27 pm
Mining Radon

Here's my idea for a cheap, reasonably safe, and reliable way of generating nuclear reagents:

Dig a wide hole in the ground in a place where radon is common. Cover the bottom with something which radon can get through but water can't, then build a shallow container full of water over it with an inverted funnel at the top, and daily pump out the radon (and other noble gases) which collect at the apex and use them for one of the many uses of nuclear reagents.

Does anyone have any knowledgeable opinion on whether this sort of design has ever been experimented with, whether it would mechanically work, whether it would have a reasonable yield, and whether radon gas itself is useful?

Tue, Nov. 25th, 2008, 02:48 pm
Economics of Prop. 2

Here in California we recently passed proposition 2, which basically required that farm animals be given enough room to stretch their limbs. The hype against it was a hilarious self-parody of playing off of urbanites's misconceptions of where food comes from: You don't want to let chickens outside, they could catch bird flu! Or run into dirt! Which is rotting! And contains worms! They might even eat a worm! You wouldn't want to each a chicken which had eaten a worm, would you? Okay, so I exaggerate, but it was pretty ridiculous. But that isn't what I really want to make a point about right now.

The other argument against prop. 2 was that it would cause California eggs to be more expensive than mexican eggs, and hence result in california chicken farmers being unable to compete with mexican ones. This on its face makes sense, but I believe the truth is exactly the opposite.

You see, food production in the united states looks very efficient, because prices are very low, but in fact it's extremely inefficient, because consumers would much rather pay slightly more for food which is grown or raised better, and farmers would happily take the higher margins for such food. This is blocked by the total lack of information in the system. Just about the only thing a store-brought chicken says about where it came from is that it's chicken. They can say 'organic' now, which sort of means something, but less than you'd think. By increasing the simple and understandable meaning of the labelling term 'california', consumers are now given extra information about how the chicken which their eggs came from were raised, and are likely to prefer that, especially with a likely price difference of only a few cents.

States in general should probably consider what regulations would cause the most improvement in their produced food for the least increased cost, and institute those regulations and make them widely known, to improve the value of their states's brand. I believe that prop. 2 is simply the most low hanging fruit (no pun intended) for such regulations, and lots more should be added.

Fri, Nov. 14th, 2008, 04:17 pm
Steam in the mortgage market

In horse race betting there's a concept called 'steam'. A once-popular way of scamming a local off track betting place was to go to an actual horserace, bet big on a guaranteed loser horse, then go to an off track betting place and place a yet even bigger bet on the horse which was likely to win. Because off track betting placed didn't used to routinely use the same pool as at the track, they'd simply mimic the odds add the track, and by using steam you could induce them to place an extremely unfavorable bet.

What does this have to do with the mortgage market? Well, as it happens the credit default swap market is many times the size of the actual mortgage market. How'd that happen? Well, overzealous investors ran out of actual mortgages to invest in, so they simply started placing side bets on how the mortgage market would do, totally many times how big the actual market underneath is. AIG is in a position of being the biggest insurer of the garbage. These two facts put together make for an interesting possible scenario. Since the amount of money on the line is greater than the actual size of the underlying market, AIG could potentially agree to cover every mortgage company's loss in any short sale (a short sale is where the mortgage company agrees to forgive part of a loan to make a sale happen, as a way of avoiding forecloser). That would immediately result in the number of foreclosures being near zero, and AIG would magically have made it so it didn't have to pay out on any of its side bets.

Chances are that the numbers don't work out for this to be a winning proposition. Maybe the CDO insurance industry as a whole, rather than just the largest player, could manage to get away with it. In any case, it sure would be funny.

Wed, Nov. 12th, 2008, 01:24 pm

This puzzle is based on an original mechanical concept I've never seen or heard of anywhere else, three gears all of which mesh at the same point and cycle through which gear goes through the center rather than alternating between two gears as regular gears do. It was designed by me and Oskar van Deventer, and is now available for purchase in a 3d printed form from puzzle palace.

Sun, Nov. 2nd, 2008, 04:40 am
Circularity of motivation in spending

There's a strange circularity in the motivations behind what americans spend their money on. People get, high-paying jobs so that they can afford the house which they need to pay for so they can be near the high-paying job. They work as two-income families so they can afford all the day care, clothes, and take-out food they need to buy because they're a two-income family. They put off having children and save up lots of money when they're young so they can afford all the fertility treatments and child care they'll need when they have children when they're older.

Most people don't seem to think these things through. It's simply how they were told one should do things when they were younger, so they dutifully follow instructions. I for one was never given any sketch of a life path other than getting a high-paying job at an established institution after finishing grad school. Somewhere along the line, the common sense advice that one should view job satisfaction as the primary criterion for what job to take (influenced by pay, but many other things as well), and that one should make a realistic evaluation of how much one is partaking of the benefits one supposedly gets from city living and how difficult it would be to engage in those activities while living elsewhere stopped being handed out. Likewise having a single income household simply became unthinkable, and the observation that the younger you have your children the more your parents can help out, the more energy you have for them, and the more you get to enjoy being a parent and grandparent became nearly taboo to say.

I'm not sure how this all happened. Perhaps the problem is that most life planning advice is given out by school administrators and academics who followed a career arc suspiciously similar to the one they espouse as the one for everyone. Maybe some people overshot the women's rights movement and instead of claiming that women have the right to pursue a career in lieu of children, which they do, started claiming that they have an obligation, which they don't. Maybe in such an uber-capitalist country as the United States all life advice will inevitably involve the career arc which earns as much nominal money as possible (although the bizarre view that anyone who doesn't wind up being a tenured professor at some point failed is advice which doesn't even vaguely optimize for pay).

Whatever the reasons, it's all very sad and causes lots of misery, and I urge everyone to start thinking about these things when they're young, because a lot of people realize far too late that they did everything all wrong.

Tue, Oct. 28th, 2008, 01:37 pm
Ignore the Dow

The state of 'the market' is a trailing indicator, not a leading one. When stocks go up or down it makes a bunch of value change hands in a casino sort of way but doesn't directly (or sometimes even indirectly) affect how the economy is doing.

If you want a better indicator for how things are doing look at the TED spread. When that line goes below 1% and stays there the bleeding has stopped and the healing can begin.

And if you must look at stock prices day to day, look at the russell 3000. It's like the dow jones industrial average, but more widespread so it's less noisy. A note to future index makers: please make your index start at the same value as some other index at the time it begins, so it can be viewed as mostly interchangeable but better, without having to worry about an exchange rate.

Sun, Oct. 19th, 2008, 02:36 am
BusinessWeek profile

There's a profile of me in BusinessWeek. It's a fairly reasonable portrayal, although it focuses a bit much on the asperger's angle. I don't really view my life through the whole overcoming disability narrative (same as most people with disabilities), and tell people that in so many words, but it's such a nice story that journalists tend to focus on it a bit. I mention my asperger's to journalists primarily because, well duh, if you're doing a profile on someone and they have an obvious disability that's clearly something worth mentioning.

There are of course some comments from the usual haters. Some of this seems to be based on an assumption that I'm of the anarcho-libertarian stripe, that movement which is really just neo-social darwinism. For the record, I'm not even vaguely a libertarian. I'm in favor of a higher minimum wage (why that thing never gets inflation indexed is beyond me), national health care, a big fat carbon tax, and open immigrations, as are the bulk of all economists. Only one out of those four is even vaguely consistent with libertarianism. I also find Ayn Rand completely unreadable due to a total lack of literary merit, although I will say that using logic to 'prove' the virtue of laissez-faire capitalism when laissez-faire capitalism is one of one's clearly stated axioms is hardly an insight at all.

Other random notes. I don't remember saying the 'only stupid people care about details' comment, although I have a feeling I was making a somewhat qualified point. There are people who perform necessary jobs where all they do is handle lots of little details, and they are not as a rule stupid. I don't know why editors like picking out really bad pictures of me (the one they used for this article was a test shot, with me squinting into the light). I'd gained some weight at the time the video was shot, although I've lost most of it by now. Fiddling with a rubik's cube during a meeting is sort of like talking to someone while they're driving - you stop doing when something important is going on, and it's otherwise not a big deal, although I've learned not to bring fiddle toys to meetings by now.

Fri, Oct. 3rd, 2008, 01:40 pm
Business Idea - non-malware whitelisting

There are several different products which will scan your computer for malware. Of course, if you produce a widely distributed application you want to not set any of them off. Currently everybody manually checks to see if they're setting off the latest updates to the malware detectors, and the different suppliers of such software have, ummm, widely diverse approaches to dealing with reports of false positives. This is all a huge pain in the ass, and a giant distraction for lots of application companies.

Somebody please set up a service to do such testing false positive reporting for companies which make applications. The world needs such a service badly.

Wed, Oct. 1st, 2008, 05:45 pm
Convex Pentagons question

If you have four points on a plane forming the vertices of a convex quadrilateral, then no finite amount of additional points can result in a configuration where there isn't a subset of four points which form a convex quadrilateral which don't also have a point on their interior. This is fairly easy to show.

My question is, for the vertices of a regular n-gon, how many points must be added to make it so that there's no subset of five points which form the vertices of a convex pentagon and for which there isn't another point inside of that pentagon?

Thu, Sep. 25th, 2008, 01:50 pm
Driving on 101

I've been driving on 101 in the mornings a lot lately. Some thoughts:

Nobody obeys the car pool lane rules. I've always got a car full of kids, but most people in the left lane are all by themselves. If the left lane were made officially a regular lane, it would have no appreciable effect on traffic whatsoever.

The fastest way to change lanes is by staying in the right lane up until an exit, then switching all the way to the left lane immediately afterwards and staying there until the next merge, then switching over to the right lane again. The one exception to this is the exit where the right lane doesn't end and instead forks into a new lane going out and the old lane continues. People don't realize that it's there, and the right lane stays fast for a while afterwards.

California drivers will not let you merge. The occasional person will, but for the most part people will literally play chicken with you when they see you're trying to merge ahead of them. This makes things even more dangerous than is obvious, because it causes people to be way too herky-jerky in all merge situations, even in ones where the person behind isn't trying to cause an accident.

I wish they'd finish the new road construction already. 30 minutes of stop and go traffic every morning kinda sucks.

Wed, Sep. 24th, 2008, 05:24 pm

There's apparently some serious market inefficiency going on over at intrade.

It isn't necessarily the case that someone is artificially keeping the ratio not as far in Obama's favor as it should be - perhaps there's a single market participant keeping a natural balance. What's clearly inefficient (if it's true) is that a single market participant is making predictable swings in the market up and down.

Rather than complaining about it, I say punish the bastard! You know the drill: buy low, sell high. When the market hits one its now regularly scheduled shocks down buy immediately, then wait until before the next shock down and sell. Rinse and repeat until either you've made a bunch of money or whoever's generating excessive market moves gives up.

Of course, now that the secret's out they might simply not do it any more. That's the way it goes.

Sun, Aug. 31st, 2008, 05:08 pm
Xor Pieces

I posted about the proper use of erasure codes in BitTorrent to the bittorrent.org forums, it's xor pieces.

Yes, I know this should really be in a refereed journal. Sorry I don't write academic papers.

Sun, Aug. 24th, 2008, 10:13 pm
Fast Extensions

I've posted my thoughts on the BitTorrent fast extensions to the thread for them on the bittorrent.org forums. Must reading for anyone working on a BitTorrent implementation, these extensions really should become ubiquitous.

Sat, Aug. 23rd, 2008, 01:30 pm
Improving a Puzzle Ring Design

I was never very happy with the second design on this page, so the other day I came up with this improvement, which is more compact, has fewer crossings, and comes apart more easily:

____________   ___   _________   ______
            \ /   \ /         \ /      
             \     /           /       
___   ___   / \   / \   ___   / \   ___
   \ /   \ /   \ /   \ /   \ /   \ /  
    \     \     /     /     \     \  
___/ \   / \___/ \   / \   / \___/ \___
      \ /         \ /   \ /      
       /           /     \        
______/ \_________/ \___/ \____________

At first glance this design appears to have some unnecessary crossings, but refactoring those out makes the braid pattern so tight that it can't be taken apart. This design is a simple tweak of the simplest puzzle ring of this kind to make it actually work as a puzzle. I'm quite fond of it.

Tue, Aug. 12th, 2008, 03:00 am
Dirty Words

In memory of George Carlin's recent death, here are my thoughts on his the words in his routine about the words you can't say on television. This isn't documentation on whether you can say these words on television these days, it's my own subjective sense of what these words mean in common usage today. I'm going to refrain from putting quotes around the words being discussed, because that would that I'm not actually writing them, which would be silly, and because it results in a lot of ambiguous sentence parsings which I think are funny.

1. Shit

The problem with shit isn't that it's vulgar - it isn't really vulgar at all. The problem is that it's graphic, and a fundamentally gross concept. Evidence for this is that the technical term excrement sounds even more impolite than shit in most circumstances, because it's even more graphic. Further evidence for the simply literal nature of the word shit is that if one were to say that some fertilizer was shitty, the natural interpretation would be that it was high in manure content, not that it was low in quality.

Most children these days learn the completely non-graphic word poop, which is almost reasonable to mention in polite conversation, and its ubiquity is making it sound a lot less childish than it once did. My prediction is that shit will be replaced by poop over time, and shit will start to sound old-fashioned. My problem is that there aren't good alternatives to shitty and don't give a shit. Sucky sounds weird when referring to objects which don't do anything, and there is no other common emphatic phrase for don't care.

2. Piss

Piss is simply not a dirty word. It's impolite to talk about peeing under some circumstances, but I've gotten far more negative responses when engaged in a serious discussion of cleaning out earwax than the occasional reference to peeing.

3. Fuck

Fuck is the catch-all phrase for cursing in english. There's even a documentary about it, which I highly recommend. Somebody told me that curse words in english used to be primarily religious, and at some point they all shifted over to bodily functions. Presumably there weren't enough bodily functions to choose from, so fuck got overloaded. That's why suck and bloody are used the way they are, although interestingly those two have ceased to be vulgar, and can now be used under most polite circumstances, and all circumstances when being used for their original meaning.

Whether fuck will go the same way as suck and bloody to becoming nonvulgar is unclear. It may be that sex inherently carries so much emotional baggage for humans that it can never be talked about politely. Certainly the term blow job is mostly just the way you refer to that thing in english. Not everyone seems to agree with my assessment of that though. The reason the 'Don't tase me, bro' guy got cut off wasn't for any of his behavior, it was because in the midst of a rant about how the current president should be impeached he said 'Clinton got impeached for getting a blow job'. The administrator who explained this said 'we do not condone vulgarity'. Which raises the obvious question: how is that statement supposed to be phrased? Saying 'for getting his penis sucked' sounds far more graphic, and would seem to imply that a vacuum cleaner was involved. Saying 'for receiving fellatio' is awkward and childish and sounds like there's something else going on.

Unfortunately there's no simple non-vulgar word for 'to perform sexual intercourse on' in english. If one says that someone got fucked by a real estate agent, the vulgarity is intentional, but if you say a woman got fucked by her boyfriend, the vulgarity is not, but there's no way of making that statement which isn't vulgar, awkward, or ridiculous.

4. Cunt

Since cunt is basically a vulgar word for clitoris or vagina (it seems to be inconsistently applied to mean either) its vulgarity is unambiguous, much like how cock is simply a vulgar word for penis.

5. Cocksucker

When used to refer to a suck-up, cocksucker is clearly a vulgar term, but when used as a straightforward adjective, it basically means what it says. The root word 'cock' is of course vulgar, so it isn't as plain a term as blow job, and the activity being described is one which generally isn't discussed in polite company, but it's mostly just a useful term which doesn't have any non-awkward synonyms.

6. Motherfucker

Has all the same baggage as the root word fuck. The origin of this somewhat bewildering and meaningless term is that it's translated from spanish, by the way, where the term mother is overloaded in a bunch of ways which makes this term make perfect sense, but it loses a lot in the translation.

7. Tits

I don't think of tits as a euphemism for breasts so much as a nickname, presumably the origin of which is that tits the birds are frequently seen flying around in pairs (I don't know if they are, I'm just guessing). Apparently some people have issues with boobs, but they mostly need to grow up. Imagine the psychic damage which would be caused to the general population if toddlers were allowed to suck on them.

What's funny about that list is how innocuous they all are. With the exception of fuck, none of them are among the words which people get frothing at the mouth about. Here's my list of the words whose very reference gets people to go completely apeshit.

1. Nigger

At one point in the past nigger was simply the word used to refer to black people, but gradually over time became viewed as negative, to now where for a white person (but for some reason not a black person) to use it even once is considered grounds for destroying their entire career. Black the race is a rather spectacular example of the euphemism treadmill, where a word gets replaced by its euphemism, which then itself becomes a bad word, euphemised, and replaced. Hence the lack of consistent and clear labelling on ass-wipe paper. The opposite effect happens to terms for being gay, which become less insulting over time, to the point that even queer, a term with inherently strong negative connotations, has lost some of its edge.

Obvious euphemisms for black include colored, a term which is clearly meaningless unless you want to include purple and green people, the subject of uncountable jokes in science fiction shows involving aliens, and the spectacularly awkward african-american, which replaces one syllable with seven. African-american not only is awkward, but is just plain wrong - black americans generally have a fair amount of white ancestry, and the term is used to refer to an ethnicity, not a cultural background, resulting in a lot of bemusement for Kofi Annan, who wonders where his attachment to america came from.

I predict that the euphemism treadmill for black is going to end now though. People of mixed black and white parents seem to refer to themselves as mixed instead of black these days, and the once very strong stigma against interracial dating is strongly reduced if not outright gone, to the point where tabloid rags which gossip about who's dating who frequently don't even mention the race angle any more. Chances are everyone will stick with the word black, and stop thinking that there must be some negative connotation to it.

I'm unclear on whether the problem with saying nigger is that black people are offended by it, or white people are afraid that black people will be offended by it, or whether white people themselves are offended by it. The term is so hair-trigger that even asking peoples's opinions about it will cause a terrible response because you just said nigger in phrasing the question. I wish everyone would grow up.

2. Retard

Like terms for black, terms for the mentally inferior are on a serious euphemism treadmill. Retard's designation as a bad word is particularly strange, because saying that someone is 'mentally twelve', an inaccurate and misleading term, is considered perfectly acceptable discourse, but saying that they're retarded, which unambiguously means the exact same thing, is considered unacceptable. Again, I wish everyone would grow up. The terms mentally handicapped and disabled are perfectly acceptable, but don't imply the sort of all-around deficiency which retarded does. The term profoundly stupid is of course a serviceable synonym, but calling someone that will cause an even worse reaction than calling them retarded. I predict that the search for a term for profoundly stupid which doesn't actually imply that the person is profoundly stupid will continue until the end of time.

3. Bitch

The problem with bitch is, simply, that it's gendered. Curiously, the other terms for someone with an unpleasant personality, jerk and asshole, are gendered in the opposite direction. I wish there was a gender-neutral, non-vulgar term for a person with an unpleasant personality, because humans being the way they are there's plenty of call for using it in everyday discourse.

Sat, Jun. 21st, 2008, 05:50 pm
Improved Blitz Clock

The US women's championship ended in a disaster of a blitz game. One player got in severe time trouble and started moving her pieces before the opponent had hit the clock, thus managing to hit her clock almost instantly after her opponent did. She eventually won on time in a lost position.

On top of being messed up, this is clearly against the rules. In an unusual move, a protest was lodged, and there was some official response, although it basically amounted to 'we never enforce that rule', which is true. I can tell you from experience that (1) it's completely impossible to simultaneously play blitz chess and audit whether your opponent is waiting to touch their pieces after you hit your clock, and (2) bullying the clock is completely rampant, in fact it's one of the core skills of experienced blitz players.

I'd like to propose a new technical solution to this problem. In addition to the regular two buttons on a chess clock, two more are added, and the rule is that after your opponent hits their side of the clock you have to hit the secondary button on your side, then move your piece with the same hand, then hit your main button. This would be very easy to audit, especially with an electronic clock which enforced the appropriate state machine, and it would completely eliminate the clock bullying bullshit which dominates the blitz world.

This would be a great piece of technology for blitz tournaments. Of course, it's completely absurd to use a blitz game as a tiebreak for a regular time controls tournament at all, much less a championship. Trying to clean that up looks fairly hopeless though - the current state of chess titles is comparable to the situation in boxing, and there are no signs of things getting better.

A little piece of trivia: I once won a game against Irina Krush. That isn't as impressive as it sounds, though. She was eight years old at the time.

Valid word in this post which the spell checker didn't like: tiebreak. Also seen recently: counterintuitively.

Sun, Jun. 15th, 2008, 03:47 pm
Weed versus Gardener

Say there's an infinite hexagonal tiling, with a single cell labelled the 'root'. A game is played by two players, the weed and the gardener, who alternate placing pieces of their color in empty cells. The gardener's goal is to make a connected region of cells of the gardener's color which completely surrounds the root. The weed's goal is to keep that from happening indefinitely.

Is it possible for the gardener to always win? My intuition as a hex player is that the gardener can always win eventually, even if the weed is allowed to place a large but finite amount of their pieces before play starts. I have no idea how to prove it though.

Sat, Jun. 14th, 2008, 03:37 pm
Let's Play Board Games

Anybody who's up for it, come to googlegamecenter.com and let's play. There's lots of interesting games available there, and it's a shame there aren't more players.

Thu, Jun. 12th, 2008, 02:12 pm

Failing gracefully is a far more difficult problem than people intuitively expect. Take the case of a web site which has insufficient bandwidth or CPU to handle its current load. Graceful failure in this case would be to let some fraction of users in, and politely tell the other users they have to wait because of the load. Web sites don't by default do anything even vaguely resembling this. Instead, page load times become very slow, and when things time out its on a per-page or even per-object basis, resulting in an acceptable site experience for no one. Even worse, when users get a bad object load in a page or a bad page load as a whole, they'll usually hit reload rather than leaving, causing the site load to be far greater than it would be were it serving the same number of users in a reasonable fashion.

It would be nice if someone could write a thing for Apache to do this automatically. When a site starts hitting bandwidth or CPU limits (preferably automatically detected by the site itself) it starts rejecting users and giving them cookies to keep repeated reloads from getting in. Ideally, it would even create a queue of users and let them know when they're up and give an estimated amount of time until they're let in.

Of course, it's always better to simply have enough bandwidth and CPU around. But once in a while someone finds themselves in a situation where they don't, and if it were possible to simply install a generic fail gracefully utility and leave that running as an interim solution until they can get a proper one in place, that would make the world a better place.

Mon, Jun. 9th, 2008, 10:36 pm
Macs suck

Dear Lazyweb,

I used my wife's macbook and foolishly hit 'okay' when it asked if I wished to install updates, not knowing that she has a policy of always hitting 'later' for those, and forgetting that I've already bricked two computers that way. After a reboot and install Safari now no longer works, exiting instantly, and when I try to invoke it from the command line it says

jenna-cohens-macbook:~ jennacohen$ /Applications/Safari.app/Contents/MacOS/Safari
2008-06-09 22:36:07.903 Safari[854:10b] Unable to load nib file: MainMenu, exiting

Of course if I try to re-download and re-install Safari it says that I need MacOS version 10.5.2 or newer when I try to select the only available partition to install on, even though this thing came with 10.5.3.

Any idea what, if anything, I can do to solve the problem? Using Firefox is working for now, but I'd like to have Safari working again.

Update: On the suggestion of some commenters, I re-installed the update pack, and made 'progress' in the form of it now giving a dialog saying 'Safari cannot open a browser window and may be missing important resources. Try installing Safari again.' when I try to run Safari. The Safari installer continues to insist that it doesn't have a proper version of MacOS installed (even though there is) and now trying to run it from the command line gives the following stdout (in addition to the dialog):

jenna-cohens-macbook:~ jennacohen$ /Applications/Safari.app/Contents/MacOS/Safari
2008-06-10 00:47:40.790 Safari[308:10b] -[BrowserWindowController loadWindow]: failed to load window nib file '(null)'.

Update 2: Problem is now fixed, thank you. But I'd like to note the very real issue that the latest version of Safari on Apple's site doesn't work with the latest version of their OS - you need to be one minor version back for that.

Sun, May. 25th, 2008, 01:50 am

After having watched at least one obviously fixed boxing match, and several more which made for just plain bad television, I have a big question about the scoring. Why on earth aren't the judges forced to give their scores after every round? In most cases fixing a bout requires outlandish enough scoring that the judge has to retroactively go back and change their scores on earlier rounds to come up with something even vaguely plausible, and having them commit to earlier round scores would end that practice completely. If the ringside announcers can give a score immediately after every round, there's no reason why the judges can't as well. Hell, my own vague judgments of 'I think I saw X' tend to hit the average of the judge's score better than the individual judges generally do. That's another big issue with boxing scoring - the judges's scores have such high variance that the claim that the winner of a close bout is anything other than arbitrary and subjective is quite ludicrous. Figuring skating is worse, but that's indicative of the situation in figure skating being beyond ludicrous.

On the subject of boxing, I have a suggested rules change which would spare boxers most of the brain damage they now sustain: When you're knocked out, you lose. None of this waiting until the count of ten to see if you can pull yourself together and get up and continue to have your brains scrambled. If you hit the mat and can't get up instantaneously, that means your brain has sustained serious injury and taking any further punishment is extremely dangerous. Other martial arts, including ones with tons of striking, have nowhere near the record of brain injury that boxing does, and the reason is hardly a secret - in those sports, if you're knocked out, you lose.

Thu, May. 22nd, 2008, 02:55 pm
Version Control Recommended Practices

It's been a while since I last posted my thoughts on version control. My thoughts have changed a lot over time, so I'm going to cover everything from the very highest level.

Here are my recommendations:

1. Don't use branches.

I'm serious. Creating lots of branches takes a lot of time and energy, and is usually a complete waste. If you have a good reason to use branches, use the minimum possible. In particular, creating a new branch for every new feature is ludicrous.

2. Don't bother with a pretty history.

The history of a branch is hardly ever looked at. Making it look pretty for the historians is just a waste of time. The beauty of 3-way merge is that you can always clean stuff up later and never worry about the past mess ever again. In particular, don't go to great lengths to make sure that there's a coherent local image of the entire repository exactly as it appeared on your local machine after every new feature. There are very rare projects which maintain a level of reliability and testing which warrant such behavior, and yours isn't one of them. Stop wanking.

3. Use 3-way merge

This is mostly a dig at myself - I've spent a long time thinking about possible semantics of merging, and the upshot is that there's a way of supporting cherry-picking well in the underlying engine, but nobody's ever proposed a good UI for it, and I suspect that's because the feature is inherently confusing and not such a hot idea for process reasons as well.

4. Use Bram's diff algorithm.

This is for tool developers, not for end users. It's fairly self explanatory.

5. Treat stable branches as forks, don't auto-merge from them.

Once a stable branch has been separate for a while, the development branch has inevitably deviated too much for auto-merging to be accurate and useful. Most projects have a convention for marking bug fixes in commit comments on the development branch, then grepping for those comments in the history and manually trying to apply those patches. The tools support for this is sucky, and the world will be a more productive place if someone improves that, but the practice is clearly a good one.

6. Don't spend time achieving a greater than usual level of stability on the main branch before branching off stable

Forcing everyone to wait until stable is branched off to get any work done just wastes their time. It's far better to do the stable branch first, then work on extra stability on the stable branch while people continue to get new work done on the main branch.

7. If you do use branches, have them 'shadow' the main branch.

Branches which don't get merged regularly inevitably become forked forever. For a branch to continue to be useful it's necessary for it to pull from the main branch on a regular basis and have any resulting conflicts be resolved.

Good reasons to have a branch are if there's a feature which might turn out to be a bad idea, there's some code work which would cause too much instability if it were checked into the main branch before being complete, or there's a direct need to have a version of the codebase missing certain features. In all of these cases the branch must be maintained by pulling from the branch it's shadowing frequently in order to not die, and the branch should have its contents committed into main and stop being maintained as soon as is feasible.

Experimental features or ones written by a person of dubious coding skills in particular should only be a single branch. Some projects treat them as a zillion piecemeal little patches, and that's just painful and awful. Far better to give feedback on a branch, and commit the whole branch when it's at an acceptable level of stability. Note that experimental branches can have their own stable and unstable versions as well, with work going on on unstable while code improvement happens in stable. That's a good practice, although it's hardly ever done today.

8. Show all relevant history in annotate/blame view

If a line of code was written by one person, then pulled into the main branch by another person, then the history should say when and by whom both of those events happened. If it was pulled into another branch by another person, that should be included as well. The semantics of a single line's history is that it was written once and then had a series of pull (or push, depending on how you think about it) operations performed on it as it was moved into other branches. None of the tools currently get this right.

9. If you have a good reason to branch off branches, do it right.

There are a few sophisticated techniques for branch management which are fairly safe and coherent from a process standpoint. These should only be used sparingly, but tools support for them is currently lousy and they're cool so I'll explain them now.

First, it's possible to have a branch shadow another branch, like this:
 branch A
branch B

In this case, A is shadowing main, and B is shadowing A.

It's also possible under some circumstances to safely change the way the branch relationships work. For example, the previous case can be changed into this one, and vice versa:
        /   \
 branch A   branch B

For those of you knowledgeable about the technical issues, the times when this can be done are when the LCA of the branch being moved and the one it's shadowing is already an ancestor of the current version of the new branch to shadow. If the reparenting isn't currently allowed, then some committing or updating can be done to make it allowed (although that might not be immediately advisable for process reasons).

Version control system developers, please make your systems have the shadowing concept be built in from the ground up. And allow the safe forms of reparenting. And make sure that the branch relationships and their changes are kept in the history along with everything else.

Valid words used in this post which the spell checker didn't like: wanking, grepping, sucky, codebase, reparenting.

Wed, May. 21st, 2008, 09:52 pm
Quitting Smoking

The new drug chantix is quite effective at getting people to quit smoking. It basically works by making you no longer get a rush from cigarettes, which helps people stop using them.

While the health effects of smoking are deleterious enough to warrant quite a bit of damage and risk from an effective smoking cessation program, there's a bit of a stir about the possible side effects of chantix going on right now. Given the effects described, and the mechanism by which chantix works, I have a theory as to what's causing the problem, and would like to propose the following warning label for it:

Warning: This drug may cause you to spontaneously quit smoking, and in case you haven't heard, quitting smoking sucks!

Fri, May. 16th, 2008, 03:13 am
xkcd seo

Here's an interesting search query challenge for relevancy ranking: xkcd metallica. Currently google doesn't, but yahoo does, give the right answer.

Let this be a lesson to you. If you want your web site to show up in search queries, and have words encoded in audio, video, or images, include a transcript!

Wed, May. 14th, 2008, 06:15 am
American Idol

The technique for building tension on American Idol is an interesting one. Rather than tell you who came out on top each week, they instead tell you who came out on the bottom, giving the impression that it's an active competition which anyone can win. The truth is quite a bit more boring. If you look at the previous season eliminations, in four of the six seasons the eventual winner was never in the bottom group, and the earliest the eventual winner was in the bottom group was in the sixth show. So the show could instead knock out a third of the top 12 on the very first show, and probably not have changed the eventual result in any of the contests thus far. Chances are that in most seasons the eventual winner starts getting the most votes early and stays that way every episode.

Does this mean that American Idol would do a better job of picking the winner if it had stayed with the format of the first few seasons, where votes were used to advance competitors through to the finals? Probably, but there's a distinct lack of any criterion with which to measure 'better'. Yes, votes are more representative of later votes than the judge's judgment, and if the pool of people is bigger there's a greatly reduced chance that there won't be any decent competitors in it (as happened in season six, yeesh), but the only measure available for determining how accurate voting was is later album sales, and those have some very wacky things going on.

Looking at the American Idol top sellers one thing stands out: in most of the seasons, exactly one finalist sold over a million albums, with a big gap below that. The exceptions are season 2, which had two, and season 6, which had none (see aforementioned observation about complete lack of talent in season 6). Apparently the show's producers pick exactly one singer to put some real marketing muscle behind each season, and let the others sell however many they happen to sell. The other thing which stands out is that with the exception of Kelly Clarkson, the first season winner, not a single top seller has sold more than half as many copies of their second album as their first, strongly implying that almost all of their sales are due to Idol-related publicity, with complete failure to build a fanbase on their singing merits alone.

Clarkson was the huge exception to that rule. She sold more than twice as many copies of her second album as her first. My guess is that had American Idol not lucked out with Clarkson in the first season, it would be viewed as having no legitimacy as a source of new talent whatsoever.

Tue, May. 13th, 2008, 12:09 pm
Process list for my new OS

The web browser is the new operating system. My own computer is at this point little more than a glorified web browser, with a text editor, command prompt, python interpreter and svn thrown in for the occasional color.

Since the web browser is the new OS, it should really, really, have the equivalent of a process list. I almost always have a whole bunch of tabs open, and firefox is most of the time using a nontrivial amount of CPU doing not much of anything. I have to guess which tab is causing the problem when the CPU gets pegged, and sometimes it seems that even shutting down all tabs doesn't completely fix the problem. Could somebody please implement metrics on how much CPU each tab/window is using, and get the process separation right so that whenever a tab/window is shut down all remnants of it are completely toast?

Tue, May. 13th, 2008, 03:21 am

I had an idea the other day. A see-saw has two seats, each of which is offset from the other one by 180 degrees. A more complicated linkage could create a three-saw which had three seats each of which was offset from the next by 120 degrees.

Why? Because.

Fri, May. 9th, 2008, 07:10 pm
Horse Genetics

A horse recently died after finishing second in the Kentucky Derby. This kind of thing happens a lot. How is it that horses are so fragile that they die just from stumbling while running? They're overbred for racing, making them fast but not really very healthy.

I have a simple solution to the horse overbreeding problem: Have races consisting of all genetically identical horses.

Don't laugh. It's gonna happen.

Thu, May. 8th, 2008, 11:33 pm
The American School Religion

Credit scores in the United States are used as the end all and be all of one's credit score, nonsensically used for approving credit cards, mortgages, and rentals, as if those all had the same risk profile. Moody's ratings are being criticized now for being taken as gospel, as if 'AAA rated' was the only useful thing which could be said about an investment. And my cursory research indicates that the same thing is starting to happen with Zillow estimates. It appears to be that as soon as any official rating appears, americans will cease to apply any judgement of their own and simply accept the official number as gospel.

It occurred to me today what's going on here. It's the religion of the Grade Point Average. Americans are so completely indoctrinated from a young age that a single official number is the sum total of all that can be said of a person's moral worth that they're psychologically incapable of evaluating people or investments in any other way, even when it's their job to do so. Hooray for US education, teaching those important lessons about life.

Thu, May. 8th, 2008, 05:37 am
Chess with Fewer Draws

An article on chess variants with fewer draws. The most obvious modification of eliminating stalemate is proposed by several people, including me. Beyond that, by far the best suggestion is to allow a king to capture the opposing king if it's a knight's move away. Someone should do an analysis of some basic endgames with that rule, for example knight versus bishop.

Sun, Apr. 13th, 2008, 02:49 pm
Improving on Meek's Method

Fixing the problems in Single Transferable Vote is a subject of much research. Meek's Method does good job of fixing the most obvious problem, and I believe the approach is basically sound, but it still has some bad artifacts. Specifically, Meek's is used for electing only a single candidate, it will behave like instant runoff instead of picking the condorcet winner, and in an election with many candidates to get elected a candidate can appear second on almost every ballot and still be eliminated first.

Obviously those are very busted behavior. I have a simple, and I believe new, suggestion as to how to fix them.

The only part of the algorithm which is changed is the one for picking which candidate to put in the 'excluded' category. Meek's picks the candidate with the lowest weight, which is a simple but highly flawed approach. Here is an alternative algorithm: For every pair of candidates in the 'hopeful' category, calculate which of them would get more weight if all candidates except those two and the ones already elected were crossed off the ballot. Then move the condorcet loser based on the results of those two-way races into the 'eliminated' category.

This technique straightforwardly gets rid of the two artifacts I mentioned and also fixes the strategic voting which real political parties do in practice, an interesting technique which probably warrants its own separate post for explanation. I believe it is in all ways a clear improvement and should be adopted by anyone actually using Meek's (or STV for that matter) in practice.

The remaining artifacts which this technique leaves are quite deep and generally both unimportant and intractable. They are:

If a voter disagrees with the choices of the other voters who have the same first-place candidate, they can move their first-place candidate farther down the ballot and thus make their own vote count for more. This is a fundamental issue in proportional representation voting, and not a big problem in practice.

When there's no single condorcet loser, all the usual issues apply. These are fundamental issues for any voting system, using any algorithm and voting method, and the usual techniques have their usual pluses and minuses, and the choice of which one to use doesn't matter all that much because such situations rarely occur in practice, and when they do simply rolling a die to determine which member of the smith set to pick will work about as well as anything else.

There are some strange edge cases where the monotonic approach of my proposed algorithm is fundamentally limiting. In practice these are unlikely to occur all that much, and when they do the monotonic approach will do something suboptimal but entirely reasonable. CPO-STV basically fixes this but at a cost of much greater cognitive and computational complexity. I for one have a hard time intuiting what CPO-STV will do under some circumstances.

Those are all the artifacts which are left. Other than that, it just plain works.

I'd like to thank Philip Neustrom for reminding me of this subject in general and Meek's Method in particular.

Fri, Apr. 4th, 2008, 05:20 pm
Wiki Features

There are a bunch of wiki features which are nonstandard, or not available at all, which I would like.

Pages should have an 'annotate' view, where you can see who wrote each line of a page.

When modifying a page, if the page gets modified by someone else between the time you start editing and commit, it should attempt to do a three-way merge of your changes before rejecting them outright. This would make a big difference for large pages which many people modify.

It should be possible to see all recent edits by a particular user, and to search for a keyword in edits done by a particular user.

Mon, Mar. 31st, 2008, 08:37 pm
Interview on NPR

On Sunday there was a radio interview with me on NPR. Probably the first time the church-turing thesis has ever been mentioned on NPR, and surprisingly the quote didn't even get mangled in the editing.

Tue, Mar. 25th, 2008, 02:54 pm
Smooth Traffic

Since I posted a bit about driving, here's some good suggestions of how to make traffic run more smoothly which they don't teach you in driving school.

Tue, Mar. 11th, 2008, 05:45 pm
Now is the time when the US media starts to lie

Now is the time in the US primary cycle when the US media starts to lie. It happens every time - just when it's becoming clear who's going to get the nomination, the media completely manufactures the story of a competitive race, because it sells newspapers.

The truth is, it's basically over. The chances of Clinton winning the Democratic nomination have become remote. Now that that's the case, I feel it's time to talk about how completely surreal her campaign has been.

The Clinton campaign rested on three core talking points. First, that she was the inevitable candidate, which now looks so ridiculous as to not be worth debunking (and should have at the beginning, to).

The second talking point was that Clinton has the most experience. This is an example of 'the big lie' - if you make a claim which has no basis in reality whatsoever, it's more likely than a claim which closely resembles reality but is slightly wrong. The Clinton senate biography page doesn't even mention any past history before being in the senate, and as first lady her main real involvement was in the Clinton health care plan, which was a disaster. The way she's run her campaign isn't a so great either. Basically, there's no record of experience, not even a made up one. Specific debunking aside, everybody knows the only reason Hillary has any national presence is because she's married to Bill, and he used to be the president. Any claims to the contrary should rightfully be greeting with raised eyebrows.

Clinton's third talking point was that she was the most 'electable' candidate. While it's true that she's widely liked, she's also widely disliked, with a large section of the population already being familiar with and hating her. She also has a tendency to do flagrant political maneuverings with no apparent awareness that people might see through them. For example, all the candidates agreed to basically cancel the Michigan primaries, including her, and everybody else removed their names from the ballot, except her, and then after the primaries were held she argued the delegates should be reinstated, presumably because she'd given the people the right to vote for her and now that should be respected. She also outright lied about doing 'dangerous' diplomatic work. Add to those and similar incidents questions as to where exactly all the of the Clintons's money has come from since Bill left the white house, and it's very clear that Hillary isn't exactly a compelling candidate. The polls (which, granted, have to be taken with a grain of salt) have backed that up as well - early polls indicated she would win the general election against leading republicans by the most narrow margin of any leading Democratic candidate, and polls now indicate the same thing.

Politics is politics I understand, but for the central themes of a presidential campaign to be claims which are obviously untrue to the general population is just plain bizarre.

Sun, Mar. 2nd, 2008, 08:38 pm
Cooking and Humidity

I've been thinking about humidity in food preparation recently. It seems like, after temperature, humidity levels are the most important thing in cooking, with 'soggy' and 'dry' being failure modes just below 'raw' and 'burnt' in their prominence.

Some systemic humidity problems seem like they should have technical solutions. The first is freezer burn. Cold air holds onto less humidity than warm air, so every time you open your freezer some warm air holding on to more humidity than the air previously in the freezer is let in. That air is then cooled off, forcing it to let go of moisture, which then crystallizes on your food, and voila, freezer burn. When you wrap food in plastic you're limiting the amount of warm air its ever exposed to, thus hopefully reducing the amount of freezer burn to the amount of moisture that was trapped in the plastic initially. Wrapping in plastic works fairly well, but it would be nice to have a freezer which regulated moisture levels, to eliminate the need for plastic and so that foods which themselves let go of or took on moisture at different temperature levels wouldn't get damaged. I'm not sure what sort of mechanism would be good for regulating moisture in a freezer though, especially with the requirement that the thermal efficiency should be damaged as little as possible.

The second big moisture issue is in cooking. When you bake food in an oven, the air gets warmed up, causing it to be able to absorb more moisture, thus drying out your food. Adding more moisture to the air in the oven can fix that problem. It should be possible to make an oven which does this automatically using a mechanism similar to the one which puts oil in your car engine, but a simpler approach is to calculate how much water will be needed, preheat the oven to the desired cooking temperature, then add the right amount of water in a pot, and when the pot starts to boil add the food. If anyone cares to point out how to calculate the appropriate amount of water for a given size oven and cooking temperature I'd appreciate it (yeah, I know, this is basic high school physics, but it's easier to ask the lazyweb). I'd also appreciate it if anybody can point out a fish recipe on the web of the form 'season to taste, then cook at X degrees for Y minutes'. Online recipes seem to really not like being simple. Fish seems like the most obvious dish to try, because it's notorious for drying out easily. Suggestions of particularly fickle fish would be appreciated as well.

Update: I was basically wrong about freezer burn. The phenomenon I described is the cause of frost build-up in old fashioned freezers, but modern freezers which auto-defrost do so by drying out the air, and the dryness is what causes freezer burn. See comments for some discussion and links.

Tue, Feb. 26th, 2008, 05:02 pm
Secondary mirrors

With some more practice driving (I recently got my driver's license) I've noticed a few more things about driving.

The main thing to do while driving is to pay attention to what's ahead of you. Not just immediately ahead, but the whole section you plan to go over in the next few seconds. This is because cars generally move forwards. Sometimes they move forwards very quickly.

What's odd thing is that the driver's test does hardly any checking for how well you're paying attention to what's ahead of you, and does tons of testing for how well you look away. Partially this is just because it's a lot easier to grade, but there are some frequent situations, such as turns and lane changes, which necessitate checking in a direction other than forwards. The effect winds up being so exaggerated that it's actually an advantage to take the driving test wearing sunglasses which cut off your peripheral vision, because that forces you to make the exaggerated head looks the instructor is looking for.

This produces an odd distraction from the core focus of driving, looking forwards, onto something quite secondary, which is looking everywhere else. A typical maneuver for a new driver is to look for a lane change, see that there's a car in that lane but just barely far back enough that it's okay to move over, then signal and start to move. Since the place where there isn't room is behind you, the natural tendency is to spend the merge time looking in the mirror. Humans naturally and correctly slow down when not looking forwards, which tends to accidentally make the person behind you catch up and crowd them off the road, resulting in a near accident and a bunch of honking. I've taken to glancing to make sure there's enough room, then looking forwards while merging, speeding up a bit to give some more room, and trusting the person behind me not to slam into me. I think almost everybody does basically the same thing.

Even worse is checking the blind spot on the left side (I'm in the US, those of you in backwards land can flip the handedness). To check the left side blind spot, I have to turn my head almost 180 degrees, try to make out what I see in the sliver of space between the B and C beams, and turn my head back and try to refocus on the road in the split second before starting to merge left. Whether this maneuver is a net positive for road safety is highly unclear, since it takes the better part of a second and one's eyes are on stuff not even vaguely useful for most of it. I've taken to either passing someone, checking that they're far back enough and then merging or checking that there's a gap behind the first car back in the other lane, letting them pass me, and then merging, basically using another car to sweep out my blind spot. Driving instructors don't tell you to do that maneuver, but it feels under control, while looking 'properly' feels hella dangerous.

All this leads to a very obvious question: Why is there no secondary mirror? You know, the small rounded kind that buses have. Sure, most people don't know how to use them, but after driving with one for a while you'd learn to recognize what you see in it after a few months without even making a conscious effort. I sure hope the answer isn't that it would deprive driving test administrators of a checklist of things to grade people on.

Fri, Feb. 22nd, 2008, 09:48 pm
Air Bubbling

Dyson vacuums work on the principle of cyclonic separation, which has long been used to get sawdust out of the air, and was only with dysons applied to vacuums.

The limitation of cyclonic separation is that it can't get rid of particles less than some size from the air. A technique which could remove all particles would be to bubble the water sucked in by a vacuum cleaner through some water. That would cause all the particulates (and some noxious gases) to get dissolved in the water, which could easily be removed when you were done cleaning.

My suspicion is that this technique would require a lot of power to force the air under water, but that it would be quite effective. It might also work well as a standing system in a house, by having an air purifier which is constantly sucking up air from around a house and bubbling it through a central water tank, and periodically flushing the tank.

Sat, Jan. 26th, 2008, 10:46 am
Puzzle Ring with Small Bands

I wondered the other day if there are any interesting puzzle ring designs which involve small bands confined to the woven section, so I came up with the following:

            |  |
            |  |
         /  |  |  \
        /   |  |   \
       /  .----|-.  \
      /  /  |  |  \  \
      \ /   |  |   \ /
       /    |  |    \
      / \   |  |   / \
      \  '-----|--'  /
       \    |  |    /
        \   |  |   /
            |  | 
            |  |

For this design to work well the small bands should actually be heavier than the large ones, so the puzzle gets pulled apart by centrifugal effect rather than held together by it.

Sat, Jan. 12th, 2008, 10:19 am
Restaurant Reservations

Restaurants which generally sell out have an interesting dilemma. In principle they could make more money with higher prices, but then they'd risk not selling out, and empty seats would quickly wipe out any revenue gains from raised prices, not to mention harming that elusive 'buzz'. In practice such restaurants generally wind up leaving some money on the table, no pun intended, and take the stability of always selling out over the potential of higher revenues.

I've come up with a variant on dutch auctions which solves this problem quite beautifully. The restaurant continues to charge the same amounts it does currently, with the same menu, but there's a 'seating fee' for sitting down which might be charged if the restaurant sells out in advance. The amount of the seating fee is determined by when the restaurant becomes completely booked, with the fee going down the later the selling out happens, possibly going down to zero at the end. By making a reservation when the potential seating fee is a certain amount, a customer is declaring that they're willing to pay the seating fee for that time period if it is necessary, but they aren't penalized for making an early reservation unless it would have been necessary to do an early reservation to get a seat. By waiting to make a reservation until later, a customer is declaring that they are unwilling to pay a higher price, but also allowing for the possibility that the restaurant will become fully booked and they won't get a seat. One of the nice features of this system is that the reservation system is essentially unchanged, allowing for trivial support of reserving particular time slots and tables.

This system also works for concerts and other events which have the potential to sell out.

A decent dot com business model would be to make a web site which performs this service for restaurants, and does fulfillment of seating fees and keeps a fraction of the seating fees for itself as a way of getting paid by restaurants. Restaurants would probably be quite agreeable to that, since seating fees are essentially found money for them, and they'd be happy to let someone else have a fraction of it.

Thu, Jan. 10th, 2008, 12:27 pm
What is up with election coverage?

The coverage of the current US primaries is mindbogglingly wrongheaded. Recent coverage has focused on who would 'win' New Hampshire among the democrats, and Huckabee's 'lead' among republicans. The actual numbers can be found here. New Hampshire is not a winner-take-all state for democrats, and both Clinton and Obama got exactly nine delegates from there, making the declaration of a 'winner' extremely misleading, if not outright revealing of the declarer having dubious mental capacity. Among republicans, Mitt Romney now has the most delegates, with Huckabee in second, and the media is currently speculating that Romney will drop out because he's so far 'behind'.

Seriously, what is wrong with journalists? Are they not able to do basic arithmetic? Ideally I'd like to have meta-coverage discussing why some states are winner take all and others aren't, and what on earth 'super-delegates' are, but I'd settle for even an accurate portrayal of what's happening in the race as it unfolds.

But thank you CNN for putting up a nice site which gives accurate up-to-date information. Please expand it in the future with more explanation of what 'super delegates' are, and what happens to a candidate's delegates if they drop out of the race.

Tue, Dec. 25th, 2007, 12:24 pm
Puzzle ring question answer

Times up on my puzzle ring pattern challenge. Nobody gets the cookie.

To refresh, the question was what the pattern/generalization of this design is:
___   ___   ___   ___   ___   ___   ______
   \ /   \ /   \ /   \ /   \ /   \ /
    \     \     \     /     /     /
___/ \   / \   / \   / \   / \   / \   ___
      \ /   \ /   \ /   \ /   \ /   \ /
       \     \     \     /     /     /
___   / \   / \   / \   / \   / \   / \___
   \ /   \ /   \ /   \ /   \ /   \ /
    /     /     /     \     \     \
___/ \   / \   / \   / \   / \   / \   ___
      \ /   \ /   \ /   \ /   \ /   \ /
       /     /     /     \     \     \
___   / \   / \   / \   / \   / \   / \___
   \ /   \ /   \ /   \ /   \ /   \ /
    /     /     /     \     \     \
___/ \___/ \___/ \___/ \___/ \___/ \______

And the answer is that if you chop the pattern up into four quadrants, and the crossings all go the same way within each quadrant, like so:
___   ___   ___   ___|  ___   ___   ______
   \ /   \ /   \ /   \ /   \ /   \ /
    \     \     \    |/     /     /
___/ \   / \   / \   / \   / \   / \   ___
      \ /   \ /   \ /|  \ /   \ /   \ /
       \     \     \ |   /     /     /
___   / \   / \   / \|  / \   / \   / \___
    /     /     /    |\     \     \
___/ \   / \   / \   / \   / \   / \   ___
      \ /   \ /   \ /|  \ /   \ /   \ /
       /     /     / |   \     \     \
___   / \   / \   / \|  / \   / \   / \___
   \ /   \ /   \ /   \ /   \ /   \ /
    /     /     /    |\     \     \
___/ \___/ \___/ \___/ \___/ \___/ \______

This can be scaled up or down to any number of bands, for example the classic design is four bands
___   ___   ___   ___   ______
   \ /   \ /   \ /   \ /
    \     \     /     /
___/ \   / \   / \   / \   ___
      \ /   \ /   \ /   \ /
       /     /     \     \
___   / \   / \   / \   / \___
   \ /   \ /   \ /   \ /
    /     /     \     \
___/ \___/ \___/ \___/ \______

And it can be chopped into quadrants as well
___   ___   ___|  ___   ______
   \ /   \ /   \ /   \ /
    \     \    |/     /
___/ \   / \   / \   / \   ___
       /     / |   \     \
___   / \   / \|  / \   / \___
   \ /   \ /   \ /   \ /
    /     /    |\     \
___/ \___/ \___/ \___/ \______

I also gave the three banded version in a previous post. The five-banded design works as well, but I don't like that as much because it doesn't have a strong canonical position which the bands want to go into like they do with four or six.

Mon, Dec. 10th, 2007, 09:30 am
Executive Search

I'm very happy with my new CEO, although the executive search firm we used did some things which I personally find quite humiliating, so I'd like to let people know a few things.

Just because you were approached about being BitTorrent's CEO doesn't necessarily mean that I'd ever heard of you. If I had ever heard of you, it doesn't necessarily mean that I thought you had the necessary experience for being BitTorrent's CEO. Even if I did think you had the necessary experience, it doesn't mean I wouldn't have gotten fuming mad at your name being suggested for any of a number of other reasons, including in some cases widely known lack of competence and lack of morals.

Normally I'd keep quiet about this for the time being, but at least one person is talking about how he was contacted by the executive search firm, and I happen to have completely blown my stack after I heard that he'd been approached, so I wanted to set the record straight.

The executive search firm's name? Heidrick & Struggles.

Unrelatedly, if there was any candidate who literally stood me up five times and then removed themselves from the search as if the job was theirs for the taking, I'd like to let them know that I'd already knocked them off my internal list of potential candidates after stand-up #3, because that was a strong enough hint to make me not care how godlike some people view them. Really, the nerve of some people.

Wed, Dec. 5th, 2007, 04:01 pm
6-banded puzzle ring design

My last 4-banded puzzle ring design gave me an idea, so I came up with this:
___   ___   ___   ___   ___   ___   ______
   \ /   \ /   \ /   \ /   \ /   \ /
    \     \     \     /     /     /
___/ \   / \   / \   / \   / \   / \   ___
      \ /   \ /   \ /   \ /   \ /   \ /
       \     \     \     /     /     /
___   / \   / \   / \   / \   / \   / \___
   \ /   \ /   \ /   \ /   \ /   \ /
    /     /     /     \     \     \
___/ \   / \   / \   / \   / \   / \   ___
      \ /   \ /   \ /   \ /   \ /   \ /
       /     /     /     \     \     \
___   / \   / \   / \   / \   / \   / \___
   \ /   \ /   \ /   \ /   \ /   \ /
    /     /     /     \     \     \
___/ \___/ \___/ \___/ \___/ \___/ \______

Aside from being very aesthetically pleasing and conceptually straightforward, this design has the remarkable property that if you remove any one of the three pairs of opposite bands the remaining two pairs will form the classic puzzle ring design.

The way I derived this one was actually quite laborious and involved reasoning out the relationships between the bands. I only saw the clear pattern when the design was finished. First person to point out the obvious generalization gets a cookie.

Wed, Nov. 28th, 2007, 12:11 pm
More Puzzle Ring Stuff

Here's a 4-banded puzzle ring design which I missed previously, because I was systematically going over all the ways which the rings can relate to each other and skipped the one which corresponds to the traditional design. This one is, unsurprisingly, similar in movement and asymmetry than the traditional design, but is probably slightly more difficult.
_______________   ___   ___   ___
               \ /   \ /   \ /
                \     \     /
______   ___   / \   / \   / \___
      \ /   \ /   \ /   \ /
       \     /     /     \
___   / \   / \   / \___/ \______
   \ /   \ /   \ /
    /     /     \
___/ \___/ \___/ \_______________

This is a variant of the above. In this one the two outer bands are linked to each other, which might make it a bit easier, but it's very pretty.
_________   ___   ___   ___   ___
         \ /   \ /   \ /   \ /
          \     /     \     /
______   / \   / \   / \   / \___
      \ /   \ /   \ /   \ /
       \     \     \     \
___   / \   / \   / \   / \______
   \ /   \ /   \ /   \ /
    /     /     /     \
___/ \___/ \___/ \___/ \_________

And here's a variant of the single-chain 3-loop design, modified a bit to make it more interesting.
___   ___   ______
   \ /   \ /
    /     \
___/ \   / \   ___
      \ /   \ /
       /     /
______/ \___/ \___

After the last 5-banded puzzle ring got successfully prototyped, I came up with the following criteria for maximum difficulty of a ring: Adjacent bands shouldn't be linked, each pair of adjacent bands should have one band connected to the one of the left, one on the right, and one both but going through them on opposite sides, and the final positions of the bands connected to either side should be on the wrong sides of where they start.

So I came up with the following design:
______   ___   _________   _________
      \ /   \ /         \ /
       \     \           /
___   / \   / \   ___   / \   ______
   \ /   \ /   \ /   \ /   \ /
    /     /     \     /     \
___/ \   / \   / \   / \   / \   ___
      \ /   \ /   \ /   \ /   \ /
       \     \     \     /     /
______/ \   / \___/ \   / \   / \___
         \ /         \ /   \ /
          /           \     \
_________/ \_________/ \___/ \______

This is a 5-band design, where the bands form a 'ring' - each one is linked to exactly two others. It's almost symmetric, sort of. The small asymmetry
in this drawing could easily be removed, but then it would be very hard to take this one apart. There's actually a quite deep asymmetry here though. If you play with this ring, it will if properly made rapidly jangle itself into a ring of five bands. That's a big 'if' by the way, it requires the bands next to the center one be able to easily pass through the center one, which shouldn't be too hard given how 'punched out' the center band is with it being above everything else in the middle, although the oval bangle shape fights against that phenomenon. In any case, let's assume that it's properly made and that it jangles out properly and easily. The funny thing is, there are two different positions for the bands when jangled out into a pentagon of five bands, depending on which band passed through the center band, and both of those are distinctly asymmetric (they're mirror images of each other).

So whether the above design is a symmetric is a matter of some interpretation, and there's some trickiness in making it work well in practice (although the usage of bands passing through each other is quite novel and interesting). Since my friend who made a prototype of my last design specifically wanted maximum difficulty and asymmetry, I also came up with the following variant, which is most definitely asymmetric, and has even more of the bands passing through each other effect, but as a result it's trickier to make sure the passing through works properly in an actual built version, so it's higher risk from a construction standpoint:
______   ___   _________   _________
      \ /   \ /         \ /
       \     /           /
___   / \   / \   ___   / \   ______
   \ /   \ /   \ /   \ /   \ /
    /     /     \     /     \
___/ \   / \   / \   / \   / \   ___
      \ /   \ /   \ /   \ /   \ /
       \     \     \     /     \
______/ \   / \___/ \   / \   / \___
         \ /         \ /   \ /
          /           \     \
_________/ \_________/ \___/ \______

I rather like how both of these designs are natively 5-banded, in that if you remove a single band they aren't puzzles at all any more, and they have the very novel bands passing through each other effect as well as being very difficult just based on classical techniques.

Sun, Nov. 25th, 2007, 10:01 pm
Puzzle of mine in limited edition

Those of you who are into rare mechanical puzzles might be interested in that a puzzle of mine is going to be available in limited edition in the next few weeks. It's the 'unscrambled' which I did in collaboration with Oskar, and can only be made by 3d printing.

Wed, Nov. 21st, 2007, 01:45 pm
Oratory Skills

Say that you're at the end of a presidential primary debate, and the very last question is a softball one, hand-picked especially for you, which noone else gets to answer. Could you make a good impression with your answer?

Hillary Clinton found herself in exactly this situation, with the question "Which do you prefer, diamonds or pearls?" The correct answer to this question is "I like looking pretty just as much as the next woman, but I'm not fundamentally a materialistic person." Kind of an easy one.

Instead, the answer she gave was "I know I’m sometimes accused of not being able to make a choice, [but] I want both."

Way to look like a materialistic bitch, Hillary!

skipped back 50