<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Better Living through Software</title>
	<atom:link href="http://www.netcrucible.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.netcrucible.com/blog</link>
	<description>The software industry from a rational perspective</description>
	<lastBuildDate>Wed, 16 May 2012 03:26:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Turbulent Waters</title>
		<link>http://www.netcrucible.com/blog/2012/05/15/turbulent-waters/</link>
		<comments>http://www.netcrucible.com/blog/2012/05/15/turbulent-waters/#comments</comments>
		<pubDate>Wed, 16 May 2012 03:26:31 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
				<category><![CDATA[semantics]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/?p=962</guid>
		<description><![CDATA[In this video clip, Benoit Mandelbrot explains how Kolmogorov inspired his works on fluid turbulence, published in the years immediately before he coined the term &#8220;fractal&#8221;.
I had the pleasure of seeing Mandelbrot in person when he visited Microsoft, and he described his lifelong fascination with things chaotic.  One of the great accomplishments of complexity [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.webofstories.com/play/10465">this video clip, Benoit Mandelbrot explains how Kolmogorov inspired</a> his works on fluid turbulence, published in the years immediately before he coined the term &#8220;fractal&#8221;.</p>
<p>I had the pleasure of seeing Mandelbrot in person when he visited Microsoft, and he described his lifelong fascination with things chaotic.  One of the great accomplishments of complexity theory is that it proscribes some mathematical limits on how deep or how far we can understand certain otherwise deterministic phenomena.  Robert Frost wrote, in his poem <em>&#8220;Neither Out Far Nor In Deep&#8221;</em>:</p>
<blockquote><p>
The people along the sand<br />
All turn and look one way.<br />
They turn their back on the land.<br />
They look at the sea all day.</p>
<p>As long as it takes to pass<br />
A ship keeps raising its hull;<br />
The wetter ground like glass<br />
Reflects a standing gull</p>
<p>The land may vary more;<br />
But wherever the truth may be&#8211;<br />
The water comes ashore,<br />
And the people look at the sea.</p>
<p>They cannot look out far.<br />
They cannot look in deep.<br />
But when was that ever a bar<br />
To any watch they keep?
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2012/05/15/turbulent-waters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dylan Thomas</title>
		<link>http://www.netcrucible.com/blog/2012/05/13/dylan-thomas/</link>
		<comments>http://www.netcrucible.com/blog/2012/05/13/dylan-thomas/#comments</comments>
		<pubDate>Mon, 14 May 2012 04:03:04 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
				<category><![CDATA[signifyin]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/?p=960</guid>
		<description><![CDATA[Not for the proud man apart
From the raging moon I write
On these spindrift pages
Nor for the towering dead
With their nightingales and psalms
But for the lovers, their arms
Round the griefs of the ages,
Who pay no praise or wages
Nor heed my craft or art.

From &#8220;In My Craft or Sullen Art&#8221; by Dylan Thomas.
Or try:
Fear not the waking [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Not for the proud man apart<br />
From the raging moon I write<br />
On these spindrift pages<br />
Nor for the towering dead<br />
With their nightingales and psalms<br />
But for the lovers, their arms<br />
Round the griefs of the ages,<br />
Who pay no praise or wages<br />
Nor heed my craft or art.
</p></blockquote>
<p>From &#8220;<a href="http://unknowing.wordpress.com/2012/05/04/in-my-craft-or-sullen-art/">In My Craft or Sullen Art</a>&#8221; by <a href="http://en.wikipedia.org/wiki/Dylan_Thomas">Dylan Thomas</a>.</p>
<p>Or try:</p>
<blockquote><p>Fear not the waking world, my mortal,<br />
Fear not the flat, synthetic blood,<br />
Nor the heart in the ribbing metal.<br />
Fear not the tread, the seeded milling,<br />
The trigger and scythe, the bridal blade,<br />
Nor the flint in the lover&#8217;s mauling.</p></blockquote>
<p>From &#8220;<a href="http://www.poemhunter.com/poem/all-all-and-all-the-dry-worlds-lever/">All All and All the Dry Worlds Lever</a>&#8220;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2012/05/13/dylan-thomas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Only The Moon Answers</title>
		<link>http://www.netcrucible.com/blog/2012/05/05/only-the-moon-answers/</link>
		<comments>http://www.netcrucible.com/blog/2012/05/05/only-the-moon-answers/#comments</comments>
		<pubDate>Sun, 06 May 2012 07:41:58 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
				<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/?p=949</guid>
		<description><![CDATA[This is from my copy of LeRoi Jones&#8217;s &#8220;Preface to a Twenty Volume Suicide Note&#8221;.  Musician and friend Aaron Carl passed away almost two years ago, and I felt that a couple of poems from LeRoi Jones&#8217;s first published collection would be appropriate (all apparent spelling errors and unmatched parens are deliberate.  This [...]]]></description>
			<content:encoded><![CDATA[<p>This is from my copy of LeRoi Jones&#8217;s &#8220;Preface to a Twenty Volume Suicide Note&#8221;.  Musician and friend <a href="http://www.youtube.com/watch?v=QKTPdmra7fM">Aaron Carl passed away almost two years ago</a>, and I felt that a couple of poems from LeRoi Jones&#8217;s first published collection would be appropriate (all apparent spelling errors and unmatched parens are deliberate.  This is a perfect transliteration, and is meant to be exactly as you see it).</p>
<p>~</p>
<pre style="font-family: 'Palatino Linotype, Book Antiqua, Palatino, serif'; font-size: 1em;">
 (For Kellie Jones, born 16 May 1959)

Lately, I've become accustomed to the way
The ground opens up and envelopes me
Each time I go out to walk the dog.
Or the broad edged silly music the wind
Makes when I run for a bus...

Things have come to that.

And now, each night I count the stars.
And each night I get the same number.
And when they will not come to be counted,
I count the holes they leave.

Nobody sings anymore.

And then last night I tiptoed up
To my daughter's room and heard her
Talking to someone, and when I opened
The door, there was no one there...
Only she on her knees, peeking into

Her own clasped hands
</pre>
<p>~</p>
<pre style="font-family: 'Palatino Linotype, Book Antiqua, Palatino, serif'; font-size: 1em;">
THE DEATH OF NICK CHARLES

... And how much of this
do you understand?  I hide
my face, my voice twisted
in the heavy winter fog.  If I
came to you, left this wet island
&#038; came to you; now, when I am young,
&#038; have strength in my fingers.  To say,
I love you, &#038; cannot even recognize
you. How much of me
could you understand?  (Only
that I love colour, motion, thin high air
at night?  The recognizable parts
of yourself?

We love only heroes. Glorious
death in battle.  Scaling walls,
burning bridges behind us, destroying
all ways back.  All retreat. As if
some things were fixed. As if the moon
would come to us each night (&#038;
we could watch
from the battlements). As if
there were anything certain
or lovely
in our lives.

Sad
long
motion of air
pushing in my face. Lies,
weakness, hatred
of myself. Of you
for not understanding
this. Or not
despising me
for the right causes. I am
sick as, OH,
the night is. As
cold days are,
when we must watch them
grow old
&#038; dark.

2

I am thinking
of a dance.  One I could
invent, if there
were music.  If you
would play for me, some
light music.  Couperin
with yellow hillsides.  Ravel
as I kiss your hair. Lotions
of Debussy.
I am moved by what? Angered at its whine;
the quiet delicacy of my sadness. The elements.
My face torn by wind, faces, desire, lovely chinese ladies
sweeping the sidewalks. (And this is not
what I mean. Not the thing I wanted for you. Not, finally.
<i>Music</i>, only terror at this lightly scribbled day.

Emotion. Words.
Waste. No clear delight.
No light under my fingers. The room, The
walls, silent &#038; deadly. Not
Music.

If there were
a dance. For us
to make; your fingers
on my face, your face wet
with tears (or silence. For us
to form upon this heavy air. Tearing
the silence, hurting the darkness
with the colour of our movement! Nakedness?
Great leaps
into the air? Huge pirouette; the moon blurred
on ancient lakes. Thin horns
and laughter.

3

Can you hear this? Do you know
who speaks to you? Do you
know me? (Not even
your lover. Afraid of you, your sudden
disorder. Your ringless
hands. Your hair
disguised. Your voice
not even real. Or
beautiful.

           (What we had
I cannot even say. Something
like loathing
covers your words.

4

It grows dark
around you. And these words
are not music. They make no motions
for a dance. (Standing awkwardly
before the window, watching
the moon. The ragged smoke
lifting against
grey sheaths
of night.
You shimmer like words
I barely hear. Your face
twisted into words. "Love, Oh,
Love me." The window facing night, &#038; always
when we cannot speak.

What shapes stream through the glass?
Only shadows
on the wall. Under
my fingers, trailing me
with a sound like
glass on slate. You cry out
in the night,
&#038; only the moon
answers.

5

The house sits
between red buildings. And a bell
rocks against the night air. The moon
sits over the North river, underneath
a blue bridge. Boats &#038; old men
move through the darkness. Needing
no eyes. Moving slowly
towards the long black line
of horizon. Footfalls, the
twisting dirty surf. Sea birds
scalding the blackness.

I sit inside alone, without
thoughts. I cannot lie
&#038; say I think of you. I merely sit
&#038; grow weary, not even watching
the sky lighten with morning.

              &#038; now
I am sleeping
&#038; you will not be able
to wake me.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2012/05/05/only-the-moon-answers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mark Hurd Resigns</title>
		<link>http://www.netcrucible.com/blog/2010/08/06/mark-hurd-resigns/</link>
		<comments>http://www.netcrucible.com/blog/2010/08/06/mark-hurd-resigns/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 01:52:11 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
				<category><![CDATA[signifyin]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/?p=947</guid>
		<description><![CDATA[HP sure has a perception problem.  Today, CEO Mark Hurd was forced to resign over allegations of sexual harassment.  Mark Hurd became CEO after the old boys at HP scandalously pinned their own criminal pretexting on that conniving female CEO, Patricia Dunn, and forced her out.  Previously, the old boys at HP [...]]]></description>
			<content:encoded><![CDATA[<p>HP sure has a perception problem.  Today, CEO Mark Hurd was forced to resign over allegations of sexual harassment.  Mark Hurd became CEO after the <a href="http://www.netcrucible.com/blog/2006/09/20/defending-dunn/">old boys at HP scandalously pinned their own criminal pretexting</a> on that conniving female CEO, Patricia Dunn, and forced her out.  Previously, the old boys at HP forced out Carly Fiorina in a scorched-earth, &#8220;I&#8217;d rather destroy the company than let a woman be president!&#8221; campaign.</p>
<p>No wonder interim CEO Cathie Lesjak has explicitly withdrawn herself from consideration in the search for a replacement CEO.  The ideal CEO candidate must be male, white, talk like George Patton, have bulldogs and cigars, and know how to keep conniving women in their places.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2010/08/06/mark-hurd-resigns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Baby Mama, Baby Papa</title>
		<link>http://www.netcrucible.com/blog/2010/03/07/baby-mama-baby-papa/</link>
		<comments>http://www.netcrucible.com/blog/2010/03/07/baby-mama-baby-papa/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 01:02:39 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
				<category><![CDATA[Life at Microsoft]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2010/03/07/baby-mama-baby-papa/</guid>
		<description><![CDATA[In most world languages, babies call their mother &#8220;mama&#8221; and their father &#8220;papa&#8221; or &#8220;baba&#8221;.  This would seem to be the most obvious evidence that there was an ancient ancestor language from which modern languages descended.  Indeed, I&#8217;ve written before about this theory of a common root language in the context of Chinese [...]]]></description>
			<content:encoded><![CDATA[<p>In most world languages, babies call their mother &#8220;mama&#8221; and their father &#8220;papa&#8221; or &#8220;baba&#8221;.  This would seem to be the most obvious evidence that there was an ancient ancestor language from which modern languages descended.  Indeed, I&#8217;ve written before about this theory of a common root language in the context of Chinese &#8220;yao&#8221; (want) and &#8220;you&#8221; (have).  However, I don&#8217;t think a common root language is necessary to explain the universal words &#8220;mama&#8221; and &#8220;papa&#8221;.</p>
<p>Note that I haven&#8217;t found the theory I&#8217;m about to explain in any books or papers, so it might be wrong.  But it seems simple and obvious, so I&#8217;ll wager that it&#8217;s well known and accepted.</p>
<p>Here&#8217;s the thing.  Parent&#8217;s don&#8217;t teach the words for &#8220;mother&#8221; and &#8220;father&#8221; to their babies; babies teach the words to their parents.</p>
<p>Upon birth, before their first meal and well before they can control their breathing, babies have a reflex to open and close their mouths when they see an adult open and close a mouth.  This reflex is ancient and involuntary, like breathing.</p>
<p>Later, babies learn to voluntarily control their breathing and their vocal chords, to voluntarily create sighing or humming noises.  During this phase, when the babies are experimenting with noise, a parent need only trigger the mouth open/close reflex (even accidentally) for the baby&#8217;s humming to accidentally produce a &#8220;mama&#8221; or &#8220;baba/papa&#8221; noise.  Try it yourself: make humming noises with your lips closed, and while continuing to hum, open and close your mouth the way that an infant reflexively does.</p>
<p>From here, the excited reaction of the parents (&#8221;He said &#8216;mama&#8217;!  What a smart baby! Everyone come here!) is enough to reinforce the behavior, and the parents have been trained.</p>
<p>Here&#8217;s another way to think about it.  Suppose that a culture were &#8220;advanced&#8221; enough to use the words &#8220;thrir&#8221; and &#8220;frish&#8221; instead of &#8220;mama&#8221; and &#8220;baba&#8221;.  It would not be long before the parents gave up and stopped trying to get the babies to say &#8220;thrir&#8221; or &#8220;frish&#8221;.  The babies would undoubtedly win in the end, and thrirs would joyfully adopt the name &#8220;mama&#8221;.  Frishes would only slightly less joyfully accept the name &#8220;papa&#8221;, since &#8220;mama&#8221; is easier to say (as you should have easily verified in the humming exercise above), and everyone knows that, after baby, thrir always wins.  &#8216;Cause when thrir ain&#8217;t happy, ain&#8217;t nobody happy! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2010/03/07/baby-mama-baby-papa/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Parity Encoding Puzzle: Solution</title>
		<link>http://www.netcrucible.com/blog/2010/02/05/parity-encoding-puzzle-solution/</link>
		<comments>http://www.netcrucible.com/blog/2010/02/05/parity-encoding-puzzle-solution/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 03:16:47 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
				<category><![CDATA[mastery]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2010/02/05/parity-encoding-puzzle-solution/</guid>
		<description><![CDATA[Apologies for the delay in posting the solution; I’ve been swamped at work.&#160; Here it is!
The first person to solve the Parity Encoding Puzzle correctly after I published it was Vittorio’s wife, Iwona, with a very elegant and compact solution, which is slightly different from mine.
First, I will explain my thought process in solving the [...]]]></description>
			<content:encoded><![CDATA[<p>Apologies for the delay in posting the solution; I’ve been swamped at work.&#160; Here it is!</p>
<p>The first person to solve the <a href="http://www.netcrucible.com/blog/2010/01/28/parity-encoding-puzzle/">Parity Encoding Puzzle</a> correctly after I published it was <a href="http://blogs.msdn.com/vbertocci/">Vittorio</a>’s wife, <a href="http://www.google.com/search?hl=en&amp;rls=com.microsoft%3Aen-us%3AIE-SearchBox&amp;q=Iwona+Bialynicka-Birula+publications&amp;aq=f&amp;aqi=&amp;oq=">Iwona</a>, with a very elegant and compact solution, which is slightly different from mine.</p>
<p>First, I will explain my thought process in solving the puzzle, then show my code, and then show you Iwona’s code (which makes my code look clumsy).&#160; If you still want to try solving it for yourself, don’t read any further.&#160; If you have solved it using another language or technique, feel free to post your solution here.</p>
<h2>With a 2-bit buffer</h2>
<p>The first step is to start with a smaller version of the problem.&#160; If a buffer of size 2^n can store n bits of information, then a 2-bit buffer can store 1 bit.&#160; All possible initial states of the random buffer are:</p>
<pre>00
01
10
11</pre>
<p>It’s pretty easy to see what to do.&#160; If you want to send a ‘1’, just flip the first bit if it’s zero, otherwise flip the second bit.</p>
<p>At this point, you’re probably noticing that the second bit has no informational value; it’s sort of a “throwaway bit”.&#160; If the rules were different, and you were permitted to either flip a bit or abstain, it would be similar (for the case of a 2-bit buffer).</p>
<h2>With a 4-bit buffer</h2>
<p>In a 4-bit buffer, you can store 2 bits of information (4 possible values).&#160; A 4-bit buffer has only 16 possible initial states, so it’s easy to sketch on paper, and try the 4 possible coded values.</p>
<p>Encoding the first bit of the information is easy.&#160; Just apply the pattern from the 2-bit solution, but use the parity of the first 2-bits of the 4-bit buffer as your value.&#160; In other words, if the first bit of your information is a ‘1’, the parity of the left half of the 4-bit buffer should be even, otherwise it should be odd.</p>
<p>Switching the parity is easy; you just flip a bit in the target half, and the parity toggles.&#160; But you’re then faced with the question of <em><strong>which</strong></em> bit to flip.&#160; For example, if your starting buffer is <font face="Couri"><font color="#ff0000">10</font>11</font> and the value to code is <font color="#008040" face="Couri"><u>1</u>0</font>, you need to flip a bit on the left half – you could do that by flipping either the first or second bit, resulting in either <font face="Cou"><font color="#ff0000">1<u>1</u></font>11</font> or <font face="Cour"><font color="#ff0000"><u>0</u>0</font>11</font>.&#160; Additionally, you’re faced with the problem that you’ve used up your only allowed toggle, and you still haven’t encoded the second bit.</p>
<p>This latter fact should make the way forward obvious.&#160; The bit that you choose to flip (resulting in a <font face="Coure"><font color="#ff0000"><u>0</u>0</font>11</font> or <font face="Courier"><font color="#ff0000">1<u>1</u></font>11</font>) should be determined by the second bit of information (<font color="#008000">1<u>0</u></font>).&#160; You can do this by saying that the parity of the opposite half (the final 2 bits in this case: 10<font color="#0000ff">11</font>) must match the value of the second bit in the half being toggled (in this case, the 1<font color="#0000ff">0</font>11), if the bit being communicated is a 1.&#160; You can arbitrarily decide that a bit value of 0 represents odd parity, and 1 represents even parity.&#160; In this case, the second bit of information (<font color="#008040">1<u>0</u></font>) is not a 1, so you want the value of the second bit to be <strong><em>different</em></strong> from the parity of the opposite side.&#160; The second bit, representing odd parity (1<u>0</u>11) is already different from the parity of the opposite half (10<u>11</u>) so you needn’t flip the second bit – flip the first bit instead.&#160; The encoded buffer, therefore, is <font color="#008000">0011</font>.</p>
<p>You can easily prove this technique on paper or by writing a quick program.&#160; It is worth working through the combinations yourself to make sure you understand what’s happening.</p>
<p>Note that you always think in terms of “opposite side”, since you’ll only be flipping a bit on the left side half of the time.&#160; Also note that the decision to compare the <em>second</em> bit to the parity of the opposite side is completely arbitrary, just like the decision to use 1 to mean “even”.&#160; You could change the rules, as long as you are consistent.</p>
<h2>With an 8-bit buffer</h2>
<p>At this point, you might be feeling confident, and think that you only need to recursively apply the 4-bit solution to manage a buffer of any size.&#160; You would be right, but it’s easier said than done.&#160; My first attempt worked 90+% of the time, but failed on some edge cases.</p>
<p>An 8-bit buffer holds 3 bits of information.&#160; You could try something like this (colors show parity comparison):</p>
<ol>
<li><font color="#ff0000"><u>1010</u></font> 1010 – first bit </li>
<li><font color="#ff0000"><u>10</u></font>10 <font color="#008000"><u>10</u></font>10 – second bit </li>
<li><font color="#ff0000"><u>1</u></font>010 <font color="#008000"><u>1</u></font>010 – third bit </li>
</ol>
<p>Obviously, the position of the second and third bit will vary, depending on where the previous bits are selected.</p>
<p><strong><u>Observation:</u></strong> If you implement this, you’ll notice 2 things (besides the fact that it fails some of the time).&#160; First is that decoding has no idea whether you moved left or right in a given step, so half the time it will get the right answer only accidentally.&#160; Second is that you’re leaving a lot of bits unused (for parity comparison purposes), which intuitively shouldn’t work.&#160; It’s true that you will have a “throwaway bit”, but it should only be one bit.</p>
<p>This leads to the key intuition required to solve the puzzle generally.</p>
<h2>The Solution</h2>
<p>You need to “stripe” the parities; using every bit except the throwaway bit.&#160; An simple example of decoding a value will make it clear.&#160; Suppose that the received buffer is 10110000.&#160; How do you decode it?</p>
<p>(For this case, we arbitrarily decide that parity equals the number of 1’s in the <font color="#ff0000">red</font> area, and that 1 is “odd” [since it has an odd number of 1’s])</p>
<ol>
<li><u><font color="#ff0000">1011</font></u> 0000 – parity of left half = 1 (odd) </li>
<li><font color="#ff0000"><u>10</u></font>11 <font color="#ff0000"><u>00</u></font>00 – parity = 1 (odd) </li>
<li><u><font color="#ff0000">1</font></u>0<u><font color="#ff0000">1</font></u>1 <u><font color="#ff0000">0</font></u>0<u><font color="#ff0000">0</font></u>0 – parity = 0 (even) </li>
</ol>
<p>Therefore, the encoded value is 110.</p>
<p>Step 3 is the key step: you notice that we are using 2 extra bits in our parity calculation more than we used in the failed attempt.&#160; The only bit which is never used is the last bit, which you would flip only if the random buffer exactly matched the message you wanted to send.</p>
<p>You can also detect a pattern here:</p>
<ol>
<li>Step 1: combine alternating blocks of 4 bits and calculate parity. </li>
<li>Step 2: combine alternating blocks of 2 bits and calculate parity. </li>
<li>Step 3: combine alternating blocks of 1 bits and calculate parity. </li>
</ol>
<p>It’s easy to generalize this to a buffer of any size.&#160; For example, if you are using a 128 bit buffer, you would use parity “stripes” of size 64, 32, 16, 8, 4, 2, and 1 (for 7 bits of information).</p>
<p>If you’d like to try writing your own code before looking at mine, you can pause here.</p>
<h2>My Code</h2>
<p>I used a very direct implementation of the process described above.&#160; The “Parity” function takes a bit buffer and a width, and combines alternating blocks of size “width” before spitting out a parity.&#160; The Encode and Decode functions use this Parity function.&#160; You can trace through a&#160; few examples on paper to see how easy it is.</p>
<pre>public int Parity(int width, BitBuffer buffer)
{
    int p = 0;

    bool even = true;

    while (p &lt; buffer.Length)
    {
        for (int i = 0; i &lt; width; i++)
        {
            if (buffer[p + i] == 1) even = !even;
        }
        p += width * 2;
    }

    return (even ? 0 : 1);
}

public BitBuffer Decode(BitBuffer buff)
{
    string value = &quot;&quot;;

    int width = buff.Length;

    while (width &gt; 1)
    {
        width = (int)Math.Truncate((double)width / 2);
        value += Parity(width, buff).ToString();
    }

    return new BitBuffer(value);
}

public void Encode(BitBuffer encode, BitBuffer initial )
{
    int[] bits = encode.GetBuffer();

    int pos = 0;
    int width = initial.Length;

    for (int idx = 0; idx &lt; bits.Length; idx++)
    {
        pos *= 2;
        width = (int)Math.Truncate((double)width / 2);

        int half = (int)Math.Truncate((double)initial.Length / width / 2);

        if (Parity(width) == bits[idx]) pos += 1;  // the left half is good; don't mess with it
    }

    if (initial[pos] == 0) initial[pos] = 1;
    else initial[pos] = 0;
}</pre>
<h2>Iwona’s Code</h2>
<p>Iwona’s Code is very compact, using xors and bit shifts, and not needing a separate parity stripe test (solved for 64-bit, but will work on any buffer size).&#160; Very nice!</p>
<pre>private static UInt64 Encode(UInt64 buffer, byte number)
{
    byte i = 0;
    UInt64 tempBuffer = buffer;
    while (tempBuffer &gt; 0)
    {
        if (tempBuffer % 2 == 1)
        {
            number ^= i;
        }
        i++;
        tempBuffer = (tempBuffer &gt;&gt; 1);
    }
    return buffer ^ ((UInt64)1 &lt;&lt; number);
}

private static byte Decode(UInt64 buffer)
{
    byte i = 0;
    byte number = 0;
    while (buffer &gt; 0)
    {
        if (buffer % 2 == 1)
        {
            number ^= i;
        }
        i++;
        buffer = (buffer &gt;&gt; 1);
    }
    return number;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2010/02/05/parity-encoding-puzzle-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parity Encoding Puzzle</title>
		<link>http://www.netcrucible.com/blog/2010/01/28/parity-encoding-puzzle/</link>
		<comments>http://www.netcrucible.com/blog/2010/01/28/parity-encoding-puzzle/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 18:42:22 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
				<category><![CDATA[mastery]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2010/01/28/parity-encoding-puzzle/</guid>
		<description><![CDATA[This is the puzzle.&#160; If you want to see the solution, visit this post.
A few weekends ago, a friend introduced me to this puzzle while we were walking around the park.&#160; It took me a few hours to find the solution and write a program to test it.&#160; It’s a fun puzzle which I have [...]]]></description>
			<content:encoded><![CDATA[<p>This is the puzzle.&#160; If you want to <a href="http://www.netcrucible.com/blog/2010/02/05/parity-encoding-puzzle-solution/">see the solution, visit this post</a>.</p>
<p>A few weekends ago, a friend introduced me to this puzzle while we were walking around the park.&#160; It took me a few hours to find the solution and write a program to test it.&#160; It’s a fun puzzle which I have never seen before, so I’m posting it to my blog.&#160; I’ll reveal the solution in a separate post, so you can try solving it without any spoilers.</p>
<h2>Introduction</h2>
<p>Imagine that you have a 64-bit buffer, where you can alter one bit only before passing the buffer on to a friend.</p>
<p>If the initial state of the buffer is known beforehand (all zeros, for example), you will be able to send 64 different unique values to your friend.&#160; This means that you can send 6 bits of information (2^6 = 64) by flipping only a single bit of a 64-bit buffer.&#160; This is enough to encode all upper and lower case letters of the alphabet, for example.</p>
<h2>Random Initial State</h2>
<p>Now, imagine that the 64-bit buffer you receive is initially filled with random information.&#160; This time, your friend does not know the initial state of the buffer.&#160; Ad before, you are allowed to flip only one bit in the buffer.</p>
<p>Now, how many bits of information would you be able to communicate to your friend?</p>
<p>Obviously, you would be able to communicate at least one bit of information (for example, a “yes/no”).&#160; You could do this by agreeing with your friend beforehand that the “yes/no” would be encoded in the first bit, and then you would flip the first bit if necessary before sending the buffer on, otherwise, you would flip a different bit.</p>
<h2>Challenge</h2>
<p>It turns out that it’s possible to encode a full 6-bits of information by flipping only one bit on a random buffer, with the recipient not knowing the initial state of the buffer.</p>
<p>Note that the same holds true for any buffer size that is a power of 2.&#160; For example, you can encode 8 bits of information in a 256 bit buffer, using this technique.</p>
<p>Your challenge is to figure out what technique needs to be used, and write a program to encode a message in a random buffer of arbitrary size, and a program that can decode the message without knowing the initial state.</p>
<p>The method signatures might look something like:</p>
<pre><code>
bit[64] encodeBuffer(bit[64] randBuffer, bit[6] value);
bit[6] decodeBuffer(bit[64] encodedBuffer);</code></pre>
<pre><code>// the below will always be true</code></pre>
<pre><code>decodeBuffer(encodeBuffer(r, val)) == val
</code></pre>
<h2>Hint</h2>
<p>At first, I started down the route of using some sort of run length encoding, but that quickly hit a brick wall.</p>
<p>Instead, think of this as information being encoded in the parity.&#160; For example, you could encode a “yes/no” by saying, if the first 32 bits have an even number of zeros, the answer will be “yes”, otherwise “no”.&#160; To encode the “yes/no” message, you just flip a bit on one half or the other to get the desired parity.</p>
<p>With this hint, you can set about generalizing the solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2010/01/28/parity-encoding-puzzle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Incarnate Your Avatar</title>
		<link>http://www.netcrucible.com/blog/2009/12/26/incarnate-your-avatar/</link>
		<comments>http://www.netcrucible.com/blog/2009/12/26/incarnate-your-avatar/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 04:55:54 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
				<category><![CDATA[Life at Microsoft]]></category>
		<category><![CDATA[hotness]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2009/12/26/incarnate-your-avatar/</guid>
		<description><![CDATA[ Check out the new comment form on my blog.  Feel like being Oprah today?  No problem!  Feel like using the Avatar of Neytiri, princess of the Na’vi?  No problem!
When entering comments, you just use your handle (or the handle of your favorite celebrity) from Facebook, Twitter, or whatever else, and the site automatically finds [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.netcrucible.com/blog/wp-content/uploads/2009/12/oprah.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 12px; border-right: 0px" title="oprah" src="http://www.netcrucible.com/blog/wp-content/uploads/2009/12/oprah_thumb.png" border="0" alt="oprah" width="196" height="240" align="left" /></a> Check out the new comment form on my blog.  Feel like being Oprah today?  No problem!  Feel like using the Avatar of Neytiri, princess of the Na’vi?  No problem!</p>
<p>When entering comments, you just use your handle (or the handle of your favorite celebrity) from Facebook, Twitter, or whatever else, and the site automatically finds your avatar.  Of course it works with gravatar, too.</p>
<p>You can get this functionality on your own blog by using the free <a href="http://visitmix.com/labs/incarnate">“Incarnate” WordPress plugin</a> built by our team.  It also works with non-WordPress blogs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2009/12/26/incarnate-your-avatar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>About that Bing!</title>
		<link>http://www.netcrucible.com/blog/2009/05/28/about-that-bing/</link>
		<comments>http://www.netcrucible.com/blog/2009/05/28/about-that-bing/#comments</comments>
		<pubDate>Thu, 28 May 2009 18:29:39 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
				<category><![CDATA[Life at Microsoft]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2009/05/28/about-that-bing/</guid>
		<description><![CDATA[A couple of years ago, much derision met the movie studios’ choice of the name “Hulu” for their video portal, which has since become one of the top sites on the Internet.
At that time, I immediately defended the name Hulu, calling it a “great name”, based on it’s close auditory association with the candy known [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of years ago, much derision met the movie studios’ choice of the name “Hulu” for their video portal, which has since become one of the top sites on the Internet.</p>
<p>At that time, I immediately defended the name Hulu, <a href="http://www.netcrucible.com/blog/2007/08/29/hulu-candy-on-a-stick/">calling it a “great name”, based on it’s close auditory association with the candy</a> known as Bing Tang Hu Lu.&#160; (Yes, I beat <a href="http://alexbosworth.net/post/66556065/reason-5-living-in-beijing-rocks-bing-tang-hu">Alex Bosworth</a> to the punch on that one).&#160; Now with the name “Bing”, we have appropriated the other part of that tasty treat’s name.&#160; I can hardly contain my excitement!&#160; Look at <a href="http://www.bing.com/images/search?q=bing+tang+hu+lu&amp;go=&amp;form=QB">pictures of Bing Tang Hu Lu on Bing</a>!</p>
<p>We should call it “Bing Bing” in China.&#160; And we should hire the actress <a href="http://www.bing.com/images/search?q=li+bingbing&amp;go=&amp;form=QBIR">Bing Bing</a> to be the spokesperson.</p>
<p>Some have theorized that the name comes from <a href="http://www.bing.com/videos/search?q=groundhog+day+ned&amp;docid=611476963602&amp;mid=DAE55987D09611C45E87DAE55987D09611C45E87&amp;FORM=VIVR13">Groundhog Day’s “Ned Ryerson – Bing!” skit</a>.&#160; Others think it might be a riff on <a href="http://www.bing.com/videos/search?q=chandler+bing+janice&amp;docid=786150654192&amp;mid=26907BEB13E0061206CA26907BEB13E0061206CA&amp;FORM=VIVR">Mitch Kapor’s old project, Chandler</a>.&#160; <a href="http://www.youtube.com/watch?v=lusXJIfB4ys">Or Monty Python</a>.&#160; Yet others have pointed out the possible reference to the bar in <em>The Sopranos</em> or the sidekick in the <em>Lethal Weapon</em> series.&#160; Jon Stewart has already “<a href="http://www.bing.com/videos/search?q=sopranos+bing&amp;docid=647842890104&amp;mid=85FEB6D6ED2FFCE6667185FEB6D6ED2FFCE66671&amp;FORM=VIVR17">Disrespected the Bing!</a>”</p>
<p>While the “bada boom, bada bing” reference seems to be hinted in our marketing materials, I believe that the Stallmanesque explanation probably holds some truth: The name is a recursive acronym, <strong><em>“Bing Is Not Google”</em></strong>.&#160; How incredibly geeky.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2009/05/28/about-that-bing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If Ecstasy Be Present</title>
		<link>http://www.netcrucible.com/blog/2009/05/21/if-ecstasy-be-present/</link>
		<comments>http://www.netcrucible.com/blog/2009/05/21/if-ecstasy-be-present/#comments</comments>
		<pubDate>Fri, 22 May 2009 03:59:00 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
				<category><![CDATA[semantics]]></category>
		<category><![CDATA[smart people]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2009/05/21/if-ecstasy-be-present/</guid>
		<description><![CDATA[I am reading about Arthur Machen, who was apparently an influence on Yeats, Pierce, and Lovecraft, and a friend of A. E. Waite.
His philosophy and approach reminded me a lot of Barfield, but I couldn’t find an explicit link.&#160; 
Here is an excerpt from a review of his book Hieroglyphics, describing his theory of “ecstasy”:
&#34;Hieroglyphics&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>I am reading about <a href="http://en.wikipedia.org/wiki/Arthur_Machen">Arthur Machen</a>, who was apparently an influence on Yeats, Pierce, and Lovecraft, and a friend of A. E. Waite.</p>
<p>His philosophy and approach reminded me a lot of Barfield, but I couldn’t find an explicit link.&#160; </p>
<p>Here is an excerpt from <a href="http://www.archive.org/stream/arthurmachennove00star/arthurmachennove00star_djvu.txt">a review</a> of his book Hieroglyphics, describing his theory of “ecstasy”:</p>
<p><i>&quot;Hieroglyphics&quot; is Arthur Machen&#8217;s theory of literature, brilliantly exposited by that &quot;cyclical mode of discoursing&quot; that was affected by Coleridge. In it he promulgates the admirable doctrine that fine literature must be, in effect, an allegory and not the careful history of particular persons. He seeks a mark of division which is to separate fine literature from mere literature, and finds the solution in the one word ecstasy (or, if you prefer, beauty, wonder, awe, mystery, sense of the unknown, desire for the unknown), with this conclusion : <strong>&quot;If ecstasy be present, then I say there is fine literature, if it be absent, then, in spite of all the cleverness, all the talents, all the workmanship and observation and dexterity you may show me, then, I think, we have a product (possibly a very interesting one) which is not fine literature.&quot;</strong> </i></p>
<p>There is something slightly incongruous about trying to rationally explain why great ideas cannot be communicated purely rationally.&#160; This of course hasn’t stopped Aristotle with Poetics, Coleridge on Wordsworth, Steiner on Goethe, Bandler on Erickson, or countless others.&#160; And Machen seems to practice what he preaches.&#160; For example, this passage from Machen’s “Hill of Dreams”:</p>
<p><i>&quot;Language, he understood, was chiefly important for the beauty of its sounds, by its possession of words resonant, glorious to the ear, by its capacity, when exquisitely arranged, of suggesting wonderful and indefinable impressions, perhaps more ravishing and further removed from the domain of strict thought than the impressions excited by music itself.&#160; Here lay hidden the secret of suggestion, the art of causing sensation by the use of words.&quot; </i></p>
<p>You can easily see the influence on Lovecraft, who went on to influence Neal Stephenson’s “Nam-Shub of Enki”.&#160; Machen’s friend A.E. Waite and Waite’s Golden Dawn colleagues were familiar with the stories of the <a href="http://en.wikipedia.org/wiki/Golem">Golem of Rabbi Judah Loew</a>, which was perhaps the first variant of the “nam-shub” story in print 50-100 years before Lovecraft, and could be seen as a superior predecessor to Shelly’s “Frankenstein”.</p>
<p>Google Books has the <a href="http://books.google.com/books?id=u2dSmbJcVvcC&amp;dq=machen+ecstasy+heiroglyphics&amp;printsec=frontcover&amp;source=bl&amp;ots=3AXrsZMEZ_&amp;sig=ymknzbsCEdNnieSLHJm1LR0easI&amp;hl=en&amp;ei=vxgWStK7CpqQswPFwOCSDw&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=1">full text of Hieroglyphics online</a>.&#160; The opening is delightful; I’m looking forward to reading the rest.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2009/05/21/if-ecstasy-be-present/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

