cbloom rants

1/31/2013

1-31-13 - Understanding ANS - 2

So last time I wrote about how a string of output symbols like "012" describes an ANS state machine.

That particular string has all the values occuring the same number of times in as close to the same slot as possible. So they are encoded in nearly the same code length.

But what if they weren't all the same? eg. what if the decode string was "0102" ?

Then to decode, we could take (state % 4) and look it up in that array. For two values we would output a 0.

Alternatively we could say -

```
if the bottom bit is 0, we output a 0

if the bottom bit is 1, we need another bit to tell if we should output a 1 or 2

```
So the interesting thing is now to encode a 0, we don't need to do state *= 4. Our encode can be :
```
void encode(int & state, int val)
{
ASSERT( val >= 0 && val < 3 );
if ( val == 0 )
{
state = state*2;
}
else
{
state = state*4 + (val-1)*2 + 1;
}
}

```
When you encode a 0, the state grows less. In the end, state must be transmitted using log2(state) bits, so when state grows less you send a value in fewer bits.

Note that when you decode you are doing (state %4), but to encode you only did state *= 2. That means when you decode you will see some bits from previously encoded symbols in your state. That's okay because those different values for state all correspond to the output. This is why when a symbol occurs more often in the output descriptor string it can be sent in fewer bits.

Now, astute readers may have noticed that this is a Huffman code. In fact Huffman codes are a subset of ANS, so let's explore that subset.

Say we have some Huffman codes, specified by code[sym] and codelen[sym]. The codes are prefix codes in the normal top-bit first sense. Then we can encode them thusly :

```
void encode(int & state, int val)
{
state <<= codelen[sym];
state |= reversebits( code[sym] ,  codelen[sym] );
}

```
where reversebits reverses the bits so that it is a prefix code from the bottom bit. Then you can decode either by reading bits one by one to get the prefix code, or with a table lookup :
```
int decode(int & state)
{
int bottom = state & ((1<`<`maxcodelen)-1);
int val = decodetable[bottom];
state >>= codelen[val];
return val;
}

```
where decodetable[] is the normal huffman fast decode table lookup, but it looks up codes that have been reversed.

So, what does this decodetable[] look like? Well, consider the example we did above. That corresponds to a Huffman code like this :

```
normal top-bit prefix :

0: 0
1: 10
2: 11

reversed :

0:  0
1: 01
2: 11

```
so the maxcodelen is 2. We enumerate all the 2-bit numbers and how they decode :
```
00 : 0
01 : 1
10 : 0
11 : 2

decodetable[] = { 0,1,0,2 }

```
So decodetable[] is the output state string that we talked about before.

Huffman codes create one restricted set of ANS codes with integer bit length encodings of every simple. But this same kind of system can be used with more general code sets, as we'll see later.

01-31-13 - Ugh ugh I hate the web

So Blogger randomly changed a bunch of shit a while ago.

One of the consequences of this is that the layout of "cbloom rants" can no longer be achieved or maintained with the new blogger layout, which means I can't edit it without losing it completely. (the existing layout does seem to keep working as long as I don't touch it, because they keep the raw HTML of the layout).

Another nasty one I just discovered is that a key setting that I rely upon is no longer there. Under "Settings->Formatting" there used to be a setting for "Convert Line Breaks" which defaults to Yes and causes any LF to be turned into an HTML BR code. I set that to "No" for cbloom rants so that it doesn't crud up my html when I send it over the Blogger API. (god dammit just let me put up HTML and stop fucking with it).

The odd thing is that the "No" setting (of "Convert Line Breaks") for cbloom rants appears to have stuck even though that setting has disappeared. That's fine with me I guess, though I wouldn't be surprised if it just stops working at some point when they revise the service again. The problem is I'm trying to set up a new blog and I can't get that setting any more.

(I of course have a workaround, which is removing LF's before I upload posts. The workaround sucks a little because I like to be able to download my posts back down and have them match the way I wrote them, which of course was with LF's in it for my readability during composition. The point is not the specific issue, it's god damn it don't push updates on me ever never ever unless I ask for them.)

Software updates are incredibly harmful. The benefit from changing *anything* has to be really massive for it to be a win. I'm so sick of getting new versions of crap pushed on me. At least with non-web software you can try to hold onto old versions as long as possible so that you can keep your valuable knowledge and its connections to your automation suite.

1/30/2013

1-30-13 - Understanding ANS - 1

I'm trying to really understand Jarek Duda's ANS (Asymmetric Numeral System). I'm going to write a bit as I figure things out. I'll probably make some mistakes.

I actually found Polar's page & code the easiest to follow, but it's also the least precise and the least optimized. Yann Collet's fse.c is very good but contains various optimizations that make it hard to jump into and understand exactly where those things came from. Yann's blog has some good exposition as well.

So let's back way up.

ANS adds a sequence of values into a single integer "state".

The most similar thing that we're surely all familiar with is the way that we pack integers together for IO or network transmission. eg. when you have a value that can be in [0,2) and one in [0,6) and one in [0,11) you have a range of 3*7*12 = 252 so you can fit those all in one byte, and you use packing like :

```
// encode : put val into state
void encode(int & state, int val, int mod)
{
ASSERT( val >= 0 && val < mod );
state = state*mod + val;
}

// decode : remove a value from state and return it
int decode(int & state, int mod )
{
int val = state % mod;
state /= mod;
return val;
}

```
Obviously at this point we're just packing integers, there's no entropy coding, we can't do unequal probabilities. The key thing that we will keep using in ANS is in the decode - the current "state" has a whole sequence of values in it, but we can extract our current value by doing a mod at the bottom.

That is, say "mod" = 3, then this decode function can be written as a transition table :

```
state   next_state  val
0       0           0
1       0           1
2       0           2
3       1           0
4       1           1
5       1           2
6       2           0
...

```
In the terminology of ANS we can describe this as "0120120120..." or just "012" and the repeating is implied. That is, the bottom bits of "state" tell us the current symbol by looking up in that string, and then those bottom bits are removed and we can decode more symbols.

