11-30-09 - Some more bike notes

There really is a *huge* seasonal variation in the used bicycle market. I knew this, but I thought it was a small factor; no, it's massive, particularly in the low end. There are just tons of cheap old bikes for sale right now for under $200. I have one I'm trying to offload and I've got zero interest. You just cannot sell old bikes right now. Conversely in the summer when I was looking at buying bikes, they were few and far between. If you ever have any ability to time your bike purchasing, do it. Also, bike shops are slammed in the summer and often low on stock. They will not give you good service and if they sell you anything it will often not be what you want. Much better to go in the winter, and they will very likely negotiate quite a bit on price with you in the winter.

I just shortened chain on my new bike again. Turns out I put it on way too loose. I think particularly with a compact double (because there's a big difference in ring sizes from 50-34 vs. 53-39), you really need the chain to be absolutely as short as possible. That means big ring to big ring plus one link. You really do not need any slack for the derailleur at all - the derailleur can move to the chain. And you will never really ride big-to-big. The problem I was having was chain slip when I was near the little-to-little rings. I now know this was because I had too much slack in the chain (riding little-to-little on a compact double with a pretty big cassette range isn't a great idea in any case).

Some tips on buying a good old used bike : I think the best bargains are actually in pretty recent low end bikes; 2-5 years old, generally aluminum, they just have zero sex appeal so there's no markup. You can get used road bikes from chinese brands like Giant or the Performance Bike generic brands with Tiagra level components for $200 and they will work better and be lighter than very expensive old bikes. If you want an older sexy steel bike, here are a few tips :

1. In general you want to look at bikes from about 1985 - 1995 ; after 1990 would be preferred. If you get a bike that's Shimano components post about 1985 , that will give you compatibility with the whole modern generation of components - all the recent generations of 8 & 9 speed pretty much work back to that era (new 10-speed stuff doesn't). Avoid old Dura Ace stuff, though you probably won't see it. Avoid the older "ten speed" era bikes. Avoid French bikes at all cost because they have weird and annoying compatibility problems that make parts much harder to find and more expensive. Avoid old Campagnolo unless everything on it works perfectly.

2. I think Japanese bikes like Bridgestone and Miyata are a good way to get quality stuff without paying the "sex appeal" markup of Italian bikes. Brand names and collector's items will have big markups that you don't need to pay, you can find great stuff that's just as cool if you do a bit of research.

3. Make sure the frame is a more modern higher quality type of steel that doesn't weigh a million pounds. Obviously if you can get a real sexy frame that's like Reynolds 531 or 853 or one of the better Columbus or Tange steels, that's nice. Avoid the pre-1985 straight steel super heavy shit that's in bikes like Schwinns, Pinnacle, Peugot, etc. Look for "butted" on the stickers. Don't get sold on paying a premium just because of a "Columbus" (or whatever) sticker though, those are just steel tubing brand names and they made a whole line of steels, some cheap, some premium. But really don't focus on this other than avoiding the super old thick crazy heavy shit. If the frame is good, make sure it fits you nicely, and then you can always replace components.

4. Look for rust, dents, big gouges. You don't want to deal with any of these. A tiny bit of surface rust on one or two spots of the frame is not a big deal, usually you can just scrape it off.

5. Check for parts being frozen. Take your tools with you. In particular check the stem is not frozen in the steerer and the seat post is not frozen in the seat tube. Take off the pedals and make sure they are not frozen. Again it's not worth buying a bike that has these problems. Often people who owned these old bikes never greased them or serviced them a single time in the last 20 years.

6. Bikes that are badly adjusted can be a nice bargain. They will seem to brake terribly and shift badly, etc. The owner thinks it's "in bad shape" but you can tell it's structurally fine. Usually when I buy an old bike I plan to throw away the tires and tubes, brake pads, and cables. Replace them all it, clean it, lube it, tune it, and it works like a dream. That overhaul will cost you about $100 in parts.

7. Bikes sold with "extras" can be a big bargain. You'll see naked bikes for $150, and then you'll see bikes with fenders, racks, bags, lights, etc. for $250 ; those parts alone are worth $250 if they're in good shape. Sometimes just one component on a bike can be worth the whole value when people don't know what they have; something like a premium saddle is worth $100+ and you can find them on $200 bikes.

8. I recommend looking for a frame that's versatile. Look for braze on fender mount eyelets at the fork and rear dropouts. Old touring frames are great to turn into commuters because they have the good rack-mount brazeons on the seat stays. Look for brakes with clearance and space for fatter tires and fenders. You might never use any of these things, but it's good to have the flexibility so that you can do whatever you want.

Don't try to save money on inner tubes. The difference between a cheap tube and a good won is actually quite large. A cheap tube is around 125 grams, a good one around 75 grams. 50 grams may not seem like a lot, but shaving 100 grams = a quarter pound off a bike would cost your $50 - $100 , so saving $5 on tubes is highly irrational.

Tires are even more important than tubes. The same is true of cars of course, I've written before about how retarded it is when people buy a $50k sports car and then put cheap tires on it. It's just a radically bad price-performance decision. Of course those people don't actually care about performance, they only claim to; in reality they are spending for image, so maybe it is a logical price/image decision.

More on this later.


11-25-09 - Blurg

mscorsvw.exe gobbles CPU to "optimize" your .NET CLR assemblies. It's gotten to the point that computers are almost always running some kind of "background optimization task"

I stuck some egrips on my Canon S90 and I'm pretty happy with the result.

I updated my picture slideshow screensaver cbsaver with a "ForceWindowed" option, and a special mode if you set TransitionMillis to 0. ForceWindowed makes it use a full screen size window instead of actually going to full screen ddraw. This takes a lot more CPU, because it uses blits instead of flips, but I found the full screen ddraw caused some odd flickers on certain graphics cards. The whole point of cbsaver is that the transition from desktop to screen saving should be completely smooth and non-distracting, so the screen jumping to full screen was unacceptable. The TransitionMillis=0 mode makes it just flip pictures and skips a lot of the complication so it's much faster; the goal of this is to avoid spinning up my laptop when it's in low-heat mode.

Which reminds me : I'd like to guarantee that cbsaver in TransitionMillis=0 mode doesn't make the CPU come out of low speed mode. If I use a lot of CPU for some reason, I'd like my app to just run slower, not kick up the CPU clock rate. So far as I know there's no way to do this. I have some hacks in there to try to avoid it, for example I don't flip to an image and then immediately load the next one, I flip and then wait a few frames to do the load so that I spread out my higher CPU use tasks over time. (really I should have the load on another thread at low priority).


11-24-09 - Google Voice

I'm now using Google Voice cuz it's better than nothing, but it has some major usability problems :

1. Not integrated with Mail and Reader. I have to keep 3 web pages open if I want to see all my junk. Yeah yeah I know can make an iGoogle page or some shit to put them together but I shouldn't have to do anything. Deliver me all my notifications together please.

2. No realtime refresh, no sound notification on new messages. If I want to see if I got new messages I have to go over and hit refresh !? Not cool. I should be able to tray it. Really it needs to be a proper Win32 app and behave more like Trillian or other IM clients, not some web shit.

3. It collapses threads like a motherfucker. That's totally inappropriate for SMS conversations where each message is 1 sentence. It starts collapsing at 5 messages, which means pretty much every conversation is collapsed all the time. I find myself just constantly clicking the "N more messages" buttons to make it fucking un-collapse. Also it seems to have no sensitivity in the collapsing to how recent the thread is. Obviously the fucking thread that I'm writing in RIGHT NOW shouldn't be collapsed, but the one from two weeks ago could be collapsed even a lot more.

