<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[leifjohnson.net]]></title><description><![CDATA[Recent content from leifjohnson.net]]></description><link>http://leifjohnson.net/</link><image><url>http://leifjohnson.net/favicon.ico</url><title>leifjohnson.net</title><link>http://leifjohnson.net/</link></image><generator>NodeJS RSS Module</generator><lastBuildDate>Mon, 08 Apr 2013 04:11:09 GMT</lastBuildDate><atom:link href="http://leifjohnson.net/rss.xml" rel="self" type="application/rss+xml"/><item><title><![CDATA[Graph Time : March Madness]]></title><description><![CDATA[<p>It's March Madness !</p>

<p>I was looking at the brackets for the NCAA men's basketball tournament the other
day, marveling at the number of upsets in this year's tournament. Then I
remembered : wait, aren't there a lot of upset victories <em>every</em> year in the
tournament ?? Particularly in the early rounds ?</p>

<p>Seriously, who hasn't wondered about that before ? Well, I thought I'd chip in
with a graph to help visualize the madness around us, just in time for the
looming final four weekend. What I specifically wanted to look at was, how does
your team's seed entering the tournament end up impacting your course through
the tournament ? If you're seeded number 1, is that a certain victory ?
Contrariwise, if you're seeded 16, are you guaranteed to crash and burn ?</p>

<p>I poked around a little bit on the interwebs and found beautiful tables of
<a href="http://rotoguru2.com/hoop/mad/seedwl.html">win/loss statistics</a> for the past 25
years of NCAA men's basketball tournament history. Thank you Guru ! I
reformatted the data from the tables into a plain text format using my lovely
text editor and got to work graphing.</p>

<p>I tried a few scatter plots with just the raw data to get a feel for how things
looked. In my mind, the general idea for the plot was to create a 16-by-16
scatter plot, with each cell containing some percentage value indicating the
likelihood that the seed along the horizontal axis would win that matchup. After
some twiddling (see below), I got what I think is a pretty decent result.</p>

<p><img class="graph" id="graph" src="/graphs/madness/madness-reasonable.png"/>
In this plot, the shape of the marker indicates the round of the tournament, the
size is proportional to the log of the number of times such a matchup occurred,
and the color indicates the percentage chance of a win for that matchup. The
first thing to notice was that the data have a lot of weird symmetries, in a way
: if a 3-seed team wins against an 8-seed team, then you could also equally well
say that an 8-seed team has lost against a 3-seed team. So, the raw data only
fill up half of the available space on the plot. To fill out the entire plot, I
subtracted the win percentage from 100 to get something like the &ldquo;loss
percentage&rdquo; for the other half of the plot.</p>

