<?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>the evolving ultrasaurus</title>
	<atom:link href="http://www.ultrasaurus.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ultrasaurus.com</link>
	<description>Sarah Allen's reflections on internet software and other topics</description>
	<lastBuildDate>Sat, 14 Apr 2012 21:19:07 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>d3.js experiments in the console</title>
		<link>http://www.ultrasaurus.com/sarahblog/2012/03/d3-js-experiments-in-the-console/</link>
		<comments>http://www.ultrasaurus.com/sarahblog/2012/03/d3-js-experiments-in-the-console/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 20:39:44 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.ultrasaurus.com/?p=3573</guid>
		<description><![CDATA[d3 (aka Data-Driven Documents) is a great little JavaScript framework for data visualization.  It&#8217;s got a nice declarative syntax for DOM manipulation that&#8217;s quite readable, but takes a bit of effort to understand exactly what it&#8217;s doing.
Favorite links:

d3 tutorials provide a great conceptual foundation
Thinking with Joins by d3 creator, Mike Bostick, helps explain the [...]]]></description>
			<content:encoded><![CDATA[<p>d3 (aka Data-Driven Documents) is a great little JavaScript framework for data visualization.  It&#8217;s got a nice declarative syntax for DOM manipulation that&#8217;s quite readable, but takes a bit of effort to understand exactly what it&#8217;s doing.</p>
<p>Favorite links:</p>
<ul>
<li><a href="http://mbostock.github.com/d3/api/">d3 tutorials</a> provide a great conceptual foundation</li>
<li><a href="http://bost.ocks.org/mike/join/">Thinking with Joins</a> by d3 creator, Mike Bostick, helps explain the syntax for chaining methods</li>
<li><a href="http://alignedleft.com/tutorials/d3/">Scott Murray&#8217;s d3 tutorial</a> offers a very nice step-by-step, covering a lot of the same ground as my little tutorial below with excellent discussions of the fundamentals.</li>
</ul>
<p>I like to understand stuff by playing with it interactively, so I created a skeleton index.html which just includes d3.js and a style a div where I&#8217;ll display some data:</p>
<pre>
&lt;html&gt;<br/>&nbsp;&nbsp;&lt;head&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;d3&nbsp;experiment&lt;/title&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;script&nbsp;type=&quot;text/javascript&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;src=&quot;https://raw.github.com/mbostock/d3/master/d3.v2.min.js&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/script&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;style&nbsp;type=&quot;text/css&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.box&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;background-color:&nbsp;skyblue;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width:&nbsp;24px;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height:&nbsp;18px;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding:&nbsp;4px;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin:&nbsp;1px;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/style&gt;<br/>&nbsp;&nbsp;&lt;/head&gt;<br/>&nbsp;&nbsp;&lt;body&gt;<br/>&nbsp;&nbsp;&lt;/body&gt;<br/>&lt;/html&gt;<br/><br/><br/><br/>
</pre>
<p>Then in the FireBug console, we can interact with d3, the top-level object that allows us to access all of d3&#8217;s goodness.</p>
<pre>
&gt;&gt;&gt; d3
Object { version="2.8.1", random={...}, ns={...}, more...}
&gt;&gt;&gt;  body = d3.select("body")
[[body]]
</pre>
<p>Like jQuery, d3 let&#8217;s us &#8220;select&#8221; one or more DOM elements to operate on them.  I only have one body tag, so I just get one element in an array &#8212; not yet sure why it needs a nested array.  Now I can manipulate the DOM:</p>
<pre>
&gt;&gt;&gt;  body.append('p').text('Hello d3!')
[[p]]
</pre>
<p>and &#8220;Hello d3!&#8221; appears at the top of my page.  Yay!  Of course that could have been written in a single line like:</p>
<pre>
d3.select("body").append('p').text('Hello d3!')
</pre>
<p>and if I want to change the text, I can use a regular old css selector to grab the paragraph element I just created:</p>
<pre>
d3.select("body p").text("Welcome to d3")
</pre>
<p>or, using the reference to the &#8216;body&#8217; variable I created above:</p>
<pre>
body.select("p").text("d3 is cool")
</pre>
<h2>Data-driven Boxes</h2>
<p>Ok, now that we understand the basics, let&#8217;s put some boxes on the page:</p>
<pre>
body.append('div').attr('class','box')
</pre>
<p>and let&#8217;s add a couple with text in them:</p>
<pre>
body.append('div').attr('class','box').text('hi')
body.append('div').attr('class','box').text('foo')
</pre>
<p>With my set of boxes, I can select one or all of them:</p>
<pre>
>>> d3.select('.box')
[[div.box]]
>>> d3.selectAll('.box')
[[div.box, div.box, div.box]]
</pre>
<p>Then I can specify data to <em>bind</em> to each box and display it.  I&#8217;ve read that d3 can deal with all sorts of data (like json, csv, etc.) but we&#8217;ll start with an array of numbers.</p>
<pre>
>>> my_data = [20, 7, 32]
[20, 7, 32]
>>> d3.selectAll('.box').data(my_data).text( function(d) { return d } )
[[div.box, div.box, div.box]]
</pre>
<p><img src="https://img.skitch.com/20120330-jb12cx9qa7p16diptgy6kqjq6c.png"/><br />
<img src="https://img.skitch.com/20120330-qhkt419gnaqh2d9f5s53xns6nh.png"/></p>
<p>We can see that our data is associated with the DOM element and we can get at it via JavaScript in the console.  (Of course, we should only do that for debugging. I would guess that __data__ is the private implementation of d3&#8217;s data binding.)</p>
<pre>
>>> d3.select('.box')[0][0].__data__
20
</pre>
<p>We can change the data like this:</p>
<pre>
>>> new_data = [10, 50, 25]
[10, 50, 25]
>>> d3.selectAll('.box').data(new_data)
</pre>
<p>You&#8217;ll see that the page doesn&#8217;t change visually, but in the console, you can see that the data does:<br />
<img src="https://img.skitch.com/20120330-kwnsfr1kiuaskauqeruib7in3d.png"/></p>
<p>We need to explicitly tell d3 to do something with the data like this:</p>
<pre>
d3.selectAll('.box').text( function(d) { return d } )
</pre>
<p>We can also use this handy shortcut:</p>
<pre>
d3.selectAll('.box').text( String )
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ultrasaurus.com/sarahblog/2012/03/d3-js-experiments-in-the-console/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>fixing brew install opencv on osx</title>
		<link>http://www.ultrasaurus.com/sarahblog/2012/03/fixing-brew-install-opencv/</link>
		<comments>http://www.ultrasaurus.com/sarahblog/2012/03/fixing-brew-install-opencv/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 11:46:27 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.ultrasaurus.com/?p=3583</guid>
		<description><![CDATA[This is more about fixing my brew install, than about opencv.  As with many install issues the root cause was actually pretty simple, but finding it was challenging.  Along the way, I fixed a number of issues which took a bit of digging to find, so I&#8217;m leaving a little trail on the [...]]]></description>
			<content:encoded><![CDATA[<p>This is more about fixing my brew install, than about opencv.  As with many install issues the root cause was actually pretty simple, but finding it was challenging.  Along the way, I fixed a number of issues which took a bit of digging to find, so I&#8217;m leaving a little trail on the web in case other people run into the same things &#8212; or in case some inspired open source citizen has time to add better solution messages to brew.  The first step of any solution, is, of course, understanding the problem.</p>
<p>$ brew install opencv<br />
==> Installing opencv dependency: cmake<br />
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/cmake-2.8.7-bottle.tar.gz<br />
######################################################################## 100.0%<br />
Error: SHA1 mismatch<br />
Expected: f218ed64ce6e7a5d3670acdd6a18e5ed95421d1f<br />
Got: 3a57f6f44186e0dba34ef8b8fb4a9047e9e5d8a3</p>
<p>solution:<br />
$ brew update<br />
	:<br />
	:<br />
Error: Failed executing: make install (libtiff.rb:18)<br />
If `brew doctor&#8217; does not help diagnose the issue, please report the bug:<br />
    https://github.com/mxcl/homebrew/wiki/reporting-bugs</p>
<h2>tl;dr;<br/>install command-line tools from developer.apple.com</h2>
<p>before I figured that out I fixed all of the issues found with &#8216;brew doctor&#8217;</p>
<p>$ brew doctor</p>
<p>Warning: Some directories in /usr/local/share/man aren&#8217;t writable.<br />
This can happen if you &#8220;sudo make install&#8221; software that isn&#8217;t managed<br />
by Homebrew. If a brew tries to add locale information to one of these<br />
directories, then the install will fail during the link step.<br />
You should probably `chown` them:</p>
<p>    /usr/local/share/man/de<br />
    /usr/local/share/man/de/man1</p>
<p>solution:<br />
$ sudo chown sarah /usr/local/share/man/de/*<br />
$ sudo chown sarah /usr/local/share/man/*</p>
<p>Warning: &#8220;config&#8221; scripts exist outside your system or Homebrew directories.<br />
`./configure` scripts often look for *-config scripts to determine if<br />
software packages are installed, and what additional flags to use when<br />
compiling and linking.</p>
<p>Having additional scripts in your path can confuse software installed via<br />
Homebrew if the config script overrides a system or Homebrew provided<br />
script of the same name. We found the following &#8220;config&#8221; scripts:</p>
<p>    /Library/Frameworks/Python.framework/Versions/2.7/bin/python-config<br />
    /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config</p>
<p>solution:<br />
Uninstalled python, which I don&#8217;t use much &#8212; I figure I can install later with brew<br />
$ sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7<br />
$ sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7<br />
$ sudo rm -rf &#8220;/Applications/Python 2.7&#8243;<br />
$ sudo rm /usr/local/bin/py*</p>
<p>Warning: You have unlinked kegs in your Cellar<br />
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on<br />
those kegs to fail to run properly once built.</p>
<p>    coreutils<br />
    geoip</p>
<p>solution:<br />
$ brew link coreutils<br />
Linking /usr/local/Cellar/coreutils/8.12&#8230; 0 symlinks created<br />
$ brew link geoip<br />
Linking /usr/local/Cellar/geoip/1.4.6&#8230; 2 symlinks created</p>
<p>Warning: You have uncommitted modifications to Homebrew&#8217;s core.<br />
Unless you know what you are doing, you should run:<br />
  cd /usr/local &#038;&#038; git reset &#8211;hard</p>
<p>tried this:<br />
$ cd /usr/local &#038;&#038; git reset &#8211;hard<br />
HEAD is now at ffb9aa5 Remove &#8220;__brew_ps1&#8243; function from completion<br />
&#8211;> didn&#8217;t work</p>
<p>solution:<br />
$ pushd /usr/local<br />
$ git status<br />
&#8211;> lots of untracked files, no idea how I got into that state<br />
$ git add .<br />
$ git reset HEAD &#8211;hard<br />
$ popd</p>
<p>Warning: Your Xcode is configured with an invalid path.<br />
You should change it to the correct path. Please note that there is no correct<br />
path at this time if you have *only* installed the Command Line Tools for Xcode.<br />
If your Xcode is pre-4.3 or you installed the whole of Xcode 4.3 then one of<br />
these is (probably) what you want:</p>
<p>    sudo xcode-select -switch /Developer<br />
    sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer</p>
<p>DO NOT SET / OR EVERYTHING BREAKS!</p>
<p>I don&#8217;t have anything at /Developer, so I did this:<br />
$  sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer</p>
<p>$ brew doctor<br />
Your system is raring to brew.</p>
<p>Of course, it wasn&#8217;t, the key clue for me was finding this in the long stream of installation output:<br />
tiffgt.c:35:11: fatal error: &#8216;OpenGL/gl.h&#8217; file not found</p>
<p>which convinced me that I was missing some fundamentals.  Searching on the text of the error led me to:<br />
<a href="https://github.com/mxcl/homebrew/issues/11088">https://github.com/mxcl/homebrew/issues/11088</a></p>
<p>Ideally &#8216;brew doctor&#8217; would have caught that I was missing the command-line tools that don&#8217;t get installed automatically with XCode 4.3.  I installed those and all was well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ultrasaurus.com/sarahblog/2012/03/fixing-brew-install-opencv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>stir fry: great example of game dynamics</title>
		<link>http://www.ultrasaurus.com/sarahblog/2012/01/stirfry-great-example-of-game-dynamics/</link>
		<comments>http://www.ultrasaurus.com/sarahblog/2012/01/stirfry-great-example-of-game-dynamics/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 17:49:39 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://www.ultrasaurus.com/?p=3553</guid>
		<description><![CDATA[The hip trend these days in game dynamics is &#8220;compulsion loops,&#8221; where in one of the game activities lets us win gold or coins or some kind of virtual currency, which lets us buy stuff, which helps us play the game better, which earns more gold, and so on. (Stephanie Morgan gave a great Creative [...]]]></description>
			<content:encoded><![CDATA[<p>The hip trend these days in game dynamics is &#8220;compulsion loops,&#8221; where in one of the game activities lets us win gold or coins or some kind of virtual currency, which lets us buy stuff, which helps us play the game better, which earns more gold, and so on. (Stephanie Morgan gave a great <a href="http://vimeo.com/35394885">Creative Mornings Talk</a> on this.) </p>
<p>As we win more, our skills improve and we get more attached to the game.  These days, if we want to short-cut the process and level-up more quickly, we simply spend real money to buy virtual currency via in-app purchase.</p>
<p><a href="http://itunes.apple.com/us/app/stir-fry/id493886740?mt=8"><img align="right" src="https://img.skitch.com/20120130-gt3xssq57hcwmxs793kujud5xm.png"/></a></p>
<p>The <a href="http://itunes.apple.com/us/app/stir-fry/id493886740?mt=8">Stir Fry iPhone game</a> includes a great example of a compelling compulsion loop, along with an entertaining premise and fun interactions.</p>
<p>The core idea is that you can&#8217;t let your veggies burn up in their frying pans.  You can flip them and hit other similar veggies to score points, and if you are lucky, you could get a fortune cookie, which earns you coins at the end of the game.  You can buy potholders, fire extinguishers and other tools to improve your ability to keep your veggies from burning up.  The addition of other elements to the game play also keeps you from getting bored once you get good.  </p>
<p>There are two aspects to this compulsion loop that deepen engagement and increase effectiveness.  First, the creative variety and story telling aspect of the props deepens engagement in the game.  Secondly, including an aspect of chance and randomness in the reward system makes it more addictive.</p>
<p>It may seem counter-intuitive, but the element of chance is a key difference between something being <em>work</em> and something being <em>play</em>.  (Of course, in work we don&#8217;t always get more when we work harder, but that&#8217;s the prevailing mythology.  In a game we know the rules and we buy into the randomness because it is <em>fun</em>.)</p>
<p>In  recent <a href="http://www.nytimes.com/2012/01/30/world/europe/harnessing-gaming-for-the-classroom.html?_r=3&#038;ref=internationaleducation">New York Times article</a>, Paul Howard-Jones shed some light on this phenomenon:</p>
<blockquote><p>
computer games stimulate the brain’s reward system to produce dopamine, a chemical “which helps orient our attention and enhances the making of connections between neurons, which is the physical basis for learning.”</p>
<p>Mr. Howard-Jones said that research has shown that the introduction of a chance or game element into any reward system increases dopamine production. “For generations, we educators have done everything we can to maintain a consistent relationship between reward and achievement, but the neuroscience is telling us something different,” he said in an interview.</p>
<p>According to Mr. Howard-Jones, students learn more, and are happier to continue learning, when they are offered the chance of a reward rather than a guaranteed reward.
</p></blockquote>
<p>While it seems illogical, I think we&#8217;ve all experienced playful activities from games to sports where the element of chance adds to that edgy, uncertain anticipation that makes the reward that much more sweet.  If only we could apply the same philosophy to all aspects of our lives, since there is an element of chance in everything we do.  Of course, I think one of the reasons games are fun is simply because they are a diversion meant only for entertainment and the game play is a gift to ourselves.</p>
<p>Check out <a href="http://itunes.apple.com/us/app/stir-fry/id493886740?mt=8">Stir Fry iPhone game</a> for a neat new example of well-thought out game dynamics or just for a fun diversion.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ultrasaurus.com/sarahblog/2012/01/stirfry-great-example-of-game-dynamics/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>cucumber and custom rspec matchers with rails 3.1</title>
		<link>http://www.ultrasaurus.com/sarahblog/2012/01/cucumber-and-custom-rspec-matchers-with-rails-3-1/</link>
		<comments>http://www.ultrasaurus.com/sarahblog/2012/01/cucumber-and-custom-rspec-matchers-with-rails-3-1/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 16:40:52 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.ultrasaurus.com/?p=3548</guid>
		<description><![CDATA[I&#8217;m working my way through an epic Rails 3.1 upgrade and some of my cucumber features were failing because I was using a custom RSpec matcher and the method wasn&#8217;t found.
My custom matcher looks something like this:

module CustomMatchers

  class XmlSubsetMatcher
      :
  end

  def be_xml_subset_of(expected)
    [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working my way through an epic Rails 3.1 upgrade and some of my cucumber features were failing because I was using a custom RSpec matcher and the method wasn&#8217;t found.</p>
<p>My custom matcher looks something like this:</p>
<pre>
module CustomMatchers

  class XmlSubsetMatcher
      :
  end

  def be_xml_subset_of(expected)
    XmlSubsetMatcher.new(expected)
  end
</pre>
<p>and when I ran my feature I was getting this failure:<br />
<code><br />
      undefined method `xml_subset_of?' for #<String:0x007f9839d30378> (NoMethodError)<br />
</code></p>
<p>As it turns out, in my zeal to make sure everything was using the latest and great new stuff, I had forgotten to move over this critical configuration line in cucumbers env.rb:</p>
<p><code><br />
World(CustomMatchers)<br />
</code></p>
<p>Now, my cucumber feature is happily failing cuz my code doesn&#8217;t work. Whew.  I couldn&#8217;t find this documented anywhere and I&#8217;m not even sure where this documentation would belong.  I found a hint on the <a href="https://github.com/cucumber/cucumber/wiki/RSpec-Expectations">cucumber wiki rspec expectations page</a>, but none of the code on that page is actually needed when using cucumber with Rails, so I decided not to touch it and just write this blog post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ultrasaurus.com/sarahblog/2012/01/cucumber-and-custom-rspec-matchers-with-rails-3-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ffmpeg on osx lion</title>
		<link>http://www.ultrasaurus.com/sarahblog/2012/01/ffmpeg-on-osx-lion/</link>
		<comments>http://www.ultrasaurus.com/sarahblog/2012/01/ffmpeg-on-osx-lion/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 05:40:37 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.ultrasaurus.com/?p=3537</guid>
		<description><![CDATA[I found that I needed to convert an m4a audio file (which is what QuickTime saves when I record audio) to a wav file, so I decided to use my favorite &#8220;can opener.&#8221; The versatile open source ffmpeg tool has always seemed to be able to convert anything to anything in audio-video formats.
I decided to [...]]]></description>
			<content:encoded><![CDATA[<p>I found that I needed to convert an m4a audio file (which is what QuickTime saves when I record audio) to a wav file, so I decided to use my favorite &#8220;can opener.&#8221; The versatile open source <a href="http://ffmpeg.org">ffmpeg</a> tool has always seemed to be able to convert anything to anything in audio-video formats.</p>
<p>I decided to pull the source from git:<br />
<code><br />
$ git clone git://source.ffmpeg.org/ffmpeg.git<br />
$ cd ffmpeg/<br />
</code></p>
<p>Stable versions are tagged (which I could see with &#8220;git tag -l&#8221;).  I don&#8217;t need to live on the edge right now, so I switched to the tag &#8220;n0.9.1&#8243; which I assume is for the latest stable build &#8220;harmony&#8221; 0.9.1 and made a local branch based on that.<br />
<code><br />
$ git co n0.9.1<br />
$ git checkout -b n0.9.1<br />
</code></p>
<p>Instructions for building ffmpeg are in the &#8220;INSTALL&#8221; file.  I discovered I needed yasm, which I could install with brew.  Here&#8217;s what I did:<br />
<code><br />
$  brew install yasm<br />
$  ./configure<br />
$ make<br />
CC	libavdevice/alldevices.o<br />
CC	libavdevice/avdevice.o<br />
CC	libavdevice/lavfi.o<br />
AR	libavdevice/libavdevice.a<br />
CC	libavfilter/af_aconvert.o<br />
libavfilter/af_aconvert.c:53: warning: function declaration isn’t a prototype<br />
libavfilter/af_aconvert.c:105: warning: function declaration isn’t a prototype<br />
CC	libavfilter/af_aformat.o<br />
CC	libavfilter/af_anull.o<br />
CC	libavfilter/af_aresample.o<br />
    :<br />
   :<br />
ffserver.c: In function ‘parse_ffconfig’:<br />
ffserver.c:4236: warning: ‘avcodec_get_context_defaults2’ is deprecated (declared at ./libavcodec/avcodec.h:3948)<br />
ffserver.c:4237: warning: ‘avcodec_get_context_defaults2’ is deprecated (declared at ./libavcodec/avcodec.h:3948)<br />
LD	ffserver_g<br />
CP	ffserver<br />
STRIP	ffserver<br />
</code><br />
I saw a lot of warnings, but they didn&#8217;t seem to negatively affect what I was trying to do.  I found a <a href="http://www.catswhocode.com/blog/19-ffmpeg-commands-for-all-needs">nice blog post from catswhocode</a> to remind me of the usage, and was able to use this simple command:</p>
<p><code><br />
$ ./ffmpeg -i frog.m4a frog.wav<br />
ffmpeg version 0.9.1, Copyright (c) 2000-2012 the FFmpeg developers<br />
  built on Jan  7 2012 21:19:08 with llvm_gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)<br />
  configuration:<br />
  libavutil    51. 32. 0 / 51. 32. 0<br />
  libavcodec   53. 42. 4 / 53. 42. 4<br />
  libavformat  53. 24. 2 / 53. 24. 2<br />
  libavdevice  53.  4. 0 / 53.  4. 0<br />
  libavfilter   2. 53. 0 /  2. 53. 0<br />
  libswscale    2.  1. 0 /  2.  1. 0<br />
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'frog.m4a':<br />
  Metadata:<br />
    major_brand     : M4A<br />
    minor_version   : 0<br />
    compatible_brands: M4V M4A mp42isom<br />
    creation_time   : 2012-01-08 05:09:05<br />
  Duration: 00:00:07.22, start: 0.000000, bitrate: 206 kb/s<br />
    Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 201 kb/s<br />
    Metadata:<br />
      creation_time   : 2012-01-08 05:09:05<br />
      handler_name    :<br />
Output #0, wav, to 'frog.wav':<br />
  Metadata:<br />
    major_brand     : M4A<br />
    minor_version   : 0<br />
    compatible_brands: M4V M4A mp42isom<br />
    creation_time   : 2012-01-08 05:09:05<br />
    encoder         : Lavf53.24.2<br />
    Stream #0:0(und): Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s<br />
    Metadata:<br />
      creation_time   : 2012-01-08 05:09:05<br />
      handler_name    :<br />
Stream mapping:<br />
  Stream #0:0 -> #0:0 (aac -> pcm_s16le)<br />
Press [q] to stop, [?] for help<br />
size=    1244kB time=00:00:07.22 bitrate=1411.3kbits/s<br />
video:0kB audio:1244kB global headers:0kB muxing overhead 0.003611%</p>
<p>$ ls<br />
frog.m4a  frog.wav<br />
</code></p>
<p>Success!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ultrasaurus.com/sarahblog/2012/01/ffmpeg-on-osx-lion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>become a working developer in 5 months?</title>
		<link>http://www.ultrasaurus.com/sarahblog/2012/01/become-a-working-developer-in-5-months/</link>
		<comments>http://www.ultrasaurus.com/sarahblog/2012/01/become-a-working-developer-in-5-months/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 14:54:25 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://www.ultrasaurus.com/?p=3530</guid>
		<description><![CDATA[Jeff Casimir believes he can train anyone with the passion and will to learn to be a professional software developer.  He goes so far as to say if you don&#8217;t make it (and you are really working at it), he&#8217;ll consider it a personal failure if you don&#8217;t.  Also, he&#8217;s partnered with LivingSocial [...]]]></description>
			<content:encoded><![CDATA[<p>Jeff Casimir believes he can train anyone with the passion and will to learn to be a professional software developer.  He goes so far as to say if you don&#8217;t make it (and you are really working at it), he&#8217;ll consider it a personal failure if you don&#8217;t.  Also, he&#8217;s partnered with LivingSocial who is eager to hire graduates of the program, paying you to learn <em>whether or not</em> you qualify for a job at the end.</p>
<p>I interviewed Jeff yesterday and posted an article about the Washington DC <a href="http://workshops.railsbridge.org/2012/01/hungry-academy-get-paid-to-learn-rubyrails/">Hungry Academy program on the RailsBridge Open Workshops blog</a>.  I&#8217;m skeptical that you can got from &#8220;I&#8217;ve never coded&#8221; to writing production code on a web app like Living Social in 5 months, but if you have a passion to learn, go for it.  At worst case, you&#8217;ll get some great training and experience and be on your way to becoming a software developer. </p>
<p> Jeff is a dedicated and imaginative teacher who has taught middle and high school before starting his business training software developers.  I don&#8217;t doubt his skill and am eager to see what happens with the program.  I believe that people need a lot of experience writing a lot of code before they would be ready for a typical job.  Of course, I also believe that there are a wide variety of code writing projects in any software company. I&#8217;m sure that Living Social has quite a bit of code that needs to be written.  My guess is that they plan to find starter projects for less experienced developers, if the folks who finish the program show that they are good learners. In any great software development class, you write quite a bit of code, so Jeff and other program mentors from LivingSocial will get a chance to see how people approach new challenges, ask good questions, work through problems and write code. As software developers, we are always learning new tools, frameworks and languages, and whole new patterns of development as the hardware underneath us radically changes in capability and the people who use our software change how they use it and what they want to do.  </p>
<p>If you are in the DC area, or willing to move there for 5 months, and think you want to become a software developer or simply switch from building desktop apps or servlets to writing web apps in Ruby on Rails, I strongly suggest you check this out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ultrasaurus.com/sarahblog/2012/01/become-a-working-developer-in-5-months/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>sillicon valley love notes</title>
		<link>http://www.ultrasaurus.com/sarahblog/2011/12/sillicon-valley-love-notes/</link>
		<comments>http://www.ultrasaurus.com/sarahblog/2011/12/sillicon-valley-love-notes/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 19:29:39 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://www.ultrasaurus.com/?p=3512</guid>
		<description><![CDATA[We need more pop culture that show how strong men can be attracted to powerful, smart, technical women.  A couple of years ago, I wrote about the rise in hacker love songs being a positive trend for women in computing.  Today I saw Silicon Valley Ryan Gosling.  

I can&#8217;t count the number [...]]]></description>
			<content:encoded><![CDATA[<p>We need more pop culture that show how strong men can be attracted to powerful, smart, technical women.  A couple of years ago, I wrote about the rise in <a href="http://www.ultrasaurus.com/sarahblog/2009/08/hacker-love-songs/">hacker love songs</a> being a positive trend for women in computing.  Today I saw <a href="http://siliconvalleyryangosling.tumblr.com/">Silicon Valley Ryan Gosling</a>.  </p>
<p><img src="http://26.media.tumblr.com/tumblr_lwmxn8NwEr1r8eulxo1_400.jpg"/></p>
<p>I can&#8217;t count the number of times my sweetheart stayed up late with me and edited yet one more draft of an important proposal or word-smithed my bio to make me sound more impressive than I thought I was.  We need new media portrayals of what it means to be loved in an honest and meaningful way.  </p>
<p>While I wish it had been a guy, writing love notes for a girl, <a href="http://siliconvalleyryangosling.tumblr.com/">Silicon Valley Ryan Gosling</a> was created by writer, artist and designer, <a href="http://lianamaris.com/">Lian Amaris</a> (<a href="http://twitter.com/#!/lianamaris">@lianamaris</a>). </p>
<p>I think Angie Chang said it well in <a href="http://www.women2.org/ryan-gosling-wants-you-to-raise-capital-to-grow-your-startup/">her post on Ryan Gosling Silicon Valley</a>:</p>
<blockquote><p>Remember, if something you think should exist but doesn’t, make it happen.</p></blockquote>
<p>Some more of my favorites:</p>
<p><img src="http://24.media.tumblr.com/tumblr_lwnns0VKw61r8eulxo1_500.jpg"/></p>
<p><img src="http://26.media.tumblr.com/tumblr_lwnm0yOHFg1r8eulxo1_400.jpg"/></p>
<p><img src="http://28.media.tumblr.com/tumblr_lwmr90FDxy1r8eulxo1_500.jpg"/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ultrasaurus.com/sarahblog/2011/12/sillicon-valley-love-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>women 2.0 startup weekend documentary</title>
		<link>http://www.ultrasaurus.com/sarahblog/2011/12/women-2-0-startup-weekend-documentary/</link>
		<comments>http://www.ultrasaurus.com/sarahblog/2011/12/women-2-0-startup-weekend-documentary/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 15:33:00 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://www.ultrasaurus.com/?p=3506</guid>
		<description><![CDATA[I&#8217;m thrilled to be part of the Women 2.0 Startup Weekend Documentary: Start Something.  Filmed as a student project with San Francisco State University&#8217;s  Digital Video Intensive program, Start Something follows three groups of  entrepreneurs as they navigate Startup Weekend, a three day event where  entrepreneurs come together to share ideas, form [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m thrilled to be part of the <a href="http://www.women2.org/watch-the-women-2-0-startup-weekend-documentary/">Women 2.0 Startup Weekend Documentary</a>: Start Something.  Filmed as a student project with San Francisco State University&#8217;s  Digital Video Intensive program, Start Something follows three groups of  entrepreneurs as they navigate Startup Weekend, a three day event where  entrepreneurs come together to share ideas, form teams and launch startups.</p>
<p><iframe src="http://player.vimeo.com/video/33522461?title=0&amp;byline=0&amp;portrait=0&amp;color=9dca68" width="580" height="326" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p>Produced by Dave Kochbeck, directed by Doug Latimer, and edited by Joseph McDonald, this film captures the excitement, frustration and serendipity of the startup experience which is the essence of <a href="http://startupweekend.org/">Startup Weekend</a>.  In these 54-hour events, developers, coders, designers, marketers, product managers and startup enthusiasts come together to share ideas, form teams, build products, and create startups!  While most startups created at these weekend events don&#8217;t continue, the people at the events often go on to create or join other startup companies &#8212; or take their startup skills to fuel innovation in their day jobs.  </p>
<p>Many thanks to the <a href="http://www.kauffman.org">Kaufman Foundation</a>, the <a href="http://startupweekend.org/">Startup Weekend</a> crew, and all the prospective entrepreneurs who show up.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ultrasaurus.com/sarahblog/2011/12/women-2-0-startup-weekend-documentary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>a founder&#8217;s manifesto</title>
		<link>http://www.ultrasaurus.com/sarahblog/2011/12/a-founders-manifesto/</link>
		<comments>http://www.ultrasaurus.com/sarahblog/2011/12/a-founders-manifesto/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 00:47:29 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://www.ultrasaurus.com/?p=3496</guid>
		<description><![CDATA[I believe&#8230;

I do my best work when I also have time away to clear my head and reinvigorate my spirit.
 People are more important than software. Software is made for people by people.  Also, the people that I love who are outside of my little startup world are way more important than my startup, but [...]]]></description>
			<content:encoded><![CDATA[<p>I believe&#8230;</p>
<ul>
<li><strong>I do my best work when I also have time away</strong> to clear my head and reinvigorate my spirit.</li>
<li> <strong>People are more important than software.</strong> Software is made for people by people.  Also, the people that I love who are outside of my little startup world are way more important than my startup, but I also am driven to create something awesome in the time I spend making a living which takes me away from them &#8212; often that doesn&#8217;t fit into a little 9-5 box, but 24&#215;7 is also the wrong answer.</li>
<li> <strong>People are more important than profit.</strong> But if you don&#8217;t make payroll, it&#8217;s hard to keep working with the people you want to work with, so we need to balance that.</li>
<li> <strong>We need to trust each other.</strong> In addition to choosing to work with people who you can trust to work hard, communicate well and treat each other kindly, we also need to trust that people will make mistakes and everyone will mostly do what is their own best interests.  When everyone&#8217;s interests are aligned, everyone wins.  If everyone isn&#8217;t winning, we need to change the rules or move on.</li>
</ul>
<p>I know I am a hypocrite. Every day I fail to live my life according to my beliefs in small and large ways.  Sometimes I get angry when people fail, instead of creating a wonderful, supportive environment where failure is a part of the learning process.  I often forget that being home for dinner is more important to me than getting one more thing done. Sometimes I watch stupid TV shows on Netflix instead of having a conversation with my husband, or playing a game with my son, or calling my best friend because I&#8217;m worn out and frustrated and I forget that sitting in front of a screen for one more hour may feel easier but doesn&#8217;t really make me happy.</p>
<p>I also agree with poet Ralph Hodgson who said that &#8220;some things have to be believed to be seen.&#8221;   One of the unique aspects of a founder is the creation of a &#8220;reality distortion field&#8221; that causes other people to participate in a shared belief thereby causing it to become reality.  So, even though I fail every day to turn my beliefs into reality, I nonetheless hold them to be true. And everyday I work to create a wonderful, supportive learning environment where I can use that failure to change the reality of my life to reflect my beliefs along with a small part of the rest of reality through the software created by my team.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ultrasaurus.com/sarahblog/2011/12/a-founders-manifesto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>setting up ec2 minecraft server</title>
		<link>http://www.ultrasaurus.com/sarahblog/2011/11/setting-up-ec2-minecraft-server/</link>
		<comments>http://www.ultrasaurus.com/sarahblog/2011/11/setting-up-ec2-minecraft-server/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 03:08:54 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://www.ultrasaurus.com/?p=3464</guid>
		<description><![CDATA[Goal: set up a minecraft server using free EC2 account from OSX
[update: FAIL -- game play doesn't work on a micro instance, if we want to use EC2 it looks like we need to use at least a small one. so be careful to adjust the steps below to pick a small instance if you [...]]]></description>
			<content:encoded><![CDATA[<p>Goal: set up a minecraft server using free EC2 account from OSX<br />
[update: FAIL -- game play doesn't work on a micro instance, if we want to use EC2 it looks like we need to use at least a small one. so be careful to adjust the steps below to pick a small instance if you want to play.]</p>
<p>I learned that there are a lot of minecraft server implementations.  I decided to use Craftbukkit server largely because I saw it referenced from a <a href="http://confreaks.net/videos/696-rubyconf2011-be-a-minecraft-modman-with-purugin">RubyConf talk</a> by <a href="http://blog.enebo.com/">Tom Enebo</a> &#8212; might be fun to mod it someday :)</p>
<p>I pieced together information from some helpful tutorials from <a href=" https://help.ubuntu.com/community/EC2StartersGuide">Ubuntu</a> and <a href="http://www.robertsosinski.com/2008/01/26/starting-amazon-ec2-with-mac-os-x/">Robert Sosinski</a>.</p>
<ol>
<li>Sign-up for an AWS account (1 year free for new AWS accounts, but you need a credit card)</li>
<li>Go to <a href="https://console.aws.amazon.com/ec2/home">AWS Management Console</a></li>
<li>Create a Private Key
<ul>
<li>Select EC2 tab, click on &#8220;0 Key Pairs&#8221; on the right side</li>
<li>name it ec2.pem (or anything you want, but I&#8217;ll use ec2 in the rest of this tutorial)</li>
<li>save it to ~/.ec2/ec2.pem</li>
</ul>
</li>
<li>Create a Certificate
<ul>
<li>Under your name in the top right corner, select &#8220;Security Credentials&#8221;</li>
<li>Download the private key and certificate and save them in ~/.ec2</li>
</ul>
</li>
<li>Make your credential files private.  In your local terminal, type:
<ul>
<li>cd ~/.ec2</li>
<li>chmod go-rwx ~/.ec2/*.pem</li>
</ul>
</li>
<li>Download <a href="http://aws.amazon.com/developertools/351">EC2 API Tools</a>
<ul>
<li>Unzip the Amazon EC2 Command-Line Tools</li>
<li>Move both the bin and lib directory into your ~/.ec2 directory</li>
</ul>
</li>
<li>Your ~/.ec2 directory should have:
<ul>
<li>The cert-xxxxxxx.pem file</li>
<li>The pk-xxxxxxx.pem file</li>
<li>The bin directory</li>
<li>The lib directory</li>
<li>ec2.pem</li>
</ul>
</li>
<li>Set up EC2 Command-line Tools
<ul>
<li>Put the following into your ~/.bash_profile:<br />
<code># Setup Amazon EC2 Command-Line Tools<br />
export EC2_HOME=~/.ec2<br />
export PATH=$PATH:$EC2_HOME/bin<br />
export EC2_PRIVATE_KEY=`ls $EC2_HOME/pk-*.pem`<br />
export EC2_CERT=`ls $EC2_HOME/cert-*.pem`<br />
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home/</code></li>
<li>On the command-line, type:<br />
<code>source ~/.bash_profile</code></li>
</ul>
</li>
<li>Startup a server
<ul>
<li>[Update] We want to be careful to choose an AMI that works with the micro instance, which is what we get for free.  Ubuntu takes up too much disk space by default to fit into a micro instance, so you need to use one of the <a href="http://cloud.ubuntu.com/2010/11/using-ubuntu-images-on-aws-free-tier/">micro Ubuntu AMIs</a> they created for this purpose.  I&#8217;m going to use Maverick 10-10 &#8212; it&#8217;s the most recent version that has a micro version.</li>
<li>[Update] I picked one in us-east, since that&#8217;s where Amazon started my account by default and it seems that it needs to be in the same region matching the one set for my key:<br />
ec2-run-instances ami-cf33fea6 &#8211;instance-type t1.micro &#8211;region us-east-1 &#8211;key ec2</li>
<li>check to see if it is running, by typing:<br />
<code>ec2-describe-instances</code></li>
<li>make a note of your hostname!  It should look something like:</li>
</ul>
<pre>ec2-###-##-##-##.compute-1.amazonaws.com</pre>
</li>
<li>Open relevant ports (22 for ssh, 80 for http, 25565 for minecraft):<code><br />
ec2-authorize default -p 22<br />
ec2-authorize default -p 80<br />
ec2-authorize default -p 25565<br />
</code></li>
<li>ssh into your new instance<br />
<code>ssh -i ec2.pem ubuntu@ec2-###-##-##-##.compute-1.amazonaws.com</code></li>
<li>Install Java (<a href="http://ubuntu-for-humans.blogspot.com/2011/04/installing-java-on-ubuntu-server-1010.html">nice Ubuntu instructions</a>)<br />
Note: to accept the license, use tab to get to the OK &#8220;button&#8221; then hit return, then arrow to get to &#8220;Yes&#8221; and hit return again.<br />
To verify installation:<br />
$ java -version<br />
java version &#8220;1.6.0_26&#8243;<br />
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)<br />
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)</li>
<li>See <a href="http://wiki.bukkit.org/Setting_up_a_remote_Linux_server">this tutorial for setting up minecraft</a>, but if you are playing with the Minecraft 1.0 client (at least of today) you&#8217;ll need to install a dev build which you can find on the <a href="http://ci.bukkit.org/job/dev-CraftBukkit/">ci server</a>. I found that I needed to run the server, stop it and run it again to get it to start without errors.
<ul>
<li>get the latest dev build (I&#8217;m running 1502):<br/>
<pre>
wget http://ci.bukkit.org/job/dev-CraftBukkit/lastSuccessfulBuild/artifact/target/craftbukkit-1.0.0-SNAPSHOT.jar
</pre>
</li>
<li>create a file called &#8220;start.sh&#8221; with the following contents:<br/>
<pre>
#!/bin/sh
java -Xmx613M -Xincgc -jar craftbukkit-1.0.0-SNAPSHOT.jar
</pre>
</li>
<li>run the server in screen:
<pre>
screen
./start.sh
</pre>
</li>
</ol>
<p>[Update] By tweaking the memory allocation, we can get it to work (most of the time) with a single player.  I found that I can raise the memory allocation for java and use virtual memory, but that it sometimes maxes out the CPU.  </p>
<p>Here&#8217;s the setting where the game couldn&#8217;t be failed (couldn&#8217;t fight monsters or build things):</p>
<pre>#!/bin/sh
java -Xmx613M -Xincgc -jar craftbukkit-1.0.0-SNAPSHOT.jar

$top
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1642 ubuntu    20   0  978m 300m  10m S 12.3 50.7 100:44.96 java
</pre>
<p>Note:<br />
VIRT &#8211; 978M of virtual memory<br />
RES &#8211; 300m resident (physical) memory</p>
<hr/>
With this it sometimes works:</p>
<pre>
#!/bin/sh
java -Xmx1024M -Xincgc -jar craftbukkit-1.0.0-SNAPSHOT.jar

 2829 ubuntu    20   0 1336m 271m  10m S 14.0 45.8   0:18.76 java
</pre>
<hr/>
With this works almost all the time (but we&#8217;ve only tested one player):</p>
<pre>
#!/bin/sh
java -Xmx2048M -Xincgc -jar craftbukkit-1.0.0-SNAPSHOT.jar

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2893 ubuntu    20   0 2499m 341m  10m S 99.8 57.6   0:27.68 java                                                                     

 2893 ubuntu    20   0 2499m 341m  10m S 18.2 57.7   1:27.30 java                     </pre>
<p>when the CPU maxes out, I see this in the game console:<br />
<code>22:39:19 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ultrasaurus.com/sarahblog/2011/11/setting-up-ec2-minecraft-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