4. Disabling ring-through is buried too deep in the settings. It should be a toggle right on the main page whether to ring & forward through or not. My main usage now is when I sit down at my desk at work I want to disable all the ring-through and SMS forwarding, and do all my "phone" at my computer. When I get up again I want ring-through to be re-enabled. (Also if I forget to re-enable it, it needs to be easier to toggle from my phone!).

5. Previous complaint about SMS forwarding not setting caller id still stands. Hopefully this will get fixed, but I'm becoming more tolerant of it.

11-24-09 - Feedback

One of the hard things about data compression is that when you first try an idea, chances are it will appear to be a loss. That is, say you have some working compressor like an LZ77 compressor and you try some new idea like using a reduced set of possible offsets instead of all possible offsets. When you first try this, you won't have fully worked out the idea, so your implementation is not that great, you don't yet realize the key to making it profitable, so it will appear to just hurt performance.

If you have faith in the idea and stick to it and work out the fact that you need to context-select the reduced set, and only do it when the prediction set is good, and escape out to context coded literals, etc. etc. all the subtleties, then it becomes a win and a nice technique. But for a long while there you aren't sure. You feel like you might be headed down a dead end, wasting a lot of time refining a technique that will wind up being worse than the original (of course this has happened to many people many times with techniques like LZ78 and DMC and Fractal images, etc.).

This is really the key skill that makes the practice of science an "art", and what distinguishes good practitioners from muddlers - it's the sixth sense for what is a good way to spend your time, what areas to explore are likely to be profitable, and how long to stick with it before you punt. If you punt too soon you might miss a huge discovery, but if you stick with it too long you waste your life chasing dead ends.

Of course this is a common feature of all the arcane arts. Any field where you get linear feedback to your exploits is trivial (*). That is, if you start down the right path and immediately get good feedback that it is the right path - anybody can do that, it's easy. All the difficult fields share the property of nonlinear feedback - including life of course. For example I believe that "dieting" and "working out" are really fucking easy life tasks because they provide very obvious linear feedback - you act and you see results. Harder things are things like choosing to make a big career change, since it will get much worse before it gets better, or choosing to work on a failing relationship.

* = obviously that's not true, there are "simple" fields that give linear feedback that are still quite difficult simply because they are a slog. I think Chess for example is one of them; if you spend more time studying, you get better results, pretty linearly; Chess is still difficult because the sheer mental focus and rigor to put in enough study is exhausting. Poker on the other hand is not simple because of the very large variance; you might adjust your game in a good way and immediately have some very bad results due to bad luck; you have to have intuition and faith to know it was a good adjustment even though the results don't seem to indicate such.


11-20-09 - Bike Tires

A lot of people believe that they should get bike tires with a bit of tread pattern, grooves or knobs or something for "good grip" or "water channels". This is a lot of crap that's gotten into people's heads from the car tire advertisements. See the experts : 1 , 2 , 3 on tire choice.

So now that you've read them you should be drinking the kool-aid that slick tires are the way to go because they maximize grip on pavement and will never hydroplane.

I don't think so. The truth is, grip on smooth pavement will never be a problem with bike tires. As Sheldon's chart shows, it's basically impossible for you to ride fast enough or corner hard enough to exceed the friction limit of a bike tire on pavement - even wet pavement. So why optimize for that? Slicks might give you optimum grip, but you already have plenty.

In reality, grip issues when biking will occur when your tires *aren't* in contact with pavement. I've had bad wipeouts due to gravel, sand, etc. In Seattle we also have the "steed" - the rotting leave gunk that's as slippery as a banana peel. When your tires are on steed you have no grip, and a bit of a knob to cut through that and get to actual pavement would be a huge boon. (it's called "steed" because rotting leaves are almost the most disgusting thing in the world, they're goopy and brown and smelly like a giant film of shit that gets on everything - second only to Paul Steed who is the most disgusting thing in the world).

I don't know what the best compromise is for a tire that can cut through some steed but still have good pavement grip. Clearly if all you care about is wet pavement grip, the right thing is a slick tire that's as wide as you can fit, and underinflate it very slightly.


11-19-09 - Pathetic

There's nothing worse than being intelligent but lazy. Intelligent enough to know that all ordinary activities are banal and pointless, but too lazy to do anything you think is actually interesting. It's a pathetic state of feeling superior but being despicable.

Dined at Tilth the other day. I won't even write a review, but I need to stop going to "New American" restaurants because they're just so fucking boring. Seared protein, buttered veg, some broth or foam, SNORE.

The best season of The Simpsons is Season 5. Season 4 (of Mr. Plow - though the best episode is Homer the Heretic) is a little bit too rough still (earlier seasons are way too rough). Season 6 (of Itchy & Scratchy Land and A Star is Burns) is really good, but it's just a bit too smooth. Season 5 is the pinnacle where they have just figured out the magic formula (which they didn't quite have down in Season 4 so it has some real rough misses), but they haven't gotten so practiced in it that it feels old hat (which Season 6 starts to smell of). The best episode ever is Season 5 - "Homer loves Flanders" and the second best is "Homer and Apu".

Also, not having watched The Simpsons is kind of like not ever having seen a Shakespeare play or heard The Beatles music. It's *the* seminal work of the medium of Televison.

11-19-09 - Myanmar