<p>The next thing that I noticed was that not all matchups were even possible in
the tournament. This is particularly true in the first round, which always pits
(in each of the four subtrees of the bracket) the 1-seed team against the
16-seed, the 2-seed against the 15-seed, and so on. So, in the first round,
there are a lot of games played, but in terms of seed matchups they align
exactly along the diagonal of the graph. A similar pattern emerges for the
second-round games : they are mostly along the &ldquo;reflected secondary
antidiagonal&rdquo; (whatever that might mean ; I bet there's a math term for this,
but I sure don't know it) of the scatter plot, meaning that the 1-seed team
often plays the 8-seed team, but sometimes plays the 9-seed team. The 2-seed
team will tend to play the 7- or 10-seed, etc. Interestingly, this pattern falls
off precipitously after the second round. Either that's because of upsets
specifically, or because by the third round enough probability has come into
play that there are almost no specific guarantees about who will be playing
whom.</p>

<p>Another thing the graph makes clear is that you've got a much better chance of
winning if you're a top-8 seed, especially if you're playing against a bottom-8
seed (i.e., the top-left quadrant of the graph). With some notable exceptions
(1-seed teams seem to lose often against 11-seed teams in the fourth round !),
the high win percentages are held by teams at the top, particularly in the top 4
seeds.</p>

<p>Finally, and perhaps implied by the previous point, the odds of winning the
entire tournament are way better if you're a top-seeded team than if you're a
bottom-seeded team. There are some tiny stars (final four or championship games)
on the graph in places like the 5-seed vs 7-seed, but more often than not,
you're going to see a 1- or 2-seed team end up at the top of the tournament
bracket. And, perhaps unsurprisingly, but also anticlimactically, the most
likely matchup at the end of the tournament is 1-seed vs 1-seed.</p>

<h2>Smoothing</h2>

<p>But let's go back to the beginning of the tournament, since that's where the
upsets happen. In the fullness of time, enough games have been played in the
first round of the tournament to give us a really nice, smooth gradient of win
percentages as you go down the seeds. Historically, the team that's seeded
number 3, for example, has an 86% chance of winning their first-round game
against the 14-seed team. That is, over the past 25 years of tournament history,
112 3-seed vs 14-seed games have been played in the first round of the
tournament, and 96 of those games were won by the 3-seed team. The chance of
winning decreases all the way down to the 8-seed vs 9-seed first-round game,
which is basically a toss-up : there's a 48% chance that the 8-seed will win its
first-round game.</p>

<p>Now, that's a fine and dandy way of guessing who'll win these games, but there's
a bit of a problem at the other end of the spectrum. Of the 112 first-round
games played between a 1-seed and a 16-seed, <em>never once</em> has the 16-seed team
won. If you're a frequentist, this means that if you're seeded number 16 in the
tournament, you might as well not show up ! Empirically, there's literally zero
chance that you'll win that game.</p>

<p>But zero is a pretty harsh statistical sentence to level against anyone, even a
basketball team. So, we need to do something to fix that &ndash; after all, a 16-seed
<em>could theoretically</em> win its first-round game, sending shock waves (and more
Madness) throughout the sporting world.</p>

<p>There are tons of really complicated ways of dealing with this problem, all of
which amount to some sort of <a href="http://en.wikipedia.org/wiki/Smoothing">smoothing</a> : replacing the actual counts in the
data with slightly altered counts, based on some prior knowledge or hunch about
how the data should look. Usually, smoothing in this context implies that you'd
like there to be fewer zero counts in your dataset, which you usually accomplish
by moving some of the probability mass from high-probability events (like the
1-seed beating the 16-seed) towards low-probability ones (like the upset).</p>

<p>This being a quick jaunt into graph-land, I prefer to stick with the simple
solution : <a href="http://en.wikipedia.org/wiki/Additive_smoothing">Laplace smoothing</a>. Because we want to make sure that there's at
least some nonzero chance of any matchup coming out either way, but we also want
to make sure that the real data have a chance to speak up. In other words, we
don't want to claim suddenly that there's a 50% chance the 1-seed will win
against their 16-seed opponent. In Laplace smoothing, we simply add a constant
value to all of our empirically collected data. Sounds simple, right ? If we've
counted %%w%% wins and %%\ell%% losses, the unsmoothed probability of a win
would be %%\frac{w}{w+\ell}%%. After smoothing, the probability looks like
%%\frac{w+\lambda}{(w+\lambda)+(\ell+\lambda)}%%. The nice thing about this
method is that you can change the value of the smoothing parameter %%\lambda%%
depending on how much you want to muck about with the original data. For this
plot I picked %%\lambda=0.1%%, which is about %%1/1000%% the size of the largest
count that we have in our dataset, so won't have a big impact on the chance of a
16-seed beating a 1-seed, but still has a decent impact on matchups that have
only occurred once in the dataset.</p>

<p>There are probably lots of other cool ways to do smoothing in a dataset like
this, especially if you take the seeds into account. For instance, there has
been just one 4-seed vs 6-seed game in the past 25 years of the final four, and
the 6-seed team happened to win it. So, empirically, the 4-seed has a zero
percent chance of winning this matchup again, if it ever comes to pass. But
something seems off about that, right ? It would be better if we said, &ldquo;Well,
it's pretty likely that that game would be close, though the 4-seed should
theoretically have a slight advantage, but the 6-seed team that's made it that
far in the tournament must actually be pretty good.&rdquo; Laplace smoothing doesn't
get anywhere near that sophisticated &ndash; it just replaces the %%1%% win for the
6-seed with %%1+\lambda%%, and the non-win for the 4-seed with %%\lambda%%,
changing the chance that the 6-seed wins a similar matchup again to
%%\frac{1+\lambda}{1+2\lambda}%%. With %%\lambda=0.1%%, that comes out to be
91.7%. That's probably still pretty high, but it yields a nice graph.</p>

<h2>Graph details</h2>

<p>Right, I was talking about a graph ! So, after smoothing the basketball data :</p>

<pre><code>data = np.loadtxt(...)
data[:, 3] += 2 * LAMBDA
data[:, 4] += LAMBDA
</code></pre>

<p>I got a much better-looking plot : suddenly lots of tiny dots appeared on the
plot that hadn't been there before, because those matchups had always gone one
way, even if there was only one of those matchups ever !</p>

<p>Similarly, I ended up adding a small amount of jitter to each of the scatter
points, to prevent matchups that occurred in different rounds of the tournament
(particularly rounds 4 and 5) from overlapping exactly on-center ; I think it's
a little easier to spot the tiny geometric shapes if they're a bit outside the
larger shape.</p>

<p>Finally, I wanted a way to distribute the code for making this graph without
resorting to a zip file for pairing the script with the data. There are only
about 100 data points in the set, so I figured I could compress it and just
include the compressed data directly in the script. Sure enough, it's really
straightforward to do that even from the command line :</p>

<pre><code>python2 -c import sys; print repr(sys.stdin.read().encode("zlib"))' \
  &lt; madness.txt &gt; madness.py
</code></pre>

<p>Then I wrapped the zipped string with a pseudo-file that could be loaded into
the always beautiful <a href="http://numpy.org">numpy</a> :</p>

<pre><code>data = np.loadtxt(StringIO('x\x9c\x95...?_\xd2_\xec'.decode('zlib')))
</code></pre>

<p>This makes the data easy to fit directly into the source code for the graph,
rather than mucking about with a separate graph-making script and dataset.</p>

<h2>Code</h2>

<p>The code for the graph (including the zipped basketball data) is in
<a href="/graphs/madness/madness.py">madness.py</a>. It's in the public domain. Download and tinker !</p>]]></description><link>http://leifjohnson.net/post/graph-time-march-madness/</link><guid isPermaLink="true">http://leifjohnson.net/post/graph-time-march-madness/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Sat, 06 Apr 2013 07:41:00 GMT</pubDate></item><item><title><![CDATA[squash seedling]]></title><description><![CDATA[<img src="http://leifjohnson.net/photos/thumb-20110326165027-garden,squash.jpg">]]></description><link>http://leifjohnson.net/photo/squash-seedling/</link><guid isPermaLink="true">http://leifjohnson.net/photo/squash-seedling/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Thu, 27 Dec 2012 15:27:56 GMT</pubDate></item><item><title><![CDATA[tomato seedlings]]></title><description><![CDATA[<img src="http://leifjohnson.net/photos/thumb-20110326165011-garden,tomatoes.jpg">]]></description><link>http://leifjohnson.net/photo/tomato-seedlings/</link><guid isPermaLink="true">http://leifjohnson.net/photo/tomato-seedlings/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Thu, 27 Dec 2012 15:27:43 GMT</pubDate></item><item><title><![CDATA[chard in the garden]]></title><description><![CDATA[<img src="http://leifjohnson.net/photos/thumb-20110326164957-garden,chard.jpg">]]></description><link>http://leifjohnson.net/photo/chard-in-the-garden-1/</link><guid isPermaLink="true">http://leifjohnson.net/photo/chard-in-the-garden-1/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Thu, 27 Dec 2012 15:27:30 GMT</pubDate></item><item><title><![CDATA[chard in the garden]]></title><description><![CDATA[<img src="http://leifjohnson.net/photos/thumb-20110326164940-garden,chard.jpg">]]></description><link>http://leifjohnson.net/photo/chard-in-the-garden/</link><guid isPermaLink="true">http://leifjohnson.net/photo/chard-in-the-garden/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Thu, 27 Dec 2012 15:27:17 GMT</pubDate></item><item><title><![CDATA[garden beds, take 1]]></title><description><![CDATA[<img src="http://leifjohnson.net/photos/thumb-20110326164527-chickens,yard,garden.jpg">]]></description><link>http://leifjohnson.net/photo/garden-beds-take-1/</link><guid isPermaLink="true">http://leifjohnson.net/photo/garden-beds-take-1/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Thu, 27 Dec 2012 15:27:01 GMT</pubDate></item><item><title><![CDATA[baby chickens]]></title><description><![CDATA[<img src="http://leifjohnson.net/photos/thumb-20110317103940-chickens.jpg">]]></description><link>http://leifjohnson.net/photo/baby-chickens/</link><guid isPermaLink="true">http://leifjohnson.net/photo/baby-chickens/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Thu, 27 Dec 2012 15:26:14 GMT</pubDate></item><item><title><![CDATA[Three cheers for tau]]></title><description><![CDATA[<p>At least on <a href="http://news.ycombinator.com/item?id=4172332">Hacker News</a>, there's been a healthy debate going for a little
while about whether tau or pi is &ldquo;right.&rdquo; <a href="http://tauday.com">Tau</a>, if you haven't seen it
already, is defined as the ratio of a circle's circumference to its <em>radius</em> :
$$ \tau = \frac{C}{r} $$ Pi, on the other hand, is well-known from school as the
ratio of a circle's circumference to its <em>diameter</em> : $$ \pi \frac{C}{d} $$</p>

<p>Like all healthy debates, there are solid points to be made on both sides, and
the winner, to my eye and that of others, seems to depend on your primary
intended use. After all, %%\pi = \frac{\tau}{2}%%, or %%\tau = 2\pi%%, so the
one substitutes readily for the other. Advocates of %%\tau%% swoon over the
absence of %%2%%s floating around in classic phenomena like the natural period
of a sine wave, while advocates of %%\pi%% jostle back with the delicate
simplicity of %%\pi%% in the formula for the area of a circle.</p>

<p>Aesthetics is a touchy area, partly because many people often have strong
feelings about aesthetics hidden beneath the otherwise calm surface of their
conscious minds. People claim equanimity, but a secret tumult rages below, only
to be unleashed when a debate breaches the surface of one's aesthetic
assumptions. Sometimes these debates can get vicious, but the comments I have
read from both sides of the %%\tau%%--%%\pi%% debate seem well-considered, and
the general conclusion seems to be that %%\tau%% and %%\pi%% are both
well-suited for use, but for different specific purposes. In particular, %%\pi%%
seems well-suited for cases where you're measuring areas of things, while
%%\tau%% seems well-suited for cases where you're measuring angles.</p>

<p>The first time I heard about %%\tau%%, I thought the author of the manifesto was
a little bonkers. I mean, who would question the correctness of a constant as
fundamental in our universe as %%\pi%% ? But even after a few minutes, just
enough of a seed was planted in my brain to think that this might not be such a
crazy idea after all. Angles, it turns out, are everywhere in the
three-dimensional world. So, although unsurprising in hindsight, I was a little
startled the first time I decided to take %%\tau%% out for a spin in my own
work. Mostly I was startled to find that I'd <em>already</em> been using %%\tau%%, only
I'd defined it in most of my code, up near the top, as</p>

<pre><code>TWOPI = 2 * numpy.pi
</code></pre>

<p>That constant appeared at the top of nearly every Python program I wrote that
dealt with drawing, from Cairo to OpenGL. As described in the Tau Manifesto, all
you have to do to start using %%\tau%% is to define it near the start of your
code or paper, either as the ratio of circumference to radius, or even more
simply, like above, as %%2\pi%%. Happily, and surprisingly for me, several
remaining parts of the code and papers I've worked on have become simpler as a
result.</p>

<p>The change doesn't suddenly solve all your programming problems ; it isn't even
that pervasive, really. But somehow, the mental load of handling two constants
simultaneously---%%2%% and %%\pi%%---is noticeably higher than handling
one---%%\tau%%. For example, converting from radians (the lingua franca of most
math libraries) to angles (the dialect of many graphics libraries) becomes
somehow easy to remember, a simple matter of changing units. I was never able to
remember the conversion formula when it was stated in terms of %%\pi%%, since it
has a bizarre factor of 180 floating in there :</p>

<p>$$ \theta^\circ = 180 \frac{\theta^r}{\pi} $$</p>

<p>but the same formula, multiplying the top and bottom by 2 and then replacing the
%%2\pi%% with %%\tau%%, just sticks in my mind :</p>

<p>$$ theta^\circ = 360 \frac{\theta^r}{\tau} $$</p>

<p>I think it's easier to remember for an embarrassingly simple reason : there are
360 degrees in a circle, and %%\tau%% radians in a circle. So, convert from the
latter to the former, we just divide out the number of radians, and multiply by
the number of degrees. Somehow that never made sense to me when thinking about
%%\pi%%.</p>

<p>A similar simplification appears when converting to a new fundamental frequency
in sines and cosines. The natural period of the sine function is %%2\pi%%, so to
convert to a new frequency, you need to have all of these expressions floating
around in your code :</p>

<pre><code>numpy.sin(2 * numpy.pi * freq)
</code></pre>

<p>But, as I mentioned earlier, I already had these definitions at the top of my
files :</p>

<pre><code>TWOPI = 2 * numpy.pi
</code></pre>

<p>so the line was usually</p>

<pre><code>numpy.sin(TWOPI * freq)
</code></pre>

<p>which, syntactically and semantically, is identical to using %%\tau%%. Again,
though, I find this strangely harder to wrap my head around than</p>

<pre><code>TAU = 2 * numpy.pi
numpy.sin(TAU * freq)
</code></pre>

<p>What's going on here that makes %%\tau%% so much easier ? The code is nearly
character-for-character the same. I think the beautiful thing that's happening
is that %%\tau%% really does capture a fundamental constant, in a way that makes
it look like %%\pi%% is the one that's off by a factor of two.</p>

<p>Of course, these examples are biased towards cases where %%\tau%%
shines&mdash;dealing with angles---, but in my experience, these cases are the rule
rather than the exception when writing scientific code. I think this bias
towards angles helps make %%\tau%% the &ldquo;sensible default&rdquo; when dealing with many
scenarios in scientific and graphics programming.</p>

<p>So, I, for one, have decided to embrace %%\tau%% in my work, because I find it
simpler to understand in many common scenarios. Besides, who wouldn't want twice
the pie ?</p>]]></description><link>http://leifjohnson.net/post/three-cheers-for-tau/</link><guid isPermaLink="true">http://leifjohnson.net/post/three-cheers-for-tau/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Sun, 08 Jul 2012 18:24:00 GMT</pubDate></item><item><title><![CDATA[One way the bread can go wrong]]></title><description><![CDATA[<p>L and I were gifted a beautiful, red, enameled cast iron pot this spring, for
the express purpose of baking bread. I know, it sounds funny, needing a heavy
pot to bake bread. But, you see, we've finally run across the no-knead bread
technique that hit the NY Times / NPR crowd several years back, and it truly is
a lovely way to make bread.</p>

<p>Here's the general recipe. In a big bowl, mix up 3c bread flour, 1.5c warm
water, 0.25t yeast, and 1t salt. Cover and leave alone for 12-24h. Turn the
goopy, bubbly dough out on a heavily floured, woven cloth, fold it over itself a
few times, and wrap up in the cloth. Set the oven timer for 90m. When it goes
off, put the oven-safe pot (including the oven-safe lid) in the oven, preheat to
450, and set the timer for 30m. When that goes off, dump the dough into the pot,
and bake for 30m with the lid on, and then 20 additional minutes with the lid
off.</p>

<p>The result is a lovely loaf of white bread, with a somewhat spongy crumb and a
crispy crust. Remarkably, the entire process is rather immune to error. So often
in my attempts at making bread the usual way, I have ended up with loaves of
dry, crumbly nothingness surrounded by tough, chewy crust. Add too little water
or knead too much, and nothing works right. But the kicker is that you can't
know how it will turn out until it turns out. This no-knead recipe is
delightfully resilient, I think partly because you're really not supposed to
mess with it very much.</p>

