6/30/2008

06-30-08 - 3

Wow, this Meanspeed Music is a pretty amazing crackpot, the kind that thinks up perpetual motion machines and universal compression algorithms.

06-30-08 - 2

One thing I've learned from watching the poker community is that even the most retarded people can do the right thing when given good feedback (direct, quick rewards) and the opportunity for trial and error. Some of the top poker pros are very smart, insightful, hard working, intelligent players. But many are frat boy types that really don't understand the theory and just work hard at it because they want the money, they copy others, and while in most of their life decisions where they don't get direct feedback they continue to be retards, in poker they succeed.

It certainly seems that more gay men are fit (and thus attractive) than the general populace. I conjecture this is primarily because they get more direct rewards for physical improvements. Similarly I've been noticing this weekend with Pride that there are an awful lot of fat ugly lesbians. Surely part of that is because lesbian coupling is not as highly driven by appearance as heterosexual coupling is. People automatically respond to the conditions of reward, just like monkeys being given pieces of fruit when they pull the right lever.

Of course I also can't help wondering if there might be some population selection in the correlation. That is, are ugly girls more likely to become lesbians? Perhaps two girls might have the exact same genetic predisposition to homosexuality, which is presumably some chemical/neurological property of the brain. Whether or not that predisposition is acted upon depends on environmental factors; many people may be 25-75% predisposed to homosexuality and may or may not actually act on it. One of the girls is hot and is rewarded by society with status and attention and many male suitors. Another is ugly and is ostracized by normal heterosexual society. Presumably the ugly one is much more likely to seek an alternative social environment where she is more welcomed. (obviously this is just the same reason kids become "stoners" or "goths" or "skin-heads" or "gamers" or whatever fringe social group where they can be accepted and valued outside of the normal ranking attributes of physical appearance and social fitness).

BTW off topic a bit, but the lesson from paragraph 1 is that if you want to make the general populace do the right thing you need to give them immediate feedback they can understand. This is why people do things like destroy shared resources - if you ask people to actually make a reasonable decision based on thought, they won't. You have to flash a green light and make their score go up and ring a bell when they do the right thing. If you wonder about why people do things that are so awful for the earth - not recycling, driving big cars, littering, living way out in suburbs, voting republican - it's not really a mystery, you don't need to ponder their motives. They're just fucking retarded. If you want them to act in a reasonable way you need to give them direct & immediate feedback; any delay in feedback or any slight obfuscation on what causes the feedback will not work.

06-30-08 - 1

WTF is the problem with fucking academics and how they name their research papers. Everything is called something like "cie99hou.pdf" ; WTF is that? One of the first things I have to do when I download papers is rename them something like "fast_semidefinite_programming_cie99hou.pdf" ; do you people not have long file names !?

6/29/2008

06-29-08 - 6

The NYT still classifies Jazz with "Pop". I suppose that's left over from 1910 or whatever when Jazz was popular music as opposed to sophisticated music. The reality is that these days Jazz belongs in the category with "Classical", since they are both dead forms, and they're more about society functions and people pretending to be sophisticated and nostalgia and image than they are about making music.

06-29-08 - 5

