11/30/2007

11-30-07 - 1

Hard drives are the new floppy . For $40 you get a thing that fits in a 5.25" floppy bay on your desktop. It's got a door on the front and you just pull 3.5" hard disks in and out. No screwing or turning off your computer or anything, hard disks are literally like floppies. That's kind of rad. this one is even better (physically use a hard disk like a NES cartridge).

11/29/2007

11-29-07 - 4

Checker poked me and it made me upload some more junk to Flickr. Bastards took away my "pro" so all the nice high res versions are gone. Lame. Anyway it made me realize I don't have any photos at all of the good stuff in SF. I'm not trying to do a photo journal, my camera is awful and I'm lazy about carrying it, but all the amazing sights I've seen here - the alleys full of graffiti, all the great old houses, the sun "rising" over the Transamerica tower, the TV tower poking through a wall of fog, looking back at the city from the Golden Gate Bridge, etc. etc. - I don't have photos of any of that stuff.

We saw "Into the Wild" yesterday which kind of made me want to go off into the woods alone and die. I know, I bet there will be copycats, and that's lame, but I have always kind of wanted to do that. I've done my own little mini-tramps, but I'm not really cut out for it. Some part of me really wants to just get rid of everything I own and completely get out of society and become a hippie or a tramp or whatever. Actually it was "Man vs Wild" most recently that really made me think of getting out backpacking in the real wild. Before that I always imagined having a little VW Camper bus or something and wandering that way, but I like the idea of the physical challenge of getting by in the woods.

Anyway, I thought of a more realistic option. I think it would be really fun to rent a totally isolated cabin for a month or so. I mean isolated like, not in a community or anything, completely out in the woods, no power, no running water. Presumably there would be a well and propane or maybe even just wood for heat and cooking. I don't think I'd want to live like that for a while, but it would be really fun to rent for a month and play old fashioned "house" for a while. I have no idea how to find something like that though. Not even sure if it would be legal, there are all these laws in the US about minimum functionality of rental properties.

We finally went to "Range" last night; it was something we kind of had to do since it's like 2 blocks from my house and it has a Michelin star. Mmmm it was very good but I don't think I would go back unless some friend really wanted to go. Basically it's normal American/French bistrot type food (braised pork loin, roast chicken, stuff like that), but it is executed really subtly and artfully - the same way that I try to cook at home. Anyway, I don't think it's really possible for basic French/American bistrot food to really impress me any more. It's just so easy for me to make that stuff at home, and there are a lot of advantages to doing it myself. I get all the fun of the cooking process when I do it, and I can drink a whole bottle of wine for less than the price of one glass.

I used to really enjoy dressing up and going to fancy restaurants and acting all sophisticated. It was a chance to prove to girls that I was rich and cultured and could have good manners despite my usual impolity. That entire element is gone for me now. I just feel kind of goofy and out of place, and the way everyone acts to each other and the interaction with the waiters and everything just seems so bizarre. I keep getting the impulse to chuck my plate at a wall and take off my clothes and go running around between the tables hitting everyone on the head.

11-29-07 - 3

Ryan's Blog is videogame related and pretty damn entertaining.

The best thing on Yelp are the Sushi + Japanese restaurant reviews by Toro Eater and Nobu K . Toro is a great reviewer, very analytical and thorough, Nobu is not so accurate but he's a brilliant wild man poet.

Sometimes when going to the movies I think how insane the $10 movie ticket is. Really it's not, in fact it's pretty much just a normal inflation increase from the old $5 tickets when I was a kid, it corresponds to higher rents and costs of power and benefits for employees and so on. The thing that's changed is I can get Netflix for $20 which is just insanely cheap (or get torrents for $0, well not really zero of course cuz of the price of power and the internet bill, but pretty much zero).

11-29-07 - 2

X and Y are vectors, (or a series of numbers). You want to do a regular linear best fit, Y = m * X + b. If we use the notation that <> is the average over the series, then :

m = ( < X * Y > - < Y > * < X > ) / ( < X * X > - < X > * < X > )

b = < Y > - m * < X >;

This is super standard but it's nice and concise which makes it a nice thing to gather. "m" is very almost the "correlation". If we use the formulas

sdev(X) = ( < X * X > - < X > * < X > )

rmse(X) = sqrt( sdev(X) )

then :

correlation = ( < X * Y > - < X > * < Y > ) / ( rmse(X) * rmse(Y) )

Note that if you put the variables in "unbiased form" by subtracting off the average and dividing by the rmse (making it have an average of zero and rmse of 1.0), then the correlation is just < X * Y > , which is the same as the "m" in the linear best fit for unbiased variables.

11-29-07 - 1

The first web server I interacted with was a VMS machine and it had this horrible ";1" ";2" etc. system for automatically keeping backups of everything. Among other things it sucked because I had a tiny disk space limit and the stupid backups would chew up my disk allocation. Now I wish Windoze had a decent auto backup thing. I should be able to set aside X% of my drive for backups, and set extensions that I want backed up, and they should automatically go in the backup dir in an LRU kind of way. Then any file you want you should be able to click and say "give me the backup". I could almost just write an app to do this using disk changed notifications. So much better than having retarded .bak files scattered everywhere. Also the backups could be delta-compressed which means as long as you're only making small changes you could have tons of backups of any given file.

11/28/2007

11-28-07 - 1

I realized Creme Anglaise is just like not-frozen ice cream (proper ice cream made from cooked egg yolks, not the frozen cream stuff you get in america; these should really be two different names for frozen custard and frozen cream) - duh, I guess that's obvious but I never really knew what this creamy junk on my restaurant dessert plate was. I made some for the bread pudding the other day but now I'm out of bread pudding so I've just been drinking it in shot glasses. Yum.

11/27/2007

11-27-07 - 4

Poker notes

I want to write some poker thoughts before I forget them because I haven't been playing hardly at all in the past 4 months and I'm losing my edge. These are generally overall play frequency and style notes. This is for someone who can already play solid 2+2 TAG poker. If I'm reading this to get back up to speed I need to take it slow and just play good basic poker first; read hands and make the right play and don't force things.

The more randomly an opponent plays, the more you must take risks against them. This goes for both good and bad opponents and doesn't necessarilly affect EV, but it does affect variance. For example, against a really horrible player, you might not really know what they have, you can't read them because they have no idea what they're doing - you just need to go with decent hands that you might not normally play, stuff like top pair for big pots. Similarly for good players with well randomized ranges who can be making a lot of bluffs - you need to repop them a lot and accept the variance or you will get beaten up.

Any time you would never do a certain move with a certain hand, that's a leak and there's a way to exploit it. It might be a tiny leak that's very hard or rare to exploit, but it's still a leak. You can identify these in other people who play standard style. For example, most people will only check-raise the flop with very big hands or bluffs (often with draws, which is kind of a bad play), they never do it with decent made hands like top pair. That's a leak and if you know they have that pattern you can use it.

Good technical play is almost impossible to beat. "Technical" play is about getting your frequencies and ranges right. One technical issue I ran into at higher levels is cbetting too much. At lower levels you can almost cbet 100% of the time. At higher levels you need to check more, and then sometimes check-fold and sometimes check-raise. Also when you do decide to cbet, then you need to have good frequencies on the turn. Again on the turn you want to be value betting some percent, second barrel bluffing sometimes, sometimes check-fold, sometimes check-call to catch bluffs and sometimes check-shove. All those options should have a reasonably balanced frequency. In theory you want to keep balancing ranges on the river, but it's harder to do on each street and I never really got a good balanced frequency of river actions.

Playing too nitty in small pots is a very very very small leak. When in doubt, fold early. Playing too nitty in big pots is bad. In general I want to just give up on the tiny pots but I want to win the big pots. Similarly an opponent who folds too much in small pots is indeed slightly exploitable, but only barely, and you need to be careful not to give up your EV against them when you choose not to fold.

Somebody who plays a lot of hands aggressively from position is very hard to deal with. You may think they're often playing junk and it's a leak and you can exploit it by playing tighter. That is true, but don't kid yourself - their leak is very small, and if you try too hard to get them you can easily spew. You will also have to accept a lot of variance to get after them, reraising a lot preflop and check-raising flops.

Any time somebody's ranges aren't balanced across streets or actions, that's a leak. For example, say you open a lot of hands preflop - that means you need to be willing to bet and bluff with a lot of hands postflop. If not, opponents can easily take you off the hand postflop. A lot of people have this un-spread aggression - they're very active preflop and on the flop, but then get scared on the turn and river, and in particular very rarely make big river bluffs. If you try to bluff raise these guys on the flop they will call, but if you wait to the river, they fold. To be unexploitable, you need to have a balanced activity level on every street. One example that's come up a lot recently is preflop 3-betting - if you are 3-betting a ton preflop, you also need to potentially call a lot of 4-bets or shoves. If you 3-bet a wide range, and then call 4-bets with a tight range, that's a leak.

You never want to make moves that you wouldn't make with very good hands. My goal when playing my tight/solid/aggressive game is to ALWAYS be making moves that I could make with a monster, or just fold. For example, say I just call a raise from the big blind, then I check-call the flop, I check-call the turn, I check the river. NO NO NO. I would never do that with a big hand, so I just won't do that ever. Instead, I will either check-raise the flop or just fold. (this is just an example). You also want to make a wider range of moves with your good hands sometimes, but you don't want to make certain types of plays (leading the betting) with good hands, and other plays (passive) with weak hands. I want my hand to never be defined, I want to always be representing a monster. Any time you do show weakness, it's intentional to induce a bluff or just fold. For example, say I raise preflop, I cbet the flop, now I just check the turn. I'm showing weakness on the turn. I do that on purpose because I'm just going to fold, or to call a bluff on the river.