<p>But my faith in the recipe was shaken last week when a slight disaster resulted
in my lovely loaf of bread <em>sticking to the bottom of the pot</em> ! Unlike the
usual old recipe, though, I know exactly what happened this time, and I want to
use this space on the internets to warn others not to tread this path. The path
involves using too much water in the dough. I was making a double batch of bread
(we've noticed that using a single batch yields too little dough, resulting in a
flat loaf of bread with cross-section similar to a biscotti), but when measuring
the water I forgot to double it at first, resulting in a very dry mix. I added
more water, but in the end it was too much. The dough turned out lovely and
gooey, but when we tried to turn it off the towel into the pot, a huge amount of
it stuck to the towel, which took several minutes to scrape off.</p>

<p>Part of the genius of this method of baking bread is that the pot is ludicrously
hot when you bring it out of the preheated oven to add the dough. This has the
benefit of instantly baking the outside of the dough when you add it to the pot,
resulting, if done properly, in a loaf of bread that slides right out of the pot
at the end. If the dough is too wet, as I discovered, then the pot doesn't have
enough heat to evaporate instantly the necessary amount of water from the
surface of the loaf, and something will end up sticking. If, as in my case, the
sticky bit is on the bottom, then it's pretty difficult to tell what went wrong
when you pull the pot out of the oven : everything is 450 degrees hot, and so
you don't have a lot of angles for investigating where the stickiness is
happening.</p>

<p>So, with a hot mitt and a very hot pot, I pulled and pulled against the wall of
the pot with a butter knife, rupturing the lovely crispness of the crust, but to
no avail&mdash;the loaf would not budge. Even waiting a few minutes and inverting
the pot over the cooling rack didn't do the trick ; instead of coming out
cleanly, the loaf split in half lengthwise, the bottom crust stuck inside the
pot, with the top of the loaf suspended in the air from the remaining intact
tendrils of crust on the side. Eventually I freed the bottom crust from the pot,
but it was too late, the loaf was irrevocably torn. It's still delicious bread,
and we enjoy it every day here, but the bottom crust ends up torn off and left
on the counter.</p>

<p>So, fellow no-knead bread bakers, beware adding too much water to your dough !
For split loaves and orphaned crusts lie this way. Follow the recipe well, and
strike the right balance of added-water against added-flour, and you, too, will
rejoice in crispy, soft bread for your sandwiches and soups.</p>]]></description><link>http://leifjohnson.net/post/one-way-the-bread-can-go-wrong/</link><guid isPermaLink="true">http://leifjohnson.net/post/one-way-the-bread-can-go-wrong/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Tue, 12 Jun 2012 14:34:00 GMT</pubDate></item><item><title><![CDATA[Another ingredient of Greatness]]></title><description><![CDATA[<p>Today I sat down at the Internet Vortex to check out what's happening on Hacker
News, and I was pleasantly surprised to see Dalton Caldwell topping the
headlines with a <a href="http://daltoncaldwell.com/oh-the-places-youll-go">very nice blog post on how Great things are made</a>. Dalton's
point, from my reading of it, is that people who manage to do Great things are
able to do so not thanks to some grand, unfathomable notion of how the world
works, but at least in part because they have practiced their craft so
completely that it's become muscle memory.</p>

<p>I completely agree. Dalton's point cannot be underscored enough : a finely honed
craft is essential to making Great stuff. Knowing your craft inside and out lets
you see, on those rare occasions that fly by every so often, the tiniest window
of opportunity that lives in the gap between those defenders, or in the way the
light is playing off the model in your viewfinder, or in any number of otherwise
completely ordinary situations. In an <a href="http://www.nytimes.com/2006/08/20/sports/playmagazine/20federer.html?pagewanted=all">excellent essay on tennis</a>, Federer
half-jokes with Bjorkman that, during their games together, the tennis ball is
the size of a basketball&mdash;but this can only happen because he is so expert in
his sport that he can ignore the motions of his hands, feet, and racquet to
focus on the strategy in the game. My friend Pete refers to this, in sailing, as
&ldquo;getting your head out of the boat.&rdquo; Only by having practiced can you safely
commit the operation of the tiller and rigging to reflex, so that you can devote
your conscious energy to anticipating the movements of the current or the
actions of the other boats in the race. The parallels in other disciplines are
numerous.</p>

<p>I wanted to chime in with another component that seems necessary for making
Great things happen : volume. This is not a new idea. It's probably been
repeated in many other places, really, but I specifically remember reading it in
a lovely book called <em><a href="http://www.tedorland.com/books/artandfear.html">Art and Fear</a></em>. In the book, the authors address many
aspects of what it is that makes &ldquo;art,&rdquo; and one of them, I seem to remember, is
volume. Bach, for instance, created over 1,000 works of music in his lifetime.
Although many of them have come to be regarded as Great, there are an awful lot
that only PhDs in the music department have ever run across. There's a corollary
to this idea that volume is critical for producing Great work : Greatness is
essentially random. Only by making a lot of something can we hope,
intentionally, to make some of it great. Or, seen through the lens of the
contrapositive, you will never produce anything Great if you don't ever produce
anything.</p>

<p>I think there's an important implication of this idea of producing lots of work,
and it has to do with our collective reverence for Greatness. The point starts
with a question : If Greatness is random, then how is it that some people are
more consistent about producing Great output than others ? I think many people,
and our culture in general, interpret people who output Great things in quantity
as &ldquo;having talent,&rdquo; or as being infused with some other mystic ability. Talent
might exist, and it might even be important for some stages of certain crafts,
but I find the notion of talent alone to be, at best, an inadequate explanation
for the amazing things that people can do.</p>

<p>Fame tends to accompany Greatness in society. This seems natural, as people of
all types enjoy appreciating Great things. Fame is deceitful for many reasons,
however. The relevant one here is that fame tends to obscure the details under
the glimmering sound bite on the surface. Often, a lot of work goes on behind
the scenes, particularly before someone gets around to producing Great work. In
particular, for people who make things, only the Great ones tend to be
remembered. But there are often a lot of other things behind the fame that lurk
in obscurity. I think it's extremely important to acknowledge the role of these
obscure, less-great outputs in producing what appears to be someone who can
suddenly and consistently produce Great work.</p>

<p>Example : consider startups. Almost legend now in the startup culture are
&ldquo;four-year overnight success stories"---companies like Rovio that struggle for
years and suddenly break into fame with an exciting product like Angry Birds.
More often than not, these companies have been spending a lot of work developing
their products, but our collective fascination with and emphasis on fame tends
to ignore the difficult struggle that precedes this sudden event.</p>

<p>I think this tendency to ignore the larger story is unfortunate for people just
learning a craft, because the lack of instant fame can all too easily send a
signal that is interpreted as, say, &ldquo;I suck at drawing,&rdquo; or, &ldquo;I'm no good at
programming,&rdquo; or the like. Instead of giving up, it strikes me that consistently
producing <em>anything</em> in a craft is a much more important way to achieve
Greatness.</p>

<p>In this way, volume and practice are intimately linked. Practicing can produce
volumes of output, some of which might be Great. Or, seen from the other side,
making yourself produce a large volume of work is a guaranteed way to get lots
of practice. But I think volume is an important concept in its own right,
because it reveals a few of the otherwise-obscure details that tend to lurk in
the shadows of fame. By producing a lot of something, you can learn how it
works, what the craft does, and even, slowly, what the &ldquo;art&rdquo; of your discipline
can reveal.</p>

<p>I'm certain that there are other important ingredients in making Greatness
happen. <a href="http://www.princeton.edu/main/news/archive/S33/87/54K53/">Luck</a> seems to be a big one. (But, of course, the more you practice
the luckier you get ?) Empathy, talent, karma ... the list might be endless.
But, as far as I've seen, volume is an important component of making Great
things happen.</p>]]></description><link>http://leifjohnson.net/post/another-ingredient-of-greatness/</link><guid isPermaLink="true">http://leifjohnson.net/post/another-ingredient-of-greatness/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Sun, 03 Jun 2012 18:30:00 GMT</pubDate></item><item><title><![CDATA[Rain]]></title><description><![CDATA[<p>Rain ! Finally we have had rain twice in as many weeks, and I am grateful for
it.</p>

<p>I can't tell for sure, but I think the plants are even more grateful for it than
I am. The roses this morning, busy pushing a new round of buds toward the sky,
started to droop. The tomatoes have gone on strike, and the seeds that we
planted in the past month have gone awol. But after a nice soak for a half hour
or an hour, many of these errant vegetables start to straighten up and fly
right. At least for the next week or so, the plants around town might celebrate
a little&mdash;the Texas sage grows purple flowers atop its silvery leaf, and little
horse herbs sprout yellow flowers in nooks and crannies. The bees abandon their
zealous worship of the water drip we set up for them, preferring instead to get
their water from sources unknown to us. The chickens, apparently not putting two
and two together far enough to seek shelter, seem to prefer that the rain would
leave them out of it, and stand resolutely in the middle of their run, faces
tilted skyward towards the drops.</p>

<p>Last week it rained for real&mdash;the first time for probably 6 or 8 months&mdash;just
when L and I happened to be sitting in a plane beside the runway at the Austin
airport, hoping to get to Houston. The flight plans would have to be jettisoned,
at least for that day, but we did get to sit in the plane on the runway while
the worst of it passed overhead. I got to look out over the scrub oak and
grasses of what remains of the Blackland Prairie next to the airport, the dry
shrubs bending sideways in the gusts, getting pelted with water and lightning.
The sight was beautiful, similar in a way to the yard and garden here at home
finally getting some liquid refreshment from the sky, but more untamed and vast,
shrouded in foggy falling droplets as the distance increased to the horizon.</p>

<p>Last week's rain happened bright and early ; today's came at dusk. In the course
of it (both times), much of the dirt from the yard reconfigures itself, and a
small moat forms and then disappears on the uphill side of the house, giving a
good indication of where to put the rain garden later this summer. The gutters I
put on the garage perform beautifully, funneling water into the rain barrels
until they overflow. Immediately after, the ants panic and surface : all over
town, even in the middle of the street, ants teem out of the earth and swarm
over the surface of whatever surface happens to be there. The earth must be made
of ants.</p>

<p>Lightning is still flashing in the distance even now, as the ants prepare their
evacuations, and as I nod off to sleep.</p>]]></description><link>http://leifjohnson.net/post/rain/</link><guid isPermaLink="true">http://leifjohnson.net/post/rain/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Sat, 21 May 2011 05:12:00 GMT</pubDate></item><item><title><![CDATA[Spring is springing]]></title><description><![CDATA[<p>Now that spring has arrived, the days have been passing in a flurry of activity
both inside and out.</p>