Note that encode/decode is LIFO. The integer "state" is a stack - we're pushing values into the bottom and popping them from the bottom.

This simple encode/decode is also not streaming. That is, to put an unbounded number of values into state we would need an infinite length integer. We'll get back to this some day.

1/28/2013

01-28-13 - Importing Eudora MBX's to Gmail

I'd like to import all my old Eudora mail to gmail, to get it all together in one place, and for searchability.

(my current mail solution is to use Eudora POP on my local machine, but forward all my mail through gmail for spam filtering and archiving and searchability; it's working pretty well finally).

Gmail does not offer any "import from local disk" options. Sigh. There appear to be a few ways to do this :

1. Change my gmail temporarily to IMAP. Get all my Eudora MBX's into an IMAP client (something like Outlook; perhaps requiring an MBX to PST conversion step or something). Open the IMAP client and connect to gmail; drag the mail from the Eudora boxes to the gmail boxes.

Should work in theory, but a bit scary, and extremely slow (moving mail on IMAP is ungodly slow).

(Also, when I switch back to POP, is it going to redeliver me all that mail that I just uploaded? That would double-suck.)

2. Make a POP server somewhere. Convert the mbx's to mbox's to maildirs and dump them on the POP server for it to serve up. Tell gmail to grab mail from that POP server.

One issue is where I could get a POP server with a public IP and admin access. The other is that any time I try to do networking stuff it's a massive fail of mysterious problems and no error messages.

3. Get a Google Apps gmail account (different from regular gmail account for unknowable reasons). Import MBX's to Outlook. Use "Google Apps Migration for Microsoft Outlook" to import mail to Apps mail account. Use gmail fetcher to bring mail from apps-gmail to my normal gmail.

(similar alternative : get apps gmail. Convert mbx to mbox. Find a Mac. Use "Google Email Uploader for Mac" to upload the mbox. Transfer mail from apps-mail to normal mail).

(I could also use gmail API to write my own importer, but that also requires an Apps gmail, so may as well just use the existing importers in method 3)

It's all such a hassle that I'm once again tempted to just write my own damn email client. Sigh I wish I'd done that long ago, but it's always the local optimization to not do it. I'm so fucking sick of getting penis emails. Hello spam filterers, *penis* -> spam. You're welcome. And of course if I used my own email client, my private property (words) wouldn't be data-mined to serve me ads (you bastards).

(oddly gmail does remarkably well at spam detection on the cases that would be hard for me to do with simple filters; things like bank phishing mails that are designed to look exactly like legitimate mails from my bank; I don't think I could give that up, so I'd still be stuck with routing mail through gmail even if I had my own client).

1/27/2013

01-27-13 - Kauai

We took a vacation from the Big Island vacation for a few days to go to Kauai. I'd never been to another Hawaiian island so it was interesting to compare. It also gave us a chance to stay right on the beach, which we're not doing this trip, which was nice for a little while, getting that salt air in the bedroom and sitting on the water late at night. Anyhoo, thoughts on Kauai :

1. Yes it's beautiful. It looks more like Vietnam or Thailand and their limestone karst stuff, all old and weathered and crumbly with these random protrusions and such. (it's cool how you can travel the Hawaiian islands from south to north and visually see geographic time passing at a rate of 100,000 years per island hop). It actually wasn't as lush as I expected given all the hype about how wet it was and the incredible lushness. It's no more jungley beautiful than the Hamakua Coast near Hilo is really. My favorite parts of Kauai were the northern coast, and also just south of Lihue around the Hulemalu Road area (which would be a pretty sweet bike ride; good pavement, no cars).

2. There're sweet beaches all over the island. Like you almost don't have to seek them out there's another one around every corner, and most with very few people on them. None of them looked really perfect the way Mauna Kea and Hapuna are just ridiculously perfect in every way (clear water, no rocks, bottom drops neither too fast nor too slow, no rips, etc), but they were uncrowded and more sort of charming in a rustic way and often have cool surrounding cliffs and pretty settings.

3. The traffic sucks. The island is small, which is cool for a vacation (actually I love staying on tiny islands, like Ko Hai, Caye Caulker, or the Isla Mujeres of my childhood; islands where you can walk from one side to the other in half an hour or so). However, despite the smallness it takes forever to get anywhere because it's constant gridlock. Sitting in traffic fucking blows, and this alone is almost enough to put me off Kauai.

4. The human development on Kauai is repellent. The cities are all really ugly (though that seems to be standard all over Hawaii); most of the island is strip malls and run down shopping centers and fast food and such. Then the alternative are these fancy manicured suburban/golf developments like Poipu and Princeville which are disgusting in a different way. Between the two, the human hand on Kauai has scarred it with an ugliness that is quite tragic.

5. It's extremely tourist-oriented. Every restaurant is for tourists (which means rotten food and weird phoney-nice service), the place is covered in tourist crap shops (t-shirts, mac nuts, koa, etc). It has no feeling of being it's own place independent from the tourists. It also has a big port where cruise ships drop out hordes. Part of the problem with that is that Kauai is so small it can't really handle the appearance of 5000 people in one day.

6. The Na Pali Coast trail (Kalalau) is pretty cool. We made it 6 miles in before turning around (just into Hanakoa Valley, which was the best part of the trail that we saw) (pretty impressive for a pregnant lady). It's definitely not the most beautiful hike ever (as some say); there are lots of hikes in WA that are better scenery and not so jam packed with ding-dongs. It is sweet to be able to take a dip in the rivers along the way and swim at the beach afterward. Much like the Big Island, there's too much private property and not very much development of good trails, so you see all this beautiful stuff around but you can't really get to it (unless you want to tresspass and bushwhack, which you certainly can do).

7. I think it would be a pretty great place for a surf vacation. One of the good things about it from that standpoint is there are decent beaches facing every cardinal direction, so you can pick your spot to match the swell, and because it's small it doesn't take forever to get there. I could see maybe going back to Kauai some day for an intensive "finally learn to really surf" vacation, based around Hanalei or something (and never leaving that area).