Your bluffing and value betting should be balanced. Are you thinking of value betting top pair on the river? Do you ever tripple barrel bluff? The more you bluff, the more you can value bet. If you rarely bluff, you shouldn't value bet so thin. If you're playing very nitty, as I sometimes do in wild games, then you need to stop thin value betting so much. On the other hand, if you are bluffing a lot, as I was doing in the high stakes games, then you can go ahead and value bet top-pair-no-kicker (especially if you hit top pair after the flop). For example, you raise AT in position, get called. Flop blanks, you cbet, get called. Turn is a Q, you decide to rep it and bet again, get called. Okay, now you're giving up and won't bet again, but the river is an A. Go ahead and value bet if you would ever bluff.

One of the ways you can make a lot of money is by having an image that is different from how you actually play. Any time your actual range doesn't match your perceived range, that is a value opportunity for you. For me this usually means that people think I steal and bluff way more than I really do. I play a lot of hands from the CO and Button when I can be the first raiser, but that doesn't really equal "looseness". I will bet and tripple barrel when I think people are weak and my line is consistent with a monster, but I'm really not wildly bluffing. But people think you're wilder than you really are. That means they call too much and keep paying you off and that's how you make money. Once in a while you can find people who think you're nittier than you really are - or even that you wouldn't bluff in a certain situation - they think your range is very tight, which means you can profit by opening your range and bluffing more. For example playing against someone who really respects your game you have lots of bluff opportunities, eg. if you are nearly all in and push for $400 into a $1200 pot, they will think you can't be bluffing and will fold a lot of hands.

Related to that, any time that your opponents peg you on a certain style, such as the "typical 2+2 solid TAG style" you can make money by slightly deviating. For example, if the flop is drawy and you bet-3bet shove, they will put you on a combo draw. You can use this knowledge of how they think you play.

If someone is really bad and lets you, you can maximize EV by waiting for later streets. Think of it this way - say your opponent turns his cards face up and you see he has a draw. Why bet the flop when he still has a good chance to improve? Just wait for the river until you know you are winning and then let him bluff. Generally, preflop your edges are very small (eg. if you have AT vs KJ or 88 vs QJ). On the flop, people can easily still have a 30-40% equity with bad hands, on the river if you are ahead you have 100% equity. You can only do this against people who are very bad and let you do this, but if they do let you then you should go ahead and do it because it greatly reduces variance. In general you want to put money in when you get as much value on it as possible.

Design your play to make them define their hand, even if that means losing the pot. eg. if you bet and they raise, but they would only raise with hands that beat you - that was a great outcome. Generally this is done by playing aggressive, especially against people who will only raise with the goods. You bet bet bet and apply pressure and they only continue with good hands, so you know exactly what they have.

People tend to chase way too much preflop and on the flop, they just love to see more cards, which makes it a bit of a bad spot for bluffing. You want to bluff when people can't call, which means bluffing the river, bluff-raising. Dry flops (drawless) are the best to bluff; when you bluff wet flops, people will put you on the draw if they have a made hand, or they might well have the draw and shove it.

Don't make big bluffs that win small pots, make small bluffs that are likely to win big pots. For example, if someone 3bets preflop and you shove, you're risking 100BB to win like 24BB , that's retarded. In some cases you can make very small bluffs into big pots and that's awesome because they don't have to work very often to be +EV. Part of why this works is people are so retarded about pot odds. One thing people don't do correctly is count the bets already put in as part of the pot. For example, the pot is $50, somebody bets $30, someone calls, now you raise to $100. That's not a huge raise cuz there was $110 in the pot, but people think of it as a $100 raise into a $30 bet and they fold, in fact you bet less than pot size which is a good bluff. Another awesome situation is when someone is almost all in, they will often fold because they don't want to reload. In some cases you can bluff the river for like $20 into a $100 pot and they will fold stuff like bottom pair or ace high if they would be all in.

Part of the awesomeness of being aggressive early is that you are always threatening to build a big pot and it lets you make big river bets. The bigger the bets are the more you profit. Maybe you only have a 1% edge in each pot, if you play small pots you never make any money, but if you are always jamming it up you play big pots and you then get to either make a big bet on the river, or check-call a big bluff - generally taking your edge but on a bigger bet, hence more profit. If you're 2nd barreling and even 3rd barreling a lot, you can value bet thinner and start winning some really big pots with only decent hands. Of course you know this with the obvious semibluff hands like a flush draw, but those are actually more obvious. A hand like AK overs is also an awesome hand, because if you spike an A or K on the river you can value bet it and take a big profit.

Against better players you need to jam more when you have an edge or to build pots because they don't pay off as much once they're beat. Against bad players you don't need to do that. With draws against bad players you can just take cheap cards and try to hit. Against good players you need to keep your ranges balanced and always be playing like you have a monster.

If you have good equity but don't know your spot - just jam. This is something I really like but don't see it discussed much. This applies mainly againt good players, or bad players who are hard to read. In the situation that you know you have very good total equity, but you don't know if you're drawing or not - go ahead and jam now. If you know that you are ahead or know that you are drawing, then you can make different decisions, like maybe jamming now or maybe just calling or whatever. Getting all in is protection against not knowing your situation on later streets. Getting all in is also protection against the disadvantage of being out of position on later streets. If you have good equity and are out of position, you want to jam as soon as possible in the hand. In particular I'm talking about spots where your hand might be best or you might be drawing. One example is if you have an ace high flush draw. There's a good chance your ace high might be the best hand, he might have a worse flush draw or just random whatever. If you can't read his action well, just try to get all in. Another would be something like if you have a weak pair + a draw. Maybe you have like 88 and the board is 679 , so you have a pair + straight draw. The wilder your opponent is, especially if you're OOP, the more you just want to get all in and jam it now in these spots because you don't know if you're drawing or not.

In terms of playing profitably at low levels, none of these things are as important as tilt control, focus, game selection, etc. You really need to just stay basic and play solid. "Solid" doesn't necessarilly mean nitty/weak though, it just means stick to basic +EV decisions, mainly playing value because people call and bluff way too much and don't fold enough. That leak is far more important than any other leak.

One of the hardest things for me in practice is getting into the right mental state. You need to be active and engaged and always going after +EV spots - but not too active, not bored, not pushing, you still have to just be patient and see it as a long grind and you need to wait for your spots - but don't let yourself just go into a trance and start playing just by some "rules". It's obvious when you're frustrated and bored and just pushing too much. One of the lazy things you do when you're grinding and sort of turning off your brain is you start thinking about hands in only one way. eg. I have a flush draw, I'll see if I hit, okay I missed I give up. When you're playing right you reevaluate based on each card and each action. It's exhausting really grinding right. The best way for me was to play 1-2 hours then take a break for 1-2 hours, then play another 1-2, etc. Ideally the break is exercise as that really freshens the brain.

11-27-07 - 3

Fucking Christmas presents is going to be a nightmare hanging over my head for the next month. Somebody hit me with a car so I can get crippled and have a good excuse to just disappear for the next 40 days.

11-27-07 - 2

On Ergonomics

I'm going to go over some of the basics which everyone should know, and also some thoughts that perhaps most of the ergonomics guys don't talk about because they aren't computer users, and some things I've learned through my shoulder injury.

Constant sitting and computer use is one of the most destructive things you can do to the body. Not only do you put the appendages in tightened positions, which can pinch nerves and cut off blood flow, you often place big pressure on the spine which can cause the vertebrae to shift, and the hours and hours of sitting with no activity cause the tendons to shorten and the muscles to atrophy. It's the atrophy of stabilizer mucles which may be the most harmful, because it means you cannot support yourself with your muscles and hold good posture, and instead you rely on your skeleton to support you, which leads to all the other injuries. It also means that any time you do something athletic you're not bearing the forces with your muscles, which leads to more injuries. People who sit do damage to their knees, hips, back, neck, shoulders, elbows and wrists !! (only your ankles are safe)

Let me start with the summary : it's good to know the basic "ergonomic" ways to sit (and good to have a bunch of different options), but that is only the first small part of the battle. The real solution is to get out of an inactive, sitting, hunched-forward, atrophied- muscle life. You need to do exercises to correct the bad habits and posture of computer users. You need to sit "actively" using your muscles and moving around. You need to change positions constantly, take breaks, stretch and rest. If all you do is sit and use computers, your body will be wrecked regardless of how well you sit.

First some review of the standard advice. Everybody by now should know the "90 degree position". Feet are on the ground, knees bent 90 degrees, sitting on your "sit bones", hips at 90 degrees, neck straight up, shoulders back, humerus straight down, forearms level. Okay, this is the "90 degree position" which is commonly advocated, but it's only sort of okay.

Basic sitting style : You want to sit on your "sit bones", not your butt. You can feel the two hard bones around the base of your butt where it meets your legs. To sit up on them, lean forward slightly and engage the ab muscles to hold your body erect. It may help to imagine that someone is holding your skull and pulling you upward by the head. Puff out your chest, engage the ab and back muscles slightly in neutral position. This is easiest to practice on a firm bench like a piano bench. Your spine should be in a slight "S", going inwards in the low back and outwards in the upper back. Okay, now you know this. You actually want a chair with a back when sitting so that it helps you keep this posture, but you need to imagine that you're sitting up with your muscles, and the chair back should provide uniform pressure across your whole back to just help you. Anyway, this is also bad.

The problem with both of these is that it's just too hard to hold them for any length of time. If you're going to be coding 8+ hours a day, you will not be able to hold these positions with your muscles and you will begin to let your weight rest on your bones and cartilege instead. These positions are very very hard on the body if not supported by muscle. BTW the very best thing you can do for your postural health is to get stronger muscles, you need a very strong abs & back and shoulders to be able to sit all day. Ironic, I know.