<h2>Spring</h2>

<p>It's hard to imagine now, but just a few weeks ago Austin was covered in an inch
of snow and ice, and the poor Meyer lemon we planted outside appeared to have
frozen solid, dropping all its leaves. In the intervening days, spring has gone
from a promise to a premise to a full-on phenomenon&mdash;leaves have emerged from
tree limbs, grass is reaching skyward, and the bees are out searching for
nectar. At first, spring started in tiny places : a single branch on the side of
an otherwise dormant trail, seedlings emerging from soil, a tiny leaf sprouting
from the ground, green near brown. But in the past ten days or so, these tiny
bits of new growth have pushed up and out, bringing with them daffodils, sage,
and even tiny new Meyer lemon branches ! The weather in the past two days, even,
has gone from the seventies to the eighties. All too soon we'll be in the middle
of summer.</p>

<h2>Juggling</h2>

<p>Several Saturdays ago, L and I went to the <a href="http://juggling.place.org/">Texas Jugglefest</a> 2011 public
show. We weren't really sure what to expect other than lots of bean bags, pins,
and rings being thrown in the air. But the show was way more than that, and we
both left feeling energized and optimistic. Highlights from the show were:</p>

<ul>
<li><a href="http://www.youtube.com/watch?v=vWnRt1NviVE">Christopher Haaser</a> is nine and has only been juggling for a year and a
half, but he can keep 6 objects in the air at once (in front of an auditorium
full of people).</li>
<li><a href="http://whatsupjuggling.com/">Doug Sayers</a> has the best stage demeanor I've ever seen, and he got 9 bean
bags to levitate for a little while in front of the crowd.</li>
<li>Kelsey Strauch and Jules McEvoy-Schaefer each performed separately, and then
together as <a href="http://flourishandfool.com/">Flourish and Fool</a>, an awesome sort-of-indie-circus act. They
did an amazing piece with <a href="http://www.arsenedupin.com/">Arsene Dupin</a> where Kelsey stood on Jules's
shoulders, each juggling three pins, taking turns passing to Arsene.</li>
</ul>

<p>Juggling is a very strange activity. First you learn the basics, and then you
kind of have a ladder of next-trick-to-learn. (My own progression stopped at
passing three clubs, so I am shooting for four balls or four clubs.) An entire
show of juggling acts sort of starts looking like a checklist after not too
long : ok, now they're going to do the rings, now four rings, now they do the
trick where they stack the rings on their head, now they do five balls, now five
clubs, etc. But I have to say that despite the repetition in the acts, there is
a lot of training behind the scenes, and performing in front of an audience is
impressive, no matter who you are. Combined with the stage magic between acts,
and thanks to the kids in the audience, it was definitely a show worth
attending. I'm glad that someone on the neighborhood mailing list sent out an
announcement about it, because these shows are one of the things that makes
living in Austin so nice.</p>

<h2>Garden update</h2>

<p>The Sunday after the juggling show dawned gray. When I finally brought myself to
open my eyes and look out the window, a spitting drizzle was knocking against
the glass. I lugged myself out of bed far later than I should have, and moped
around the house for a minute. I looked outside again and noticed that the trash
bin had spent the weekend on its side in the alley behind the house, so I put on
my shoes and ventured outside to pick it up. Happily, the air outside was
refreshing from the rain, and the resulting humidity radiated the warmth that
was, in fact, peeking in through the clouds. It was a beautiful day, and just
walking around outside a little brought me out of a listless funk.</p>

<p>We ended up making the most of the day. L went off to the studio, and I finally,
finally finished a project in the garage that had been on my todo list for
months. Then, with perhaps a little hubris, but mostly because of the gorgeous
weather (the afternoon sun had burned off the clouds and brought warmth and
light to the backyard), we undertook to dig out the second raised bed for the
garden. Out came the mattock, shovel, and hoe, and we spent the next couple of
hours moving a relatively small (tiny ?) amount of dirt a small distance across
the yard. It was a completely exhausting effort. The mattock is (by design)
heavy, and lifting it up and slamming it into the sod is, by turns, satisfying
and overwhelming (not to mention blistering on the inside of the thumbs). L
discovered that the hoe is a great tool for a follow-up, to loosen the chunks of
sod and move them out of their stubborn hiding places. Then a tour with the
shovel moves the dirt out of the ground and into a pile on the side of the lawn.
Then, rest.</p>

<p>The week after we had the beds laid out, we ordered bulk garden soil from the
<a href="http://www.naturalgardeneraustin.com/">Natural Gardener</a> in Austin, and now we have three lovely raised beds in the
backyard, where before there was only grass and scorched weeds ! We went to the
<a href="http://www.sunshinecommunitygarden.org/">Sunshine Community Gardens</a> plant sale a couple of weeks ago and bought six
tomato seedlings, a couple lavenders, three bell peppers, basil, oregano, and
fennel, bringing our seedling population up to nearly two dozen. After the beds
were ready, we waited out what looks to be the last of the cold spells for this
year, and last weekend we put the seedlings in the ground ! Now I will fret and
worry as the bugs devour the tender plants, but I hope that we'll get a bunch of
tomatoes, cucumbers, squash, beans, and chard out of the garden this year.</p>

<p>Just for the record, we planted these seeds in mid-February :</p>

<ul>
<li>pumpkin (reclaimed from our fall Jack-o-Lantern)</li>
<li>squash (from the CSA box)</li>
<li>peppers (ibid)</li>
<li>red Swiss chard</li>
<li>pomegranate</li>
<li>basil</li>
<li>mint</li>
</ul>

<p>Around early March we had seedlings from the first four, especially the pumpkin
and squash, which push up out of the ground with remarkable force. The
pomegranate seeds never did anything, and the basil and mint seem to have just
needed more time to produce their teensy sprouts.</p>

<h2>Chickens</h2>

<p>Two weeks ago L and I went over to <a href="http://buckmoorefeed.com/">Buck Moore Feed &amp; Supply</a> and bought three
tiny chickens ! We have kept them in a box for the intervening days, during
which time they have gone from little three-inch puffballs to six-inch gangly
teenager-looking things. They still chirp like chicks, singing themselves to
sleep every evening, but soon enough they will be big, probably ornery,
chickens, hopefully eating the bugs from the garden plants and giving us a few
eggs now and then.</p>

<h2>Family visit</h2>

<p>Last weekend my dad and stepmom came to visit, so we all took the occasion to
drive the hour and a half down to San Antonio. The renowned riverwalk had piqued
our curiosity, so we wanted to see what it was like. It turns out that we were
there the weekend before Saint Patty's Day, so the river had been dyed green.
Combined with the narrow channel, the low banks, and the crowds of people
ambling about, the entire scene looked something like Disneyland-meets-Vegas. It
was surreal, but I really enjoyed the walk. I love urban landscapes that are
actually used by people, and San Antonio has definitely got the use.</p>

<p>Despite being more like Disneyland than I had expected, the riverwalk was not
too far from my imagination. What I was not expecting, though, was that San
Antonio is a very old city, by American standards, and so there were loads of
other interesting things in town. The downtown area surrounding the riverwalk is
old and in various states of renovation and disrepair, and the crowds from the
more touristy blocks spill out into the surrounding streets and make the city
feel very European. The Alamo is in San Antonio, and the highlight there (for
me) was the beautiful grounds surrounding the &ldquo;Shrine of Texas Liberty&rdquo; &ndash; even
including a possum hanging out on one of the yucca plants. The best, though,
were the ruins of four original Spanish missions in the southern part of town,
generally built in the mid-1700s and mostly in ruins now. Surprisingly, though,
the usable parts of the buildings are still maintained by some part of the
Catholic church, and set aside as National Park land in some capacity, so they
are all beautiful working areas that welcome both tourists and worshipers.</p>

<p>My dad is a fountain of know-how around the house, and my stepmom loves to
garden, so we spent a couple of the days of their visit just hanging around at
home doing a bunch of little projects. We labeled the circuits on the breaker
outside, fixed a hanging lamp, installed an exterior outlet, weeded two huge
flower beds, and installed drip irrigation in the raised beds. The house is
in significantly better shape now than it was a month ago !</p>

<h2>Research</h2>

<p>It's been a little slow going on the research front these couple of weeks, but
things have been moving along in fits and starts. I've been coordinating with B
to get the lane driving simulation to a place where it consistently learns
useful policies. Over the past week I ran a number of small simulations in the
walter world, where the learning agent must aim for targets and avoid obstacles.
The world is normally static, but I added a new feature that allows the
obstacles and targets to move around randomly at a fixed speed. By measuring the
distance to the nearest target during evaluation periods, I found that the
learner can develop a working policy even when the targets are moving at nearly
the maximum available speed. Also, interestingly, the learner failed to develop
a working policy for some speed conditions, but not all of them. In addition,
when the learner did develop a working policy (so that it was able to remain
near the targets throughout the evaluation periods), the distance-to-target
metric went through several discrete plateaus of similar performance, divided by
sudden change in policy &ndash; quite reminiscent of punctuated equilibrium. My take
on the simulations is that learning is highly dependent on exposure to critical
parts of the state-action space, and so unless the learner gets this critical
expsure, there is some sort of ceiling on overall performance. I'm sure there's
a better way to phrase this, but that seems to be the behavior so far.</p>

<p>At any rate, the plan for the next week or so in the driving world is to
separate the tasks in the lane driving world by controller, so that we can
create a pedal controller that depends only on distance to target, and a
steering controller that depends only on the lane occupancy. I've also included
skeletal code for perceptual arbitration, which is exciting because that's sort
of the entire point of the reinforcement learning simulation for this project.</p>