I'm going to SE Asia for Christmas, and I'm vaguely considering trying to go to Myanmar. (probably won't)

There's some who suggest that you shouldn't go because of the oppressive government, that tourist dollars help prop up their regime. I think this is basically nonsense. It's not a huge amount of money, and not much of that will get to the government; if you're a conscientious tourist you can try to use local currency and spend it at small local operations rather than the big tourist hotels and guided tours that kick back a lot to the government. I also think there's a ton of benefit to the local people and world awareness just to have contact with westerners (I would say the same about Cuba, etc. etc.) - isolating the people of the country is a terrible way to affect change ; I think we see that throughout history the best way to democratize countries is through maximum contact with western society.

If you actually want to do something about the Myanmar government, you should boycott Chevron, who pumps a ton of money directly to the regime for the natural gas leases in the north. We theoretically have economic sanctions against Myanmar, but of course the oil companies are exempt from that, just as they were when we had economic sanctions against Iraq. The result is that the people are impoverished but the government still gets plenty of money for its military, since the oil money goes directly to the government, while any smaller businesses that would help the people are not allowed to trade.

See : Amy Goodman on Chevron in Myanmar , Amnesty International calls for protesting Chevron and Chevron's response .

I heard the CEO of Chevron on NPR once responding to questions about the Myanmar lease. His justification was basically "if we don't do it, someone else will" (and the stuff in the above link about local schools, health care, blah blah blah). He's definitely right that someone else will. There's no oil/gas in the world that some oil company won't touch. Even if our government had balls and enforced real sanctions so that Chevron and Exxon were forbidden from taking the lease, surely China would step in. CNPC is already building a pipeline through Myanmar and is the biggest supporter of the regime already; if Chevron stepped out, CNPC would step in, and without the benevolent local spending.

Despite that reality, it's a preposterous moral argument that it's okay for us to be bad because someone else would be worse. In that situation you should clearly refrain from the bad action and also try to get the world to stop the worse action. We clearly need more international pressure on China to stop dealing with oppressive regimes around the world, but we also need to start doing so ourselves.

I am the worst kind of liberal (*). I can get all outraged about some indignity and rant about how people should behave, but when it comes down to what I personally want to do, I can always rationalize why it's okay for me to do it.

(* = the most common kind / the only kind )


11-18-09 - Raw Conversion

CR2 format is a big mess of complication. My god I hate TIFF. The main thing is the sensor data. It appears to be stored as "lossless JPEG" which is a new format that uses the JPEG-LS predictor but then just codes the residual with normal JPEG Huffman coding. The sensor data is RGGB which they either store as a 4-channel per pixel [RGGB per pixel] or as 2-channel [GR or GB]. Either way is clearly not optimal. One interesting thing I could do if I cracked the CR2 format is store all these raws smaller with a better compressor. The RAWs from the S90 are around 11M on average, it uses the 2-channel mode; the RAWs are 1872x2784 = 3744x2784 samples and 12 bits per sample. That means the JPEG is getting to 8.85 bits per sample. Not very good.

Of course I probably have to use dcraw to read it for me, but dcraw is just about the worst piece of code I've ever seen in my life. It's a miracle to me that people are able to write functioning software from code like that.

Paul Lee has a modified dcraw and some nice sample pictures of how demosaicing can go wrong (click the Moire or Aliasing links).

My idea for high quality RAW processing :

First of all, abandon your idea of an "image" as a matrix (grid) of colors (aka a bitmap).

The S90 sensor has barrel distortion that's corrected in software.

It also samples colors in an RGGB Bayer mosaic pattern (like most cameras).

The two of those things combined mean that you really just have a collection of independent R's, G's, and B's at
irregular positions (not on a grid due to barrel distortion).

Now, you should also know that you need to do things like denoising on these original samples, NOT on
the grid of colors after conversion to a bitmap.

So I want to denoise directly on the source data of irregular color samples.
Denoising R & B should make use of the higher quality G data.

Denoising should of course use edge detection and other models of the image prior to make a Bayesian
maximum likelihood estimate of the sample without noise.

To output a bitmap you need to sample from this irregular lattice of samples (mosaic'ed and distorted).

Resampling creates aliasing and loss of information, so you only want to do it once ever on an image.

There's absolutely no a-priori reason why we should be resampling to the same resolution as the sensor
here.  You should resample at this point directly to the final resolution that you want your image.

For example with the S90 rather than outputting the stupid resolution 3648x2736, I would just output 3200x2400
which would let me view images at 1600x1200 on monitors with a box down-filter which will make them appear
much higher quality in practice (vs 3648x2736 viewed at 1600x1200 which involves a nasty blurring down-filter).

The output from this should be a floating point bitmap so that we don't throw away any color resolution

Exposure correction can then be done on the floating point bitmap without worrying about the irregular
lattice or any further resampling issues.

11-18-09 - Information

Intellicast has awesome interactive weather maps. The best. Also, the UW ProbCast provides sophisticated computer modelled weather predictions for Seattle. The ranges show you the 90% confidence interval; mouse over things for more info.

Hot Map is just a bunch of scanned in paper maps that you can navigate around. SO SO superior to computer generated maps like Google. See for example Bangkok ; give me a good paper map and I'll beat anybody relying on electronic maps and GPS in a scavenger hunt.

It's funny reading about Julia Child and Craig Claiborne and that era of food in America, when you could become famous just by introducing America to some exotic new dish from foreign lands, like "spaghetti". It used to be so easy to travel and see things that you've never encountered before. It's such a fundamental part of human nature to explore and discover and bring things back, and it's basically entirely gone from our lives, which is a damn shame. These days if you discover something it's just because you are uneducated - you could have easily known about it before your journey if you were a better googler.


11-17-09 - Cleaning

I did a full clean up of my laptop and it's running like a million times better now. There are lots of badly behaved apps on Windows that seem to just crud up your disk with temp files so badly that they make themselves slow. Do this on a fragmented disk and it's slowness death.

How to fix :

1. Uninstall badly behaving apps (* see later)
2. Del temp files and caches (* see later)
3. Defrag disk
4. Reinstall bad apps

The key thing is getting your disk free of all the shit before the defrag, so that the shit files aren't getting mixed in with the real stuff at the front of the disk when you defrag.

Here's my temp file cleaner :

echo dir c:\temp :
call d -r  c:\temp\*
REM call d -r "%USERPROFILE%\local settings\temp\*"
REM call d -r "%USERPROFILE%\local settings\temporary internet files\*"
call zdel -y -r  c:\temp\*
call zdel -y -r "%USERPROFILE%\local settings\temp\*"
call zdel -y -r "%USERPROFILE%\local settings\temporary internet files\*"

REM call zdel -y -r "C:\Program Files\Visual Assist.NET\vc7\history\*"
REM call zdel -y -r "C:\Program Files\Visual Assist.NET\vc7\cache\*"

REM call zdel -y -r  "c:\windows\system32\config\systemprofile\local settings\temp"
REM call zdel -y -r  "%USERPROFILE%\application data\acd systems\acdsee\imagedb.*"
REM call zdel -y -r  "%USERPROFILE%\Local Settings\Application Data\VisualAssist"

(d is a dir and zdel is a delete ; -r is recursive).

Visual Assist and ACDSee are two apps I use regularly which are fucking retarded in that they seem to just grow their caches on disk indefinately until they get so big that it badly affects their startup time. My ACDSee was taking a few seconds to start up and I was like "WTF" and found the ImageDB cache was a few hundred MB; delete that mofo and it starts up fast again. You probably don't want to do those REM'ed out lines every time you clean up junk (it will make VA do a full reparse), but they're good to do once a month or so.

(*) badly behaving apps :

There are a few apps that seem to crud up your disk super badly with temp files; you may even have trouble finding them all; they're mostly under "Documents and Settings" , spread around in Local Settings and Application Data. With all of the following apps you should first uninstall them, then go through these temp dirs and find as many of the files they left behind as you can and delete them, becuase they don't clean up after themselves correctly. The worst offenders that I've seen are :

1. Firefox. So impossible to make this beast clean itself. If your Firefox is taking a long time to start up, best move is to uninstall it. It will leave lots of shit behind, delete that manually.

2. Adobe Everything. I had tons of shit from Acrobat Reader 6, Acrobat 7, and Acrobat 8, even though I uninstalled all of them (Foxit FTW). Uninstall all and delete manually.

3. Apple Everything. Uninstall all Apple software, delete all the shit they leave behind, then do yourself a favor and don't reinstall it. There was almost a gig of mystery shit in Apple folders, including shit like copies of installation packages of various versions of iTunes. No I don't want you to backup the install packages for me thank you very much.

In all I freed up about 10 Gig from this, and getting rid of all the shit before the defrag lets the defrag do better work.

ps : may as well run Malwarebytes while you're at it.

pps : may as well delete the masses of VC shit too :

zdel -r -y "*.(ncb|ilk|idb|opt|plg|dsw|pch)"

ppps : may as well checkpoint your p4 server too :

p4d -jc -z


11-16-09 - Warning 4244

I wish I could disable warnings about float - double conversions but keep warnings about the conversions between different types of ints. I hate that every time I call sqrt() or whatever in some utility code I have to spend a bunch of time worrying about whether I'm in float or double or whatever, and every time I write FPU utility code I have to write versions for float & double, or cast at the call site, bleck blah lame.

For int - int type conversions I'm trying to be good these days and use stuff like these :

// check_value_cast just does a static_cast and makes sure you didn't wreck the value
template < typename t_to, typename t_fm>
t_to check_value_cast( const t_fm & from )
    t_to to = static_cast< t_to >(from);
    RR_ASSERT( static_cast< t_fm >(to) == from );
    return to;

#define RR_CLAMP_U8(x)  (U8)RR_CLAMP(x,0,0xFF)
#define RR_CLAMP_U16(x) (U16)RR_CLAMP(x,0,0xFFFF)

So eg.

S32 val = whatever;

U8 t1 = check_value_cast< U8 >(val); // no clamp but asserts that it fits in range

U8 t2 = RR_CLAMP_U8(val); // clamps to target type range

Losing values to type conversion is one of the few nasty bugs I continue to have, and I'd like it to stop.


11-15-09 - Braised Pork

Night 1 : Braised poker shoulder with polenta. About 4 hours at 325. I added about a cup of root beer this time which had a nice flavor but too much sugar. White wine is really the best braise/deglaze liquid IMO. Also I think it may be best to chop up the meat before browning because it gives you more surface area to get delicious brown on.

Night 2 : leftovers. On night 1 when you put it in the fridge, pour off all the liquid into a tall narrow glass so that the juices and fat separate neatly. Take the fat off and reserve. The juices should be totally solid and jello-like when cold, indicating you have rendered out the collagen. To make a sauce, take just the quantity of juices you want for the moment, reduce the juices a bit in a pan, then whisk in butter. This is a general sauce boosting technique which will make any homey braise liquid more luxurious.

Night 3 : meat pies (Pastys, Empanadas, whatever you want to call them). I've tried these a few times and they haven't been awesome, but I think I finally nailed it. There are lots of little details to get right :

1. Preheat oven to 375 with a baking stone in it. You should prep the pies on parchment paper and then just slide that onto the stone. This will cook the bottom quickly on the preheated stone which keeps the bottoms of the pies from getting soggy.

2. Forget the dough you are "supposed" to use for meat pies (be it the dull Welsh Pasty dough or the puff pasty dough or whatever, they all suck). Just make the crust that tastes delicious to you. I like Martha Stewart's Pate Brisee (BTW any time you see a hat in French it means there's an "s" there in the English version, so pate = paste, hopital = hospital, etc. ) . To make it savory instead of sweet : A. omit the sugar ; B. double the salt (or just use salted butter + the called for salt) ; C. add some pepper and herbs to the crust ; D. use a bit of the separated chilled fat from the braise for some of the butter. (note : I generally think frozen pie crust is an okay short cut for pies, but they are all sweetened so cannot be used here; plus the whole point is the delicious crust, so you're really only cheating yourself that way). (of course do all the things you are supposed to for pie crust - work very cold, do it all in advance so they have time to chill before rolling out, etc.)

3. For the filling : the main thing is it should all be pre-cooked and not have very much moisture. I tried a few things, the best filling I did was like this : cut the pork shoulder into bite size chunks; saute some onions and carrot until just al dente (it will cook a bit more inside the pie but not much) ; let it all cool and mix together. Take a few tablespoons of the mixture and pulse in food pro to make it into a paste, crack in one whole egg, stir this back into the chunky mix as binder. This should look like a very chunky meat loaf or meat ball preparation. Spoon into pie. Be very liberal with spicing - the crust will mellow out the flavors so the filling should be full of punch.

4. Roll out pie crusts quite thin - thinner than you think is okay. Don't over-fill, leave a good inch of border for crimping. Paint edges with water to seal, then crimp well. Cut three BIG air vents - they need to be big because the crust will puff a bit and try to seal itself back up. Brush with egg wash and sprinkle on a bit of coarse sea salt. Bake about 30 or until colored. Brush with melted fat near the end of baking if you want a bit of glaze.

They look like this ; BTW I'm pretty pleased with the S90. It's got its flaws, but it takes pretty amazing photos when you just put it in Auto and press the button and don't do anything (like this one) which is what you really want from a little P&S.

Night 4 : Packaged pork Ramen with pork chunks and cloves added for lunch. Tacos of pork chunks for dinner. (the key thing here is to cut the pork into chunks and pan fry it in hot oil to make it really crispy, like how carnitas is done). Om nom nom.

Night 5 : fear food poisoning risk and throw out last bit of pork.

11-15-09 - New York Times Magazine

The New York Times Magazine this week has an article on video games as "art" (See the article here ). It mainly focuses on Jason Rohrer and his game "Passage" (see it here ).

I came here to write an angry rant about how retarded the article is and how Passage is absolutely the worst kind of attempt at "art" and the worst kind of "game" (in that it's not a game at all - it's a "toy" or an "experience" ; at the Indie Game Jam we always tried to have a rule that we didn't just make "toys" or "experiences" because they're easy and uninteresting).

But then I realized that actually the article and Passage are both actually brilliant on a meta level. The article is by someone who totally doesn't understand games or art, but is trying to seem intelligent and writes a lot of pretentious nonsense. Rohrer is either an idiot or is intentionally spouting bullshit to make Passage and games seem more significant than they really are. The article is aimed at out-of-touch old people who will nod and go "hmm interesting" and then share what they read at some cocktail party and everyone will pretend to agree in order to seem smart. That's art! It's exactly like the traditional art world ! How brilliant, by being retards they have shown that games are art.

(I realized this while walking around the SAM looking at the Calder mobiles and being amazed by how "artists" can create this amazing mass delusion to make critics talk about all the powerful themes in their work that don't really exist).

This article was part of yet another weekly new low for the NYTM. This week the main articles are on Megan Fox and Octomom. It's literally a tabloid now, but even worse than a tabloid because the gossip and tawdry condescenion is cloaked in a language of detached observation and pretentiousness. It's like "oh we're way too smart to actually care about Megan Fox and Octomom so we will write about the phenomenon of other people being interested in them".

Of course that's all people really want. People don't want to actually be intellectually challenged. They just want confirmation of their existing beliefs. They want opinion without facts. They want sex and gossip and soap operas. If they're sophisticated, they like to get their trash cloaked in a veil of higher culture (see, eg. Mad Men, 2666, etc.).

.. also Passage does indeed invoke powerful emotions. It doesn't make you think about mortality or futility unless you're a fucking moron. But it does make you feel frustration, disgust, disbelief, anger, and finally sadness that you wasted your time on this pile of turd and that our cultural critics fall for this nonsense so easily.


11-14-09 - Stereotypes

I cop out of fashion choices. I like to just wear jeans and t-shirts because it shows that I'm not trying. When girls ask me about fashion things I say "I dunno, I suck at fashion, don't ask me". Of course the real issue is that I'm afraid if I try a little bit, it will just look shitty and look like I'm trying and failing. I don't want to put in the time and effort to really do a good job, so instead I just intentionally do a really bad job.

This is a shitty position to be in (not wanting to try all the way so you intentionally don't try at all). It would be much better if you could just try a little bit. The problem is that it works so well. When you try a little bit, the world mocks you. They don't appreciate the fact that you're making an effort, showing what you can do, even if you suck.

I think when girls do the whole "do I look fat?" or "you don't really love me" routines, obviously it's partly insecurity, but it's also a dominance game. They get you to prostate yourself before them, to whimper and beg them to feel okay, they humiliate you, and then if you have performed like the lowly dog that you are to their liking, they show mercy and forgive you.

Women use their emotional powers to manipulate and attack men; when women feel vulnerable or demeaned they lash out with painful words. This is a balance for the physical dominance of the male; we could beat them up at any time and they're a little terrified of that and try to defend themselves and achieve their own sort of power in a relationship. It's only fair, I don't think I'm saying anything controversial; men are very naive about interpersonal war, most women are far more adept at it, and of course they use their skills for their benefit. Women use their sly emotional dominance skills on other women of course, but also on their lover, something that most men find terrifying and revolting. There's a power gap - both sides know the man is physically more powerful, and that's a shitty feeling for the woman to have, even if you never use that power. It's sort of like a non-nuclear state being in negotations with a nuclear state. Like hey, we know you're never gonna use the nukes, but dude you have a picture of one on the wall, that makes us feel a bit uncomfortable here.

Digital ovens are such fucking retarded bollocks. I shouldn't have to hit Plus/Minus to set the fucking temperature. In order to put my oven to Bake at 400 I have to hit something like 10 key presses; I have to hit "bake" "temp set" "plus plus plus plus plus" "bake". It should be a fucking spinny knob like the old days. And my fucking OVEN SHOULD NOT BEEP AT ME EVER NEVER EVER !! Not when I press buttons, not when it reaches the desired temperature, never ever never. Fucking electronics everything flashing and blinking and beeping is a fucking awful noise polluting annoying turd. Turn off all the lights in a house these days and it's fucking red and green christmas light city of blinks everywhere. The old plain mechanical ovens with an analog dial you turn to set temperature were just about perfect in terms of user interface and usability. You modern designers all suck so damn bad.


11-13-09 - The Pixies

The Pixies are touring now. I think when you go to see a band relive their glory days even though they sound awful now, that's the defining moment when you become a pathetic old fogie.

11-13-09 - Noise

I really hate the trend for heavy noise reduction in photos these days. Heavy noise reduction gives everything a weird playboy-airbrushed kind of look with big flat solid color patches and super crisp edges. It's fucking gross. It's tacky, it's tasteless. It's like the fucking photos that people make black and white except for one object left in color. (It's almost as bad as all the mangled HDR that people are doing to make these gross artificial-color shots). Makes me want to fucking vomit.

Canon have played a dirty trick with the S90 by putting some pretty heavy noise reduction into the firmware that becomes stronger at higher ISO. Of course that's sort of what you want, but you want to do it outside of the camera ; noise reduction is a lossy operation that kills information.

The worse thing is that all the review sites play right into their hands. They will mention the S90's strong noise reduction, but they also show direct side-by-side images from cameras , eg : S90 vs LX3 and then say "the Canon shows significantly less noise at high ISO". Well fucking DUH. You aren't comparing apples to apples. Then you have geniuses like this guy who say they are doing a fair test because they don't run outside noise reduction software. Well, no that's not a fair test if one of the cameras has more noise reduction firmware. It is clear that the S90 has some kind of newer fancy noise reduction alg in the firmware, like bilateral filtering or something. There's no such thing as comparing the "raw image that the camera makes" any more by not doing post-processing in software, because the cameras all cheat and do different tricks in firmware to make their images look better.

Anyhoo. I was pondering why digital camera noise looks so objectionable. Real film noise doesn't look awful. If you take shots without enough light on a film camera, you get a nice speckly grain. Digital cameras look much worse. I think a big part of it is the uneven color matrix thing that DC's use which gives the noise ugly chroma shift speckles. The only other things I can think of are the clamping to 255 and the fact that we JPEG after noise which smears it into DCT basis functions.

One thing that's a bit perplexing is that printing noisey digicam photos makes them look a million times better. Again I'm not sure exactly why all this is. Surely one reason is that printed pixels are actually little ink blobs that run into each other and blur; this adds an extra physical level of some kind of gaussian like blur, but it's better than any digital blur you can do because it's operating at near-infinite subpixel resolution (aka the real world).

The S90 has a low-light mode that makes images with 1/4 as many pixels, presumably because they're binning 4 buckets on the sensor together to get more light per pel. I wonder if they're actually doing anything better there than what could be done as a post-process. BTW it occurs to me that you could make a much higher quality black & white digital camera if if actually had a sensor with no color filters on it, so every bucket was open to any type of photon; it would have a true pixel at every bucket instead of the funny chroma selection that color digicams have.


11-11-09 - Google Voice etc

I have found one great use for Google Voice : I can give that number as my business contact number (for banks, credit cards, etc.) and then set it so that those people go straight to voice mail and never rings through.

Luminaplex algorithm for improved generation of luma subsampling. I guess it's the obvious answer that we will use for everything in the present/future now that computers are fast. Rather than try to specify a forward and inverse transform, just specify the inverse transform and then do a brute force optimization to find the data which reproduces the original as well as possible after inverse transform.

However, Luminaplex is a bit silly. If you're serious about fixing chroma nastiness, the right fix is to use the Luma edge information in the chroma-upsample. I'm not aware of anyone doing this in the main stream, but obviously high quality JPEG decoders should be doing this. In fact there are lots of things you could do to make a high quality JPEG decoder which would actually be a pretty useful thing since we're stuck with this evil format.

In other news : Land's End has gone to shit, don't buy anything there any more. I used to like it because it's one of the few places you can get "tall" sizes, so my freakish monkey arms wouldn't hang out six inches past the end of the sleeves, but suddenly they seem to have switched their production to be super cheapo Chinese shit and they've partnered with Kmart or Sears or some shit. Garbage.

I also just got my Canon S90 today. It was either that or a Panasonic LX3, I couldn't make up my mind so I flipped a mental coin. First impression : URG , I really don't like the ergonomics of it. I hate not having a view finder, but the LX3 doesn't have one either so I was fucked on that. The shitty thing is it's so small and it's got buttons everywhere on it that I don't feel like there's anything to hold it by; I feel like I'm holding a faberge egg, I can't put my fingers anywhere without touching a button by mistake. It's also smooth all over, it has no nice nubby grippy bit; I kind of want to superglue on a strip of rubber. Yeah the control ring is obviously sweet, but I would gladly throw that away for a better grip surface like the LX3 has. Will report again later with more impressions once I take some real shots.

It's still nowhere near my dream digital camera. Some basic attributes of my dream camera :

Tiny. The LX3 is about the maximum size (the S90 is a bit smaller than the LX3, definitely an okay size).

Minimal in-camera processing. Shoot RAW and let me do noise reduction / white balance / etc. in software after the fact. I want the camera firmware to be as simple and direct as possible with as few modes as possible exposed. Basically the only fancy thing I want done in camera is stabilization. This removes the need for a bunch of settings in the camera menus and lets the software get better over time.

Fast. In manual focus mode it should be super super fast, like 0.1 seconds or less cycle time between shots. There's absolutely no reason for all the delays in cameras these days. It should never stall out because of buffer flushing either; WTF is that, memory is fast and cheap.

Good optical viewfinder. Ability to turn the LCD off completely all the time would be nice. Large LCD and image review is completely irrelevant to me; I just want to snap the photos, I'll review them on my computer. In fact I'd be content with no LCD and no review at all if it meant a smaller lighter camera with longer battery life.

Big sensor and lens that lets in lots of light, not too many pixels. I want good low light performance. The Canon S90 is supposed to be okay on this, but I'd like even more. I'd be happy if the camera had no flash at all, it saves me from having to turn it off, saves a mode to fuck with, and reduces size and weight. Has there ever been a flash photo in the history of the universe that was worth keeping? I don't think so. (not in camera flash anyway, external flashes can be okay).

BTW the Leica D-LUX 4 is a pretty hilarious product. It's one of those clear "I'm an absolute moron" purchases. It's literally identical to the Panasonic LX3 (except that it's *worse* because the front is smooth while the LX3 has a nice old fashioned grip style) - and everybody knows it's identical to the LX3, and they charge almost twice as much for it, and yet people buy it. Wow.


11-10-09 - Touchy

It's always perplexed me how touchy people are about things that don't matter. Like yeah, I understand when you're touchy about something you care about or are sensitive about. Like if you hope to be a writer and you give me something to read, okay, I know you're touchy about that and that's fine. (of course in that situation I feel just crippled, afraid to say anything, it's so awkward, I hate it when people ask for my opinion on their work because I know they don't really want it).

People who absolutely suck at cooking are totally touchy about it. If you just ask simple questions like "is this Lawry's seasoned salt on here?" they get all defensive like "my momma used Lawry's , there's nothing fucking wrong with Lawry's" ; well A. chill out, I didn't say there was anything wrong with it, B. yes there is something wrong with it, and C. you obviously don't fucking care about cooking so why are you so defensive? D. it was actually pretty fucking delicious and I was going to compliment it before you lost your shit.

A funny one that seems really universal is loading the dishwasher. God forbid you rearrange someone's dishwasher loading because they did it badly, they'll be all like "oh, my dishwasher loading's not good enough for you? uh you're so annoying and picky". Well if you fucking had any clue about how dishwashers worked you wouldn't put pans right in the way of the telescoping jet that comes up in the middle, and you wouldn't put the plate surfaces right up against each other so that no water can get between them, and you wouldn't put bowls on the plate rack, or lie wine glasses down sideways. I mean

11-10-09 - Sustainable

"Sustainable" is the new fucking ridiculous tag-word that's used to sell shit.

First of all, anything super expensive is not sustainable. That's almost a tautology - if the majority of the people can't ever afford it, it does nothing for large scale effects of humanity on the environment, nor does it improve most people's lives. Fucking hand-fed berkshire pork is not "sustainable" - it's a fucking indulgence. Small farmers in general are a massive drain on the environment; large scale farming is of course the only way to be sustainable; see aso :

People use "sustainable" a lot to mean "hand made" or "old fashioned" ; like "sustainable wood carved toys instead of mass produced junk from China". Hey, I love hand carved wood children's toys, but "sustainable" ? Hell no. First of all, anything made from wood is not sustainable (a common misuse of the word). But most of all, anything involving a lot of human labor is not sustainable, because it makes it expensive, and it actually makes it massively polluting and gives it a huge carbon cost. A human life has a huge carbon cost (and general huge environmental impact). Anything hand made is massively damaging to the world, and thus again in no way sustainable.

The right way for us to make a sustainable existance is to of course take advantage of the efficiency multipliers of factories and mass production. Anything that produces less product and takes more time and labor is almost inherently less sustainable; there have to be massive other confounding factors for it to make up for it.

Of course if you want "sustainable" toys, the real place to get them is at a thrift store. Reusing is sustainable, cutting off the cycle of constant production of new crap that just depletes resources and increases and toxins and just gets thrown out. But of course the "sustainability" yuppies are just fad-followers so they will buy all new junk and then throw it out when the next fad comes along.

11-10-09 - Truth

Truth is the hobgoblin of small minds. Foolish people dismiss things because they aren't true.

A while ago we talked about the myth of the Bonobo. The myth is that humans are most closely related to Bonobos and Chimps. Chimps are super violent, aggressive, territorial, masculine ; they settle disputes by beating each other; when conflicting tribes of chimps meet at a border they scream and often kill each other. Bonobos are peaceful, tender, feminine; they settle disputes by fucking; when tribes meet they groom each other and fuck. It's almost like the two sides of human nature split in two (like the Dark Crystal) to form the Bonobos and Chimps. Of course it's a big lie spread by sloppy biologists who just saw what they wanted to see, but who cares? It's a fucking great story. I despise it when I tell that story and some jackass is like "that's not actually true". I know it's not fucking true, pipe down.

I have a great fondness for romanticized peasant farmers, like in Tree of Wooden Clogs or Once in Europa or whatever. People just love to point out to me that it's not really like that; that those people are actually just provincial and ignorant and awful rednecks. I fucking know that! I'm not retarded, I know it's romanticized ; is any movie or book or anything remotely realistic !?

Another one that bugs me is when somebody's trying to prove a point and they cite some examples or some history and they fuck up the specifics, some jackass will always point out the little mistake they made. You're wasting our time and detracting from the real argument. Just pretend that he cited the right examples and then focus on the point that he was trying to make.


11-09-09 - Health Care 2

Some data :

nice scatterplot that shows our outlier clearly

tons of nice charts here but you have to click on them to read them.

More data here ; in particular Exhibit 6 at the bottom is the key problem. Health care spending as a percentage of GDP is growing fast in Europe. (not as fast as the US, but still bad).

Another key point I think is that the US system is horribly broken at the low level. We often focus on the problem of who's paying (insurers vs. government) and who's covered (univeral, poor, etc). But even once people get into a hospital our system is fucked. Medicare + Medicaid (+ all government spending on health care) is 7% of GDP, which is close to what the Europeans spend on all their health care. Government spending is also growing as a percent of GDP (even normalized to remove the growth of the elderly population), so it's not like that is controlling costs. I think it's easy for politicians to villify the private insurers, but they are only a small part of the problem. We need to be looking at doctors who are making poor care decisions.

ADDENDUM : This Uwe Reinhardt guy is alright. He annoyingly uses the hack's method of presenting only little snippets of data that are carefully chosen to prove his point at the time, but it's still interesting.

Uwe E. Reinhardt - Economix Blog - NYTimes.com

Why Does U.S. Health Care Cost So Much (Part I) - Economix Blog - NYTimes.com
Why Does U.S. Health Care Cost So Much (Part II Indefensible Administrative Costs) - Economix Blog - NYTimes.com
Why Does U.S. Health Care Cost So Much (Part III An Aging Population Isn�t the Reason) - Economix Blog - NYTimes.com
Why Does U.S. Health Care Cost So Much (Part IV A Primer on Medicare) - Economix Blog - NYTimes.com
U.S. Health Care Costs, Part V Can Americans Afford Medicare - Economix Blog - NYTimes.com

Who Needs the Public Option - Economix Blog - NYTimes.com
Is Medicare Raising Prices for the Privately Insured - Economix Blog - NYTimes.com
Health Reform Without a Public Plan The German Model - Economix Blog - NYTimes.com
A �Common Sense� American Health Reform Plan - Economix Blog - NYTimes.com


11-08-09 - Health Care

Well health care reform is moving forward, and it's a huge pointless disaster as predicted. We're going to basically wind up covering more people within the same current broken system. I actually think things like not letting health insurers refuse to cover certain people is a very negative development, as is mandatory coverage and forcing employers to cover people. (I've written before about why I think the whole connection of employers and health care is very negative for our economy and personal liberty in general).

I was thinking about what we really should do for health care, and it occurred to me that it's really even a larger problem. Health care is definitely the biggest single manifestation of this issue, but at the bottom the problem is manipulative binding contracts, exclusionary pricing that forces you into contracts, closed networks, and collusive oligopolies. These same issues are afflicting people in bank accounts, cell phone contracts, cable networks, etc.

The real solution is to find a way to force all of these things to open up to consumer choice. The big problem with health care really is : consumers have no realistic choice options - all health insurances are basically the same ; consumers have no access to information to choose doctors based on prior performance or based on cost ; doctors have no ability to charge different amounts and are not rewarded for charging less or doing less ; specialists are rewarded heavily for doing unnecessary work ; consumers can never make a cost/benefit choice to opt out of care for the elderly or very ill ; consumers can't change plans or opt out of plans because of the collusionary pricing that forces you to have health insurance and not pay cash ; etc. etc.

Basically there is no capitalist competitive market at work in health care at all. Doctors/hospitals are not motivated to do better cheaper more efficient service to attract more clients. Health insurance is not motivated to charge rates that are competitive with cash rack rates because that option does not exist. Health insurance is not really "insurance" at all for most people, but rather just a huge fee that you have to pay simply to be allowed to get care.

With all of these things - bank accounts, cell phones, credit cards, health care, cable networks - I'd like to see a few major overhauls. 1) legal requirement to provide reasonable cash "rack rates". That is, consumer should be able to choose not to sign a binding contract for services, and instead just pay-per-use at a reasonable rate. 2) networks should be required to be opened to other companies at reasonable rates; eg. credit card point of sale networks, ATM's, cable wires, health care providers, etc. should all be required to allow third party companies access. 3) requirement to provide quick clear reports of past performance and disclosure of billing and furthermore notificiation of billing. For example, cell phones and banks should have to disclose how much the average consumer actually pays for bills; eg. when they advertise "$29 a month" cell phone contract, but without including all kinds of surcharges and fees and extra charges, they should be required to disclose "average consumer actually pays $63 a month". Also, when an unexpected bill arises they should be required to notify you *immediately* and even get permission, not just send you a bill months later. eg. if you make some roaming call they should have to say "this will cost $1 do you want to proceed?" not just send you a bill for $1000 at the end of the month. Similarly banks with overdraft, health care with out-of-network anaesthesiologists, etc. There's absolutely no reason not to provide warning these days with computerized everything and automatic email & SMS warnings.

You can't have working capitalism without informed consumers, and you can't have working capitalism without consumers being free to change services. Currently all of these industries are completely broken and are doing nothing but intentionally suckering people into contracts where they pay outrageous fees with very little ability to avoid it or get better treatment.

Really I'd like to avoid a lot of federal regulation, what I'd love to see is for it just to open up to competition, but in some cases the best option may be regulation. For example with cell networks, I think a good argument could be made for just nationalizing the networks and making them open at auction rates to 3rd party service providers. Another option would be to make it illegal to tie a phone to a given network, which would allow consumers to change provider at any time, which would make network bandwidth and quality a commodity and greatly improve the market.

Many of these services have also basically become "utilities" that a human must have to function decently in this society. You can't really choose not to have a bank account or health insurance or a cell phone, and that argues for the government providing them, or mandating some basic availability by law. For example cell providers could be required to provide a $10/month text & voice only contract for the poor.

Banks in particular make me angry because even without the recent TARP disaster, they get massive amounts of public support through the free money from the Fed and the insurance from the FDIC. I think it's perfectly reasonable to have very high requirements on any bank that takes Fed money. For example, they should be required to provide a very basic checking account with zero fees, and most importantly no line or credit or overdraft account, which are extremely predatory practices forced on the poor (and no NSF fees either up to 3 bounces or something; and of course automated warnings).

But of course we'll never see any of that, because the government *wants* corporations to rape consumers, and doesn't actually want to see better competition that will improve services.


11-06-09 - IsSameFile

I found myself wanting to know if two file names were the same file on disk. It's hard to check that just by looking at the name. Obviously you have issues like one might be absolute, one might be relative. Even if you fix that, they could be different A-code-pageizations of unicode names. And something I hit often is one of them might be on a "subst" or even a hard link. I want to know if they are actually the same file.

This appears to work :

bool IsSameFile(char * Name1,char * Name2)
    HANDLE f1,f2;
    if ( f1 == INVALID_HANDLE_VALUE )
        return false;
    if ( f2 == INVALID_HANDLE_VALUE )
        return false;
    // BY_HANDLE_FILE_INFORMATION has a unique file ID and Volume Serial Number in it
    //  check those are the same
    //  heh fuck it just check they are all the same
    // confirmed : this does work across substs
    return memcmp(&info1,&info2,sizeof(info1)) == 0;

11-06-09 - I-Phone

Over the weekend in SF I finally used an iPhone myself extensively to look up clubs, restuarants, etc.

OMG what a piece of shit. All you iPhone users have just been lying to me about how great it is; are you all brain-washed !? If it belonged to me I would have bashed it against a desk or thrown it out a window it was so fucking frustrating to use.

1. The fucking finger navigation is so broken. I kept accidentally clicking links. It won't fucking let you scroll around when the page is still loading !? WTF !? How do you put your finger down to navigate when the spot you need to put it on is all covered in links? Plus the amount that you can scroll is only equal to one page.

2. The two-finger zoom is a fucking useless gimmick. So annoying and hard to use. Again I'm accidentally clicking links or scrolling, and I constantly run into the limit of how much my fingers can move on the screen. It would be so much better just to have a mouse-wheel type of zoom wheel, or even a +/- magnifying glass increment. Hell for scrolling I'd rather have two physical sliders or wheels on the edges of the screen.

3. The keyboard thing is mostly okay, but occasionally very frustrating when you keep getting the wrong letter and have to back up over and over. Maybe it should zoom up the area that you are trying to click, like the tap should be a hold & release, it should select the letter on release and it should zoom while you hold, then you could hold & slide your finger to disambiguate.

4. No Flash support !? WTF. I knew about this, but so much of the web is flash-only now, it's pretty crippling.

5. No right click "open in new window" for links, and no way to duplicate the current page to a new page !? Maybe you can do these and we just didn't know how.

6. I often found myself in situtations where I couldn't go back in browsing. I'm not sure exactly how this happened but I'd just be browsing a bit and realize that I want to go back and then I notice the back button is greyed out and I can't get back. WTF. Combined with trying to scroll around and accidentally clicking links this was probably the biggest frustration, I'd have to restart my whole browse from the beginning because I'd misclick a link and then find I couldn't undo it.

7. No undo stack in general. All the scrolling and zooming and everything should be on an undo stack. Again largely needed due to awful laggy interface, you find yourself in weird spots and just want to go back and you can't.

8. Apps were even worse. I tried the Yelp app and the Urbanspoon app. Both have kind of nice interfaces, but it's just a fucking retarded idea. You're locked into their way of navigating and it's frustrating as all hell and they're missing features. I tried to fight with them briefly before screaming and just closing them and going back to the normal web. I don't understand choosing to limit myself into some dumb fuck developer's way of getting information.

Conclusion : it's a frustrating pile of turd and I don't know WTF you all are so happy about. It gives me great rage.

11-06-09 - The Basics

People often ask me how to lose weight. I ask them "have you done a log of your diet? writing down everything you eat for a few days?" and "are you writing down your workouts and recording the intensity?" . The answer is invariably no.

It's just the obvious basic fundamental thing to do. People always want some magical new solution, some amazing wisdom they didn't think of that will solve all their problems. They are also always fixated on the hip new solution that just came out this season, when in fact the obvious old fashioned way is almost always just the right thing to do.

People will ask me how to improve their data compressor, or speed up their slow code. Well, have you measured it against some other known standard ways of doing things? Have you set it up to be repeatable and take standard data sets as input so you can make reliable tests? Have you put in counters to analyze the parts to know where you might be going wrong? If not, I don't even want to talk to you about it. Come back when you've done the obvious basics.

Broke people are always struggling with their finances and can't figure out how to get by on their low salaries. Well, have you done a budget? Are you writing down everything that you spend money on? Do you have a log of all the necessary expenses that are upcoming? The answer is invariably no. Well, that might be a good place to start, you know?

11-06-09 - Dance

Modern Dance is only tolerable when there are hot mostly-naked chicks in it. It's not that I'm interested just for the naked chicks, if I wanted naked chicks I'd just look at naked chicks - I'm in it for the dance, the movement, the forms, the light and shadow, the interaction with the sound. It's just that all those things are not enough; if you have those things without hot semi-naked chicks, it's not enough value to get me out of the house. The hot naked chick is a the bonus added value that puts it over the line. You could say the same thing of relationships I guess.


11-05-09 - Quicksilver

"Quicksilver" (starring Kevin Bacon) is a "classic" bicycle movie, in the sense that there are only like 3 bicycle movies and it's one of them. It's mostly just a light piece of trash featuring some pretty amusing absurdly cheezy 80's-isms. The dance scene where Bacon dances with his bicycle is precious.

Winning is a feeling you never lose.

Speeding towards the final -- and deadly -- showdown...

Kevin Bacon is Jack Casey. He traded in his three-piece suit for a ten-speed and the streets.

For Jack Casey, playing the market was life in the fast lane... until he joined QUICKSILVER where the fast lane was a way of life!

It also has the most insane boldly obviously wrong stuff I've ever seen in a Hollywood movie. The city shots randomly switch between New York and SF. And not like in a subtle way at all, like they specifically show very unique SF hilly streets, and then very NY dense traffic city streets. People talk in NY accents and the characters are obviously very NY and the messengers talk about NY addresses for deliveries (68th St., etc), but he works on the Pacific Stock Exchange. It's bizarre, it's like they wanted certain aspects of both cities and someone in the production meeting was like "oh yeah, we'll just switch back and forth, nobody will notice, movie-goers are idiots!". There are a few scenes where they literally ride around a corner in NY and turn onto a street in SF (and the lighting changes dramatically of course).

Bacon's bike also magically switches between fixed gear and freewheel. In most of the close up and low speed shots it's fixed, but then any time they're going fast or going down hill he's suddenly magically free wheeling.


11-04-09 - Video is not for Windows

Holy crap video is a flaming mess.

First, if you don't know, there are two main things : packages & streams. The packages are AVI, MKV, MP4, MOV ; they put together image data and audio data in some way (the layer that unpacks these is often called a "splitter" or "demuxer"). The packages send their streams to codecs which convert them to some format for display. On Windows this is all supposed to go through DirectShow which is supposed to use the 4CC codes and some priority information to automatically find the right handler for the various streams and packages. In theory.

The first problem you hit on Windows is that AVI packages are handled pretty well, but AVI can't hold H264 video because AVI can't handle the flexible B-frame ordering that H264 can generate. (limitted profiles of H264 can be put in AVI, and there are hacks around this problem, but you're getting into a world of hurt). So you need MKV or MP4 boxes, and those are handled poorly; some apps handle them okay, some don't. Some apps "cheat" and don't trust DirectShow like they're supposed to (the cheating apps often work better).

Things I've installed lately :

MP4Box : MP4 stream boxer/unboxer ; pretty decent app, recommended, but help is poor

YAMB : GUI for MP4Box.  Useful to help figure out command lines for MP4Box because the help is bad.
    YAMB has bad bugs though and will fail to launch MP4Box, so you have to copy out the command line
    and run it yourself

MKVVerify : MKV stream checker.  Useful because MKV support is so fucking borked.

MediaInfo : Media info reporter.  Questionable usefulness because I don't trust it and don't know where
    it's getting it's info for.

Graphedit : DirectShow graph visualizer and tester from MS

GSpot : AVI info tool.  Useless.

MSU VMT : Moscow State University Video Quality Measurement Tool.  This is pretty neat when it works,
    but far too often it fails to get the frames correctly, so you get totally bogus results.

MSU LS Codec : Moscow State University Lossless Codec.  Best compressing lossless codec, seems nice
    but crashes some tools when you try to use videos compressed with this.  Thus useless.

Lagarith Codec : This appears to be the one good working lossless codec.  Recommended.

HuffYUV Codec : Videos made with this crash me on read.  Jeff says it works great for him.  Avoid.

MeGUI : GUI for "mencoder" which can driver AviSynth and x264 ; like all of these big GUIs that try to
    run a bunch of other products, this mysteriously fails for me.  It seems to set everything up right
    and then it launches ten other programs and they fail to hook up in the way MeGUI expected them to.

Handbrake : see MeGUI

FFDShow : hooks up the Linux video decoders (ffmpeg , libavc, etc.) to DirectShow.  This thing is
    pretty evil and fails to report frame rate and media info sometimes, but is also the only real

Haali Media Splitter : MKV unboxer, works with FFDShow.  Difficult to install correct manually.
    Even when installed correctly, does some weird shit with framerate; doesn't seem to report it
    correctly through DirectShow.  Probably best to get a codec pack like :

K-Lite Codec Pack : works for me but generally is considered malware
Matroska Codec Pack : didn't work for me
CCCP Codec Pack : not tried

MPlayer : Linux media player, now ported to Windows ; very flexible command line control of everything,
    alternate audio/video in/out.  Highly recommended.

MEncoder : video encode/decode partner to MPlayer.  I've had more success running mplayer and x264 manually
    than using this.  Still I can't complain about MEncoder from the command line.

MPUI : GUI for MPlayer.  This is horrific malware.  When you install it, it takes over your system without
    asking.  They do provide some tools for you to change this after the fact, but still should be avoided.
    Use Media Player Classic or VLC.

AviSynth : script thing to pipe video to other programs that read AVS scripts.  Dear lord.

Basically I've found that all the GUI's are broken, and all the video containers (AVI,MP4,MKV) are broken. The thing I've finally discovered that actually works is using MPlayer and X264 from the command line, and only working with split frames. Trying to work with video containers caused me all kinds of hurt because so many of these apps fail to unbox the containers right and screw up the frame rate or drop frames or other mistakes. Instead now if I want to work on a video I use MPlayer to convert it to raw frames.

mplayer -benchmark -ao null -vo png:z=5 video.avi

to dump frames to PNG

mplayer -benchmark -ao null -vo yuv4mpeg:file=test.y4m video.avi

to dump the video to YUV4MPEG format in "test.y4m" for input to x264

x264.exe --bitrate 10000 --output "out.mp4" test.y4m

x264 compress to "out.mp4"

Then use mp4box to put the audio back if wanted.

The cool thing about mplayer is that its audio/video decoders are the same ones used to view the video. So you can watch it, and if it plays right in the viewer, then it will extract correctly. I've found lots of videos that I can watch in MPC or VLC, but then fail to load the same way in whatever encoder/decoder when I try to process something.

The sucky thing about this method is you make ginormous temp files on your disk, which also slows things down a lot. But avoiding the fuckups of going through the borked DShow codecs and splitters is worth it.

Most of these tools now are originally Linux tools that are getting moved back to Windows. One very promising development is that many of them have the option to directly load libs for the codecs Linux-style (eg. just load libavc to play video) and avoid DirectShow completely. I haven't really tried that yet but it seems like it's almost possible to work with video just by manually picking a few of these libs and then you avoid the whole Windows borked media layer.

ADDENDUM : one of the difficulties I've seen in a lot of tools is reading the frame rate wrong. This is presumably due to the demuxers not reporting things back totally right. But there are also two related fundamental problems that make everything harder :

1. Most of these formats don't have real/useful headers. (if they do have header info, it's just added as "comment" information). This was done originally because theoretically if your AVI is being broadcast on TV and you change the channel into it, you will just start getting bytes in the middle and never see the header, thus they didn't put good headers on at all. This is fucking retarded.

2. It's almost impossible to really reliably just get the frames out of video. DirectShow doesn't have a reliable call that's just "give me the next frame". Instead you have to ask for "when is the next frame" and then "give me an image at this time". The problem is that the "when" can get fucked up in various ways, and then when you say "give me an image at this time" you can either skip frames or get duplicate frames. (this is what fucks up the MSU VMT tool for me so badly, they are getting the time sampling all wrong quite often).

Even if it's not way off, this still causes subtle bugs because people don't agree exactly on how to represent the frame rate. Some people treat broadcast as exactly = 30000/1001 fps and use rational arithmetic for all timing. Some people use floats for frame rate and use 29.97003 and then wind up with floating point precision problems at high frame numbers. Many of the containers store the frame rate as a number of microseconds between frames, eg. 33367 ; so if they store "33367" in the header, should I use that as my frame time increment exactly, or should I use 33366.666666 ?

I'm guessing that tons of people get duplicate and/or dropped frames because of this and just don't notice it.


11-03-09 - Notes

WD-40 is not a lubricant. It is a solvent.

Ooo ! Ooo ! I want Google Voice really bad, just for this :

The SMS messages that are sent to your Google number will also be
displayed on the website. You can reply to the SMS from the Web as well.

holy christ it's so retarded that I get texts in my phone and have to reply using my phone keypad when I'm sitting right here at my computer. All forms of my communications should be accessible from any kind of electronic portal.

I pray to god Google puts the predatory incompetent corrupt cell phone companies out of business. Maybe next Google will open a bank?

Actually a Google Bank is not a terrible idea.

... well I got in the Beta for Voice. Hmm.. I'm not sure that it's actually awesome. The problem is that the "read" status for voice mail & text messages is not propagated among the various devices (handset and computer), which means I have to look through things in both locations. That's annoying. Also the texts that are sent through to your phone show up as being from some random Google number, not the original sender, so you can't easily identify the sender in your phone, you have to read them all.

The transcribed voicemail is awesome, but again the result is that my real phone voice mailbox fills up with shit I've already seen on the web, and I have to go through and maintain that all the time. I guess if I had an Android phone and it was actually all kept in sync properly that would rock.

old rants