The head should be up and "back" and not looking down. I say "back" in quotes because really it should be a neutral position, but just about everyone has it forward, so you need to push it back from what you have be doing. The bones of the neck are in a neutral position roughly straight up when you're sitting right or perhaps very slightly angled forward. Your monitor needs to be high enough that you can look pretty much straight ahead. The ideal spot is roughly where if you look straight ahead that's about 1/4 of the way down the screen (pretty much no monitor is tall enough on its own, you have to put something under it). While I'm talking about monitors - the common dual screen setup that coders use is very bad. You should not be turning your head to either side for any signficant length of time. If you need to look to the side, you should turn your whole body. It's much better to have one large monitor than two. If you do have one large monitor, make sure your windows are centered, not left-justified, as that would cause you to be looking slightly left all the time. Bad neck position squeezes the discs in the spinal cord around the neck and shoulders, which can impinge the nerves coming out of the spine and going to the shoulders and arms. This can cause weakness, muscle spasm, numbness, constant muscle tightness, and pain. Once you get vertebra damage, it's basically impossible to fix by any means. Seriously, don't get it. Your head should be far enough from the monitor that you don't have to look very far in any direction to see the whole thing.

Shoulders should be back and down. Again, this is just the neutral position, but so many computer users are hunched forward that you really need to focus on getting the shoulders back. It's basically impossible to have them back too far, so go ahead and hold them back as much as possible. You should be retracting using the scapula muscles in the mid back (rhomboids), not hunching the shoulders up with the trapezius. The same goes roughly with getting them down - it's pretty impossible to hold them down too far for any length of time, and lots of people have them constantly hunched up, so just try to keep the shoulders down as much as possible. Note that arm rests on chairs usually get in the way of this, so you want a chair with no arm rests or removeable arm rests which you can take off. When reaching for anything - the keyboard, the mouse, etc. - the shoulders need to stay back, don't reach out with the shoulder. Basically this means that anything you reach for regularly should be within forearm distance of your torso. Elbows should be close to your ribs at all times. One way to be aware of the right position is to pay attention to how your scapulae feel against your chair-back. You should feel the flat surfaces of your scapulae flush against the chair back (when you lean back) - not the points of your scapula sticking into the chair.

Forearms should be roughly level, and wrists should be level or slightly down, and relaxed. In particular, the arm should be supported from the shoulder, not by resting the weight of the arm on the hand. Many people use these wrist pad things. Those are certainly better than resting your wrist on a hard surface, but they encourage a very bad habit of resting the arm weight on the pads. Split keyboards are nice, but the MS ones are awfully thick, which means your desk surface needs to be really low to avoid having the key surface too high. Usually this means that the desk needs to be as low as possible such that you can still get your legs under it. You should not be able to cross your legs under your desk.

The head forward shoulders hunched posture of the typical computer uses is called "kyphosis", which is a forward rounding of the upper spine. It's bad for the vertebrae as well as the function of the scapula, the shoulder muscles, and the load bearing function of the core. These disfunctions make simple activities like holding a weight over your head very dangerous. One way to feel if you're in danger is to run your hand over the back of your neck. You can feel the vertebrae. Feel near the level of the shoulders, the vertebra here is C7 and it will be a pronounced protuberance if you've had your neck too far forward for a long time. (BTW another contributor to Kyphosis is the modern obsession with pecs & abs; even people who do work out will often overtrain the front of the body leading to constant hunching forward).

Typical computer users are in a severe state of muscle atrophy. It may feel very straining just to sit up without back support, such as when sitting on a physio ball. Similarly it may feel very difficult on the upper back to hold the shoulders back. Neither of these should be difficult for someone with even a basic level of body function. An immediate course of physical therapy and stretching is warranted to correct these problems. I'm not going to go into a ton of detail right here about the best exercises and stretches, but they can be done as often as every day, and a full course would take about an hour a day. Exercises should start pretty light and involve isometric holds with each repetition, using high-rep sets, something like a 3x10 pattern. Once some function and stability and posture is acheived the exercises can be done in the more typical hyptertrophy range of higher intensity.

On equipment : buyers should procure chairs that are highly adjustable. If you can find a chair that perfectly fits your body in a 90-degree sitting position, that's fine, but for office managers you need chairs that can be adjusted to any employee. That means height adjustment, removeable arm rests, back tilt (back tilt should not tilt the seat), and adjustable lumbar support (preferrably in depth as well as position). Desks should also be height adjustable. The height of the mousing surface needs to be about 1 inch above the users waist in a 90 degree sitting position. Note that this also requires that the desk top should be very thin, and there should be no support bars under the desk top where the users knees will go. Height adjustable keyboard and mouse trays are one option, but in that case the desk top needs to be very high, and most cheap trays are really flimsy and horrible to use. Height adjustable thin-top desks are quite cheap and all office managers should procure them. The exact keyboard and mouse that a user wants is not really a big deal, they can use what they like. What is important is that they can put their hands in position on those devices while keeping the back and shoulders neutral. That can be hard to arrange, though it's easier with a track ball or a chair-mounted mouse tray.

Okay, this is a good start, but this will still wreck your body. For one thing, as mentioned before, it's just too hard to hold this position for a long time. But even aside from that it's bad. Your hips are not made to be bent 90 degrees like that for long periods, they need to be straight. The combination of hips bending and knees bent leads to severe hamstring shortening and hip tightness which is very bad and dangerous for athletic performance. A similar thing happens in the shoulders - having them down and immobile all the time leads to atrophy of the shoulder girdle. Something that most people aren't aware of is that the shoulder is not a ball and socket joint. Rather, the head of the shoulder is simply held to the glenohumeral joint through muscles and tendons. It's like it's just strapped on there with soft tissue, and when that soft tissue atrophies, you're at increased risk of dislocation, as well as soft tissue injuries like rotator cuff tears, "slap" injuries and seperations. Shortened and immobile joints also lead to nerve shortening and loss of blood flow. This "90 degree sitting position" that we've advocates is almost a fetal position with all your joints curled up and shortened and it's just horrible for you.

So, what's better? Well, not much. One common alternative that's advocated is a "kneeling chair" (sometimes called an "ergonomic chair"). These things provide pretty much no benefit, but could be used as part of position cycling (see later). Another device I have used is sitting on a "physio ball" (big blow up balls). Make sure you get a ball the right size and blow it up so you can be in a 90 degree position. This is a useful training tool to help your sitting posture, because it engages the muscles and makes you aware of posture, but you should not sit on it for more than 30 minutes or so at a time as it's very fatiguing. A simple bench or stool at the right height can serve the same purpose.

The real best thing you can do is two part : position cycling and taking breaks. You need to take a 5 minute break at least once an hour. I know this is really hard to do, but there's no substitute for it. The break should involve some simple stretching and active mobility work. Position cycling means not sitting in the same way for long, ideally using as many different positions as possible. One option would be to change positions every hour when you take your break. A better option is to just be changing positions and stretching constantly. Any time you start up a program and it's taking a second, stand up! When you compile, stretch your arms out to your sides, then up over your head. When resting or waiting for something, don't just sit there - move around. There are various free & not free programs to help force you to take a break. These can be very useful to get you in the habit because most of us won't take enough breaks if left to our own devices.

Basically you need to stop resting on your skeleton and ligaments all the time, and start using your muscles. But you don't just want to lock up your muscles and try to hold the "90 degree" position. You want to stay as relaxed and mobile as possible. You want to keep the body moving in natural ways and stretch and let the muscles move around and contract and relax. There's also really no substitute for getting plenty of exercise outside of work. If all you do is sit at a desk and then sit at home your body is going to be wrecked no matter how "well" you sit.

BTW I haven't mentioned the most imporant thing, which is using a computer less, because I presume it's basically not possible. One thing you should work on is getting away from the computer when you don't need to be at it.

As for position cycling, some of the useful positions : 1. regular 90 degree sitting, 2. sitting on a ball or a pogo-stick chair where you're "actively sitting", 3. reclining in a normal desk chair; this is actually a very good position, but you have to be careful. Recline from the hips with a straight back, not a slouch in the low back. Make sure you can still reach your keyboard and mouse near your lap, not reaching up or straining the shoulders. You may also need to be able to elevate the monitor to make it high enough that your neck can be neutral, not tilted forward relative to your torso. 4. standing up. Standing up is one of the very best work positions you can have. You will need to elevate your keyboard and monitor a lot, so you probably need a "sit to stand" desk, which is one of the best pieces of ergonomic equipment you can get.

Having no desk surface at all and having a wireless keyboard in your lap is an interesting option. The standard keyboard with numpad presents a lot of problems for mouse placement. Putting the mouse off the right side makes it too big of a reach. If you have a corner desk, the mouse can be in front of the numpad. Alternatively the mouse could be on a tray or on the chair, or it could be a trackball.

Frequent use of laptops is just horrifically bad. They do just about everything wrong to your body and really actively promote the hunched kyphotic posture. It's highly discouraged.

Let me sum up and emphasize that the solution is not any particular "ergonomic position" or any piece of equipment you can buy. It's a lifestyle. It's a mentality of listening to your body and putting your body before your work. It's about being mentally aware of how your body feels and keeping your "mind in your muscles" - feeling your abs and scapular adductors holding you erect, not just resting on your frame. It's about stretching and exercising and resting every single day. You need to start listening to your body. If you really listen, your body will tell you when you do bad things to it - it's just that you're so used to abusing it constantly that you automatically ignore it.

BTW if you want to do exercises that will be beneficial, some of the things you should focus on are strengthening the back, fighting kyphosis, strengthening the shoulders, in particular the posterior shoulder girdle such as the scapular retractors and the rotator cuff, hip mobility and hamstrength stretching movements, and in general extension and pulling movements. Rowing is actually a superb all-around full body anti-computer-use movement which does most of these things.

It may be impossible for someone who's chronically heavily using computers to really fix their neuromuscular patterns. One suggestion that might help is the next time you take a week or two vacation, try to really exercise and stretch and treat your body well during that time (do lots of swimming and rowing and yoga and good active mobility and extension work). Now when you return to work be aware of how healthy your body feels. When you sit down, keep that feeling. If the work starts to make that feeling go away - fix your work pattern.