<p>On my own work, I've been pretty stalled for the past couple of weeks. My work
machine has been training up a Smith/Lewicki codebook for several days now (!)
but seems unable to get below about 33 % reconstruction error on the development
sound when the codebook vectors are allowed to shrink and grow. (A different
Smith/Lewicki codebook that I trained earlier gets down to 23 % error with
constant-length vectors.) I have, however, coded up a Python translation of the
Taylor/Hinton/Roweis deep belief network that they used to model human motion
capture data ! I plan to sandwich this network between the motor and perceptual
representations in my learner to produce a full model of vocal mapping. This
week I will be testing and verifying the deep belief nets code, and training up
a matching pursuit (or, probably more likely, a Smith/Lewicki codebook) on
the FFT power spectra, to see how well that can model speech production. It
remains to be argued how this model can incorporate (a) plant changes like vocal
cord length changes during development, and (b) frequency mapping to adapt
parent-frequency speech to learner-frequency speech. I think these points are
important but can hopefully be ignored in the first pass of such a model.</p>]]></description><link>http://leifjohnson.net/post/spring-is-springing/</link><guid isPermaLink="true">http://leifjohnson.net/post/spring-is-springing/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Sat, 19 Mar 2011 19:29:00 GMT</pubDate></item><item><title><![CDATA[Garden, RAID, and hacking]]></title><description><![CDATA[<p>This week has pretty much flown by. The major highlight has been a weekend visit
from P and K, which has been a welcome change of pace from school work.</p>

<h2>Garden</h2>

<p>With a lot of help from our visitors on Saturday, we excavated about 5 inches of
soil from the site of our first garden bed, a sort of squared-off C shape that
we'll soon match with a second bed leading from the water barrel.</p>

<p>The work basically progressed in four stages. First, we got a bunch of large
boxes from the <a href="http://www.peddlerbike.com/">Peddler Bike Shop</a> and laid them out on the ground to figure
out where we wanted the beds. (Happily, a bike box is about the right width for
a raised garden bed, and the folks at our bike shop are pleased to divert them
to a useful cause.) I found the boxes very helpful for visualizing the actual
size and shape of the beds on the ground, especially as the sun transits
overhead and exposes areas of sun and shade during the day. Next, P used a
<a href="http://en.wikipedia.org/wiki/Mattock">cutter mattock</a> to chip up the sod in the area under the boxes, and the rest
of us shoveled the sod and dirt into a pile on the side of the lawn. (We will
likely add much of this pile to a comfrey tea this summer, since it contains a
bunch of bermuda grass runners.) I trimmed the corners on a few of the boxes,
and K cut some drainage holes in them, and then we laid the boxes into the
depressions in the ground, making sure that the edges of the boxes covered the
sides of the holes, to prevent bermuda grass from growing into the beds.
Finally, we laid bricks around the edges of the boxes so that we have about a
foot of vertical space for dirt in the beds. In the next week or so we'll get a
couple yards of dirt from a garden store, and then we'll be ready to plant our
veggie seedlings !</p>

<p>I feel old these days when I work on projects like this, because all of the
digging puts a hurt on my back. Somehow I used to think back pain was something
I wouldn't ever have to deal with, but boy was I wrong. Luckily, stretching and
resting seem to work well for repairing the back muscles, but the feeling of
getting older doesn't go away that easily.</p>

<h2>Painting</h2>

<p>This week we also finished up the bulk of the painting on the house ! The
bedrooms, hallway, and living room are all finished, modulo some touch-ups at
the corners of the ceilings. The kitchen still needs to have one partial wall
painted white, but that will about do it for the major painting duties.</p>

<p>The work is never actually done, of course, because after we finish the walls we
still have a large cabinet and 8 or 9 doors to paint, and then hinges and other
hardware to turpentine, oil, and reinstall. But we've largely been able to move
our furniture back to its original position in the house, and it's really nice
to have floors instead of dropcloths again.</p>

<h2>Adventures in system administration</h2>

<p>I spent a good bit of time last week installing a bunch of new hard drives in my
computers at work and setting them up as <a href="http://en.wikipedia.org/wiki/Standard_RAID_levels#RAID_5">RAID-5</a> arrays. This process went
well once I got all the drives (I ordered three 2TB WD Caviar Greens and went
through two RMAs before I had three actually working drives) but I ran into some
snags while reinstalling Ubuntu. Here's the situation. I have an Ubuntu machine
with one drive, call it drive A, that contains a bunch of data I want to move to
a new RAID array. I install drives B, C, and D in the machine, set up RAID, and
move the data to the array. I need to use drive A in another machine, so I
install Ubuntu on a new drive, call it drive E, <em>on a different machine</em>
(because the target machine can't boot from USB or CD). After swapping drive A
out for drive E, the RAID array will not start ! Concerned about massive data
loss, I replace E with A again and boot up, and the RAID array starts fine. So,
even though all the respective drives are plugged into the same SATA ports, the
Linux kernel sees them somehow differently, and will fail to create the RAID
array just the way it was before. My solution, which was dangerous but worked,
was to boot the machine with its final drive configuration (B+C+D and E), and
then re-create the RAID array manually. Thankfully, I had recorded the mdadm
command I used to create the array (and in particular the chunk size), so after
re-syncing the third drive I had a complete RAID setup that worked, with no data
loss.</p>

<p>During the course of this adventure, which lasted a few days because it takes a
long time to sync up a 2TB RAID array, I had some interesting realizations about
system administration on Ubuntu. First and foremost, I had almost forgotten how
to do many parts of these tasks, which I realized was because I haven't had to
do any of them in several years ! Ubuntu is completely to thank for this blessed
state of ignorance ; it really just works, and my life is better for it. The
second realization was that system administration is really not fun, which I had
also completely forgotten in the course of running these Ubuntu servers that
work well. Thank you, Ubuntu !</p>

<h2>Tube resonance model</h2>

<p>On Thursday I started wrapping the <a href="http://www.gnu.org/s/gnuspeech/">gnuspeech</a> <a href="http://pages.cpsc.ucalgary.ca/~hill/papers/synthesizer/">Tube Resonance Model</a> for my
current synthesis work. I have been casting about this semester for a
programmable articulatory synthesizer, and, although it is open and easy to
install, <a href="http://www.fon.hum.uva.nl/praat/">praat</a> just doesn't cut it. Praat runs on Ubuntu, but the scripting
language is opaque and poorly documented, and there are no examples of scripts
out there that I can use to understand how to make praat generate audio over the
course of more than a couple hundred milliseconds. It seems to me that Praat is
more a tool for <em>phonetics</em> than for speech, as you might guess by looking at
the project's subtitle.</p>

<p>On the other hand, the world of speech synthesis apart from Praat seems centered
around text-to-speech. This is understandable, given the revered position of
text in computer science, but I need a programmable speech synthesizer that
gives me a small number of temporal control knobs, either via formants or
&ldquo;muscle&rdquo; parameters. Gnuspeech tempted me because it provides a small number of
control parameters, and the code is compact and well written. I have been
reluctant to try wrapping it myself, lest I get tied up in a month-long wrangle
with some code I don't know well. But, as it turns out, <a href="http://docs.python.org/distutils/setupscript.html">distutils</a>, <a href="http://www.swig.org/Doc2.0/Python.html">SWIG</a>,
and the gnuspeech code made things relatively easy to handle, so before I knew
it I had a wrapper ! I am working out what to do with the result, but I hope to
put it up on <a href="http://pypi.python.org">pypi</a> soon.</p>

<h2>Upcoming</h2>

<p>This week I've got a lot of programming on the table. I'm continuing work with B
on the reinforcement learning driving simulator. We've had problems getting
consistent learning behavior, so I will write tests to shed light on some
questions we have about the simulation. Is the world being quantized in a way
that introduces perceptual aliasing ? Or does the action space create aliasing ?
Is the representation of time interacting poorly with the dynamics of the world ?
Or is there just a bug somewhere in the Q learning implementation ? Lots of unit
tests are in store this week.</p>

<p>I'm also finally at a point where I can train up a number of matching pursuit
objects on sound data. This week I'll be running those in the background while
I'm writing tests for the reinforcement learning code. I think the Smith/Lewicki
code is ready to go, so I'm going to give that a whirl, too.</p>

<p>Finally, this weekend is <a href="http://www.cs.utexas.edu/~gracs/gradfest.shtml">GradFest</a> at UT, so I will be meeting some of the
prospective students on Saturday over a round of disc golf at Zilker. Come join
us if you have discs and want to have a nice afternoon in the park !</p>]]></description><link>http://leifjohnson.net/post/garden-raid-and-hacking/</link><guid isPermaLink="true">http://leifjohnson.net/post/garden-raid-and-hacking/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Sun, 20 Feb 2011 12:38:00 GMT</pubDate></item><item><title><![CDATA[Warming Up]]></title><description><![CDATA[<p>Waking can be an invigorating experience. Austin has&mdash;or at least I
have&mdash;spent the weekend waking from a forced hibernation, induced by
not-one-but-two recent spells of severely cold weather.</p>

<p>It was so cold here last week that I woke one morning to find that the water
from the faucet&mdash;destined first for warming and then for tea&mdash;gushed,
sputtered, and then petered out. The shower, bathroom sink, and outside faucets
behaved similarly. The pipes had frozen overnight, and I spent the next three
hours panicking about broken plumbing, donning long underwear, rooting the hair
dryer out from the bathroom cupboard, and crawling under the house to thaw out
the surprisingly unassuming pipe that brings water from the main into the house.
The next day, the meyer lemon that we bought to decorate the front yard curled
up its leaves in fright and froze, even though I'd covered it with an empty
inverted rain barrel. (I hold out hope that it will somehow sprout some new
branches this week.) In the midst of all this, my friend C arrived for a visit,
and we woke the next day to find the entire neighborhood covered in snow and
ice, witnessing a veritable comedy of vehicular errors as we drove downtown for
breakfast.</p>

<p>But this weekend the spell broke, and the city stretched its collective self out
in the sunlight. The Saturday farmer's market afforded parking only on the
second floor of the garage at Third and San Antonio ; for that matter, parking
lots and roads all across town were crowded. Austin expresses itself through car
use. It's been so nice outside today that L spent part of the afternoon reading
in the backyard, lounging on the cardboard that marks the soon-to-be garden
beds. All through the weekend, birds, pedestrians, and bikers peeked their heads
outside for the first time in days, greeted by a warming sun and a lovely
tropical breeze bearing clouds from the Gulf. This evening people sat outside on
porches as the bus went by.</p>