8. For anyone considering going to Kauai - don't go in winter. We got super lucky with no big storms during our short trip, but generally Kauai is pounded in winter with big waves and lots of rain. You can always go hide in the dry south, but since the north is the best part of the island it's just better to go when it's not storm season.

Overall it made me miss our Big Island home, and I'm happy to be back.

I guess I'm a little negative about Kauai because I was super tired the whole time from not sleeping well. I also realized that I kind of hate vacation these days. I like workcation where I rent a house for a while and settle in and can cook my own food and bring my bike and get to do what I like (bike, swim, work). I don't really like sight seeing, just going from place to place and going yep I saw that; it feels so pointless, and it's kind of all the same experience no matter what sight it is you're seeing. I hate hotels, the invariably awful beds and pillows, the ice makers and elevators and other guests, the nasty decor and bad air, the attendants angling for tips. I hate restaurants, I'm so sick of restaurants. I wish I could just buy some proper ingredients that are actually fresh and okay quality, and have them cooked simply at the time that I order. Instead you get frozen super-low-grade Sysco garbage that's been pre-cooked and then warmed to order and covered in some nasty "sauce", it's just revolting the filth that they pass off as food all over America. (and the fancy expensive restaurants are not much better). And you have to sit around forever while the waiter does god knows what and try to act nice and make the most of it while poisonous filth is flopped down in front of you.

I like the idea of vacations that are for a certain activity that you like. Not going to see sights or relax, but to go hiking in some place that's really great for hiking, or to go biking, or surfing, or whatever you like. I sort of did this with the CA work/bike-cation, and it was rocking good. I'd like to do it more, but it's hard to find good information. A lot of the "epic hikes" or "great bike rides" are actually total shit; the rating is done by people who don't know WTF they're talking about. (same is true of "great beaches", which are often total crap beaches except for their white sand or something stupid like that). For example, I know that Hwy 1 in CA is on many a list of epic rides, and having lived there for a long time I know that's totally retarded; not only is it not epic, it's barely even tolerable, like I would never ride it by choice (I only rode it when necessary to connect a loop between other roads), and in the same area where they recommend Hwy 1 there are probably 30 rides that are much better. So anyway, actually finding solid information on places that are good "destination biking" is very difficult.

I'm also getting more sensitive about travelling places where the tourism is sort of a form of exploitation. In Hawaii the bad vibes are mild, but they're definitely there. We stole these islands from the Hawaiians, and now they are mostly pretty poor and get to watch rich tourists come in and buy up their best land and crowd up their favorite local spots. But despite that Hawaii is immensely better than other beach destinations I've gone to. In Mexico & Central America you get to see the abject poverty of people whose lives have been destroyed by government corruption and "free trade" (which is a transparent absurdity when we own all the patents and subsidize our exports and fuel costs); most of the beach developments were the result of the government evicting the people who rightfully lived there with minimal compensation; you used to be able to get away from the Zona Hoteleria areas and find sweet little towns that were still pretty untouched, but that's increasingly hard. In Thailand you're surrounded by the sex tourists and the cheap-booze backpacking set, who generally sleaze the place up (but it's better when you get away from the tourist-heavy areas).

Anyhoo, some photos from Kauai :

(including "tree canopy" and "how to look at tree canopy")

1/17/2013

01-17-13 - What Happened to Tech Blogs-

I feel like the internet is dying. There's less and less legitimate content, and more and more fluff and self-promotional ignorant useless crap. It's becoming harder and harder to find solid information that's written by people who actually know anything about what they're posting about.

The information on the internet is now almost entirely one of :

1. Advertising. Sometimes even subtly hidden advertising (there are now tons of "blogs" that are actually advertisements, and a lot of the posters on web forums are actually advertisers who are more or less clever about it).

2. Ignorant. Stuff like answers.yahoo and eHow and Yelp and so on are once in a while written by someone who knows their topic, but usually not. Reading these sites is often more harmful than helpful.

Oddly, the vast majority of blogs about things like cooking, cars, home improvement, or any DIY hobbies are not written by people who actually do those things and know anything about them. They're usually written by housewives or techie nerds who just want some attention or love blogging or god knows why they do it. It should sort of be harmless for ignorant people to write about their adventures building a shack for the first time (lord knows I do it), but it's actually not harmless. For one thing, they tend to become popular and so become the leading search results, ahead of much better information which is drier or not so cutesy. For another, the writers often present themselves as more well informed than they actually are, and they often misrepresent the success of their endeavour.