Another addendum : if your workstation is not set up well, it doesn't matter how much good work you do away from work. It's valuable to know body-friendly positioning and desk setup, even though that is not the "solution". Basically sitting at your desk is wrecking you, and movement and strength is restoring you. If your desk has too much wrecking power, you can't beat it. You want your workstation set up to be as non-damaging as possible. It will *always* be damaging, no matter what kind of active sitting you do, but it's important to minimize how bad it is, as well as minimizing your time spent sitting.

"proprioception"

11-27-07 - 1

So I've been writing this thing on fitness . I dunno, I'm not really happy with how it came out, but what are you gonna do? There it is.

11/25/2007

11-25-07 - 3

So, I used to have a Persimmon tree at Alrita and hardly knew what to do with them. It turns out I had an "astringent" tree. I don't know the exact type. Persimmons come in two very different familes, the astringent and non-astringent. Astringent are ripe when they're super soft. If you catch them at just the right moment they can be a sort of pleasant jello-like sweet gel jelly gel gel. One day later and they start getting really liquidy and gross. I guess they might make good jam but the only thing I ever liked with them was bread, persimmon bread is kind of like banana bread or pumpkin bread, it's quite tasty. Anyway, the other type is "non-astringent" which you can eat while still crunchy. They're only slightly sweet and I've come to like them quite a bit with just a bit of fleur de sel. Many people here refer to the two types as "Hachiya" and "Fuyu" because those are the varieties that we typically see; Hachiya is just a variety of astringent persimmon while Fuyu is a variety of non-astringent persimmon.

I took this picture at market today :
image
Fuyu persimmons to the lower left, Hachiya to the upper right

I have leftover Panettone so I'm going to try making a Panettone-Persimmon bread pudding tonight.

11-25-07 - 2

If you like hiking and enjoy nature, do NOT read "A Walk in the Woods". If you enjoy condescending jabs at the South and Americana interspersed with random statistics and historical trivia, you will love it.

11-25-07 - 1

So Youtube is totally broken if you tell Firefox to not save passwords. If you try to upload a video normally, you fill out the description and hit upload, then it says "enter your password" but it's a confirmation email screen. Okay, so you enter your password, it sends the confirmation email. You click the confirmation email and it takes you to a page that says "email confirmed". Now when you hit upload again you go back to the description page and repeat this cycle endlessly.

I have found a way to get videos uploaded though. This seems to be the best process : log in, and go to My Account and click on My Videos. This will trigger a "confirm password" screen. Do that and click the confirmation link in the email. Okay, now do NOT click Upload. Instead click My Account again, click My Videos, and click "Upload a video" from there. You should be able to proceed now.

WTF.

11/24/2007

11-24-07 - 2