"Secrets of a Restaurant Chef" is a new show on Food Network starring Anne Burrell (famous mainly for being Mario Batali's sous chef on Iron Chef). The first episode was not bad; her camera persona is a bit of a turn off, but hey she actually knows how to cook which is very remarkable for a TV cooking show these days. Unfortunately I have a feeling this series will not last long, Anne is not what middle american stupid suburban housewives want to watch.

Right before watching the show I had this rant percolating in my head about how one of the most common mistakes of amateurs is not browning their food enough. Amateurs don't use high enough heat; you need whopping high heats, big flames; amateurs stick too much in the pan too fast, they just toss in all the ingredients right away, it's better to go in stages and brown each stage; amateurs add too much liquid too soon, they think liquid = moistness, or that dry pans will burn, in reality drying and removing moisture concentrates flavor & makes good browning. Anne covers this pretty well. She also reveals the two biggest "restaurant secrets" : 1. lots of salt and 2. lots of fat.

With "Jamie at Home" we actually have two shows on TV about real cooking. Sacrebleu!

It's funny to look back on the early days of food network, when Good Eats was in real production, we had Molto Mario, The Naked Chef, East Meets West, Melting Pot, hell even the hated Bobby Flay was doing actual cooking on Boy Meets Grill instead of worthless junk like Throwdown. At the time I thought it was a cheezy edutainment network with low information content fluff, but in comparison to the last few years it was down right high-brow back then.

06-29-08 - 4

I watch a bit of Jeopardy, and there are a few things I don't get. The main one is the total lack of reaction of most people at the end of the show. WTF you just won $20,000 and you just stand there? I would be hooting. Even more surprising is the lack of reaction when a defending champ loses. I would be going "fuck fuck fuck" banging myself in the head for being so fucking stupid to miss the question.

The other thing that surprises me is the way people act in the little interview segment. Haven't you seen these little anecdotes a million times? Don't you know that your funny story about your cat is just going make you look like a retard?

06-29-08 - 3

Alissa has a blog. She's a really smart, funny writer, but she mixes in stuff that's very personal and awkward to read. Perhaps she's finally taught me the lesson through example that I need to quit that shit. In my head it's therapeutic for myself and also perhaps interesting for my close friends to read the personal junk I write here, but in reality I think it's just inappropriate for me to write that kind of stuff here. I mean, I always knew it was inappropriate, but I thought it was charmingly inappropriate like Kramer spouting the truth too much.

06-29-08 - 2

Levels of dialog :

Level 0 : defining the terms, just agreeing on what exactly you're talking about, establishing the base axioms that are known to be true.

Level 1 : making the obvious conclusion about what that means or what to do.

Level 2 : Seeing how the obvious conclusion is wrong (or right for a different reason); seeing what others typically think about the problem and how that affects the situation; seeing the real reason why it is the way it is.

06-29-08 - 1

"The Thin Man" has loads of retro charm, people smoking, drinking, racism, sexism (and quaint portrayals of strong women), classic cars and bars, but the enduring appeal lies in the great witty banter.

"Mad Men" is like "The Thin Man" without any of the witty banter.

6/28/2008

06-28-08 - 6

It's a damn shame that J2K didn't catch on. People still don't fucking get it. I'm reading about HD Photo and got this page where the guy rants about J2K and HD Photo and completely misses the point. (of course by missing the point, he makes the point - people didn't understand J2K)

The awesome thing about J2K wasn't that it gave you slightly better quality at normal bit rates, obviously nobody gets that excited about having 40 dB PSNR instead of 38 at 4 bits per pixel. It was the embedded prefix quality of wavelet bitstreams that made J2K a big improvement. That is, you could just output the lossless encoding. Want a smaller file? Just truncate it. This is so fucking rad for many applications, but people never got it, and it was never supported right.

One of the classic examples was digital cameras. There's no longer such a thing as a "capacity" of # of photos for cameras. You just keep taking photos. The first 100 or so are lossless. Then you take another and all your images lose a tiny bit of quality to make room. Take another, quality goes down another microscopic bit. If you want you could take 1000 crappy photos.

In terms of daily use, I would store nothing but lossless J2K on my machine. I never have to worry about picking a quality setting again. I never have to worry about saving a JPEG and then loading it to do more edits and compounding errors. I never have to make internet versions of files. When I want to upload something I just upload the J2K. Smart servers could just terminate the upload when they decide they have enough bits. Or they could accept the whole thing and only serve up a prefix depending on bandwidth. It's so fucking superior.

J2K could've been the in-camera format and it would've provided a lot of benefits even if you typically converted to JPEG when you pulled it onto your machine. There's no need for taking RAW photos if you take lossless J2K in camera. But consumers didn't really drive any demand for it, and camera makers had long pipelines making JPEG-based chips and had no need to devote all the extra engineering to implementing the more complicated encoder. The J2K encoder is a bit complex, and while it was intended for simple camera hardware it's not nearly as easy to encode as JPEG.

Another obvious one is automatic bandwidth customization of web pages. The web server can have a desired max load or something and when it's under stress it just sends smaller prefixes of the J2K files. You could also do really nice quick previews to make the web pages load very fast then pull in the rest of the bits.

A few things killed J2K. Perhaps the biggest was the patent fuckups by all the retards who crammed too much in the standard; this also made the standard unnecessarily complex as everyone in the group tried to get their favorite technology piece in the standard. The other was lack of a good free library for encode & decode being made available quickly. The last was lack of consumer education.

BTW I'm not really a fan of the actual J2K standard; it was overly complex and contained too many different modes and options, like different transforms, lossy and lossless modes, etc. It should have just been one good single lifting reversible truncatable stream.

Bill Crow's HD Photo Blog has lots of goodies in it; it's got good intro material just about HD photography in general, not just on the format.

HD Photo could be a cool thing in various ways. The slightly better compression is pretty meh. The cool thing would be if it actually standardized the encoding of gamma, exposure, and HDR images. While the general public is not going to get this, if it's supported by the OS and the hardware (cameras) it can kind of happen automatically. The camera can tag the exposure information into the file, then when you work with it the OS knows your gamma, and all that junk can be tagged in automatically so that when somebody who actually knows their shit gets the file they can figure out the true meaning of the pixels.

Now, Bill Crow says some things on his blog that are just wrong and quite naive propaganda. He says that the way wavelets concetrate the error in high frequency areas is bad, and that somehow HD Photo's action of spreading error uniformly is better. That's way off. The whole idea of perceptual coding is that you want to put error where it's not noticed. One of the things that makes wavelets great is that they put error in the right place, and the error they introduce tends to be a smoothing, which is visually not annoying. In contrast, HD Photo seems to make blocky errors, and the tests I've seen indicate that HD Photo's human visual error is much worse at the same PSNR.

these guys at some Science news group seem to know WTF is going on.

There are some general things in HD Photo that are interesting to mention.

It does a "lapped" transform as a preprocess. If you search for "lapped image" there are tons of papers on this now. Lapped transforms are a reversible convolution that you can apply to any other transform, but they go best with block-based schemes like the standard JPEG DCT. Basically the convolution takes the lowest bit rate DC signal and changes it from being a bunch of blocks into being smooth bumps. Like instead of the 0th coefficient being an 8-pixel hard step, it's a 16-pixel wide smooth bump. There are a bunch of papers about sticking lapped pre & post processes on standard JPEG, and it improves perceptual error a lot without increasing computation time much at all. Any modern block-based coder should have something like a lapped transform in it.

(ADD : this is not true. In the ensuing years it is now well known that lapped transforms are shit and should not be used. Traditional block transforms + deblock filter are just better. The problem is that lapped transforms screw up your data in ways that you can never get back.)

HD Photo also uses one of the newer lossless "Y-Chroma" color transforms that's based on lifting operations. I think I wrote about this in Rants before. There's a lot of papers on this topic as well. More generally, you could make it so the encoder could write the lifting color transform out to the stream. This would only take a few bits and not cost anything really in the decoder. You can improve compression performance by optimizing the color transform for the given image; it takes a lot of computation so it wouldn't usually be done, maybe never.

06-28-08 - 5

Bleck, I really hate bars. The crowd, the noise, the shitty expensive drinks, the disgusting smells of puke and spilled beer, the bad loud music. I have a lot of trouble hearing people in crowds, it's frustrating to me to even try to carry on a conversation, and the frustration makes me mad, so now I just usually don't eventry. If I'm in a group at a bar I'll usually just zone out and try to ignore the horror around me and go into my head and let the others talk amongst themselves. Of course this doesn't really make a good impression, and kind of makes me a bad boyfriend. On the other hand, if I don't let myself zone out I sometimes get so frustrated I lash out with fighting words.

06-28-08 - 4

In the old days, youth was for hard work. Good jobs were hard to get, you had to be really qualified to get into a good university, and being able to support yourself was not gauranteed. You had to take advantage of the time your parents were supporting you and you had to maximize every early opportunity, you had to study hard, get a job right out of school, and try to move up. You had to scrimp and save, buy a house, have kids, and then maybe when you retire you can relax a bit (thanks to social security). We now think of that life as silly, as "wasting your youth", since when you're young is the best time to party, travel, etc.

A lot of kids now treat youth like the goal is to party as much as possible before you get "old". They think college is just a great opportunity to party and goof off without responsibility, and even the time after college is often thought of as your prime years to take some time out of the system and just travel or live somewhere great and get drunk a lot. There's certainly some merit to this, when you're young your body is ripe, sex is amazing, the social scene is vibrant, you fit in, you can abuse your body and it can handle the punishment (sort of - there are pretty bad long term effects from very heavy drug and alcohol use which kids don't seem to realize). However, they think that somehow when they get to 30 and decide it's time to get serious that they can somehow just quit goofing off and walk into a great job. Of course that isn't true, because their resume sucks and they haven't been learning any employable skills. The girls who were crazy counter-culture partiers often marry a yuppie investment banker type at this point and get him to pay off their debt.

I think both ways are pretty equally retarded. They're both ignoring very clear benefits of the other side. Unfortunately it seems very few people manage both. I don't think they're inherently mutually exclusive, it's more an issue of mind set, it's much easier to have the mind set for one or the other than it is to be flexible & smart about when you're responsible and when you party.

06-28-08 - 3

Is there a decent music visualizer out there? They all seem to be just complete ass. They completely fail to do decent beat detection and separation, which means the visuals don't really feel good, they don't feel locked to the song. It certainly is a non-trivial problem to get right, but you'd think by now it would be sufficiently solved.

06-28-08 - 2

The DMV driving test should be a computer driving sim with a fake car cockpit. It would be pretty cheap and could be fully automated. Instead of the stupid paper test where you do some driving rules, you play the driving sim. You have to execute some basic moves, parallel park, etc, then maybe also throw in some surprise accident-avoidance tests to check reaction time. (the old fashioned behind the wheel test is very rare now in the US because it's very expensive for the government; I never took one myself, and of course you don't take them when you renew, which is pretty critical when you're 80+ years old).

06-28-08 - 1

"Before the Devil Knows You're Dead" was okay; P.S.H. is great as usual playing the creepy pasty repressed/depressed white guy on the edge. The big surprise for me was the bonus Marisa Tomei nudity. Wowza she's still gorgeous at 42. Take a semi-cliched heist gone wrong flick, tell in totally cliche nonlinear format, execute well, and add hot nudity - now that's a formula for success. BTW I got a lol out of Chikipedia

I kinda like the new Presets album Apocalypso. It's a bit like the harder/darker cousin of Cut Copy. Cut Copy is sort of like very early Depeche Mode, and Presets is like later Depeche Mode. Like Cut Copy wears the really loose t-shirt that falls off one shoulder, and Presets has black finger nail polish.

God damn I hate everything about iPods and iTunes. The hardware UI is so fucking awful; I hate the fucking spinny dial, I hate the pop sound it makes in my headphones when I turn it on, I hate how slow and evil iTunes is, I hate the fact that "The Presets" is filed under "P" but they don't change the name to "Presets, The". If it wasn't free I would be really angry. The fact that I can't fucking scroll around the song list smoothly is just absurd. When I change the sort order it doesn't keep me focused on my current item. WTF WTF this is basic UI shit.

I bought an iTrip car-FM-iPod thing. That was a waste of money. It works exactly like it should, it's just unusable. Trying to browse through the iPod while driving is asking for an accident (partly because of the shitty hardware design that doesn't have tactile buttons you can find without looking). The other problem is the background noise. The iTrip signal is plenty loud, but you need a clean FM channel and I can't find one, all the frequencies here are full of really loud static. Maybe out in the country it might work okay, especially with a copilot to work the song selection for me.

6/27/2008

06-27-08 - 4

Basic things I'd like in a new laptop :

eSATA port. Should be SATA internally of course, just expose a hole to me. For some reason this is super rare. I think it's probably pretty easy to plug into the SATA internal and run it out of the case, but that's a bit lame.

Digital video out. Fuck VGA ports. Should be able to do 2560 x 1600 on the external line. Again this continues to be super rare, people keep putting VGA out on laptops. WTF.

Cool and quiet. No monstrous hot desktop bricks like the Sager shit.

Port replicator would be nice, so I can get a docking station at home and one at work and just go snap instead of changing 20 plugs every day. Really only awesome if the port replicator does your video and eSATA too which pretty much none of them do.

Must come with Windows XP out of the box, supported by manufacturer. I don't want to deal with changing OS's and finding my own laptop drivers, I did that on my current laptop and it was not fun.

I'd love it if it was super sturdy and had a secure closing latch and big rubber corners. I'd like to be able to drop it and not break it. Toughbook seems okay but they're super crippled in terms of performance/capabilities.

06-27-08 - 3

The newly reasonable price of gas makes things strange in ways I haven't quite come to terms with yet. For example my drive to ride my bike today cost around $20.

06-27-08 - 2

Jon Blow refuses to work on technology any more, he just does gameplay and the minimum of complex coding to make the game do what it must to be fun. Some see this as defeatist or stubborn. I think it's brilliant. One of the biggest pitfalls for smart coders who go indie and try to make their own game is wasting too much time on technology, getting lost in intricate details, and losing focus on just making the game. Smart coders are inherently drawn to perfectionism and arcane details like moths to a flame, and when they get free of the corporate yoke that kept them from doing things "right" they can finally do what they always wanted and really get into the technology. Good coders also tend to greatly overestimate their ability to do hard technology work, and underestimate the long term maintenance cost associated with new complex technology. Now, in theory you would like to be able to let yourself do a little technology work where it makes sense, but in practice it's like any addictive behavior - it's very hard to actually be logical and only do technology work where it makes sense. It's much easier to just cut yourself off completely and pledge to keep things simple and only use off the shelf libraries and simple coding techniques. Jon seems to have done that and the result looks like it is a great game (hitting an Xbox near you very soon).

06-27-08 - 1

I don't use the LCD on my digital camera at all. It occured to me they could make a really sweet small digicam by getting rid of the LCD, the flash, all the features. All I want is a viewfinder and optical zoom. With no LCD and no Flash the battery could be small and last forever. They do sort of make things like this, but they're super shitty quality, I want a good lens and CCD, I would use it as my primary camera. I really don't understand the point of reviewing pictures in your camera. When I'm taking pictures I just take 10 and then look at them later on the computer and delete all but the best one.

6/26/2008

06-26-08 - 5

The Tour de France is coming up soon now and I'm excited to watch it. I don't even know who the favorites are this year, it's all fucked up by people & teams being kicked out for doping. The actual racing is pretty boring 99% of the time. There are occasional exciting moments like some of the finishing sprints on the flat stages, and once in a rare while there's a heroic battle up one of the climbs (like Contador - Rasmussen in the Pyrenees last year, or that classic when Lance got clipped by a spectator and crashed then sped back).

My favorite part is just all the helicopter flyovers of the French countryside. It's beautiful and it makes me imagine biking through it myself. It's inspiring to watch the pros kick huge gears up monstrous hills and it makes me want to get out there myself and ride harder.

06-26-08 - 4

BTW on the String thing : Ignacio has an EditString/ConstString kind of thin in the NV texture tools open source depot : StrLib.h ; I like how his String just looks like a "char *" and the refcount is at [-2], that's nice for debugger examination.

06-26-08 - 3

Galaxy3 just got a crappy spline simplifier. I also put in some crappy text rendering that I stole from the D3D samples (and fixed bugs; how do people still not understand alpha blending? just because the alpha of a pixel is zero doesn't mean its color value is irrelevant. Interpolation, people!).

I made a movie viewer app in Galaxy3 to view the Netflix movie database as points in 3d, located by the SVD to rank 3. Basically movies that are correlated are neighbors in a 3d space. I fade the names of the movies in & out such that when the font scale is near 1.0 they are opaque and as they get too big or too small they fade out. It doesn't work worth a damn, you can't find any good information by looking at it. Oh well.

The SVD was an okay way to get to 3d, but I was thinking about the general distance-embedding problem. Say you have N points in very high dimension (what dimension is perhaps unknown and you may not even know the coordinates of the points). What you do have are a bunch of point-point distances (more than N, but perhaps not all N*N of them). You wish to find an embedding in some lower dimensional space of K dimensions (such as K=3), such that the distances in K are as close as possible to the given distances.

Obviously if K >= the necessary dimension of the points, you can find an exact location that satisfies the desired distances. In general you can't satisfy them exactly.

You want to minimize the error

E = Sum_ij { ((Xi - Xj)^2 - Dij^2)^2 }
Where Dij is the desired distance between points i and j, and you optimize the set of points X, and the sum is taken only over the pairs where Dij is defined (Dij may be sparse).

I don't think there's any way to solve this directly. What we can do is the old trick of solving for one Xi and pretending all the other X's are held constant, do that for all the X's, that's one step, and then keep stepping until it converges.

Starting from the slightly different error measure :

E = Sum_ij { (|Xi - Xj| - Dij)^2 }
Take deritive in Xi and set to zero, do some algebra and you get :

Xi = Sum_j { Xj + Dij * Unit(Xi - Xj) } / Sum_j { 1 }

Where Unit(V) = V / |V| , and the Sum is over terms where Dij is given and i != j

Now this doesn't look too useful because it's a solution for X in terms of X, but we can play a trick. The X on the right hand side is the X from the last "time step", the X on the left hand side is new X that we get for the current time step.

You can actually see what's happening here geometrically. This is like the Verlet constraint solver that game people use a lot. We have all these pair distance constraints of Dij. To solve for the new Xi, we take each "fixed" point the old Xj, and we make the point that satisfying the distance constraint by walking along the unit vector to the old Xi. Then we just average all these points that satisfied each constraint.

Now that we see that, we can play with this. In particular, we can weight each of the terms in this average. Rather than treat all the other Xj are equal, what we really care about are the points near our Xi. That is, I don't really care much about getting the very large distances exactly right, but I do care a lot about getting the closest points right. In particular I really want the identity of which point is my closest neighbor to be preserved by this mapping. Now that we think of this we can see our original choice if squared distance error was pretty poor. The squared distance error says that it's more important to turn 1004 into 1000 than it is to turn a 4 into a 1. Obviously that's wrong. We should have something that measures the fractional error, maybe

E = Sum_ij { (|Xi - Xj|/Dij - 1)^2 }

In any case, its obvious a decent weighting now would just be 1/Dij. That makes smaller D's much more important.


next Xi = Sum_j { Xj/Dij + Unit(Xi - Xj) } / Sum_j { 1/Dij }

Note that if any Dij are zero, this form snaps those points together exactly, which is good.

This iteration looks good, but there're a few niggles that still bothering me. This thing is pretty sensitive to the initial seeding and I don't have a really good way to do that. I have a hunch this iteration may be prone to getting stuck in local minima too.

I guess classically this problem is called Multidimensional Scaling . In 2000 in Science 290 there were two papers that seem to have shaken up this old problem. One introduced Isomap ( Isomap homepage ) , the other was Locally Linear Embedding . Both are pretty sexy.

06-26-08 - 2

Classic toys are kind of hillarious industrial cast offs. Bob, these springs are way too loose, you're in big trouble! I know, call it a "slinky" and give it to kids! This rubber is too soft. Call it "silly putty" and give it to kids! Then you produce some weird petroleum clay-like paste byproduct by accident. WTF do we do with this junk? Call it "playdoh" and give it to kids!

06-26-08 - 1

I made pork braised in milk tonight for the first time; it was pretty amazing, sweet, very porky, simple clean flavor. basic recipe , or at meathenge . I combined it sort of with a recipe for a Tagliatelle al Ragu and then changed lots of things.

Sear pork shoulder with a tiny bit of butter. Remove from pan. Add lots of butter + lots of onions and garlic. Cook until browning. Pour in 1-2 cups of hot milk. Return pork to pan. Boil to reduce until milk is almost gone. It will curdle, don't worry. Pour in 1 beer. Add 1 tsp cracked fennel seed + zest of 1 lemon. Liquid should come about half way up pork, if it doesn't then add stock. Put in 325 oven for 2 hours or so, or until liquid is almost completely gone. Serve on wide flat egg noodle with grated parm and a drizzle of OO.

BTW it's pretty retarded to change recipes you've never made before. I should always just make the recipe as spec'ed once to understand the baseline before I muck with it.

Conclusion : the porky onion garlic milky sauce and tender meat was top top. As a pasta topping it was lacking, maybe I would saute some extra stuff at the last minute to give me some variety and some more oily saucy something to toss the noodles in. Maybe like artichoke hearts, fennel bulb, onion, something like that.

I made some ghetto meat pies in frozen puff pastry the other day cuz I had extra puff and didn't want to make any more turnovers. It was okay but not worth repeating. I guess it would be a decent sort of party food cuz its easy and cheap and you can make ahead and all that but fuck party food, it's shite.

Frozen puff pastry turnover technique :

Thaw puff per package. Roll out quite a bit. The thickness in the package will make ridiculous thick puff wedges, roll to maybe 50% of original thickness. Cut into squares about 7" a side. Place fruit filling in the middle. Of course apples should be peeled and sliced, and lots of sugar needs to be added to apples, less to peaches. Add cinammon or apricot to apples. This is a good use for vanilla sugar BTW. Dot fruit filling generously with butter. Put as much filling as possible, lots and lots, because it will cook way down. Paint 2 adjacent edges with egg wash, about 1/2 to 1 inch wide. Fold non-egged side over to egg and press together. Crimp edge. I prefer a simple hand crimp by successive folding, but you can fork crimp if you like. Egg wash the top. Sprinkle top *very* generously with turbinado sugar. Almost cover it completely, the Puff doesn't have enough sugar in the dough. Cut very big holes in the top. If you cut small holes or poke with a fork, they will seal back up when the puff does its thing and puffs. Don't worry about making too many big holes, too much venting is better than too little, in fact it's sort of cute to just cut the hell out of the top so that it creates a sort of spring-like open ribbing. Bake at 400 about 35 minutes (start checking color at 30, you want them very brown all over, not brown in parts & pale in others). When done glaze with butter.

6/25/2008

06-25-08 - 2

California's burning (again). I want to go for a bike ride but I'm a little scared since I'm mildly asthmatic. I remember biking in LA when I was a kid; the pollution in LA used to be so much worse than it is now. We lived in Pasadena which is like 10 miles from the San Gabriel mountains, and many days you couldn't see them at all, you would forget they were even there.

Some good sources for satellite smoke maps and such : US Air Quality Blog , National Weather Service SF Area

06-25-08 - 1

Geologic History of CA is quite interesting. So much of the shape of the state is extremely young.

Orientations in LA always got me confused. LA actually points mostly south, and the mountains run east-west. I always felt like the ocean should be to the west and the mountains should run north-south. Well, it turns out it was that way 25 million years ago. The mountains around LA to Santa Barbara are called the "Transverse Ranges" because they run east-west, and they were rotated 90 degrees 25 million years ago as the plates slammed together and all sort of chaos happened.

6/24/2008

06-24-08 - 1

At the beginning of Pig Earth there's a statistic that blew my mind, and I just checked it out at the world's most accurate Encyclopaedia . In 1320 the population of France was 20 million. In 1720 the Population of France was 20 million. In 400 years it didn't grow at all. That's mind boggling.

Just read another one that's similarly shocking. Population of Berlin in 1925 : 4M , population in 2007 : 3.5M

If you look at a graph of the population of any (current) major city in the US or the US as a whole, it's pretty much an undisturbed exponential, we just keep growing and growing. (by current major city I mean LA, NY, Seattle, Houston, something that's still a healthy city, not Detroit, Cleveland, etc. that have died).

6/23/2008

06-23-08 - 2

People who curb their wheels the wrong way kind of amuse me. Of course inexperience with hills is no excuse, it takes about two seconds of thought to realize what curbing your wheels is for and how to do it. When I first parked here I had no idea what the term curb your wheels even meant, but I saw a sign saying "curb your wheels" and my god I figured out what that probably meant and which way to turn it.

Anyhoo, these days curbing to prevent roll-aways seems rather quaint. It is however, very useful still. When you parallel park on a steep hill with a manual transmission, it's very hard to avoid hitting the cars in front & behind you. Now say you parked okay, but when you get back to your car you need to start up from a dead stop on a very steep hill with a car about 2 inches behind you. That's tough. However, if your wheels are curbed tightly it's much easier because the curb keeps you from rolling back, and having your wheels rotated gets you going in the right direction. It means you can put the car in neutral and let off the brake and you don't roll back into the guy behind you, because your wheels on the curb stop you. Then you can gas it and clutch and get going without a big roll-back.

06-23-08 - 1

I've been checking out the Better String Library .

Let me back up a bit. I'm not really delighted with my String. For ease of edits, I really like plain old char []. I even like the null-delimit of C that some people hate. The null delimit is really swank because you can take a big string and split it into substrings in place just by jamming a null, then you restore it by putting the original char back. This is a very common and sweet thing, for example if you want to split a full file spec into the path part and file part you just find the last slash and jam a null, blamo you have path part and file part, then you can get the full file spec back just by going filepart[-1] = '/'; how hot. I also really like the sprintf() way of making strings.

So, what's the problem with char[] ? A few things. One is the static sizes. Mostly that's okay (assuming you use all the "n" versions of functions to prevent overruns, which you probably don't). Even if you do, it's ugly for cases of very highly variable lengths, like emails or something. The other big one is they don't go in containers well. sprintf is very unsafe, but if you use my safeprintf you get a lot of protection against the common errors there.

Now the String I have in cblib is a COW string class which mainly doesn't provide edit functions. My design idea was that you use it for storage, and to do edits you get the cstring and stick it in a char[] and edit, then jam the result back in a String. Sort of like the Java readable string / writeable string. My String is not strictly read-only but it's just a bit of a pain to edit so I rarely do. COW is pretty far out of favor these days but I still think it has a lot going for it. For one thing it lets you just return things by value and pass by value in function args and not worry about making copies. That's very handy. The real reason COW is nice though is that it plays very well with STL containers; you can make a vector < String > and not have lots of unnecessary copying, and you can even just std::sort on it and it's all good. Of course you could get the same benefit by wrapping your string in a ptr, like vector < shared_ptr < std::string > > or something.

Okay, so anyway, the idea of a string class that's very simple and easy to use like char[] but is packed up and safe and containerable like my String is pretty appealing.

"Better String" is pretty close. It's really not like a containerable string class unless you use shared_ptr< CBString > because if you just use vector< CBString > you get copies like crazy. It's really just a wrapped and cleaned up version of char[] which will resize instead of overrun and all that kind of good stuff. However :

It's an annoying thing that it doesn't treat null the same as C strings. If you want to track the length in a seperate variable to accelerate strlen and strcat, that's fine, you can do that and still support null. Rather than having an operator[] that returns a char, you have an operator[] that returns a CharProxy. When CharProxy is assigned a null, it updates the length. If CharProxy sets a null to non-null, it updates or invalidates the length. But this has a problem :

When we work on C strings, we often temporarily invalidate them and this is hard to translate to bstring or any other string class. The simplest example goes like this :

1. int len = strlen(string);
2. string[len] = 'a';
3. string[len+1] = 0;

This is code to stick an 'a' char on the end of string. It looks pretty normal (maybe), but it holds a trap. In between lines 2 and 3 the string is temporarily fucked. We stomped on the null and made the string of indeterminate length. We simply rely on the fact that during this phase of temporary fuckitude, we will be treating "string" only as a char array and not as an actual string. Obviously this is a silly example but this general pattern of temporarily fucking the string and treating it as a raw char array is very common to C-style string manipulation, and IMO is part of what makes it cool.

I dunno, I'm still kind of unhappy. It seems to me that maybe making a solid EditString and ConstString might be the way to go. That was kind of annoying in Java though.

6/22/2008

06-22-08 - 2

What my cycling site would be like :

Casual browsers would be able to type in their city and search. They could search for ride groups, events (stuff that happens on a specific date such as meetings, classes, political stuff, jams), or routes. If you look at routes, you can see the start points on a map like businesses, and they'd be rated by other users. You click on a highly rated route. On the route page, you would see the Google Map overhead route, the elevation profile (with grade %'s), and notes along the route. The route description would be like a Wiki edited by the community. You could click on points along the route to read user comments or see user pictures. If you scroll down you could see member comments on the route with their review rating. You could see if your friends had done the route and what they rated. If you were a member you could also see your own training history on the route - if you'd done it, and possibly a chart of previous speeds (maybe more data if you uploaded from your bike computer). On the side you could see a list of similar routes, like "people who liked this also liked ...". From each person's review of the route you could click on them and visit their blog, see their groups, etc.

Regular members would update the wikis of route descriptions, add new routes (with the simple Google Map style clicking of end points and dragging mid points), rate routes, track their training, track what rides they're doing. In addition to the route pages, you could view your ride history in a calendar format, which would also show upcoming events or group rides you were signed up for. From the calendar you could also graph things like your speeds and weight over time. You could also have your own blog page. You blog page would include the reviews of routes and events that you write, and also any other blogging about your riding that you want to do.

You could connect with other members and see what rides they're doing and what they recommend, send messages to each other, etc. ala Yelp / Myspace / etc. Of course there would be a forum. People would upload pictures taken along routes. Pictures could go into their blogs and also into the route pages. Of course people would want to take pictures of their rides and use their bike picture as their avatar.

06-22-08 - 1

Some random bloggy blog about our camping trip :

Sierraville is a high Sierra ranch town on a big plain; how strange. Hwy 49 between Camptonville and Sierraville is gorgeous, it runs along the North Fork Yuba River in a deep valley cut through the Sierra. The river was running strong still, we stopped randomly along the road on the way back home and jumped in the water (it's super cold snow melt). Downieville is really touristy but looked pretty cute, old downtown, lots of cafes and lots of mountain bikers and outfitters. I guess they run a lot of rafting out of Downieville in the spring; looks like that would be pretty fucking rad. Bassetts is not so much a town as it is one store that sells wood and ice.

The Sierra Buttes is a huge granite craggy set of peaks carved by glaciers or some shit. It's pretty impressive towering over the scenery. The first evening there we hiked up the short 4x4 road from Lower Sardine Lake to Upper Sardine Lake, about a mile. The view of the Buttes from Upper Sardine is amazing, the solid rock seems to grow straight out of the lake. Alissa took a good picture . There are some rough camp spots around Upper Sardine Lake that would be pretty sweet and very isolated; it would take a true 4x4 to get up that road though.

The next day we drove the access road up to Packer Lake which you can take all the way to the ridge top next to the Buttes. There's a good description of the roads at climber.org . Packer Lake Road is paved & a very easy drive way up to the top of the ridge and you can see for miles in all directions. We didn't actually do the hike to the lookout tower on the top of the Buttes; it looked pretty amazing but we're both semi-crippled injured sad people right now.

The actual Lakes Basin area is a bit north, all along Gold Lake Hwy. There are just tons of cold clear alpine lakes all over; the mountains made of giant hunks of rock that were glacier cut, so there are many crags and shear faces. It was alpine spring time, so there were still some patches of snow around in shady dips, and lots of flowers. It's a pretty popular area, even on a weekday it was a bit crowded. I mean, it's nothing like a Yosemite or Sequoia, but it's not exactly wilderness. The short hike to Frazier Falls was pretty mobbed. As usual, however, if you just hike a bit you can get away from everyone. We did the Lakes Basin Loop from Long Lake trailhead by Elwell Lodge, and we did the little detour up past Silver Lake to Helgramite Lake which nobody else does and we were all alone. We took a swim in Helgramite and froze.

Lying in the sun up at Helgramite, the clouds over the rocky ridge suddenly started to glow with colors; first the higher clouds started to glow red and orange, then a bank of lower clouds lit up turqoise and green and blue. We took some pictures (see one on Flickr ), but they can't really do it justice. I guess it was a Sun Dog , which would make sense in the sierra, the clouds would have lots of ice crystals in them which would cause the refraction.

The Pacific Crest Trail runs right through the area past some very scenic wilderness. It made me fantasize about doing some chunks of the PCT some day. I don't really like the idea of carrying a load on my back though. We're fucking humans, masters of the earth, can't I get a donkey or something to carry my gear?

Lakes Basin hand drawn map
Forest Service Lakes Basin Page with a good downloadable map.

We camped at Salmon Creek because we happened to find a really sweet spot there. #33 ; they don't reserve, but if you can get it, do. But, in general Salmon Creek kind of sucks. It's close to the highway, like most of the camp sites around there. WTF I don't get that, we're out in the woods, we drove hours to get there, there's nothing around, then the campgrounds are directly on a semi-busy highway. We checked out some of the other campgrounds around and they mostly sucked balls. That stupid fish-brained fucker Stienstra rates some of them 8 or 9 out of 10 even though they have very poor seperation from neighbors and are directly on highways. The other standout spot was in the Diablo Campground, which is mostly awful, there's one spot (#13) which is really sweet.

I'm finding the best way to scope campgrounds is just with a map. If you have a detailed map of campgrounds ( this atlas is pretty good) you can see where they are. Directly on a road? No. Directly on a reservoir? Probably no, check to see if motor boats are allowed. Motor boat = no me because it attracts rednecks. Check for proximity to cities. No. Okay you have found a campground that actually might be decent. Now just search it on the internet to read about it. When you search a campground name, you can usually get a PDF map of the actual campground layout. From that you can usually tell if it will decent. Is there a single road loop with sites crammed in the middle of the loop? That's bad. Are there a bunch of feathery roads with camps far apart from each other on the arms of the feathers? That's good.

While doing my map scanning I noticed that the Middle Fork of the Feather River is really remote. Hardly any roads get near it. What a prize! Turns out you can do a very intense rafting trip down it.

Places I've scoped out for the future :
Clark Fork : maybe a bit crowded; near Iceberg Meadow
Highland Lakes : looks very sweet, Aug-Sept ideal; good high alpine trails nearby
Loon Lake North Shore, Camino Cove : meh, boats, but supposed to be very nice anyway; good access to Desolation Wilderness
Yosemite Creek : high camp in Yosemite, maybe July
Silver Fork : simple river camp; seems pretty quiet
Pi Pi : lower El Dorado camp, in logging road territory

6/21/2008

06-21-08 - 5

Funny little thing. AAA is a member-owned co-op or something like that. Anyway, because of it, they publish all their financial details in the membership magazine. You can see a breakdown of money in & where it goes. I was amused to notice that AAA loses money on their basic service. Roadside service & free maps and all that cost quite a bit more than they get in membership dues, something like cost $5M, receipt $4M. They make up the difference through the profits on their travel agency and insurance business. So the basic membership is a loss leader. I was kind of surprised, I always figured that AAA worked with the "gym" business model - that is, the people who actually use the service much are very unprofitable, but you make it up with the vast number of people who sign up but never really use it.

06-21-08 - 4

I really like the sounds my Prelude makes, the little tick tick of the turn signal, the soft ding ding if you leave the lights on. I love that it doesn't beep if you fail to put on your seat belt, doesn't beep if you leave the door open or whatever, doesn't honk the horn when you use the keyless entry. It's all subtle and pleasant and informative without being unpleasant. I can't believe how bad most cars are, I could never be in those cars, I would want to smash them every time they beeped or honked at me. I've ridden in many people's expensive cars and they make disgusting rackets with all sorts of loud and unnecessary beeps and dings and honks.

On a related note : the fucking power LED's on electronics just keep getting more tasteless and retarded. If I'm watching a DVD in a dark room I don't want a bunch of fucking 100 Watt super bright blue LEDs on all my power indicators. Fortunately this is pretty easy to fix. Just get the screwdriver, open up your electronics, disconnect the LED, throw it on the ground and stomp on it, then scream curses at the retarded fucking product designers that made you waste your time on this.

In fact, there are very few electronic devices which should even have a power light at all. If it's got a hard switch that you can tell is flipped one way or the other (which it should always have) then it doesn't need a power light. If it has any kind of LCD or other activity indicator, it doesn't need a power light. If it makes noise when on, it doesn't need a power light. The only things that should have power lights are things that don't have on/off switches or may be hard to tell if they're on or not, such as microphones and gamepads.

06-21-08 - 3

Wrapping up my Unicode adventure :

I uploaded new versions of cblib and the ChukSH executables that should handle unicode pretty decently. The main piece of code is a function in cblib/FileUtil.h called "MakeUnicodeNameFullMatch" which takes a char string and does a file search in each directory portion of the path to promote the single byte char strings to unicode one by one. (fixes the flaw in earlier posted code on this page).

I've straightened out a few things. For one the "%S" (capital S) unicode printing is just totally broken, don't use it. Console output is indeed "OEM", so in my console apps I am treating all single byte char strings as OEM, and any time I do any file IO, I use the unicode file IO functions (the single byte char file IO functions would be in "A" code page, so you cannot use them if you treat your char strings as "A"). For example, I do FindFirst/FindNext in unicode, then kick down to OEM single byte to do substring compares to the command line args, then promote back up to Unicode to do a file rename or copy.

Some notes for people using consoles :

cmd.exe seems to do everything "right" in the sense that it displays unicode by converting to OEM code page. The dir autocomplete and "cd" and such all take the OEM code page names.

4NT is just totally broken for unicode. You can't even "cd" into dirs with unicode names. That's sort of okay because 4NT is deprecated and you're supposed to use :

TCC is pretty weird with unicode. "dir" appears to be incorrectly outputting "A" code page names, not OEM, but the console is still OEM code page, so you get bad characters. I believe what's actually happening is TCC is actually putting unicode chars in its screen buffer (since you can drag-select-copy and get the true unicode names in the clip board), and windows is converting those unicode chars to "A", not OEM, for display. That seems to just be a bug. If you drag-select a unicode name and paste it to the TCC command line, it converts to OEM.

06-21-08 - 2

When I'm depressed I like to hole up at home and watch TV and eat garbage. Some people go out and get drunk and have sex with strangers. It's basically the same feeling that leads to both behaviors, and both give you a similar sort of temporary shot of happiness which rapidly turns into regret and self-loathing. I really can't relate to the other behavior, when I'm depressed I feel like a rotten turd, and I feel like I'm transparent, everyone can see right into my soul and can tell that I'm a loser and a coward and a jerk, and I just want to hide. In any case, as much as I can never imagine doing the more social destructive behavior, I envy people who do. It has a slightly higher health risk due to STD's, but it has a lot of side benefits. It gives you funny stories to tell at parties. It gives you familiarity with the sexual quirks of lots of different people. It lets you experiment with social interactions. It gives you a sort of feeling of superiority or "bragging rights" due to all the sex you've had; it makes things that are intimidating to the hermits very commonplace for you.

Last night was another intense short heat wave; I've written before about how the city goes nuts on a hot night. It makes me feel very alone. Slutty neighbor got home around midnight with a cute young blond boy. I was happy to see that she was satisfying her need for male approval with someone who at least looked half decent, it made me sad when I saw the 45 year old short bald guy leave her place.

It occurs to me that just going out and getting HPV and Herpes would be sort of liberating, because after that you really don't have to worry much about STDs any more. I mean Syphilis and Gonorrhea and Chlamydia all suck, but are easily cured and pretty rare, you just take antibiotics, no biggie. HPV and Herpes sure they sort of suck but for 99% of people who get them they're very mild, just like having some pimples. The only thing left is AIDS, but the big secret is that AIDS is actually very rare (in the US, among wealthy white heterosexuals) and especially for men the rate of transmission is very low, even without a condom. So if you just go ahead and get yourself the Two H's you really don't have to sweat STDs any more, just use a condom and go nuts.

BTW you should never end your acronym with an S.

06-21-08 - 1

I'm about 55 pages into Snow Crash and I can't take any more. WTF this book is retarded, why do so many people like it? It's laughable, it's like Stephen Colbert's Alpha Squad Seven, it's like what you would write if you were trying to make fun of the "hacker ninja" stereotypical ridiculous jargon silly personification of the internet genre.

I got "Pig Earth" from the library; it's a John Berger book about peasant life in rural France. Some jackass scribbled notes all over the book, highlighted sections, wrote in definitions of words, etc. He should be punched in the nose and kicked in the balls. People are such fucking scum.

6/20/2008

06-20-08 - 1

Lakes Basin / Sierra Buttes / Gold Lake Hwy area was pretty great. Maybe more later. Some pics on flickr.

6/17/2008

06-17-08 - 4

We're going camping again tomorrow. It's either going to be Clark Fork in the Stanislaus (on the 108 near Dardanelle, between Yosemite and Tahoe) , or the Lakes Basin / Sierra Buttes area off Gold Lake Hwy north of Truckee.

I want to go to one of the high country (8000+ feet) camps in Yosemite, but they aren't open yet. There's a lot of good stuff up Hwy 4 in the Bear Valley - Hermit Valley area, but it seems maybe a bit too early still.

The Highways that cut the Sierra Nevada are rich in wilderness - mainly the 4 and the 108, but also the 88 and 120.

I'm also pretty limited by my car's complete lack of offroad capability, though lord knows Dan & I took it places it never thought it could go. I've gotten it stuck a few times and don't care to do that again. The California Sierra seem to have a lot of the best trailheads only accessible by high-clearance vehicle. I don't care to park a few miles early and walk the road.

Lots of good info at climber.org ; I like how you can browse around there hitting the North,South,East,West buttons. sherpaguides is pretty amazing.

BTW hiking searches are one of the many ways Google is broken. It literally takes me hours to find the pages that have actual content. For example, if you do any search related to Yosemite, 90% of the results will be pages that just show crappy copies of the government's content. Also lots of hiking searches now return pages from fucking hikercentral which appears to be an autogenerated text aggregator that someone cooked up to make money from ads. The shame is that google search even returns crap like that at all.

06-17-08 - 3

I started talking to Google about maybe working in the Search Quality team; I like the idea of working right in the guts of what matters most, plus it seems like an opportunity for me to learn a lot of stuff I'm not an expert in. I see a lot of flaws in search and think I have ideas to improve it, but who knows if I'd really get to fool around with that. I've got a deadline June 27 now so I need to get my shit together and decide.

06-17-08 - 2

strncpy is one of those basic functions that doesn't do what you want. If you use it like this, as most people do :
char buf[256];
strncpy(buf,from_str,256);
You just wrote buggy code. If from_str is actually longer than 256, buf will not have a null and when you try to use it as a string it will hose you.

The way I like to replace library functions now is with a namespace and a using :

namespace my_strncpy
{

	inline void strncpy(char * to,const char *fm,int count)
	{
		::strncpy(to,fm,count);
		to[count-1] = 0;
	}

}

using namespace my_strncpy;
Any code that follows this and calls "strncpy" will actually call my_strncpy::strncpy

06-17-08 - 1

Most of the best hiking and camping in CA is way the fuck up high in the mountains. That's not because the high sierra is the only place with good scenery - it's because it's the only place that nobody else wanted. All the usable or habitable beautiful places lower down were developed. All the wilderness areas that are preserved are not preserved because they're so great, but rather because they're so *not* great for normal uses. (obviously special places like Yosemite, Sequioa are not included).

CA is paradise; the weather, the sun, the lack of rain and humidity, the variety of scenery, there's nothing like it in the US. Unfortunately, everybody knows that, which means it's full of damn people. Actually even 15 years ago I would think to myself "why in the fucking world do people live in Minnesota when they could live in CA?". To some extent that's still true, but there has been a massive exxodus from the middle of the country to the west in the last 15 years. High prices here now keep people out to some extent.

To find ideal spots these days you have to be willing to suffer some minor inconvenience that most people aren't willing to suffer. You can still go to deserted tropical islands if you're willing to take a local flight, maybe catch a little boat, and wind up traveling all day to get there. You can go to amazing places if you're okay with places that aren't easy for tourists, where perhaps people don't speak english, you have to find your way around and figure things out.

6/16/2008

06-16-08 - 1

Bleck, I don't know what to do with myself.

6/15/2008

06-15-08 - 3

It's kind of weird to me, but I actually completely forget what makes me happy. The things I really enjoy just slip my mind and I don't do them. Recently I just remembered how much I love to just sit outside first thing in the morning while I drink my first cup of coffee. I like to feel the morning air, listen to the birds chirping, and read the stupid newspaper. I miss my house in SLO.

Sometimes on a nice day I sit out on the stoop in front of my building. It makes me feel like a real city dweller to sit on the stoop, and I can see the appeal; people walk by and you can say hi to your neighbors or people you know, flirt with girls, or just check out the freaks.

06-15-08 - 2

The situation with wchar is so fucked. There should be a wstring.h that has all the exact same functions as string.h with the same names, but taking wchars. That's what fucking C++ does for you. I guess if you're using std::string you can just switch to std::wstring and that works, but the fucking std::string functions suck so bad, any time I need to do real work on strings I go back to strlen,strrchr,strrev,strtok,etc.

I guess I could make it myself with a bunch of this fucking retarded shit :

size_t strlen(const wchar_t * s) { return wcslen(s); }

BTW it's easy to get a unicode argc/argv using CommandLineToArgvW( GetCommandLineW() ) - but as I said before, do NOT do this! It's an illusion of correctness that is not true. You must take the ansi argc/argv and do the search match to find the right unicode promotion for file names.

How can engineers be so fucking retarded. How did this shit pass review in a code design committee? Why am I not in charge of everything?

Oh, I just discovered this new awesomeness. It's perfectly legal to make two file names which appear 100% identical to the user. There are multiple different ways to make the accented characters, such as in "1-15 Cr�me Brul�e.mp3" ; you can have two file names with have identical display chacters but different unicode names because one of them uses composed accents and one doesn't. Awesomeness. If you take the version of Creme Brulee that's made with composed accents and copy-paste into an ansi text editor, it turns into "1-15 Cre`me Brule�e.mp3" - even though the accented e's are perfectly well representable in the windows "A" single byte code page.

Okay, so rather than deal with this BS I just made an app "DeUnicode" to get rid of this nonsense. It's in exe now.

Addendum :

I should note that "wchar" is pretty evil in another way that I haven't mentioned - it gives you the false illusion that you are solving the problem, and that one wchar = one visible char, but of course that isn't true. 16 bits isn't enough for some languages, so you still need composed chars or escapes.

There's some appeal to using UTF-8. It lets you still use normal string storage and compares and such. You still have a little bit of an issue to interact with a console correctly.

Also printf with "%S" (that's upper case S) doesn't do at all what you want. It supposedly takes wchar strings, which it does, but it doesn't actually covert them to oem code page to printf to a console, so you just get gunk.

The "dir" in CMD seems to be converting to OEM which is fine. The "dir" in TCC seems to actually be trying to show the unicode, but the non supported chars show up as squares. If you select-copy the name in TCC you seem to get the true unicode file name, but if you paste that to the command line, it converts to OEM. (FYI, TCC is the successor to 4NT, it stands for Take Command Console)

06-15-08 - 1

I spent my very early coding days making a lot of libraries and not ever really making useful apps with them. It's sort of what I crave to do, it's a very satisfying form of mental masturbation for the type-A OCD coder inside me. To fight that I really don't let myself go off and do that too much any more, and I think maybe I fight it too much. There are some basic libraries that I don't have that I would find very convenient.

1. A standard set of functions for working with file specs and paths, and for doing standard command line app type arg parsing, file spec qualifying, renaming, etc.

2. A standard very basic 3d app harness and 3d drawing utils. How in the world do I not have this?

6/14/2008

06-14-08 - 3

How Windows File Name and Charset Handling is Fucked

I've started getting files with unicode names and am discovering that lots of old apps crap out very badly with them. I mainly get these in mp3's where the damn music database decides it's going to do all the correct accenting and it's not possible in ascii. Some old apps that don't support unicode names throughout will crap out.

Usually this happens when apps enum the dir and see the files, grab the names in ascii, and then try to do something to the file - and windows refuses to find it. Windows isn't nice to you, it won't let you open the file with the ascii version of the name where you just crammed the unicode into ascii. All the old POSIX dir enum stuff that's just ascii like readdir is thus useless and old unixy command line tools break badly.

(BTW I'm using "ascii" wrong in these first paragraphs, I'm going to try to refer to "single char strings" in the remainder; so far as I know there's no good standard way to refer to single byte char strings of indeterminate encoding)

Okay, so I've done a bit of research and the result is even nastier than I thought. First, let's talk a bit about character sets.

The "wchar" in Windows is unicode, I believe it's UTF-16. Note that there can still be composite characters in UTF-16, it's not necessarilly one short = one character.

The "A" in Windows means a single byte string, but it's not exactly ANSI or ASCII and it's also not UTF-8. What it is, is an encoding in the Windows Code Page. That can actually change depending on your locale settings. By default it is "Latin 1" which is similar to ANSI but not quite the same.

Now, just to have even more fun, if you are writing a console app, you also have to deal with the "OEM" code page. It has nothing to do with an OEM, it's really just the DOS code page. Note that this is also a single char code page, but it's not the same as the "A" code page. If you printf stuff, it will use the OEM code page. If you just take "A" chars and put them in printf, some weird junk will come out.

In practice for English, the OEM code page is basically a subset of the "A" code page, the low 128 chars are the same, so you can take OEM strings and cram them into "A" strings and you think everything is fine. But it's not, because the file names won't be the same. When we usually talk about "ascii" we are sort of vaguely referring to single chars that are either OEM or A strings.

External reference : Michael Kaplan on OEM & A code pages , there are a few pages on this over at "Old New Thing" : such as this , and this , and a a page at smallcode .

Okay. But none of these people really address how this is fucked and how to deal with it.

1. You cannot really convert between OEM and "A" file names. That is, if you have some Unicode string and you convert it to OEM and "A" versions, you will get two different results (sometimes). Now if you take those different results - there is no way to get between them at all. If a user does something like "dir" in a DOS box, they will see the OEM names. On the other hand, if they look at the names in Explorer and do a copy-paste of the file name into a (non-unicode) text editor, they will see the "A" name. The A name and OEM name are now just both char strings and there is no function that will turn one into the other.

2. When you use something like FindFirst/FindNext , Windows will give you the "A" versions of the file names. So far as I can tell these "A" names are made using this call :

WideCharToMultiByte(CP_ACP,0,from,-1,to,maxlen,NULL,NULL);

(*) it's important to me to know exactly how Windows makes the "A" names; this appears to be it, but it would be lovely to get confirmation. Note that with composite unicode names, using WC_COMPOSITECHECK|WC_DISCARDNS will give you much prettier looking "A" names, but you can't use that because it's not the same thing that windows does. Note that you may be tempted to try to pretty up the names for display, but DON'T because you want the user to be able to copy the name you show and paste it and have it be a valid file name, so you must use the standard convention at all times.

3. Windows will *SOMETIMES* accept the "A" versions of file names for file IO functions. This is easy to test. Run FindFirst/FindNext over a bunch of names and try to fopen them all. It works with all the simple names, and sometimes it works with weird unicode names, and then sometimes it doesn't work. Yay. I believe that the failure cases have to do with composite characters. With the weird file names that fail, I have not been able to find any "A" encoding of the name that will succeed in fopen.

This #3 is actually a pretty horrific problem. It means that legacy apps will actually fail to open some files. For example even the plain DOS copy and move will fail. This can make your apps very confused and can cause you to lose data.

4. Just to be clear - even files that are not even unicode have some of these problems, when the "A" and OEM encodings are not the same. For example : "� g�r.mp3" , is not unicode, that's the "A" encoding, the "OEM" encoding is "I g�r.mp3". And if you just take the "A" encoding and output it with printf and don't convert to OEM, you display "- g�r.mp3"

Okay, so like obviously this is pretty fucked and you should be well scared and hating MS right now. It would've been pretty trivial to make an "A" equivalence for file names that always worked, but they didn't. It's pretty obvious that FindFirst/FindNext should always give me names that function even in "A" mode, but they don't.

Alright, so you decide to bite the bullet and do everything in unicode like you're supposed to (including converting Unicode to OEM before doing console displays). You think that's grand, until you start taking command line arguments. Now you're back in the world of hurt, because users can pass in file names in various encodings. It's perfectly reasonable to do something like "dir" and then copy-paste a name (in OEM encoding) and use that as a command line argument. Or they might just use the cmd shell name autocomplete (which appears to also be OEM encoding). But your app could also be invoked directly from someone passing unicode args, or passing "A" encoded names.

Note that you could have this problem not just with command lines but of course any time you take text input from the user, they might paste in file names from any encoding. Also note that while you can get the Unicode version of the command line, that doesn't really solve anything because the most common case is that the user is not actually typing in correct unicode commands.

The best solution I have to this is to work internally all in unicode and whenever you get input in a char string, try to convert to unicode.

Of course there is no function to convert a char string to Unicode and match the file name that you want. (if you just blindly convert the char string to unicode, it will not match the file name). The best solution I have is to search the dir containing the file name to find the unicode name that converts down to the char string. Of course in general there could be multiple unicode names that map to the same string and we should check for that and scream loudly about ambiguity, but if that ever actually happens you are super fucked anyway.

Here's the code for GetUnicodeFileNameFromMatch. This is imperfect in a few ways if you want to fix it. First of all, it only works with bad unicode file names - not bad unicode dir names. To make it work for dir names too you should start at the drive root and search each dir up the path spec and match as you go. Second of all, it only works for full file names, not partial files and wilds. Ideally it would be able to match not just full strings, but substrings. eg. if somebody does a DOS autocomplete on a unicode name and then deletes the first few and last few chars, I want to still match the internal substring and get the unicode equivalent.

This also provides a way to correctly convert between OEM and "A" encodings. Take the encoding and use Match to find the unicode file name, then convert to the other encoding. This also lets us do a nasty way of avoiding making our whole app unicode. First take command line args (OEM) and promote to unicode then convert to "A" encoding. Work internally entirely in "A" encoding. Right before doing any file access calls, use Match to find the true unicode name.



void StrConv_AnsiToUnicode(wchar_t * to,const char * from,int maxlen)
{
	MultiByteToWideChar(CP_ACP,0,from,-1,to,maxlen);
}
void StrConv_OemToUnicode(wchar_t * to,const char * from,int maxlen)
{
	MultiByteToWideChar(CP_OEMCP,0,from,-1,to,maxlen);
}
void StrConv_UnicodeToAnsi(char * to,const wchar_t * from,int maxlen)
{
	WideCharToMultiByte(CP_ACP,0,from,-1,to,maxlen,NULL,NULL);
}
void StrConv_UnicodeToOem(char * to,const wchar_t * from,int maxlen)
{
	WideCharToMultiByte(CP_OEMCP,0,from,-1,to,maxlen,NULL,NULL);
}

// GetUnicodeFileNameFromAnsi
//	from name must be a full path spec
//	does a search for the uni name that matches the ansi
// only works if the dir names are ansi !! does not support uni dir names !!
enum EMatchType
{
	eMatch_Ansi,
	eMatch_Oem,
	eMatch_Either,
};
bool GetUnicodeFileNameFromMatch(wchar_t * to,const char * from,int maxlen,EMatchType matchType = eMatch_Either)
{
	// have to do a search :
	
	const char * filePart = strrchr(from,'\\');
	if ( ! filePart )
		return false;
	filePart++;
	
	char findSpec[1024];
	strncpy(findSpec,from,1024);
	
	char * lastSlash = strrchr(findSpec,'\\');
	if ( ! lastSlash )
		return false;
	
	lastSlash[1] = 0;
	strcat(findSpec,"*");
	
	wchar_t wFindSpec[1024];
	StrConv_AnsiToUnicode(wFindSpec,findSpec,1024);
	
	WIN32_FIND_DATAW data;
		
	HANDLE handle = FindFirstFileW(wFindSpec,&data);
	if ( handle == INVALID_HANDLE_VALUE )
	{
		return false;
	}
	
	do	
	{
		// process data
		bool match = false;
		
		if ( matchType == eMatch_Ansi || matchType == eMatch_Either )
		{
			char ansiName[1024];
			StrConv_UnicodeToAnsi(ansiName,data.cFileName,1024);
			match |= (strcmp(ansiName,filePart) == 0);
		}
		
		if ( matchType == eMatch_Oem || matchType == eMatch_Either )
		{
			char oemName[1024];
			StrConv_UnicodeToOem(oemName,data.cFileName,1024);
			match |= (strcmp(oemName,filePart) == 0 );
		}
	
		if ( match )
		{
			wcscpy(to,wFindSpec);
			int len = (int) wcslen(to);
			len--;
			to[len]=0;
			wcscpy(to+len,data.cFileName);
			FindClose(handle);
			return true;
		}
	
	}
	while ( FindNextFileW(handle,&data) );
		
	FindClose(handle);
	
	return false;	
}

06-14-08 - 2

Two weeks ago I decided I was drinking too much (booze) and I should stop for a while. Well, I did, and it really wasn't hard at all. I didn't miss the buzz at all, in fact it feels nice to be clear headed and strong. What was hard was eating dinner without the right accompaniment.

For "bar food" like burgers or hot dogs or peanuts, beer is the perfect partner, the bitterness of the hops balances the heavy fat, and the sweetness of the malt accentuates the sweetness of the caramelized sugars in the food, but I can sort of be okay with soda as a substitute there.

With French and Italian food I just can't find a substitute for red wine, and the food just doesn't work without it. I take a bite of spaghetti carbonara, my mouth is full of cheese and garlic, now I need something to balance it, I take a sip of water - bleck, fuck, yuck, it doesn't work. It needs the acid and tannin of the red wine to play counterpoint. You have to go bite-sip-bite-sip. The problem is if you eat a ridiculously large amount, as I do, then you wind up drinking an awful lot too, which is not always what I want.

06-14-08 - 1

I'm really digging "Fleet Foxes" and "Band of Horses" but wow they just completely rip off My Morning Jacket. That's okay with me cuz I love the classic MMJ sound.

[Kontrol] is an SF DJ group that does minimal tech stuff. Follow the link and browse around, they have a ton of big mix mp3's to download for free that are very good if you like the minimal techy sound.

The other SF group I really like is DirtyBird . Again on the link there are bunch of big free mix mp3s. DirtyBird is more standard house, but it's tasteful, good quality.

The Satellite SF guys have a good weekly and lots of free mixes to download : here

There are lots of other big name SF DJs, like Mark Farina, M3, Miguel Migs, David Harness, Dimtry Mykonos, all of whom I think are total crap. They play "funky house" and it's just gross, tastless, big beat junk.

Most of the Burning Man related groups, like Green Gorilla and Space Cowboys are pretty meh to me. I do generally like the Opulent Temple stuff (Opel Productions). There's a good free mix by Syd Gris (Opel) but I can't find it now with cursed Google. There's also a good mix by Myles Egner I like but I can't find the download link to give you.

6/12/2008

06-12-08 - 6

People keep making fucking cords where the cord is attached to the device via its electrical contacts, so if you pull on it the tension is transferred directly to the electrical connection. That's so fucking retarded and trivial to fix. You just need to loop the cord back and afix it to the body of the device so there's slack between the tension point and the electrical contact. This of course is easy for you to do at home and is a good idea when you buy a new device.

Headphones are one of the classic perpetrators of this flaw. That's easy to fix with some electrical tape and you will be happy about it later. Black twist ties work too. In many cases you can also loop the cord back and just make a little knot around the device. My coffee grinder also has this flaw. More annoying, my digital probe thermometer has this flaw, and that's a bit harder to fix. I can't use tape because it has to live in a 500 degree environment.

06-12-08 - 5

I fucking hate flies on boxers; my dick is always popping out and it's both uncomfortable and indiscreet. On the other hand, flies on tighty whiteys are very important. Not that I ever actually poke through the hole to pee, that is weird as hell. The fly on the whiteys is important because it's a flexible basket for the junk. Since it's not sewed it can spread as necessary like a camera iris or something, in a way that no flyless whiteys can. I sew a lot of my boxers shut but that's an awful lot of manual labor for underwear.

06-12-08 - 4

There's this weird thing with apartment repairs, where if I bug the landlord and make them fix a problem while I live there, I don't get charged for it, but if I just live with it and move out and they see the problem in inspection, then I get charged for it. It forces me to be way more of a pest tenant than I want to be. Most little things I would just live with.

06-12-08 - 3

Sunny day per year count. South San Francisco : 160. Seattle : 70. source

Sunny days per year for working stiffs (2/7) : SSF : 46 : Seattle : 20.

Currently I'm (potentially) alive 160 days a year. It's hard for me to imagine really only being alive 20 days of the year.

Part of what makes this area so fucking perfect for cycling is that with all the microclimates you can get the perfect temperature just by driving 30 minutes. A bit cool out? Palo Alto will be perfect. Summer heat and you want it cooler? Head to the coast and ride the 1, or up to Marin. Winter and it's quite cold? South or east will still be hot.

06-12-08 - 2

I just finished "The Apprentice" by Jacques Pepin, which was very enjoyable. Alissa doesn't think it's engaging for someone who's not already a Jacques fan. Some things I like about it : Perhaps foremost is just his personality, how sweet and fun loving he is, his joie de vivre, his true love of cooking. But it's more than that. He has a depth of experience and a perspective that is quite unique.

Jacques went through a traditional apprenticeship, which never happens any more. It harkens back to an older time when young boys would go to learn a trade by working for free for a blacksmith, or a cobbler. It gives you a depth of appreciation for the basic techniques, because you had to do them for years. It also produces admirable knife skills and sensitivity (he learned in the days when baking was done in wood burning ovens with no thermometers; to tell if the temperature was right or anything was done required feel and experience, not precise formulas).

When I was growing up "Nouvelle Cuisine" was something that was roundly made fun of. It was a standard joke on sitcoms right next to the toilet seat up and how people of various races drive. In the joke, nouvelle cuisine was a tiny portion of something very simple served on an enourmous white plate. Certainly that ridiculous stereotype did exist and the practitioners went a bit overboard, but it makes us miss how important nouvelle cuisine was. I, like many food lovers, have read the history of the classic recipes from the time of Escoffier and laughed at how ridiculous they seem now. Armies of chefs preparing these elaborate food scenes, and yet all brown, all glace and butter. Thinks like fish stuffed with langoustine and puree of scallops, baked in a salt crust that's carved to look like the fish, and presented with potato puree rolled in truffles and carved to look like heads of coral. It's this bizarre superlative iteration under constraint. Like you're only allowed to use meat and potato and mushrooms and butter, everything has to have a typical gravy like taste, and now spend as much time and money as you want to make it as fancy as possible. This classic style french food doesn't exist any more, all modern high end restaurant food (the generic CIA style we get so much) is a descendant of nouvelle cuisine.

The book actually reminds me of Papillon a lot. Partly it's the style of the way anecdotes are crafty, slight exaggeration, and a kind of bragging that's quite charming. Mainly it's the attitude that every challenge is an opportunity for adventure, and even disasters (Jacques was in a really severe car crash) are something you face so you can get back to fun.

It makes me think of the life I wish I had - hanging out with great chefs, doing food related adventures like gathering mussels or wild mushrooms, trying to do a huge clam bake or cook your own whole cow head to make tete de veau, and having some of your experiments go horribly wrong. What fun, that's an ideal way to live for me.

06-12-08 - 1

I'm reading through Alton's book "I'm Just Here for the Food: Food + Heat = Cooking" (one of the worst titles in the history of food writing). I got it when it came out and glanced through it but never really read it. I only consulted a recipe or two over the years. It's pretty meh as a cookbook for recipes, but it's actually a really entertaining read straight through. He covers a lot of the same ground that he's covered in the TV show, but there are plenty of other little entertaining tidbits, stories of experiments he's done to test out different temperatures and methods, etc.

6/11/2008

06-11-08 - 2

Montara Beach and Graywhale Cove are pretty sweet, isolated, sandy beach with steep cliffs all around.

I've done a few rides recently, my first of the year. Holy crap! I forgot how good it feels and how much I love it. The sun, the scenery, my body and the machine, the coating of sweat all over me, the hypnotizing rhythm of the pedals, the way the tension bleeds out of me around mile 15 and suddenly I feel fast and smooth. When I get back from a ride I'm actually smiling and cheerful and pleasant; who knew I had it in me !?

my bikely paths . Bikely is pretty fucking god awful in every way, but it seems to be the best we have at the moment. I mean I can't even begin to list the fuckups with it it's so broken.

I guess bikers aren't enough of a community to make a decent biking web site? No, that can't be true. This is a huge Web 2.0 opportunity waiting to happen. It also ties in very well to adds because you can sell bike gear. You have a big forum, review new products, have a map making and route sharing setup, tied into the Web 2.0 so people can review routes and share them with each other, you coordinate groups and group rides, etc. You'd probably get more press profile by tying it into urban biking and gas conservation and commuter advocacy and all that nonsense, though that's a little bit of a tough dance because the serious recreational cyclists and the urban hipster cyclists tend to be antipathetic communities. We could have experts writing articles, but more geared toward beginners and well organized; there's not a single good cycling web site out there that I can point people at. Sheldon Brown of course has great stuff but that site is a mess. There is no great site for routes, just lots of little messes. My theoretical Web 2.0 site could gather people's cycling blogs together too, connect them to the shared route maps, and also have training / progress tracking for fitness.

06-11-08 - 1

I've been thinking a lot recently about the French way of living, with a flat in the city and a weekend home in the country. All the middle-upper class in Paris who live in the city will have a nice flat in town where they spend the week, then a country home out an hour or two away in a little village. It seems pretty ideal to me, the best of both worlds. And it's really not that much more expensive than the American way of just having a big home near the city. For example, in SF it would be $1M+ to get a decent home in the city. Instead you could buy a condo for $600k and also get a cabin in the Sierra for $400k. The bigger problem in SF is that to get to country that's both cheap and desirable you have to get really far away from the city, perhaps a bit too far for a weekend. You certainly could have a weekend home in a place like La Honda to the south or Tomales Bay to the north, which are not super far and surprisingly still very rustic, but they are no longer cheap.

The country home should have a vegetable garden, a big herb garden (mainly of perenials like thyme, marjoram, rosemary, tarragon, sage), fruit trees. Lately I've been eyeing the wood burning brick oven that Jamie Oliver's got but I would probably tire of that. I'd like to be able to bike right out of my house onto good country biking roads. It should be isolated or protected with enough shrubbery that I can walk around my yard naked all the time. (don't ever use a weed whacker while naked; also make sure to check for ticks).

One thing I've always wanted is a more social kitchen. I like to hang out in the kitchen, but my girlfriends are usually scared to get in there with me because it's a small space and I'm a bit of a whirling dervish at work. I'd like a big inviting space. Recently I've realized one of the crucial things that would be cool : having two seperate gas ranges so two people can work without being in each other's way at all. They shouldn't be right next to each other either, you could have the rack of pans and tools in between the two ranges so they are convenient to both work stations. The other huge thing that most home kitchens get wrong is insufficient ventilation. You need functioning fume hoods so that you can sear the fuck out of stuff and make a bunch of smoke and have it all sucked away. Part of this is not just the fume hood but the entire air flow design of the space; quite often your only window is adjacent to the stove. That's very bad, because if you turn on the vent fan and open the window, the air is sucked directly above the stove and out the vent. What you want is a window on the opposite side of the room so that air comes in, across the stove and out the vent.

I guess one problem with the two house method is US tax laws give you a break only for primary residence. Another is that condos in the US tend to be shitty, unlike the old flats in European cities.

BTW that reminds me of an interesting thing I heard on NPR the other day. The guy said that our perception that people used to build things better in the past is mainly due to sampling bias. That is, what we see today is not a representative sample of old buildings, since most of them have burned down or simply been torn down for new construction. What we see are the very best examples from each period that were strong enough to endure or were preserved because of their beauty. I think it's certainly an interesting point, and worth considering, and perhaps is true on other topics, but I think he's actually wrong about building. Obviously we have lots of new technology, but even with it the average home of the upper middle class now (such as your typical McMansion) is shit compared to the home of some lower gentry of yore.

6/10/2008

06-10-08 - 4

We went to Henry Cowell yesterday to check out the swimming. It was pretty good. There are lots of nice big swimming holes, big enough to swim laps in. decent guide to holes , good map showing holes Misc notes :

There are trees all around the river and the river runs north-south, which means you only get full sun exposure for maybe 3 hours in the middle of the day (east-west rivers get more continuous sun on the north bank). It takes about 80 minutes to get there from SF if you drive fast. It's like 5 minutes from Santa Cruz. The main swimming hole is called "Garden of Eden" and is a very short and easy walk from the road. The combination of easy access and proximity to Santa Cruz mean it's jam packed with people, both locals and college kids. It's not worth going to the main hole. Direct access to the holes is easy from the many parking spots along Highway 9 between Felton and SC. There's no need to pay the park day use fee or go into the main part of the park at all. Another major hole is "Big Rock Hole" that you have to hike about 2 miles to get to, starting at the Rincon Fire Road gate. I thought maybe that hike would make it more empty, but there were a ton of cars parked at the gate so we didn't check that out, maybe they all went to "Frisbee Beach" and not Big Rock Hole so maybe that would've been a good spot.

On the map there's only official parking at the Ox Trail gate and the Rincon Fire Road gate, but in reality there's parking all along, and most people park very close to Garden of Eden and cut down. Don't do that, it's a short walk from Ox Trail gate and there's no need to add to the erosion. It looks like "Ox Trail" is separate from the railroad, but actually it runs right along it. Also the railroad actually runs right along the river edge, so as you walk you can spy the river and check out the holes. There are various little paths people have cut down the bank - do not take them. They're really badly eroded and hard to climb, and it's also pointless. Just go down to Garden of Eden, which is well signed and easy to walk, and from there it's easy to walk along the river bank upstream to more holes. We went about 200 yards upstream from Eden and were alone almost all day.

I don't think the main holes are really worth a return visit due to overcrowding and excessive ease of access, but the river is very promising. I'm sure there are plenty of other holes that aren't so well known, and with a bit of scrambling around on rocks you should be able to get a secluded swim.

On the plus side, Henry Cowell is a pretty setting, lots of nice redwoods, a rich smell of redwood in the air, some decent trails and one hike to a view. It is a small park that is everywhere very near civilization, but you can occasionally forget and feel like you're far out and alone.

p.s. hole crap Santa Cruz is so bizarre and trashy. I actually sort of like the run down beachside carnival town aspect, but now it's got yuppie gentrification randomly scattered around it, with brand new condos and the big strip of chain store shopping which creates a really bizarre contrast. Scott's Valley is even worse. It seems to have sprung up over night and is now a tract-home + big-box-store suburb plunked down in the mountains.

All the trash left around these popular river swim spots really hurts my fragile faith in humanity. I start feeling okay about people again, I think, hey there are actually people who appreciate nature and get out and do fun things with their time, these are my kind of people. Then they go and fuck it up. It's not just that they fuck it up, it's that it's so purely destructive and retarded. It's not even the usual way that humanity fucking sucks - if people can give themselves some small pleasure at great cost to others, they generally do it. Okay, I've come to know and accept that, though I'm not happy about it. But this littering in nature, it's not really even much of a pleasure to the litterer, it's just a purely destructive asshole thing to do. Even among the decent subset of humanity that actually gets outside, a large percentage of them are fucking dicks. Sigh.

06-10-08 - 3

I think the hubbub about Tibet is rather otherblown. First of all, just because a part of a nation would like to be independent and secede is no reason to support them. Even if their parent nation has laws and policies that are rather onerous to the group that wishes to secede, that's still no reason to support them. There are countless groups around the world that would love to secede. The Kurds in Turkey and Iraq, the Tamils in Sri Lanka, the Indians in Southwestern Mexico, etc. etc. Some of these groups have much better cases than the Tibetans, but it's unclear when the international community should get involved in supporting independence for sub-nations. One reasonable criterion is to support independence when severe human rights violations are being inflicted on the sub-nation by the parent nation. So that's the question in Tibet. The news is a bit hard to parse, because obviously the official Chinese news is garbage, but the Tibetan partisan news is pretty questionable as well, and independent western journalists aren't allowed in the area much. From what I can tell, the human rights violations against the Tibetans are not any worse than what China is doing to the Falung Gong sect, or to anyone who criticizes the government.

06-10-08 - 2

When you pull up in the left turn lane in a tight intersection, don't pull all the way to the front, hang back about 10 feet. This doesn't hurt you at all and it greatly improves the flow for everyone. (quite rare, not many do this)

When some retard has got themselves stuck in the middle of the intersection, don't squeeze right up to them and box them in, give them space and let them get out. It's much faster for everyone. (not super rare, nice people do this)

When you park on a line of cars, and you are the last one that can fit on the available curb space, don't pull right up to the car in front of you. Instead, park as far back as you can on the curb, potentially leaving some space between you and the next car. This is significant because parked cars are not permanent fixtures. (I've never seen anyone but me do this). Quite a bit more people get this one right when they are parking on the front of the line, presumably because if you put something right in front of someone's face they tend to go for it.

People are so retarded.

06-10-08 - 1

We went to Tilden last week to check out the swimming at Lake Anza. It sucks balls. It was a weekday and still loaded with yelling children. That wouldn't be awful, except you're only allowed to swim in the little swim complex area, and they actually put lane dividers out in the lake to cordon off a tiny area that's like maybe 1 acre, but looked more like half an acre.

Doing some research - the East Bay actually has a ton of swim lakes, which seems like it should be awesome, but all of them seem to be fucking lame like Anza where you're not allowed to swim anywhere in the lake.

The one exception is Del Valle out near Livermore. That actually seems pretty awesome, it's a big lake and you can swim anywhere in it. A few problems though. 1. Motor boats are allowed. 2. It's pretty far from here. 3. It's 92 degrees there today.

One highlight at Tilden - we layed out in a field for a while and watched a feral house cat hunting.

old rants