3. Self-vertising. Even some of the better blogs are just ways to self-promote or otherwise make money. This can be okay and there can still be good information from the self-vertisers, but they also do a lot of padding, a lot of repetition, and heavily distort the truth to make themselves seem more important. The tech self-vertisers tend to be annoyingly pedantic and act like experts when they are not. They almost never do the helpful thing and link to their (better) original sources. They often use the same style as pundits or paid "experts" in that they present their solution as The One True Way to give it extra legitimacy, when in fact the truth is more nuanced (maybe there are disadvantages that they don't talk about, or equally valid other solutions that already exist, or uncertainties in the parameters). Part of the problem with the self-vertisers is that they all mutually promote and are very active about SEO, so they become the primary visible voices. Also to pad their posting they tend to grab "facts" from other sources and repeat them, which creates a bad false sense of confidence in those nonsensities because they are being repeated all over.

Somewhat related to this are the lunatics with some kind of agenda. They aren't exactly advertising, but they are rabid about some point and so spam the web with their "facts" which are just creations designed to prove their point. It makes it almost impossible to find information about controversial topics, because these people are so active that they dominate search results.

4. Communities. I used to get some of my best information from web communities/forums. The great thing about them is that you can find these individual posters that hang out on them who are actually true experts in the field; like if you're searching for home improvement stuff you can find guys in web communities who are actual long term builders and provide solid facts; or for car info you can find people who actually build or race cars and know WTF they're talking about. However, it takes a lot of work to find those guys; they generally are not the most frequent posters, they tend to pop in and snipe some amazing wisdom once in a while and then disappear. You have to do a lot of scrounging around, and read multiple posts from each poster to try to assess the credibility of the individual user.

But I've been noticing something really nasty about web communities recently. They tend to get into this kind of rigid group-think which can lead them to constantly repeat certain "facts" despite there being no substance to them. What happens is some strong personality on the forum promotes some fact and everyone gives it a "thumbs up" , they start repeating it everytime someone asks that question, and it winds up in the FAQ. Posters on web communities are highly motivated by the approval of their peers; they act like a pack of high schoolers who are constantly looking around to make sure everyone else thinks they're cool. There's very little independent thinking and willingness to challenge the group-think. There's lots of high-fiving.

The truly wise tend to be humble and a bit soft-spoken. That's all well and good, but in the juvenile shouting match which is the modern internet, it's the people who are unashamed to loudly pontificate and bully about things they know not much of who are heard.

Try searching for something like "Calphalon" or "Big Island Waterfall" and see how many results you can find that aren't one of those 4 groups. Sure there's still signal out there but it's getting drowned in the noise.

Anyhoo. One of the symptoms of the dying internet that I've noticed is that there are basically no tech blogs for me to read any more. Maybe I'm just out of the loop? Are you all blogging on facebook now, or some other closed system that I refuse to join?

A few years ago, I felt like I was getting really superb quality tech blogs in my RSS on an almost daily basis, and now that has slowed to a trickle of maybe one a week or one a month. The vast majority of people that I liked and followed are not posting any more. What gives?

I understand that a lot of people who blog do it for a while, but lose steam and their blog goes silent. But there should be new people picking up the mantle; maybe I just haven't been active enough about figuring out who the good new bloggers are.

For reference, my tech blog subscriptions :

```

`<`opml version="1.0">
`<`head>
`<`title>cbloom subscriptions in Google Reader`<`/title>
`<`/head>
`<`body>
`<`outline text=".mischief.mayhem.soap."
`<`outline text="1024cores" title="1024cores" type="rss"
xmlUrl="http://feeds.feedburner.com/1024cores" htmlUrl="http://blog.1024cores.net/"/>
`<`outline text="A random walk through geek-space"
title="A random walk through geek-space" type="rss"
`<`outline text="Amit's Thoughts" title="Amit's Thoughts"
xmlUrl="http://amitp.blogspot.com/feeds/posts/default" htmlUrl="http://amitp.blogspot.com/"/>
`<`outline text="Aras' website" title="Aras' website" type="rss"
xmlUrl="http://aras-p.info/atom.xml" htmlUrl="http://aras-p.info/"/>
`<`outline text="Atom" title="Atom" type="rss"
xmlUrl="http://farrarfocus.blogspot.com/feeds/posts/default" htmlUrl="http://farrarfocus.blogspot.com/"/>
`<`outline text="Attractive Chaos" title="Attractive Chaos"
xmlUrl="http://attractivechaos.wordpress.com/feed/" htmlUrl="http://attractivechaos.wordpress.com"/>
`<`outline text="Beautiful Pixels" title="Beautiful Pixels"
xmlUrl="http://feeds.feedburner.com/BeautifulPixels" htmlUrl="http://beautifulpixels.blogspot.com/"/>
`<`outline text="Birth of a Game" title="Birth of a Game"
`<`outline text="bitsquid: development blog"
xmlUrl="http://bitsquid.blogspot.com/feeds/posts/default" htmlUrl="http://bitsquid.blogspot.com/"/>
`<`outline text="bouliiii's blog" title="bouliiii's blog"
xmlUrl="http://bouliiii.blogspot.com/feeds/posts/default" htmlUrl="http://bouliiii.blogspot.com/"/>
`<`outline text="Braid" title="Braid" type="rss"
`<`outline text="Breaking Eggs And Making Omelettes"
title="Breaking Eggs And Making Omelettes" type="rss"
xmlUrl="http://multimedia.cx/eggs/feed/" htmlUrl="http://multimedia.cx/eggs"/>
`<`outline text="C++Next" title="C++Next" type="rss"
xmlUrl="http://cpp-next.com/feed/" htmlUrl="http://cpp-next.com"/>
`<`outline text="c0de517e" title="c0de517e" type="rss"
xmlUrl="http://c0de517e.blogspot.com/feeds/posts/default" htmlUrl="http://c0de517e.blogspot.com/"/>
`<`outline text="Canned Platypus" title="Canned Platypus"
`<`outline text="cbloom rants" title="cbloom rants" type="rss"
xmlUrl="http://feeds.feedburner.com/CbloomRants" htmlUrl="http://cbloomrants.blogspot.com/"/>
`<`outline text="Cessu's blog" title="Cessu's blog" type="rss"
xmlUrl="http://cessu.blogspot.com/feeds/posts/default" htmlUrl="http://cessu.blogspot.com/"/>
`<`outline text="CodeItNow" title="CodeItNow" type="rss"
xmlUrl="http://www.rorydriscoll.com/feed/" htmlUrl="http://www.rorydriscoll.com"/>
`<`outline text="Coder Corner" title="Coder Corner" type="rss"
`<`outline text="copypastepixel" title="copypastepixel" type="rss"
xmlUrl="http://copypastepixel.blogspot.com/feeds/posts/default" htmlUrl="http://copypastepixel.blogspot.com/"/>
`<`outline text="Corensic" title="Corensic" type="rss"
xmlUrl="http://corensic.wordpress.com/feed/" htmlUrl="http://corensic.wordpress.com"/>
`<`outline text="Diary of a Graphics Programmer"
title="Diary of a Graphics Programmer" type="rss"
xmlUrl="http://diaryofagraphicsprogrammer.blogspot.com/feeds/posts/default" htmlUrl="http://diaryofagraphicsprogrammer.blogspot.com/"/>
`<`outline text="Diary Of An x264 Developer"
title="Diary Of An x264 Developer" type="rss"
xmlUrl="http://x264dev.multimedia.cx/?feed=atom" htmlUrl="http://x264dev.multimedia.cx/"/>
`<`outline text="direct to video" title="direct to video"
`<`outline text="el trastero" title="el trastero" type="rss"
`<`outline text="EntBlog" title="EntBlog" type="rss"
xmlUrl="http://feeds2.feedburner.com/EntBlog" htmlUrl="http://entland.homelinux.com/blog"/>
`<`outline text="EnterTheSingularity" title="EnterTheSingularity"
`<`outline text="Fast Data Compression"
xmlUrl="http://fastcompression.blogspot.com/feeds/posts/default" htmlUrl="http://fastcompression.blogspot.com/"/>
`<`outline text="fixored?" title="fixored?" type="rss"
xmlUrl="http://www.sjbrown.co.uk/feed/" htmlUrl="http://www.sjbrown.co.uk"/>
`<`outline text="Game Angst" title="Game Angst" type="rss"
`<`outline text="Game Rendering" title="Game Rendering" type="rss"
xmlUrl="http://www.gamerendering.com/feed/atom/" htmlUrl="http://www.gamerendering.com/"/>
`<`outline text="Game Rendering" title="Game Rendering" type="rss"
xmlUrl="http://www.gamerendering.com/feed/" htmlUrl="http://www.gamerendering.com"/>
`<`outline text="GameArchitect" title="GameArchitect" type="rss"
xmlUrl="http://gamearchitect.net/feed/" htmlUrl="http://gamearchitect.net"/>
`<`outline text="Gamedev Coder Diary" title="Gamedev Coder Diary"
`<`outline text="Graphic Rants" title="Graphic Rants" type="rss"
xmlUrl="http://graphicrants.blogspot.com/feeds/posts/default" htmlUrl="http://graphicrants.blogspot.com/"/>
`<`outline text="Graphics Runner" title="Graphics Runner"
xmlUrl="http://graphicsrunner.blogspot.com/feeds/posts/default" htmlUrl="http://graphicsrunner.blogspot.com/"/>
`<`outline text="Graphics Size Coding"
xmlUrl="http://sizecoding.blogspot.com/feeds/posts/default" htmlUrl="http://sizecoding.blogspot.com/"/>
`<`outline text="Gustavo Duarte" title="Gustavo Duarte" type="rss"
xmlUrl="http://feeds2.feedburner.com/GustavoDuarte" htmlUrl="http://duartes.org/gustavo/blog"/>
`<`outline text="Hardwarebug" title="Hardwarebug" type="rss"
xmlUrl="http://hardwarebug.org/feed/" htmlUrl="http://hardwarebug.org"/>
`<`outline text="hbr" title="hbr" type="rss"
`<`outline text="Humus" title="Humus" type="rss"
`<`outline text="I am an extreme moderate"
title="I am an extreme moderate" type="rss"
xmlUrl="https://extrememoderate.wordpress.com/feed/" htmlUrl="https://extrememoderate.wordpress.com"/>
`<`outline text="I Get Your Fail" title="I Get Your Fail"
`<`outline text="Ignacio Castaño" title="Ignacio Castaño"
`<`outline text="Industrial Arithmetic"
xmlUrl="http://industrialarithmetic.blogspot.com/feeds/posts/default" htmlUrl="http://industrialarithmetic.blogspot.com/"/>
`<`outline text="John Ratcliff's Code Suppository"
xmlUrl="http://codesuppository.blogspot.com/feeds/posts/default" htmlUrl="http://codesuppository.blogspot.com/"/>
`<`outline text="Just Software Solutions Blog"
`<`outline text="Lair Of The Multimedia Guru"
title="Lair Of The Multimedia Guru" type="rss"
xmlUrl="http://guru.multimedia.cx/feed/" htmlUrl="http://guru.multimedia.cx"/>
`<`outline text="Larry Osterman's WebLog"
`<`outline text="Level of Detail" title="Level of Detail"
`<`outline text="level of detail" title="level of detail"
`<`outline text="Light is beautiful" title="Light is beautiful"
xmlUrl="http://feeds.feedburner.com/LightIsBeautiful?format=xml" htmlUrl="http://lousodrome.net/blog/light"/>
`<`outline text="Lightning Engine" title="Lightning Engine"
xmlUrl="http://feeds2.feedburner.com/LightningEngine" htmlUrl="http://blog.makingartstudios.com"/>
`<`outline text="Lost in the Triangles"
xmlUrl="http://feeds.feedburner.com/LostInTheTriangles" htmlUrl="http://aras-p.info/"/>
`<`outline text="Mark's Blog" title="Mark's Blog" type="rss"
`<`outline text="meshula.net" title="meshula.net" type="rss"
`<`outline text="Miles Macklin's blog"
xmlUrl="http://blog.mmacklin.com/feed/" htmlUrl="http://blog.mmacklin.com"/>
`<`outline text="Mod Blog" title="Mod Blog" type="rss"
`<`outline text="Molecular Musings" title="Molecular Musings"
xmlUrl="http://molecularmusings.wordpress.com/feed/" htmlUrl="http://molecularmusings.wordpress.com"/>
`<`outline text="Monty" title="Monty" type="rss"
`<`outline text="My Green Paste, Inc."
xmlUrl="http://mygreenpaste.blogspot.com/feeds/posts/default" htmlUrl="http://mygreenpaste.blogspot.com/"/>
`<`outline text="Nerdblog.com" title="Nerdblog.com" type="rss"
xmlUrl="http://www.nerdblog.com/feeds/posts/default" htmlUrl="http://www.nerdblog.com/"/>
`<`outline text="nothings' projects" title="nothings' projects"
`<`outline text="Nynaeve" title="Nynaeve" type="rss"
`<`outline text="onepartcode.com" title="onepartcode.com"
`<`outline text="Online Game Techniques"
xmlUrl="http://onlinegametechniques.blogspot.com/feeds/posts/default" htmlUrl="http://onlinegametechniques.blogspot.com/"/>
`<`outline text="Pete Shirley's Graphics Blog"
xmlUrl="http://psgraphics.blogspot.com/feeds/posts/default" htmlUrl="http://psgraphics.blogspot.com/"/>
`<`outline text="Pixels, Too Many.." title="Pixels, Too Many.."
`<`outline text="Preshing on Programming"
xmlUrl="http://preshing.com/feed" htmlUrl="http://preshing.com"/>
`<`outline text="Ray Tracey's blog" title="Ray Tracey's blog"
xmlUrl="http://raytracey.blogspot.com/feeds/posts/default" htmlUrl="http://raytracey.blogspot.com/"/>
`<`outline text="Real-Time Rendering" title="Real-Time Rendering"
xmlUrl="http://www.realtimerendering.com/blog/feed/" htmlUrl="http://www.realtimerendering.com/blog"/>
`<`outline text="realtimecollisiondetection.net - the blog"
xmlUrl="http://realtimecollisiondetection.net/blog/?feed=atom" htmlUrl="http://realtimecollisiondetection.net/blog"/>
`<`outline text="Reenigne blog" title="Reenigne blog" type="rss"
xmlUrl="http://www.reenigne.org/blog/feed/" htmlUrl="http://www.reenigne.org/blog"/>
`<`outline text="RenderWonk" title="RenderWonk" type="rss"
xmlUrl="http://renderwonk.com/blog/index.php/feed/" htmlUrl="http://renderwonk.com/blog"/>
`<`outline text="ridiculous_fish" title="ridiculous_fish"
`<`outline text="Sanders' blog" title="Sanders' blog" type="rss"
`<`outline text="Self Shadow" title="Self Shadow" type="rss"
`<`outline text="Some Assembly Required"
xmlUrl="http://assemblyrequired.crashworks.org/feed/" htmlUrl="http://assemblyrequired.crashworks.org"/>
`<`outline text="stinkin' thinkin'" title="stinkin' thinkin'"
`<`outline text="Stuart Denman" title="Stuart Denman" type="rss"
xmlUrl="http://www.stuartdenman.com/feed/" htmlUrl="http://www.stuartdenman.com"/>
`<`outline text="Stumbling Toward 'Awesomeness'"
xmlUrl="http://www.chrisevans3d.com/pub_blog/?feed=atom" htmlUrl="http://www.chrisevans3d.com/pub_blog"/>
`<`outline text="Syntopia" title="Syntopia" type="rss"
xmlUrl="http://blog.hvidtfeldts.net/index.php/feed/" htmlUrl="http://blog.hvidtfeldts.net"/>
`<`outline text="Sébastien Lagarde" title="Sébastien Lagarde"
`<`outline text="The Atom Project" title="The Atom Project"
xmlUrl="http://www.farrarfocus.com/atom/index.atom" htmlUrl="http://www.farrarfocus.com/atom/"/>
`<`outline text="The Danger Zone" title="The Danger Zone"
`<`outline text="The Data Compression News Blog"
title="The Data Compression News Blog" type="rss"
xmlUrl="http://www.c10n.info/feed" htmlUrl="http://www.c10n.info"/>
`<`outline text="The Fifth Column" title="The Fifth Column"
`<`outline text="The Ladybug Letter" title="The Ladybug Letter"
`<`outline text="The ryg blog" title="The ryg blog" type="rss"
xmlUrl="http://fgiesen.wordpress.com/feed/" htmlUrl="http://fgiesen.wordpress.com"/>
`<`outline text="The software rendering world"
xmlUrl="http://winden.wordpress.com/feed/" htmlUrl="http://winden.wordpress.com"/>
`<`outline text="The Witness" title="The Witness" type="rss"
xmlUrl="http://the-witness.net/news/feed/" htmlUrl="http://the-witness.net/news"/>
`<`outline text="Transcendental Technical Travails"
xmlUrl="http://t-t-travails.blogspot.com/feeds/posts/default" htmlUrl="http://t-t-travails.blogspot.com/"/>
`<`outline text="Treatise on Graphics Programming"
`<`outline text="UMBC Games, Animation and Interactive Media"
title="UMBC Games, Animation and Interactive Media"
`<`outline text="View" title="View" type="rss"
`<`outline text="VirtualBlog" title="VirtualBlog" type="rss"
`<`outline text="Voxelium" title="Voxelium" type="rss"
xmlUrl="http://voxelium.wordpress.com/feed/" htmlUrl="http://voxelium.wordpress.com"/>
`<`outline
xmlUrl="http://zeuxcg.blogspot.com/feeds/posts/default" htmlUrl="http://zeuxcg.blogspot.com/"/>
`<`outline
`<`outline text="Work Without Dread" title="Work Without Dread"
`<`outline text="Zack Rusin" title="Zack Rusin" type="rss"
xmlUrl="http://zrusin.blogspot.com/feeds/posts/default" htmlUrl="http://zrusin.blogspot.com/"/>
`<`outline text="ZigguratVertigo's Hideout"
xmlUrl="http://zigguratvertigo.com/feed/" htmlUrl="http://colinbarrebrisebois.com"/>
`<`outline text="  Bartosz Milewski's Programming Cafe"
title="  Bartosz Milewski's Programming Cafe" type="rss"
xmlUrl="http://bartoszmilewski.wordpress.com/feed/" htmlUrl="http://bartoszmilewski.com"/>
`<`/body>
`<`/opml>

```

1/15/2013

01-15-13 - Kids

Some random thoughts on my impending kid-having-ness :

(note for dumb people : we're not here to talk about boring obvious shit like "kids make you sleep less" or "many parents live out their frustrated life goals through their kids". That's an obvious given as a baseline that should not need to be said; on this blog we try to talk about the things that are past the baseline, though many readers seem to not get that and want to chime in with the material that was a prerequisite for this course; get out of here and go back to reading "Excessive DOF Photos of Crappy Food" or "The New Old Coding Bore" or "Precious Twee Artisinal All-Organic Parenting" or whatever banal blog you usually read)

1. Kids automatically make you cooler. They're like a +1 modifier on anything you do. Like if you're just some single guy and you're in good shape and do triathlons or whatever, who cares, you're kind of an obsessive dweeb. But if you're a good family-man dad and you do the same, then you're amazing cool fit dad. (of course there's valid reason for this +1, because it's so much harder to do anything once you have kids, they're such a huge energy-suck)

(I've long been aware that I have some sort of bad jealousy tick where I really hate awesome dads; whenever I meet a dad who's super-fit and has great kids and also has a great job and builds robots or writes books on the side, I'm just filled with loathing; I'm not entirely sure but I assume that instant gut loathing comes from jealousy; I also think those guys are liars/phonies. Like, I think they must actually be terrible dads, it's just not possible to do all those things and spend enough time with your kids; why aren't you exhausted and frazzled? perhaps they have very self-sacrificing wives who are actually doing all the work at home, and/or they aren't actually putting in the work at their job; something is amiss, my spidey senses tingle)

2. Kids let you do things you suck at without feeling awkward. Say you suck at skiing; if you just go as a single man and take beginners lessons and have to ski the tow-rope bunny slope, you feel embarassed and most people can't get over it (of course if you do it anyway, you actually are super cool, and it's the people who look down on you that are fucking retard losers, but I digress). With kids you can go and ski the bunny slope with them and nobody looks at you funny. If you go ice skate for the first time as a single adult and are falling all over and wobbly you're a weirdo, but if you do it with your kids, you're a cool dad.

(one of the great tragedies of life is that people stop doing new things around 20 because they don't want to look like a beginner; they also lose all humility and never want to admit that they are a beginner at something. It's super dumb and I've been trying to get past it for the last 20 years or so. It's so funny seeing men at track days or at home improvement stores; they obviously don't know a thing about cars or construction (like I don't), but they can't just admit it and go "yeah I'm a newbie, can you help me?" they have to act all macho-man and pretend to be in their element like "I need a ball-peen wrench to adjust the timing on my carburetor." Um, let's back up and try again.)

3. Kids let you do things that are dweeby to do as single people, like go to the zoo or ride in a carriage. Part of the issue is that those activities are just not quite interesting enough on their own, but when you have the +1 enjoyment modifier of seeing it through your kids' eyes that pushes them over the threshold of worth doingness. I've always loved factory tours and those living-history museums where you can see how stained glass is made or whatever, also science museums (particularly interactive ones), but they just aren't quite worth doing as an adult. Kids remove the difficult embarassingness of everyone around you thinking "why are you here? it's only really old people and families, childless adults are not allowed".

4. Kids give you an excuse to be a selfish inconsiderate asshole. This is not a good thing and lots of parents over-do it. (it starts with pregnant moms who use the pregnancy as an excuse to be selfish bitches way beyond what's necessary or appropriate). Things like we can be loud at the symphony because we have kids, or we can cut in line because we're pregnant, or lets take the best seats and spread out all over, or lets take all the chairs at the hotel pool and then leave a giant mess behind us, etc. People know that kids make it much harder for others to go "hey fucker, you're out of line" and they abuse that advantage.

5. Kids let you play. I'm super excited about this. For a long time I've known that what I really need in my life is *play* , not sports, not games, but just joyous pointless movement. Adults are so fucking uptight and trying to act cool and impress each other all the time that they can never just play (actually I had a pretty sweet thing going for a while with Ryan where we could play a bit, but that was rare). Of course there's a whole industry of "ecstatic dance" and shit like that which is basically adults paying someone to let them play, which is so sad and bizarre; you have these uptight type-A business assholes who are total fuckers to everyone all day long, and then they go in a room and listen to a teacher tell them to run around in circles and stick their tongue out; super bizarre disconnect there. Anyhoo, kids let you go to the park and run around and roll in the grass and jump on things and nobody thinks you're a weirdo. (alternatively : move to San Francisco; fucking wonderful place SF, but all the gentry and computerists are ruining it)

(I guess those funny-dress-up runs are also societal concoctions to let adults play; but they ruin it by being a regimented precisely specified play; you're still just trying to fit in and do what you're supposed to. Oh crap, I wore a tutu and everyone else is wearing a cape! And it's still competitive and judgemental - ooh look, that guy is really relaxing well. Adulthood is so bizarre.)

6. Kids let you not have friends. They let you turn inward and just hang out with family. And of course you get some socializing through yours kids doing things and hanging out with other parents. You don't have to make any effort to make adult relationships work, which is a pain in the ass. Kids let you just stay home with your family without being a weird lonely hermit. Of course this is also a danger if you take it too far; you see these families that are so drawn in and almost afraid of other adults that when they're out in public they hardly even look up at the world around them.

7. Kids let you feel okay about sucking. If you're not really doing anything with your life and you're just kind of a rotten human being, but you have kids - then you can think "I devote my life to my kids, they are my pride and joy, at least I've made them, they are my life's work". They provide a +1 smugness bonus.

1/14/2013

01-14-13 - Hawaii Workcation 2013

Photos from the first few days here. Tasha's bro visited so we did a bit of travelling around sight seeing. Starting with the rental house, my office, and then some excursions :

Man it feels great to be here. The house is incredible, just as we hoped, tons of windows and a big view of Mauna Kea with not a single neighbor around. I feel alive, young, virile, lithe. I love the sun and the sweat. I love the trees and the good vibes.

I packed my bike this year (mild hassle (and the damn TSA opened my box and disturbed my careful packing)), looking forward to getting some good rides.

BTW you may notice that the correct ergonomic position for a "laptop" is about three feet above the human lap.

I can't wait for Tasha to pop the kids out so we can travel with them and play on the beach and run around in the trees.

1/01/2013

01-01-13 - Chicken Coop Learnings

Some hindsight and lessons learned after living a while with my first coop, some mistakes made and things I'll do differently the next time. In all cases I'm assuming a backyard-size flock, 10 birds or less. Obviously different considerations apply to large-scale coops. Also I'm assuming that you live somewhere relatively warm (winters above 20 degrees); in the super-cold different considerations apply.

1. Chickens don't need a big coop. They don't like to be inside, they like to be outside (as noted above, I'm assuming a decently warm climate). The coop is just for sleeping and laying. Almost all the coop designs you'll see on the internet, and all the fancy ones you can buy, are much too big. Not only is it a waste of time and materials to build a big coop, it's a huge disadvantage because it takes up more space and is more work to clean and is harder to move.

2. Don't build a coop you can walk inside. As per #1, the coop should be small, and it should be high (chickens like to be up high to sleep). All you need is a small raised box. You do not need a door for humans or a floor at human height. Do, however, put an entire wall or roof on hinges so that you can open up the whole thing and easily reach every corner.

3. Don't over-engineer. Because the coop only needs to bear chicken-weight not human-weight, there's no need to use 2x4's or half inch plywood, you can use much lighter and smaller construction materials. Again most of the internet designs and coops you can buy are just way off here, way over-engineered. (it does need to be strong enough to be wind-proof and dog-proof; dogs are by far the biggest hazard to urban chickens).

Even if you want a movable coop, you don't really need wheels if you use suitably light building materials and are moderately athletic. It's very easy to just pick up a small coop and move it around the yard as needed.

4. Paint. I painted the inside of the coop, and some sites & people consider this silly and froo-froo, but I think it was a good call and would do it again. A thick coat of high-gloss provides great water proofing and provides a smooth surface, which makes for much easier cleanup and longer life.

5. Rain/Snow. In contrast to #3, you should *not* cut corners in following good practices for weather-proofing. In particular, don't leave exposed edges of plywood or sheathing (they delaminate very easily), do use good shingle-principle for roofing (overlap and cover holes), use a proper drip-edge to prevent water wrapping around, etc.

6. Doors. I put a bunch of doors in the coop and one thing I didn't really consider was that all the poop and shavings and such will constantly be getting in the door jamb, which will prevent closure if it's a tight fit. One option is just to intentionally make a sloppy door that's a loose fit; another is to put some kind of trough near the door so that closing it pushes out the crud into the gap. Many designs, including mine, feature a door hinged at the bottom, so that when it opens it becomes a ramp. This seems clever but is not a very functional door because of the poop-in-the-hinges problem, it just becomes a static ramp. Probably the best type of door is top-hinged, with a raised bottom sill to prevent crud building up there. There's just not a lot of need for doors though; if you make the whole coop open for cleanability (such as via a hinged or removable roof), you can just use that to get the eggs as well; there's no need for the cute little nesting boxes with individual doors that people do.

7. The roost is the backbone of the coop. The chickens will spend 90% of their indoor time on the roosts, so locating the roost is the most important aspect of the design. The coop is really just the roost and the nesting boxes, the chickens want to spend their time outside in the run or free ranging, not on the floor of the coop.

8. The Poop Trough. Because of #7, I've found that almost all the chicken poop that's inside the coop is in a perfect straight line under the roost. I think you could take advantage of that and put an angled trough under the roost so that the poop was super easy to clean out. Another option would be a line of wire mesh instead of solid floor under the roost, perhaps with a removable trough under the wire mesh.

9. Rats. You have to decide from the beginning if you want to try to make a rat-proof coop. Doing so is a major undertaking and requires careful design. For example, chicken wire is not rat-proof. To make a rat-proof coop, first you need a solid stone foundation (for a small coop the easiest way to rat-proof the floor is just to cover the whole floor with pavers or bricks; for a larger coop you wouldn't want to do that, so you have to dig down at least 1 foot underground and surround the perimeter with rat-proof wire mesh or concrete blocks; rats are excellent diggers). Then the entire coop must be surrounded with hardware cloth (wire mesh) or similar. Rats are also superb climbers and jumpers, so vertical barriers will not stop them (you need a closed roof).

Some people try to rat-proof by putting wire on the floor (rather than a solid paver floor or burying a barrier around the perimeter). This is not a great idea. What will happen is the rats will still dig under the coop and create a network of tunnels under the wire floor. The chickens knock their feed all around, so lots (most) of it will fall through the wire mesh into the gap below it, and the rats will have a party living in the dirt under the wire floor. This might be okay with you (at least the rats are not actually in the chicken's space) but I think that overall wire on the floor is actually worse than nothing.

10. Feeders. Lots of people advocate these big automatic hanging feeders that you can fill with feed and it will drop down to let out more. Unless you have made a seriously rat-proof coop, these things are a terrible idea. Rats with an unlimited supply of food like that will multiply incredibly rapidly. You're going to want to visit the chickens every day anyway, so I see no advantage to these gravity feeders, just give them their ration each day so that there aren't a lot of left-overs for the vermin.

11. The Run. You have to decide up front whether you are going to free-range the chickens or not. If you are going to free-range them, then you don't need any run at all, just let them out in the yard. If not, then you need a big run. A tiny run (like under the popular commercial A-frame "chicken tractor") is pointless and cruel. If I had a decent amount of land I would build a simple run by just putting in some posts and wrapping it in chicken wire. (obviously this run is not rat proof). There's no need to cover the top of a large run (assuming as above you do not use a big feeder which would attract other birds).

12. Free ranging in your yard kind of sucks. Chickens love to dig in soft soil, so will go after your new plantings and vegetable beds and dig up your seedlings. They like to sit on railings and handles and poop. You will have poop all over everything. It's not awesome. On the other hand, it is very easy. They will eat a better diet without you having to carefully manage the supplements in their feed. They also naturally return to their coop at night so you don't really have to do any work to get them in and out, they do it themselves.

13. The poop pile. If you are going to try to reuse the poop and shavings you get when you clean out the coop as manure, you need to locate a spot for the poop to rest. You will get a *lot* of waste out of the coop, so you need a big spot, and you need at least two piles so you can cycle the new into the old (like compost; poop needs 2-3 months rest before use). The poop pile should not be near the coop (or run) and should also not be near your planting beds to avoid pest and pathogen transfer. It can be hard to find a good location for the poop pile in an urban yard, so you may want to abandon this idea and just throw out the poop. The poop pile will also attract rats and flies (but of course so will composting); it may also attract justifiably irate neighbors.