One thing I've learned living in the city is that city people really are way way better than country people. The population of San Francisco is like the cream of the US (and similarly for New York, less so for Boston, Austin, etc. etc.). There are so many gorgeous people, and they're intelligent, musicians, artists, cooks, the food is unbelievable, the people are aware of politics, cultured, they're up on current fashion, news, etc. It's a real shock when you go back to the country or the "heartland" and you see what a fucking backwards cesspool most of America is. The people are ugly, fat, uneducated, they speak poorly, they're woefully out of touch with the news and culture and fashion, their taste is just laughable, the food and decor that they like is just so disgusting and tacky. It's really not a question of needing to be "balanced" or remove the bias against the country; the best people of the country leave and come to the city, what's left are the people who couldn't make it for whatever reason, either lack of ability or lack of gumption. (obviously there are tons of exceptions, we're just talking about the general trend here). This doesn't apply so much for the people born and raised in cities, who you can tell by their dingy clothes and lack of eagerness, it goes for the huge amount of newcomers.

Another thing I've learned is that city people have way more sex. I think San Francisco is probably even well above average in the US in this regard, but it's just a sexual playground. People move here and go nuts. Not only is there the anonimity of numbers, there's a straightforwardness about it, people are too busy to mess around with dating, they go straight for the kink. In SF there's the added idea that anything goes, there are tons of membership sex clubs here. So many people move here for an "adventure" and the most adventurous thing they can think of is having a threesome.

11-24-07 - 1

8 oz Dark meat turkey = 425 Calories, 36% from fat
8 oz White meat turkey = 357 Calories, 20% from fat

That is in fact a noticeable difference and if your diet is *extremely* clean it might be significant to you, but for the average person another 50 Calories of fat is a drop in the bucket. The NYT did a similar comparison but based on 1 oz servings which is totally retarded, it's similar to what "Pam" does in order to claim to be "fat free". The amount of fat is so small it rounds down to nothing.

8 oz Dark meat turkey has 16g of fat. The minimum you should eat per day is around 25g. My goal is to eat 60-80g of fat per day. BTW the proper serving size for someone who's not bulking is 3-4 oz.

11/20/2007

11-20-07 - 2

I've got horrible code writers block. I've been trying to make myself finish this certain project for the last like 6 months. Days like today I make myself sit down and I open VC, and I browse around a few different cpp files, make some notes about what I should do next ... and then I just can't get going. Maybe I write a function header and then I decide that's not really the right way to go. Sometimes I'll pick some little stupid peripheral thing, like working on my Timer class or something that doesn't advance me towards completion at all. It feels horrible.

To make it worse I didn't sleep at all last night, as has been happening often lately. I went to bed around 12. At 1:30 some people coming home from the bars walked by outside, some guy was on his cell phone. At 2:30 Dan came to bed (she falls asleep on the couch a lot). At 4:00 someone in the building went in and out; I think they were going to catch a plane, I heard roller wheels like luggage. At 5:30 the garbage truck came down the street, which has horrible loud beeping on top of the loud sound of the arm lifting garbage cans. At 8:00 Dan started getting ready to go to work and I realized my chances to get a little sleep were all past.

11-20-07 - 1

Hitman movie continues a long line of "why the fuck did they decide to make a movie out of this videogame?" ; it has no story, no characters, absolutely nothing that suggests it would make an interesting movie. Plus there have been a billion other hitman-based movies already that are all better. I mean the only thing worse would be a Doom movie or a Dungeon Siege movie or a Mario Brothers movie, AMIRITE ?

Anyway, this reviewer pissed me off :

Ultimately Hitman is about bullets, blood, and bombs. For die-hard fans of the videogame, there is much to relish in terms of cobblestone car chases, punishing fistfights, cool weaponry, impossible physical feats, and ear-popping gun battles that rage through exclusive hotels in exotic locations.

Yeah, we like videogames with lots of action, therefore we will like movies that have nothing but action. Nevermind the fact that you aren't actually doing those things when you watch a movie, which takes away the whole fun and immersion of the violence. Maybe they should make a movie based on Unreal Tournament. All they have to do is put in tons of shooting and respawning and it will be a favorite of video game fans! Or they could make a movie about Chess and just show nothing but pieces moving around the board. I mean, people who play chess just see the pieces moving, who needs stories or characters in the movie!? If you have no clue WTF you are talking about then just shut the fuck up.

11/19/2007

11-19-07 - 2

Ben Stein has always been an opportunistic scum bag; he's sold himself and repeated his Bueller character in horrible commercials, of course he's an arch-Republican and his New York Times articles are very juvenile-Republican-Ayn-Rand-myopic intellectualism. Anyway, the new "Alaska Seafood" commercials make me sick. They don't say "seafood is great, eat some" they say "the oceans are full of fish, eat all you want, there's a lot more out there". It's such disgusting lie, just thumbing a nose at reason, and winning since they're on TV and logic isn't. The reality is that the oceans are being destroyed by overfishing and line dragging. We don't see it because we don't live in the ocean, but the affects of man are near catastrophe. As our human population continues to skyrocket, the fish population is plummeting. Already many species are in desperate conditions, and worst of all very little is being done about it world wide. This kind of advertising is just so irresponsible it makes me want to boycott Alaska seafood. This page is a little old but very thorough.

11-19-07 - 1

Some different Thanksgiving suggestions :

Plain roast pumpkin is really delicious. Scoop out all the pulp, cut into moons, rub some olive oil on, salt & pepper, and roast in the oven for 30 minutes or so, just like a butternut squash or something. Finish with a pat of butter and maybe a drizzle of honey or a tiny dash of nutmeg. Roast beets and roast brussel sprouts are also easy to do in a similar way and go great with thanksgiving.

Grilled polenta is a really convenient thing because you can make the polenta the day before and just grill it at the last minute. I recommend using a spring-form pan to cool the polenta in, it makes it really easy to pop it out and cut nice perfect wedges to grill. Coat very thinly with OO before grilling. Use a vegetable peeler to cut flakes of parmesan to top each wedge.

Make a cranberry gastrique instead of regular cranberry sauce. Combine 1 cup sugar, 1 cup cranberries, 1 cup red wide vinegar + 1 cup red wine. Boil then reduce to a simmer for 20 minutes. Mash the cranberries. If it's not thickening enough you could add a cornstarch slurry. Of course you can add whatever other flavor elements you want; some standard would be a bit of orange rind or some ginger. If you want it chunky you can serve just like that, or you can blend some of it or all of it. You can also strain through a mesh strainer if you want it really smooth. It should be bubbling and syrupy when you take it off the heat and it will thicken more as it cools. Oh you can also finish with butter if you like.

11/18/2007

11-18-07 - 5

XBLA game ideas :

Mafia/Werewolf game that everyone loves right now. The code for this is so trivial, it's almost totally played just over voice comm. But it would be cool to have the xbox faccilitate the rounds and the day/night and randomly assigns everyone's secret identities, does the voting, lets the seer act, lets the werewolves talk at night and just turns their mics on, etc.

Army vs. Terrorists game. Team "shooter" trying to capture the dynamic of Iraq. One side is a squad of like 4-8 guys that's like the US Army - they have totally superior weaponry, night vision, money, whatever they want. The other side are the terrorists and they have a specific mission to accomplish, the Army side doesn't know what the mission is. It's always played on the same decent sized map, but the mission is random, it might be blow up a mosque, or assassinate a diplomat, etc. there are various sites around the map. The terrorists big advantage is they look just like the civilians and there are tons of civilians wandering the map. So the army guys basically have to wander around the map looking for suspicious behavior, maybe they can also leave decoy targets or decoy munitions to try to lure the terrorists; once they actually figure out who the terrorists are or what their target is, it's pretty easy for the army guys to take them out. Somebody must've done this already but I've never really heard of this dynamic existing in game, it seems like most people who do Army vs. Terrorists just make standard shooters with different graphics.

11-18-07 - 4

God "Beowulf" looks so awful. The CG is just disgusting looking, something about that super fake bad animation just hurts my eyes, and I HATE HATE HATE the CG stages with real actors on them and the stupid drop shadows and full-screen flickers and all those other lame tricks they do to try to merge the chromakey. These kinds of movies will not age well. Hey, I want to make my characters look like cardboard cutouts oddly stuck into an oversaturated unmatching background! Oh, then animate these stunt moves instead of getting standins, and I want the moves to look as jerky and unhuman as possible. Great idea! How avant garde!

On a semi-related note, we saw "Mirrormask" recently which is the same sort of horrible super-fake-looking CG, but it's way way better. For one thing, the designs are not supposed to be realistic, the characters are in a dream world and the designs are all the wild stylized Dave McKean stuff, which is what makes the movie worth seeing. I found the story and acting to be pretty juvenile, but Dan thought it was an accurate depiction of the struggles of a teenage girl. The backgrounds are totally flat and the characters look like they're standing on a page - you have to sort of pretend that's what's happening, it's almost like they stepped onto a comic book and are standing on the pages. Okay, it's still bad bad bad but it's not as bad as something like "Beowulf".

Zemeckis I guess likes to work with technology; he did Polar Express and Roger Rabbit, but if you look at his oeuvre it's evident that's he the master of semi-pleasing unremarkable pop fluff. Most of his movies are sort of enjoyable, but not at all risky, have no emotional connection other than cheezy sentimentality and don't say anything about anything. I didn't like Forrest Gump at all, so I guess "Back to the Future" is his best movie, which was quite enjoyable, but you could go back in time and prevent it from being made and there would be absolutely no bad consequences.

BTW I noticed the credits for Mirrormask actually credit each of the technical artists specifically and even says what each one did. I don't think I've ever seen that on any other major CG movie, it shows a lot of respect for the artists.

11-18-07 - 3

I really really just don't get people who dress weird every day. I mean, I get doing it once in a while, it makes you feel weird and you get reactions from people and all that. But, like on a daily basis, just going to your job. Like a guy who wears bow ties. Or someone with bizarro facial hair like Jared Diamond (a "chin curtain"). Or the hipsters around here who go really bizarrely allout with the style. I just can't imagine what's going through their head when they get dressed and all day long as they go around town and get stared at, and people like me give them "what the fuck is wrong with you" looks. I mean I just can't explain it other than they must be partially retarded in certain brain pathways.

BTW it's much easier to understand with something like the 80's extreme punk culture, where the elaborate costume is partially a form of protest, but also a way of peacocking to other punks to show your coolness.

I also don't get people who can actually write serious programs in less than a day. I hear people say "I wrote a jpeg library in about a day" or "I wrote this seam carver in about a day". WTF? Really? I can only assume they're either lying or they're super geniuses. Even back in my youth when I was crazy fast it always took me a week or so to write anything serious. Maybe I'd getting working in a day but it would be totally buggy and nonfunctional, then after 3 days I'd realize I did it wrong and start over, and finally rest on the 7th day.

11-18-07 - 2

We're losing all the people with really weird cool looking faces. Everyone is getting too healthy. You know how everyone in Sweden just looks clean and has good posture and a healthy glow? How boring! If you look at like old photographs, especially of peasants, there are all these people with bizarre facial features (aka "character"), which I guess comes from malnutrition and disease and such, and that's going away.

11-18-07 - 1

Simpsons today made a "black guys have big dicks" joke; wow, it just blew me away when I saw it; that's a 90's-comedian level of comedy, I expect that stuff on "Premium Blend" but Simpsons mostly doesn't go into that ridiculous cliche cheap territory. It's been a steady downhill since about 1999 and this was one of the major milestones to me on the road to comedy garbage. As much as I hate to admit it, the Simpsons is hardly even watchable any more; it just barely makes the TiVo list mainly on the merit of the fact that there's nothing to replace it, but if the Sunday night football game was ever any good I would watch that instead.

11/17/2007

11-17-07 - 3

Link day :

Grafica Obscura old SGI graphics articles by Paul Haeberli ; some really neat fun stuff here.

Paul Phillips Blog is just kind of scary cuz the guy is a bit too much like me. At OW when the poker boom hit we all sort of hated Paul as a TV character cuz he was such a Silicon Valley stereotype; he got lucky and cashed out and became a maverick with colored hair and sort of geeky personality. I'm definitely just jealous.

I found this Ask a Scientist thing. Wow, I was so excited, it looks so promising! Then I read some of the physics ones (which I have some expertise in) and found the answers to be both condescending and uninformed. In fact their big thing about Google on the main page is really hillarious and a good example of all the content.

This page on Tone Mapping is okay and has a decent references section.

Lost in the Static is an interesting experimental game. My eyes can't handle it, but I like the idea.

Also, browsing to a web site and having it play audio is fucking completely unacceptable. To stop it, 1. get flashblock . 2. put this in userContent.css :

/* block embedded sounds */
object[data*=".mid"],embed[src*=".mid"] { display: none !important; }
object[data*=".mp2"],embed[src*=".mp2"] { display: none !important; }
object[data*=".mp3"],embed[src*=".mp3"] { display: none !important; }
object[data*=".mp4"],embed[src*=".mp4"] { display: none !important; }
object[data*=".wav"],embed[src*=".wav"] { display: none !important; }
object[data*=".wma"],embed[src*=".wma"] { display: none !important; }
I guess .ogg should be in there too.

11-17-07 - 2

It's really a tragedy that Hugo Chavez is such a nutter. Not only is he bad for Venezuela, he's bad for populism across the world. Countries will see the havoc he's causing and choose to not elect populist leaders and instead stick to the IMF/WTO/US slavery model. To a lesser extent Evo Morales also appears to be a bit of an extremist nutter. I think it's a great and long-needed more for the masses of poor in central and south america to reclaim control of their countries. The wealth inequality all across the Americas is disgusting, and just about every country is plagued by these semi-state-endorsed private monopolies. The IMF/WTO/US model does absolutely nothing to help these people because it they work with the "capitalist" system that's already in place which is completely corrupt and provides no opportunities for the poor.

Unfortunately, the dictatorship of Chavez will be held up as an example of failed populism (it's not) which will help the causes of all those in the US who are against real change in the Americas. Just as an example, he's being used as an argument that "nationalizing oil is bad". That's totally retarded, nationalized oil profits make perfect sense, and just about every single country in the world with oil does it (the US is one of the very few exceptions - our government gets relatively $0 from oil under our soil, and in fact the very small amounts that we take from oil companies often go unpaid as found by the GAO). Many companies have nationalized oil companies and run them just fine; others have private oil companies but take some large chunk of their profits which also works fine.

11-17-07 - 1

"The Tree of Wooden Clogs" by Ermanno Olmi is a beautiful, slow, sad pastoral movie. It's a three hour long, and the plot and character development is very thin; it's really just a picture of life. Most of the scenes serve no narrative purpose, they just portray the lives of the Italian peasants working, praying, struggling, loving. It is a little overly sentimental, but we can forgive that.

I really liked "Il Posto" too. (not "Il Postino"). It's of a similar style, like an eye on life, but it's contemporary with when it was made which makes it rather more realistic; it's the better movie of the two I suppose, but the depiction of the dehumanization of modern society is a little painfully close to home. It's much more fun to watch peasants in the countryside and pretend it would be a lovely way to live despite the crushing poverty and hard work.

11/16/2007

11-16-07 - 4

I've mentioned before that our system of taxes is badly broken. Roughly our system now (if we ignore Bush's temporary destruction) is a progressive income tax with lots of little regressive taxes and deductions and tons of exceptions.

Many of the deductions are designed to motivate certain good behaviors, but I believe that doesn't really work. Rather they just motivate people to find ways to save on their taxes and don't actually lead to good behavior. This is because they're too specific which leads to "I can do this to save on taxes" rather than "I need to behave differently to save on taxes".

A classic example of this is the hybrid car deductions (or solar panel deductions, or energy efficient appliance deductions, etc.).

The problem with these deductions is they are sort of one time things that allow rich people who can afford them to do something and get some bonus money. While it does have a certain small positive effect, it's not nearly the effect you could get through actually motivating people to do the right thing.

So people with hybrids get deductions, but people who carpool get nothing. Same with people who just don't buy a car and use public transit or bicycle. People who choose to live closer to work get nothing. And people who own 3 SUV's and also a hybrid get the deduction. Clearly the money is not reflective of benefits to emissions at all, and conceptually knowing that the hybrid deduction is out there is not a thought in people's heads which affects their day to day behavior. (it may affect their car buying choice, which is the small positive effect, but it doesn't encourage them to not buy a car at all, and it has this bizarre nonlinearity)

The best way to do that is through the capitalist system, where people can look at prices and make decisions. The problem is that prices do not reflect the true cost of things, and the government should logically step in to remedy that.

In the case of emissions, you have the ideal method - gas tax. Not only is this the ideal motivator, it's only a fair reflection. Gas taxes should pay for all the highways, bridges, vehicle testing, oil pipelines, foreign expenditures for oil, as well as the estimated long term future cost of cleanup due to emissions and other waste. This lets people see the true price and make a logical decision. The republicans weill say "but the taxes!" , well of course you can lower the income tax by the same amount that you take in, so there's no total change. The question of how much total tax you should take in is separate from the question of from where you get it. Anyway, regardless of the fairness of the charge on the gas tax, it's the best way to motivate conservation.