<p>I love&mdash;love&mdash;how Austin doesn't even venture outside when the weather is bad.
Last year I went to a class that was almost 90 percent empty when it was raining
outside one day : I figured most people just didn't want to face the gray
skies&mdash;I know I didn't. When snow showed up on the roads on Friday, the entire
university closed, and the bus system changed to run on a Sunday schedule. Even
the crazy people riding bikes&mdash;who, astoundingly, and often without hats or
scarves, are the last ones to head inside when it gets cold&mdash;didn't show up on
campus at the end of last week. It's better here just to hunker down for a
couple of days, because it will soon be sunny and warm again. This time it took
a couple of weeks, actually, but the sun seems to have returned to warm us all.</p>

<h2>School</h2>

<p>The past week has been a fairly productive one for me. On the coding side of
things, I have capped development on my <a href="http://github.com/lmjohns3/py-pursuit">matching pursuit</a> code after
vectorizing it for a pretty nice speedup. I can encode and decode sounds with
it, and the training time is wonderfully short for short codebook vectors. The
Smith-and-Lewicki version of the code needs more testing to uncover a
hard-to-find indexing bug near the end of the signal being encoded, but that
will come along this week. I also hacked a good bit on the <a href="http://code.google.com/p/ut-vrlab-rl-driving">driving simulator</a>
for B, getting the code to a good state where the dynamics match up well with
the reinforcement learning and state quantization side of things. (It turns out
to be surprisingly difficult to model a dynamic world using discrete bins.) We
still need to explore the reasons behind the non-smooth Q tables for some
modules, but I think it has something to do with the state quantization.</p>

<h2>Home</h2>

<p>At home, L and I did a good bit more painting over the past couple of weeks.
Thanks mostly to her work on the trim, we are nearly done with most of the
house ! Today was so beautiful outside that I pulled up some dead bermuda grass
on the once-and-future patio, and then piled up cinder blocks behind the garage
in anticipation of the rain barrels back there. A house is truly a stream of
things to add to the todo list, but it's also a more satisfying stream than many
of the things that crop up in coding work.</p>

<p>I also did a lot of computer shuffling this weekend. I got a new RAID-5 array
set up on a machine at the lab, and copied my data to it in preparation for
setting up a second RAID-5 array on the second machine. The linux install
process hit some snags this afternoon, so it will take some more system
administration time to get that fixed up and working, but I hope it will go by
quickly after getting some fresh eyes on it tomorrow.</p>

<h2>Upcoming</h2>

<p>This week promises to hold a lot of progress in my research work. I will make
some more progress on the speech learning project, by training up a few matching
pursuit dictionaries of different lengths and sizes&mdash;probably {20,50,100,200}ms
time windows, times codebooks of {20,50,100} vectors. We are going to compare
encoding efficiency against raw FFT to see if we're capturing anything
interesting with MP. I also hope to train up some MP dictionaries on the FFT
power spectra from recorded sound, to try for speech generation using those MP
codebooks as a control space. If this works, there might be some interesting
collaboration with J and R in the lab, to see if we can do something similar for
generating motor signals.</p>]]></description><link>http://leifjohnson.net/post/warming-up/</link><guid isPermaLink="true">http://leifjohnson.net/post/warming-up/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Sun, 13 Feb 2011 21:15:00 GMT</pubDate></item><item><title><![CDATA[Flying onto the pavement]]></title><description><![CDATA[<p>There's nothing quite like a bike accident to make one's bones tremble in their
sockets. The speed, the lack of padding, and the hardness of the paved earth all
chip in to make for a raw, powerful impact. I've had two bike accidents so far,
and they have definitely contributed to my own (still underdeveloped) sense of
mortality.</p>

<p>Before the first accident, I'd only once pulled a full-out Superman over a piece
of pavement. Winston and I had gone to Chapel Hill to meet up with Jordan, who
was in town just for the weekend, and the three of us were somehow separated
from one another as we walked out of a restaurant on Franklin Street. Winston
and I found each other first, but we needed directions to Lydia's house, where
we were supposed to be heading next. We thought we saw the back wheels of
Jordan's car pulling out of the parking lot as we rounded the corner of the
restaurant. We both immediately broke into a sprint, trying to signal Jordan to
stop. As we accelerated on foot through the parking lot, I dodged a bit to the
left to head off the car's apparent trajectory, but I miscalculated the distance
to Winston's outstretched feet, in front of me, and tripped over them.</p>

<p>I don't remember much about what happened next, but I do remember having the
distinct sensation of flying, my entire body stretched out horizontally a couple
feet over the ground, seeming to levitate as the tiny rocks of the paved lot
passed underneath me, arms outstretched before my face. A pure Superman. I
landed, I deduced later that evening, on my right hip and knee, and although
they were sore for a couple of days, I was none the worse for wear. Let's hear
it for those halcyon years of early twenties health and fitness ! Also, I think
I can't have been traveling very quickly when I tripped, and I only had a couple
of feet to fall.</p>

<p>Not so when I first crashed my bike. It was the last week of June, and I was
riding to my new apartment in Mountain View from my girlfriend's parents&rsquo; house
in Palo Alto. I love the bike route between those two places&mdash;it's friendly,
fast, well-traveled, and well-lit. The last of those is really what got me into
trouble this time, though. I was in the middle of moving, so my bike stuff was
scattered, and in this particular instance the critical piece was my front
headlight, which I'd already moved to my new flat. I decided, foolishly, that
although I knew it was unsafe in theory, I'd rather have my bike at my place for
the morning commute than wait until a more convenient time to pick it up. So I
hopped on Veronica and had a lovely ride down Bryant, across Meadow, and through
the crop circle neighborhood. Just a mile or so from my new flat, I arrived at
the three-way stop behind the old HP buildings. Even though it was nearly 10 and
I would have been able to hear and see any approaching cars, I stopped, having
been chided the year before by a fellow cyclist after blasting through a
four-way stop in downtown Mountain View. (I've always mentally thanked that guy
for saying something to me. Thanks, concerned citizen.) Even after stopping,
though, a kid on a fixie can get up to a pretty good speed in the space of an
intersection, and the speed bump was completely hidden in the only patch of real
darkness on the whole trip.</p>

<p>The change was effectively discrete as my bike made a punching noise, and I
found myself once more floating through the air, disconnected from everything
solid in the world. This time around, the sense of wonder at my sudden flight
was somewhat dampened by the darkness, and probably also by my somewhat
increased age. In its stead I contemplated a single, uncannily clear thought :
Uh-oh, this is going to hurt.</p>

<p>The feeling of absolute freedom I'd experienced in that Chapel Hill parking lot
was short-lived this time around&mdash;probably because I hadn't managed to get that
full arm stretch happening as I launched from my bike. And then, in a split
second, I made contact with the ground, which had been flying underneath me at
probably 15 miles an hour. I remember emitting a single sound, a counterpoint to
the punching noise I heard as I was thrown from my bike. A huge, prolonged,
oooofff noise emerged from my lungs as my body parts rained down onto the
pavement. Although I didn't lose consciousness (at least I had been wearing my
helmet), I don't remember what happened for another split second, and the next
thing that I was aware of was the pavement, as it slid under my cheekbone in a
strange centering of the universe on the frame of reference around my face. I'm
sure it was just my altered perception, but the pavement seemed to slide on and
on.</p>

<p>Eventually I came to a halt, and I did a quick mental check to see whether I had
survived. I was once again on my right side, and some parts of me hurt a teeny
bit, but I could move all of my joints, I could stand up, and I could look
around. I was totally in shock, but even through that haze of endorphins I could
tell that I'd landed on my right arm as I came down. I walked my bike the rest
of the way home, with my arm over my head, and, with my girlfriend's help, began
the amazingly painful process of cleaning out all the road rash. The next few
days revealed that I'd severely bruised my arm, scraped some skin off my arm and
hands, broken the screen on my phone, and torn a hole in the shoulder of my
shirt where I'd slid on the pavement. But, in all, the heavens smiled on me that
night, because I hadn't sustained any really severe injuries, and my pants,
miraculously, remained unscathed !</p>

<p>I've always marveled at skateboarders. They are never all that great, the ones
you see doodling on the sidewalk in front of the library, but somehow they are
willing to take the stumbles and the falls as they attempt to jump and float
over a plane made of concrete. It must be really hard, that concrete. And,
though I can't skateboard, after I'd tried just standing on one I gained some
appreciation for how difficult it must be to do even the smallest ollie.</p>

<p>And terrifying ! Flying over that hard, hard ground, potentially losing balance
at any moment, supported only by a board mounted on wheels. Before my bike
crash, I'd never made the connection that cycling involved a similar risk,
particularly because of the higher speeds involved. So I didn't ride for months
after that first crash, and when I finally did get back on a bike, it was in
full daylight&mdash;it took another couple of months to restore my confidence in
night or twilight riding.</p>

<p>Even so, there's something calming and focusing about all of this fear. In those
instant instants when I've been launched, floating, above a piece of pavement,
knowing that I would soon be crashing onto the ground, there has been a brief
moment of panic, and an accompanying brief moment of acknowledgement, or
resignation, or peace, or whatever it might be called. At that moment, reality
is stripped of pretense. Your body <em>will</em> fall towards the earth, and your bones
<em>will</em> collide with the rocks and the clay. There is certainty there. And so
pulling a Superman is, in a way, a sort of meditation, or an exercise at finding
the truth among moments of excitement, disappointment, fear, and hope. As long
as there are other ways of finding this truth, of finding it in every moment,
then I'm on board. And I keep riding my bike in the meantime. With my headlight.</p>]]></description><link>http://leifjohnson.net/post/flying-onto-the-pavement/</link><guid isPermaLink="true">http://leifjohnson.net/post/flying-onto-the-pavement/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Wed, 29 Jul 2009 21:48:00 GMT</pubDate></item><item><title><![CDATA[On the frigid SF summer]]></title><description><![CDATA[<p>Okay, San Francisco, we need to talk. I know you're famous for it, but, really,
this whole I'm-cold-in-the-summer thing is getting pretty old.</p>