It's hard to think of any deductions in the tax system which are actually beneficial to the country and wouldn't be better served as fair usage taxes in a more capitalist pricing model.

You get the same thing on bigger scales with corporate tax breaks. Rather than motivate good behavior, they generally just provide loopholes and pork (free money) for specific companies that figure out how to capitalize on them. You would get much better results from using a market-based charge system. The goal should be to motivate companies to do the right thing on their own, economic benefit should correspond with national benefit. If for some reason they can't, they should be able to choose not to and just pay the price if that makes more sense. That price should be set high enough that the populace is willing to accept that payment in exchange for their bad behavior. If you think about that way, that price should be very high. How much money should a company pay to cut down a forest or blow up a mountain, or destroy habit? Every company that uses electricity is playing a small part of that.

Other obvious cases I've mentioned before are the fees charged to mining and drilling and logging companies which are not close to covering their actions & not close to motivating conservation. Another obvious one is the cost of water. Not only is water ridiculously subsidized across most of the US such that the cost of water doesn't pay for the infrastructure that delivers it - it should not only cover that but also be expensive enough to balance the environmental damage due to using that water and motivate conservation.

I don't mean to use Europe as an example of a place that gets it right because they certainly screw plenty of things up, but you can see the difference in behavior of everyone when prices are motivating. In many countries in Europe not only is gas very expensive, but so is power and water, and everyone just gets in the habit of conserving - people turn off lights when they leave a room, they wash dishes with the minimum of water, they reduce driving as much as possible - it just becomes part of your daily living, which the US system of tax breaks doesn't accomplish.

Of course this is likely to never change in the US because "tax break" sounds good while "gas tax" sounds bad, even if you adjust the overall rates so that the total tax taken is reduced, you'll get destroyed on the soundbite news programs.

11-16-07 - 3

You know, the one instruction we've never gotten that would be really rad is the ability to zero big chunks of memory quickly. I'm pretty sure RAM chips could be made with a special command to make a whole 4k page zero. If nothing else you would eliminate a ton of bus traffic and CPU time.

Here's some funny stuff about Kernel page zeroing and COW that sort of does something like this, but is not ideal.

11-16-07 - 2

I put up floatdd in the exe section. It's the little float gamma+exposure test I was talking about yesterday. I put some new funny rational exposure functions in that I think are pretty neat. It's purty, it's pointless, whatever it was fun. The general form of rational exposure is :

x * ( a + b * x ) / ( 1 + c * x + d * x * x )

As x -> 0 , this is (a * x) ,
As x -> inf , this is b/d , then you have some other parameters to play with shape.

(a) of something like 6 to 16 makes sense. The slope of sqrt or other gamma functions goes to inf at x = 0, but if you look at the actual slope of a discrete 1/255 step it's just very steep.

(b/d) of 1.0 to 1.5 is best. At 1.0 you never get white until infinite intensity which is not ideal (you can see that in the basic rational exposure modes of floatdd). Something above 1.0 means you hit white somewhere sooner (you can work out for what x exactly you hit white and formulate it that way if you want). Hitting white somewhere around x = 3 or 4 feels good to me.

11-16-07 - 1

I really don't enjoy wine tasting. I used to make myself do it and try to enjoy it around San Luis because it's supposed to be "fun". I just don't get it. I do really enjoy tasting different wines, but I really don't like some salesperson staring at me the whole time telling me a bunch of nonsense tasting notes, and then the implied obligation of buying a bottle even though they're generally outrageous, and all the other people in there tasting and trying to act like they know the first thing about wine, or even if they do know a lot about wine that's often even more insufferable to be around.

Some of the tasting rooms are legitimately nice, but I prefer the tiny shack on a hill in the middle of a real vineyard over these ridiculous Disneyland like constructions with fake stones and waterfalls and all that nonsense. At Wolff in SLO you could taste outside on the terrace on the hilltop over the vineyards which is pretty ideal. Outside (nature) = good; inside (man made) = crap.

Personally I have much more fun buying a wide selection of $4.99 wines from Trader Joe's and carrying them all out in the woods, drinking them all and jumping in a river.

For comparison, test driving sports cars is really fun, so is going to high end audio shops and listening to their gear; both of those would make excellent weekend activities except for the fact that you have these horrible salespeople with you the whole time who are totally condescending and pushy.

11/15/2007

11-15-07 - 2

I'm using KeePass for all my passwords now. It's reasonably easy to set up and use, though the auto-import from Firefox is kinda broken. Anyway, it provides absolutely zero security against local machine spies such as keyloggers since it uses unsecure methods (either typing or the clipboard) to enter your data into web forms. It has no choice, Windows doesn't provide a way for apps to securely communicate with each other (I dunno maybe Vista improve this? you would also have to sign the apps so that they can know they are talking to the app they think they're talking to). Also Firefox could provide custom accessors to fix this as well, they could have their own PGP key inside firefox, make the public key public, and let other apps encrypt things with the public key and send them to Firefox, then internally decrypt with the private key and send it on the web, which perhaps you keep hidden at all times if you're on an https page (I imagine there must be a way to change your encryption algorithm without actually ever decrypting).

Anyhoo, the only thing it really does do is let you use a different strong password everywhere you go. That makes you secure from leaky sites spoiling your entire security. So one of the sites you go to is corrupt or just incompetent, they can't get to all your other sites. What with having money on poker sites of dubious integrity, that's a pretty useful protection.

Unfortunately that still doesn't protect you from the retarded fucking banks which seem to just lose hundreds of thousands of records on people all the time. It's so retarded that you can't change your social security number. You should be able to get a new one once a year. The government would keep a record of who corresponds to what numbers, but would only provide those records to law enforcement. Similarly with drivers licenses and credit card numbers. And anyway WTF why do I need all those different numbers, just one number is plenty. Being able to change it once a year severely reduces the risk of identity theft, and also makes it easy to catch them when they try to use someone's old data.

11-15-07 - 1

I'm so far out of knowing what's up with hardware (I didn't even know AMD bought ATI's card business). Anyway, this got me excited -