<p>Put yourself in my shoes. Imagine coming down with a flu and spending a weekend
in bed, unable to move without disturbing the air molecules that keep battering
your eyes. Yep, that was Saturday, two weekends ago, and I'm just getting over
the ensuing phlegm. You did rally a beautiful, beautiful day in there for
<a href="http://www.sundaystreetssf.com/">Sunday Streets SF</a>, and I'm really thankful for that. Having somewhat
recovered from my fever at that point, I got to spend the middle of the day on
Sunday chillin on the laughably small Valencia sidewalk, chatting with friends
and gawking at the bikers and roller skaters and kids on <a href="http://www.skuut.com/">Skuuts</a>. But the
very next day, still swigging my Tylenol cold stuff, I stepped outside to go to
work and you really put the smack down. It can't have been more than 50 degrees
outside. And so gray and miserable !! What a way to usher in a new week, I
thought, adding freezing weather to partly sickness. But oh no, you didn't stop
there. It was cold and gray the entire week ! No happy weather for this camper.</p>

<p>And even though your cold, foggy influence extends only as far south as the
airport and as far north as Mill Valley, you really make sure you have your
preferences known within those borders. Even now, as I return home from another
day at work, the sunshine that blesses the 101 as far north as the landfill is
blocked out suddenly by the gray mass of water vapor that hovers, seemingly
forever, over these beautiful hills.</p>

<p>I know, I'm being unfair. You're beautiful and exciting, and you know it. In
September you produce days of unparalleled beauty. But all summer it's just been
fog, wind, drizzle. You were much better last summer. So let's step it up a bit.
I expect full reform by the morning.</p>]]></description><link>http://leifjohnson.net/post/on-the-frigid-sf-summer/</link><guid isPermaLink="true">http://leifjohnson.net/post/on-the-frigid-sf-summer/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Mon, 27 Jul 2009 22:11:00 GMT</pubDate></item><item><title><![CDATA[On spotting a terrible movie]]></title><description><![CDATA[<p>Lucia and I went to see &ldquo;Public Enemies&rdquo; last night. Normally, being such a
relativist, I give experiences in my life a wide berth of judgment. But this
film, directed by Michael Mann and starring Christian Bale and Johnny Depp, this
film was just plain terrible.</p>

<p>There were several bad aspects of this film, any one of which alone might have
just made the movie mediocre. But, taken together, they totally destroyed the
cinematic experience. The overarching problem was that nothing in the movie came
together and formed a coherent whole. Several technical aspects of the film were
hastily done or of otherwise patchy quality: The sound was uneven, and the
photography was amateur in places. Instead of flowing smoothly through a plot
that had literally already written itself, the screenplay was composed of
unrelated vignettes, competing with each other for time and attention. Finally,
the film itself was unclear in its motivation, pulling the audience over here to
see this little corner of the world, and now up there to see this gunfight. At
the same time, the acting was great, so it's a shame that the cast had to make
such a valiant effort against the irresistible force that was the film's general
spazziness.</p>

<p>My first clue that this movie was going to be bad was the noticeable sound. The
sound quality in a film should do anything but attract attention to itself, but
right from the beginning, the levels were set wrong in this film. Nowhere did
the volume of the sound in this movie give me an indication of how I should be
feeling. Nowhere did the noises that things made otherwise reinforce the images
happening in front of my eyes. During the initial prison break scene, for
example, the few words that were spoken barely reached my ears, and the gunfight
from which the prisoners fled was just plain too quiet. Never did I hear the
roar of the thirties Buick V8 engine as it supposedly strained to get the bank
robbers out of town, and when Dillinger met his girl at a dance, the woman
singing their theme song was edited into obscurity, leaving us to guess later
that a song had been happening at all. The sound also collaborated poorly with
the scene boundaries, sometimes fading in or out too quickly. Overall, the sound
tended to trash whatever emotional resonance a small sequence of the film
managed to acquire.</p>

<p>The cinematography also suffered from a lack of quality control. The director
didn't seem to want to give us a single thematic approach to John Dillinger.
Here we were on the scene of <code>Blair Witch</code>_w, in the woods with a handheld
camcorder, peering through a poorly calibrated white balance sensor. There we
had a full-scale film camera on a tripod, panning smoothly across a bank lobby.
We saw a closeup of Purvis&rsquo; hands as he fidgeted with matches and a cigar, where
before we saw a long view of the federal money train that the robbers were
planning to rip off. Editing played its poor part here as well. Scenes were cut
off abruptly, and occasionally a raw view of the stage made its way onto the
screen. For instance, in an absurd gunfight in an anonymous forest, most of the
scenes showed the actors playing Babyface Nelson or the FBI, standing at a
window or behind a tree, trying to convince us that they were involved in a real
gunfight. Instead, they all looked like what they were&mdash;standing on a sound
stage with a prop and some flashing lights. (Again, cue the poor sound
complaints.) The film never acquired a unity of vision to convey to the
audience.</p>

<p>The script was similarly flawed. Most of the scenes in the movie were too short
to grab onto emotionally. The relationship between Dillinger and his girl was
constructed on the basis of maybe a dozen lines, leaving the audience to guess
at how they came to be so serious about each other. In a story with maybe ten or
twenty characters with significant ties to Dillinger, the film reveals the
source or consequenes of maybe three of those ties. I learned the next day, by
reading Wikipedia, the identities of several of the major characters in the
story, which the film&mdash;even though it was 2.5h long&mdash;failed to present at all
to the audience. Several characters were mentioned by name but never otherwise
introduced. Memory, and particularly my memory, is a terrible thing in life, but
from what I remember, many of the scenes in the movie clocked in at under
fifteen seconds, unable to convey a single emotional thread from start to
finish. And, as a result, the entire story remained fragmented and lost at the
borders of the vignettes. (And again, cue the terrible background music,
intruding early and too loudly into one short scene, to introduce the next
already.)</p>

<p>All of this fragmentation totally destroyed what might have been a coherent,
excellently told story. Instead of learning more about the connection between
Dillinger and Frechette, we saw them in an anonymous sandy place (a beach of
some sort ?), saying things that I don't even remember now to each other. When
the gangsters broke out of jail in the beginning of the movie, Dillinger's
mentor (I learned this from Wikipedia) died in the high-speed escape from the
prison. But the audience never got to care about him, because we never found out
who he was, or why Dillinger was holding on to him with that look in his eyes.
We were left to guess, halfway through the movie, at whether Dillinger was
referring to this moment as he sparred with Purvis about the look on a man's
face when he dies.</p>

<p>The sound, the cinematography, and the story&mdash;none of these components managed
to maintain a coherence that conveys a single story to us. We were left feeling
completely meh about Dillinger, Frechette, Nelson, and Purvis. And this is too
bad, because the actors really did a great job with the material they had. They
ran around with silly tommy guns in the anonymous forest, in front of the
camcorders with bad white balance. They wept when they learned of Dillinger's
death at the hands of the strange vigilante FBI agent from Texas. And they tried
to provide us with good death scenes. But none of it gelled, and we, or at least
I, didn't care as a result.</p>

<p>My only recourse is to consider the film a total bomb, a pet project of some
dude from film school who's obsessed with the crime genre but managed only to
convey to us that he enjoys film and guns. Otherwise, it's just not worth trying
to explain. Next movie please.</p>]]></description><link>http://leifjohnson.net/post/on-spotting-a-terrible-movie/</link><guid isPermaLink="true">http://leifjohnson.net/post/on-spotting-a-terrible-movie/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Fri, 24 Jul 2009 12:21:00 GMT</pubDate></item><item><title><![CDATA[On closing out the week with a little disc golf]]></title><description><![CDATA[<p>This week I've found myself often thinking of the garden at our house in Idaho.
I was wee when we built its three terraces, dragging huge, fallen trees into the
backyard with the Kubota. But some pieces of it still loom large in my memory.</p>

<p>Closest to the back door of the house, the top terrace had a compost pile, a
glorified, fenced-off area filled with organic material and worms. The compost
was flanked on the far side by rhubarb and potatoes, and on the near side by a
grassy path separating the garden from the house. The path led downhill into
what remained of the backyard after the garden had been constructed : a grassy
slope, bordered below by salmonberry bushes and on the side by fir trees.</p>

<p>The entire bottom bed of the garden was filled, in my memory, with strawberry
plants. I don't recall what grew in the middle terrace, but there must have been
some sugar snap peas somewhere, because I remember Mama showing me how to snap
them off once they were ripe and swollen and eat one or two now and then, crisp
and sweet from the sun, while picking. I also remember zucchini squash and
carrots, and probably some spinach. But kale ? Maybe ? Chard ? I just don't
remember.</p>

<p>Because I was smaller then, two and four and six years old, the physical
dimensions of my memories are even more warped than they would normally be by
Father Time. But the recollections of some shapes and colors remain. Thin, pale
runners from the strawberry plants jump out over the deep green leaves,
chartreuse and then ruby-colored berries mostly hidden underneath. Sprinklers
flash brightly in the sunlight over the green slope of the backyard. Brittle egg
shells and brown hay mix in the compost. Breezes push the clouds around in the
pale sky. The garden of my memory exists only in the summer.</p>

<h2>Work and gardens</h2>

<p>Things have been going well at my summer internship. It's been rewarding in many
ways to be back&mdash;I feel as though someone has decided to give me a second go in
this old work environment. And, given how I've changed in the meantime, I'm
finding that I'm much better able to take advantage of the opportunities
provided by working with so many amazing people. Instead of more of the old
scene, work this summer is full of interesting ideas and possible improvements
to some of the most amazing software in the world. I'm learning a lot and will
hopefully be able to say more concrete things at the end of the summer when we
get our excellent results.</p>

<p>Along the way, I've been having quite a few bizarre, wonderful meetings with
people from the past. I hadn't quite realized how many people I'd met at work
before, since I'd generally been pretty unhappy and put up a lot of walls to
keep myself safe. But it's surprisingly refreshing to see everyone again and
think of what changes and what doesn't. At any rate, there is no shortage of
people to meet and catch up with at lunch.</p>

<p>There are some mini-gardens near the cafes at work, and I've wondered often
whether these tiny planters actually produce anything that the cafes use. It
seems more likely to me that the gardens are more a &ldquo;proof of concept,&rdquo; but I'm
not certain. For example, in Austin this spring, I found that I had a terrible
time trying to guess how much food our three-recycling-bin mini-garden would
produce. Certainly not enough food for five people for a season, but for a meal ?
Two ? Depends on how much people eat ? I'll have to find out more when I return
in August.</p>

<h2>Tea and time with friends</h2>