The flash ("SSD") hard drives coming out now are very exciting; they seem a tiny bit too early to jump on just yet, but in a year or so they should be big and fast (64 mb is common now and bigger is available but the prices are still insane). Better read speed is sort of meh, but the super fast seeks are awesome (of course using all this hard drive terminology is kind of silly, there isn't really a seek). Best of all is the silence. Ah the sweet silence, and lack of spin-up and spin-down sounds and delays. Also the reliability is pretty appealing to me. Dealing with hard drive crashes is not fun. Oh yeah and they're very small and low power so they are awesome for notebooks.

On that note Intel's 45 nm (and smaller) cores are also killer for notebooks; we're going to have some super sweet notebooks in 2008. I don't know what's up with GPUs but it looks like powerful GPUs might be the biggest energy draw and heat generator in 2008.

On the flip side the "Hyperdrive" RAM hard drive thing is totally retarded. Taking a bunch of RAM and segregating it off and calling it a "disk" is just a freaking ram disk that you can do in software, or not do! There should just be more RAM slots on the main board and a battery backup so it's persistent.

11/14/2007

11-14-07 - 4

ImDoub notes

The basic approach of the trained image doubler works like this :

The goal is take an image I and pretend it was created by downsampling it from an image of 2X the res, we'll call it 2I.

Of course there are many images 2I that when downsampled would produce I. Of those many possible 2I images we want to choose the most likely. To define "most likely" we assume that all images are generated by a statistical source.

So, how do we model this statistical source? We simply gather a big library of images {L} and say they are likely to come from the universal image source (UIS). For each of these images we have an example "doubling", we say that the downsampled image (L/2) when doubled should be L.

So we have this huge space of training samples, { L/2 -> L }, and we basically want to find our image I in that space and interpolate. That space is way too big and too sparse for this to ever work, so we make the assumption that the UIS is *local* and also *unoriented* and also *relative*.

Local means that a pixel's probability is only affected by it's neighbors. In practice we'll use the 2-ring (the immediate neighbors and their neighbors).

Unoriented means that if you take a neighborhood and flip it in X or Y or rotate it 90 degrees, the probabilities are the same.

Relative means that if you add or subtract a constant value to the whole neighborhood it doesn't affect the probabilities.

Now, all 3 of these assumptions are in fact obviously wrong. Locality is obviously wrong because images may have repeated features, like a wallpaper pattern, and obviously having the same pattern in another part of the image far away affects the probabilities in the repeated area. Unoriented is obviously wrong if you just consider images of text that obviously treat X and Y differently, and even in photos they are much more likely to have the horizon line horizontal. Relative is also obviously wrong when you get near the neighborhood of 0 and 255 where you have clamping; perhaps logarithmic-scale infinite range images would be close to being "relative" but real images obviously are not.

Regardless, we're going to use these 3 assumptions (as do almost all image transform algorithms). Furthermore note that we are NOT assumping *scale* independence, either in spatial scale or value scale. That is, we are not assume that you can multiply a neighborhood by a constant and get the same result, nor are we assuming that if you zoom out and take a wider set of neighbors you will get the same result.

Anyway, using these symmetries we can now create a much denser training set. Instead of using a whole image from the library {L} we take a local neighborhood of pixels N (the 2-ring) around each sample in L/2. We put the neighborhood into canonical form. First subtract off the average of the neighborhood, this removes the constant offset. Then flip in X and Y until the values are growing in the +X direct and in the +Y direction. This orients all neighborhoods in the same way.

This canonical form of the neighborhood now predicts a certain doubled pixel, this makes up the training set {N -> L}. Again the procedure is simply take the image you want to double {I}, form the neighborhoods in canonical form, look them up in the training set {N} and interpolate between the closest ones you find. Once you find the prediction, you take it back out of canonical form, putting the right local offset back in to create an output pixel.

In practice how do you do this interpolation? Neural Nets would work fine. So does a pure dense sample search like k-Means where you have a distance metric to find samples. Perhaps the best way is a Support Vector Machine (SVM) which is precisely designed to be ideal for this type of work; all of the neighborhood samples {N} are the support vectors and you can optimize for a desired machine size (which is equivalent to the sensitivity to noise in the training samples).

How does this ideal doubler work differently than any fancy filtering algorithm? First a little review. Normal image filters work by creating a linear combination of the local neighborhood. Any rotationally-symmetric filter can be decomposed into the product of two 1d filters, which is what everyone does (actually that's not true, needs investigation), so you can work first on the rows then on the columns. It's an inherent problem of sampling that you cannot create a filter which is ideal in terms of "ringing" and "blur" - you either have to tolerate one or the other. I'm not really going to get into this right now but it's an interesting topic with lots of papers on it.

So the first thing that the trained doubler can do is make a per-pixel decision about what filter to use - a more blurry filter or a more ringy filter. (of course it isn't explicitly making this decision, it's just finding neighborhoods where the training set L/2 -> L either looks like a blurry upsample or a ringy upsample).

But the trained doubler can do more than that. It can see patterns in the downsampled image which typically come from hard curves of various types in the higher res image, such as hard diagonal stair-steps, or even rasterized circular curves.

BTW the old-fashioned style image doublers work by explicitly looking for these types of patterns. They basically work by assuming that all neighborhoods of an image are either smooth (locally polynomial) or a hard edge of various types (horizontal, vertical, diagonal 45, diagonal 135). They best-fit the neighborhood to one of those groups and then use a different anisotropic linear filter for each case. This is how the old DPCM / CALIC image compressors work and how Wm Withers' "Augural Image Zooming" worked. These semi-heuristic approaches actually work very well.

Another way to think about it is this : for any image that we are given I , imagine we downsample it to I/2 with a filter , and then we double it through the trained doubler J = 2*(I/2). The result J should be as close to the original I as possible. This is how we can formulate the problem as a standard machine learning optimization.

Addendum : Well, back when I worked on this I did a literature search and didn't find much; Won has pointed me at a paper by William Freeman , "Example-based super-resolution" which is almost exactly this approach.

11-14-07 - 3

Some thoughts on metadata and reflection. So far I'm just really happy with the cblib system for prefs and reflection, and I was thinking about why exactly. Maybe it's just cuz I designed it and I'm an egomaniacal programmer like everyone who loves their own work way too much. I'm going to compare to the standard alternative, a data-based metadata system. The data-based system basically stores a list of the members with typeinfo & offsets for each marked up class. This is pretty standard and what we had at Oddworld. (The other common method is an autogenerated metadata system which is often done by putting a comment on the line with the variables; the autogen just creates the data definition for you though, so this isn't really a different system at all, though it does have some minor advantages).

BTW the "Reflection" method I'm talking about is an "imperative templated visitor" system. It's probably easiest to look at the code in cblib to tell what's really going on. Note that there's absolutly zero code to implement the "Reflection system". It's simply a policy for client classes that want to be reflected and for the functors that want to visit them.

First of all, if your metadata system is designed well it's about the same amount of work for the client in either case. In an autogen system you have to comment the members with whether they get metadata or not. At the end of the Oddworld system we had nice macros to just list all the members and it would create the right metadata through template type detection. The reflection system is about the same, you just call reflect on all the members the template finds the type.

Basically the reflection system will have client code that looks like this :

	template 
	void MyClass::Reflection(T & functor)
	{
		REFLECT(showControl);
		REFLECT(controlgraphic_x);
		REFLECT(controlgraphic_y);
		REFLECT(showMucks);
	}

While the Metadata system will have client code that looks like this :

	START_METADATA(MyClass)
		METADATA(showControl)
		METADATA(controlgraphic_x)
		METADATA(controlgraphic_y)
		METADATA(showMucks)
	END_METADATA()

In either case you could also add info about valid ranges and descriptions and whatever else extra markup junk you want to add.

So, what's the difference? There are two issues. One is how do you add a new type to the system, and the other is how do you handle weirdo nonstandard junk in your marked up classes.

Adding a new type in the description-based system required me to make a new metadata type for that class, or to somehow tell the system that it's the same as some previous type so you can use that description. Using templates here is an advantage already because it will autoconvert for identical types, as opposed to like a parser-based system that will struggle, but data-based or reflection-based can both use templates. Also in either case if your system is good, you should generate a reasonable compile error when you try to metadata or reflect a type that isn't supported. Actually that seems to be pretty much identical.

The big difference comes from nonstandard iterations. The "standard" case is that your class is just a bag of other types, and you iterate over each of those members and call the functor on those members. Of course reflection and metadata are identical for the standard case. The nonstandard case happens when you have some nonstandard junk.

The cool thing about the reflection system in this case is that it's "imperative" ; in Casey World we would say that the reflection way is "immediate mode" and the metadat way is "retained mode". Basically this is cool because it lets us interject code right into the member iteration.

For example you can do conditionals, like :

	template 
	void MyClass::Reflection(T & functor)
	{
		REFLECT(isAngular);
		if ( isAngular )
		{
			REFLECT(angle);
			REFLECT(radius);
			length = width = height = radius;
		}
		else
		{
			REFLECT(length);
			REFLECT(width);
			REFLECT(height);
			radius = (length+width+height)/3.0;
			angle = 2*pi;
		}
	}

Of course you can do stuff like this in the metadata method too but it's messy. Also, the derived-data type of fixups are normally done in a metadata system with "Finalize" type of call. The problem with that is that it's done after the metadata iteration is all done, which means that you are temporarily in a state where it's not fixed up. With the imperative method, you can fix derived data and then immediately be using it for the rest of the iteration.

For example, say you own some little other class that you don't want to bother to mark up, you can just reflect its members :

	template 
	void MyClass::Reflection(T & functor)
	{
		REFLECT(m_ptrData->x);
		REFLECT(m_ptrData->y);
	}

Basically you can do whatever you want because it's just code. More than anything, that freedom just feel liberating. You're no longer locked into a system where you "must do it like this" for it to work.

Oh yeah, the big disadvantage of the Reflection way is that it has to be in the header. IMHO that's not so horrible. It's no worse than having the members in the header. If you want to hide the members you have a pImpl thing already, or a derived class, or whatever. So you have the members and the Reflection there with the pImpl. Now, you can't get through to it with arbitrary template functors, but you can still get there with specific calls passed through a concrete class dispatcher. Anyway, an advantage of the metadata method is you can iterate around in peoples' data without even seeing their header, in fact it provides a whole alternative way to do linkage, such as named variable access if you want to go down that route (I don't approve of that).

In fact you need that dispatcher anyway so that when you call Reflection on a parent class it will get passed down to the derived class. This doesn't work automatically in C++ because you can't do virtual template functions (yuck). So you have to have a virtual that will get you down to the most-derived type. You can see such a thing in "Prefs.h" in cblib. (there are different ways to do this too if you want to do more of an RTTI type of thing with a description of the classes).

11-14-07 - 2

A little more on the rough Gamma thing. Another cute thing to do would be to go ahead and combine our Gamma step with an Exposure step. Now instead of taking linear light in [0,1] we're taking brightness in [0,inf] and we still want to output in [0,255].

We want a function like 255*(1 - exp( - C * x )). For x = 0 we output zero, and we get 255 as x -> inf.

We can make this match the gamma curve for low x. Again just assume gamma = 2 and match against sqrt. When you do the integral to optimize C, you get an error function which you can't solve analytically so you have to do it numerically. I just ran rough numbers and got C = 2.69 which is awfully close to "e" (2.718) so I wonder if I did it more precisely if I would actually get "e".

Anyway that's not what we really want, cuz the exposure for large values is very different. We really only want to force them to match for the small values of x. If you optimize for the low value of x you get C = 3.0 almost exactly. (again we're integrating in steps of sqrt(x) not in steps of x).

So our combined gamma + exposure function is :

255*(1 - exp( - 3 * x ))

I have no idea if this is actually cool, I haven't tried it yet or anything.

Won says a more common tone mapping form is x/(x+C). The optimal C for matching sqrt in the low range is around C = 0.25 This form is actually a better match for sqrt in that range, but has the disadvantage of being pretty far off 1.0 when x is 1.0 (it's only 0.8, unlike the exp form which is 0.95).

Both of these forms are actually pretty shitty for very low x which is pretty bad. They do a bit better if you use e^(-4*x) or x/(x+0.2)

11-14-07 - 1

I put up the assembly for ConvertColorsGamma that does 4float -> dword color conversion and gamma correction. This is like super non-optimal assembly, and furthermore you can do this a lot faster with video cards these days (in fact they pretty much do the whole thing for you). I'm not very good at writing assembly anymore, I'm not even sure what the major issues are (other than memory accesses).

I've looked a little at the ASM output form the VC intrinsics and it looks pretty good; the compiler will do reordering and all that good stuff for you, so dumb assembly like this should pretty much be written with the intrinsics and let the compiler do the little stuff.

11/13/2007

11-13-07 - 1

It would be nicer if the while() at the end of a do{}while was treated as being inside the scope of those braces, so you could continue or not using variables that are only in that scope.

11/12/2007

11-12-07 - 2

I finally got off my ass and started uploading some of the junk I've worked on in the last few years. Some of the stuff has mod times from January 2006 which is pretty scary; WTF happened to 2007? Oh well.

I put my new "cblib" in the Misc section. So far as I know the old "crblib" (which was ugly as hell) and the newer "Galaxy3" never really caught on with anyone (for actual use as a library), but since I have an audience of zero I'm devoted to updating them with another library that noone will use. Anyway the point of cblib isn't that anyone use it as is, but rather people can look at the code and steal some snippets they like. It's got a bunch of the old stuff cleaned up and unified as well as some hot new stuff.

Some bits you might be interested in :

There's lots of good 3d maths stuff, but it's the same stuff that's in Galaxy3 for the most part. There's really nothing new in terms of 3d stuff, but there are a few little cleanups and fixes compared to the Galaxy3 versions.

Lots of funny STL and C++ ism stuff. If you think this stuff is retarded you can have a good laugh looking at the weird stuff I do. Probably the funniest of these are the next two :

Reflection & Prefs mechanism. The code for this looks rather complex, but it comes out very very simple to use in the client and I'm very happy with how it works. My big poker app uses this system and it roxors the hizzouse. The prefs are very easy to mark up in code, human editable, and the whole system is "Immediate Mode" to use Casey's lingo which means you can do version-conversions right in the reader and nice stuff like that very elegantly. The system is so simple to the client that you can use it without understanding it; if you want to decode some template functor insanity you can try to follow the execution flow.

safeprintf - looks just like printf to the client but validates args (at runtime). I'm mostly happy with this. It has helped me find a lot of bugs already and it does create a pretty nice human readable error that tells you exactly what the error is, like "printf expected %s but got data of type (int)". You could easily use the exact same mechanism to make a printf that does conversions, eg. so you can just pass in your own String and print it with a %s, but I haven't actually done that because I'm not sure if it's a good idea. For one thing that makes it no longer directly interchangeable with printf and that could lead to disasters when you search-replace to change your printf to a fprintf or something that's not patched.

Some useful Win32 junk, like a little DirChangeWatcher file that compactly exposes the ReadDirectoryChangesW that everyone does; the "Metered Section" code that I mentioned here previously, and some goodies in Win32Util like how to make an app that can be either console-attached or make its own console, how to really mess with other apps, stuff like that.

BTW while I'm on the topic, the damn HWND system in Win32 is so fucking hosed. The handles are not unique (they get reused), they can become invalid at any time, and it's not a valid safe weakpointer system so if you are holding HWND's to other apps they can suddenly and with no notification to you either change identity or become garbage pointers. Now of course you should never store an HWND to another app's window in your state, but even if you're just holding one in a local while you do some work on it, a thread switch can destroy you. Stupid OS should've had a proper Smart/Weak pointer system so that my HWND reference was a unique weak reference.

There's a half decent BmpImage class finally; I'm still not delighted with it; how is it that I've worked on images for all this time and never really written a decent image class?

11-12-07 - 1

Yesterday we went out to the Inner Sunset since it was a rare clear sunny day out there. The arboretum / bonatical garden in Golden Gate Park is really lovely. It's a detailed miniature, a densely detailed jewel, riddled with a million paths and tiny discoveries. A few blocks away is the 9th Ave / Irving Street corridor which has got a ton of little family restaurants, some of which are decent, and just a nice functioning neighborhood. I really like it out there, much better than the Mission, it feels really unpretentious, and there are great groceries and bakeries and such that cater to the locals who really COOK instead of the yuppies who read about it in the New York Times. Unfortunately it's godawful foggy out there 90% of the time which I can't handle. Anyway, it might be one of my favorite "tourist day" activities; you can go eat lunch in the Sunset, walk around the arboretum, then go to the DeYoung. Or you could just look at the outside of the DeYoung and go to the Victorian flower greenhouse thingy.

11/11/2007

11-11-07 - 2

I did some random vaguely game related stuff yesterday and put some junk up on my exe page (namely ImDoub), including fixing the broken compile of all my own DDraw toys. It reminded me how much fun that stuff was (the old DDraw stuff). So I started playing around with a full screen floating point 2d drawing engine and was wandering around looking up SSE2 float to int stuff and somehow found myself at Casey's MollyRocket Forums (oddly, one of the top Google hits for float to int was Sean's notes on his Ogg Vorbis work). There's lots of good stuff there and I started thinking how fun it is to work on technology and maybe I should get back into it.

This morning I'm back to cynical. I was thinking it would be fun to just work on an all 2d game with like floating buffers and proper gamma and everything and do some fun image self-feedback like an analog synth, and make the image the actual gameplay, but then thinking a little more about what it would take to make an actual game, it's just glue glue glue and I know I would get bored after a few days. For a game like Casey's it seems like a big waste to do anything at all novel or risky with technology; sure it's fun and maybe it keeps you motivated to stay focused on your game, but really you just need to be getting it done and working on all the PopCap-like retardedness that people seem to love so much. Hell, even with AAA games it's pretty much a bad idea to do much that's novel or risky with technology; the limiting factor for the game being good is almost always content and dev tools and all that kind of stuff. In reality the code bases are a disaster and you have to work with these teams and meetings and the fun high tech code is like the 5% and the vast majority of your time is in the glue, the tools, all that junk. Casey is a unique individual who seems to be making it work, but for a normal ADD person like me, the technology coding is a way to avoid doing all the dumb glue junk that's so boring and is actually what you need to be doing. Lord knows at every job I ever had I spent way more time than I should have on high tech stuff just to keep myself interested.

On the other hand there's working on technology or engines in isolation. That's equally unsatisfying in a different way, you just feel so disconnected from reality, like you're doing all this clever work and it's totally pointless because nobody really needs it and noone is ever going to see it and it may not even ever make it into a single product. It can be really fun for short bursts of time when you're working on something cutting edge and making discoveries and breaking ground, but then the pointlessness of it all sets in again.

There's a pure joy in like - hey I figured out how to do Perlin noise or draw Bezier curves and look I made a little app and it runs fast and it looks really pretty too and hey I can make Bezier end points fly around the screen and put a spring between them and look how fun it is. I absolutely love that work and it's what got me into games. The problem is that real game work is not like that, and I don't know how to make a career out of that kind of stuff. Part of the problem is that you can't because that stuff is easy and anyone could do it and not useful.

I guess I had the exact same problem with physics. I mean I absolutely loved learning about particle physics, and making all these realizations, and figuring out my own ways to derive things, and coming up with clever formulations and connections between things like spin and symmetry groups and all that stuff. But that's not what doing physics is like. Anybody can learn that stuff, and you can't make a career out of learning stuff that other people have figured out. Doing actual cutting edge research particle physics today is not very similar at all to that excitement of learning it, it's very similar to making games, you have the exact same kind of horrible tedious "glue" work (doing tons of hard math, verifying experiment numbers, writing grant proposals, etc. etc.) and then once in a while you get those good bits again.

11-11-07 - 1

Hmm. So, I've often used this rough approximation that gamma on monitors is pretty close to 2.0 , so you can just use square and sqrt to degamma and regamma. Well, sqrt is kind of annoying. So what if you approximate sqrt(x) under the constraints that the approximation is exact at 0 and 1 ? For a quadratic you must have something in the form f(x) = { x + c*x*(1-x) }. This is a cool form, the first term gives us the endpoints f(0) = 0 and f(1) = 1 , and the second term gives us the curve to try to match the sqrt. Now we can minimize the error over the interval {0,1}. If we minimize by integrating in dx we get c = 0.92857. But that's sort of wrong because x is in linear light space which is not what we see, we see more like gamma, which would mean integrating in even steps of y, so if we integrate instead using dy, we get c = 1.03125 Well, guess what's in between? c=1. So a pretty okay approximation is f(x) = 2*x - x*x. This is a rad approximation because it can be done without even any constants.

BTW the inverse is x = 1 - sqrt(1-y)

11/09/2007

11-09-07 - 3

Sometimes when I'm walking around the Mission I like to pretend there are sandworms under ground, and I have to walk without rythm to avoid attracting them. It's really hard to walk arythmically, if you stop concentrating for one second you will slip into a pattern.

I also like to do the little skip-step that they do at the end of Buckaroo Banzai when they're walking around in that big concrete flood basin or whatever that is.

11-09-07 - 2

Ignacio pointed me to this game September 12 at Newsgaming. Go play it now then we can talk about it ...

.

.

.

Ok, so you see it's a little moral game with a message that you discover for yourself. It's pretty obvious what it's going to be right from the beginning. I don't really think that this game "works" in the sense that it doesn't actually teach anyone anything, and it will never convince anyone to change their mind on the topic. That is, people come into the game having a preset idea on the topic, and the game just reinforces that. People sympathetic to the message will go "oh yeah" while people who don't agree will think "this is stupid, it's not like this". Of course the movies of Micheal Moore et.al. are pretty much in the same boat or even worse.

I was thinking about what it would take to make a game that could actually change someone's mind. It's something I've always wanted to do and something I often think of. People are so pig headed, they have some retarded idea, and they can manage to see every bit of news in a way that just supports their preconception, and all the news that doesn't reinforce their preconception they either just ignore or claim is lies. With games, in theory you can put them in the actual position of the thing they misunderstand, and make them actually make a decision, and perhaps they will see the logic of the decision that they disagree with.

One of the key factors to successfully teaching someone in this way is that you have to let them discover the connection to the real world issue themselves. If you show that this is a game about terrorism, or a game about global warming, or whatever - you've already lost. As soon as they see that issue, their head fills with their preconceived ideas, they presume that your game has some certain message, and they're not going to convinced by anything they see. They begin judging the game based on how it fits their preconceptions - either they approve or they think you're full of it - they no longer judge the scenario on its merits.

Instead, you have to present them with a purely logical or immersive situation in which they are making a decision based on either rational thought / logic (eg. if I do move X I get more reward than move Y) or their immersed emotions (eg. I need to save my character's family). That is, they're judging it as a fresh situation seperate from their memories and their political identity.

Once you achieve that, hopefully they can make the connection back to the real world issue. This is a tricky part, because if you're too obvious about it, then they will see the hand in the machine and know they've been set up and reject the lesson, but if you're too subtle they won't see it.

Of course, getting to children is much easier.

old rants