<p>There's nothing quite like the flavor of a strawberry that's been in the sun for
just the right length of time. On Thursday, Lucia and I went to the Samovar at
Yerba Buena, and her meal came with some of those rare strawberries that have
been properly solarized. When I tasted one, it woke up the flavor of those
long-ago days in the Idaho summer, hot but dry, with a lake nearby and
omnipresent firs for shade. That berry, just like the ones from my memory,
bridged the seemingly ideological gap between those juicy but flavorless Safeway
strawberries and the teensy, seedy sweetness of a rare wild berry from a hike in
the forest.</p>

<p>The tea at Samovar is impressive, both in flavor and price. I'd never been there
before, but this week found me twice in attendance, both times chatting with
friends. On Thursday I spent a wonderful evening downtown with Lucia, and then on
Saturday morning I headed to the Castro location on a lark and met up randomly
with Joe from school. The magic of San Francisco is partly in the weather that
graces the city on weekends like this one just past, but it's also in the
friends that you see, serindipitously, walking down the sidewalk on Valencia.</p>

<p>The rest of Saturday continued along the same vein, meeting up with more and
more UT folks, culminating with some beers at Zeitgeist. Happily, everyone was
dressed for the occasion !</p>

<p>Then, on Sunday, the weekend closed out with a fantastic game of disc golf in
the park with Tim. Even though he'd never played with golf discs before, he
caught on very quickly, and we both had a great time walking through the woods,
catching up on time spent this year in different cities, and making fun of each
other's putting.</p>

<p>As time is wont to do, the week has already gotten underway here, with more work
and musings about the productivity of those mini-gardens near the cafes. Maybe
I'll discover just how they do use them after all.</p>]]></description><link>http://leifjohnson.net/post/on-closing-out-the-week-with-a-little-disc-golf/</link><guid isPermaLink="true">http://leifjohnson.net/post/on-closing-out-the-week-with-a-little-disc-golf/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Mon, 15 Jun 2009 00:59:00 GMT</pubDate></item><item><title><![CDATA[On twitter galaxies]]></title><description><![CDATA[<p>The past few weeks I've been nerding around with a subset of the Twitter
follower graph. It's hard to visualize this graph, because it's really, really
large, about 5MM nodes and 50MM edges, and the tool that I've been using (neato)
can really only handle graphs in the thousands of edges. And it takes forever to
sample randomly from my edge database (MySQL). But I've been poking at it
nonetheless, and I came up with a pretty neat little image this weekend.</p>

<p><a href="http://media.leifjohnson.net/img/twitter/twitter-galaxies.pdf"><img src="http://media.leifjohnson.net/img/twitter/twitter-galaxies.jpg"></a></p>

<p>(Click the image for a PDF.) I think it's a fun image. It reminds me of a little
petri dish, or of the view through a telescope into a cartoon universe. The
stars and other shapes are like little organisms or galaxies, swimming around in
this chaotic sea of online social networking.</p>

<p>This particular image was created by repeatedly selecting 100 rows at random
offsets from a database table that stores graph adjacency information. Because
the degrees of the nodes in the follower graph are distributed using a power
law, you sometimes select 100 rows that are all centered around one user, and
you get these really dense communities. Happily, neato lays out these
communities together in the center of the image. But, often, you end up picking
100 rows that include several tiny communities involving just a few users. The
graph layout tool puts these little galaxies near the border of the image,
making it look somehow a little bit artistic. Fun !</p>

<h2>Smaller samples</h2>

<p>I generated a few other images from this dataset, using a smaller number of
edges, and a different sampling strategy. For this set, I sampled 1MM edges
randomly from the database into a Python script, and then from that sample I
repeatedly drew samples of a fixed size. For instance, here's one of the images
drawn using 20,000 of the 1MM edges:</p>

<p><a href="http://media.leifjohnson.net/img/twitter/sample-20000-1.pdf"><img src="http://media.leifjohnson.net/img/twitter/sample-20000-1.jpg"></a></p>

<p>And another version with just 10,000 edges :</p>

<p><a href="http://media.leifjohnson.net/img/twitter/sample-10000-2.pdf"><img src="http://media.leifjohnson.net/img/twitter/sample-10000-2.jpg"></a></p>

<p>I think these are even more interesting (but somewhat less &ldquo;cute") than the
first image, because they show the normal galaxy pattern, but there are also a
few &ldquo;link&rdquo; users in there, who join together galaxies&mdash;sometimes even forming
long, narrow chains of follower relationships. This is particularly true in the
10k sample.</p>

<p>In addition, you can get a visual idea of the power law in effect by comparing
the 20k sample to the 10k sample. There are twice as many edges in the 20k
sample as in the 10k sample, and about half of the extra edges tend to be
allocated to new pairs (around the edges in the visualization). The other half
tend to be allocated to existing communities (closer to the center).</p>

<p>Now, of course, these are all subsets of the whole dataset, and so they do not
tell even close to the whole story. (This is particularly true now, in our
post-Ashton era, because Twitter has many, many more follower relationships than
just these 50MM.) But I enjoy looking at these images all the same.</p>]]></description><link>http://leifjohnson.net/post/on-twitter-galaxies/</link><guid isPermaLink="true">http://leifjohnson.net/post/on-twitter-galaxies/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Sun, 03 May 2009 04:33:00 GMT</pubDate></item><item><title><![CDATA[Stallman on campus]]></title><description><![CDATA[<p>I got the chance to see Richard Stallman speak on campus yesterday ! I've never
seen him speak in person, so I was quite pleased that J Moore and the university
gave us the opportunity. Stallman spoke for about two hours in front of a crowd
of probably a couple hundred citizens from the university and the greater Austin
community. Even though he had no supporting materials, I found his talk to be
well-delivered, focused, and informative&mdash;and perhaps somewhat less
inflammatory than I'd been imagining.</p>

<h2>Delivery</h2>

<p>One of the highlights of the talk was J's introduction : Once everyone had
quieted down, J said that it was an honor, and also quite easy, to introduce
someone who needed no introduction&mdash;and, at that, J sat down ! It was a perfect
introduction for the speaker (who noted that it was the shortest nonzero length
introduction he'd ever had) and for the audience.</p>

<p>I was really impressed with Stallman's delivery during the talk. Once I got over
his Boston accent, I realized that he was standing in front of a fairly large
group of people, primarily computer types, who are not unknown to be
argumentative and opinionated. Nonetheless, Stallman spoke
uninterrupted&mdash;except for a couple brief periods of applause&mdash;for about an
hour and a half, delivering a clearly well planned speech. He went through a
basic introduction to the mission of the <a href="http://fsf.org/">Free Software Foundation</a> and then
described his perspective on how copyright emerged historically. His historical
discussion was primarily focused on political situations and how technology has
changed the context in which copyright operates. He focused for some time on the
evils of the current copyright system in the US, and then he made several
proposals for reforming copyright law. Throughout the talk he remained focused
on the moral and ethical aspects of copyright, and he mentioned several
instances of what he sees as attacks on the freedoms of individuals, primarily
on behalf of governments and large corporations.</p>

<p>At the conclusion of the talk, Stallman suddenly announced that he was going to
auction off a plush gnu toy that he had in front of him. A couple of people in
the audience got into a bidding war, so Stallman ended up raising $ 260 for the
FSF. The audience quite enjoyed the whole spectacle, and gave him a huge ovation
at the end.</p>

<h2>Creative Commons</h2>

<p>After the auction, Stallman had about twenty minutes for questions. Because
there were so many people in the audience, I didn't get to ask mine : Do you see
the Creative Commons as an ally or a distraction in the mission of the Free
Software Foundation, and in your pursuit of freedom in the realm of copyright in
general ?</p>

<p>I figured I would be able to find some information on the internets, so I wasn't
too worried about the live answer (although it would have been nice).
Unfortunately, the internets deliver once again, and so I came across a 2006
<a href="http://yro.slashdot.org/article.pl?sid=06/02/07/1733220">slashdot article indicating that Stallman did not endorse CC licensing as a whole</a>
at the time, but also across a letter from the FSF about their 2008
<a href="http://www.fsf.org/blogs/licensing/2008-12-fdl-open-letter">option to convert to CC-BY-SA licenses</a>. From what I can tell, Stallman and
Lessig are playing the same arguments, so it makes sense to this observer that
they would have found some sort of common ground eventually.</p>

<h2>Reaction</h2>

<p>I was really impressed by the whole event. Here I was, sitting in a room with a
couple hundred other computer types, listening attentively to a man who has been
working for <strong>more than 25 years</strong> to make software free for everybody, and to
make sure that these freedoms are not easily taken away from people in the
future. In the 1980s, when Stallman was getting started, it seems like he would
have had a hard time filling up even the space around the water cooler&mdash;he was
probably just some crazy guy going off about tyranny and injustice. But now,
after realizing an immense impact in the software community, here he is, <strong>still
working</strong> on freedom and ethics in software.</p>

<p>I don't know if everyone else felt this way, but my reaction was a sudden
sensation that Stallman is one of my personal heros. Whether or not he's right
about everything (and he is working in an area where being right is nearly
impossible anyway), his efforts to bring ethics and social issues to the
community of computer hackers are amazing and valuable. I think a lot of people
get into software because they find that it helps them express their thoughts,
or because they like how it feels to solve technical problems, etc. Some people
probably like computer stuff just because it feels so amoral to them&mdash;while
they're programming they don't feel like they have to make difficult decisions
about redistributing income, or about fixing schools, or whatever. Stallman's
success, then, has been in convincing this community that ethics are, in fact,
very important to consider. Free Software, although it will always have more to
achieve, has been a huge success because of this person's determination and
sense of morals.</p>

<p>I don't think Stallman made any new converts with his talk, but the general
feeling I got from the audience was a sense of awe in seeing this legend in
person. At the very least, he got people talking : As I walked back to my
office, I heard people all over the place debating copyright issues of one sort
or another.</p>]]></description><link>http://leifjohnson.net/post/stallman-on-campus/</link><guid isPermaLink="true">http://leifjohnson.net/post/stallman-on-campus/</guid><dc:creator><![CDATA[Leif Johnson]]></dc:creator><pubDate>Sat, 25 Apr 2009 21:47:00 GMT</pubDate></item></channel></rss>