<?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 cat itself &#187; andrea</title>
	<atom:link href="http://www.cds.caltech.edu/~ender/blog/author/andrea/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cds.caltech.edu/~ender/blog</link>
	<description></description>
	<lastBuildDate>Wed, 11 Jan 2012 00:59:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<!--real-sticky--><div id="real-sticky"><strong>Note:</strong> While I am keeping this blog for the occasional longer piece, I have moved to Google+ (<a title="My Google+ posts" href="https://plus.google.com/u/0/106839984596770449716/posts" target="_blank">link to my Google+ profile</a>) for the more casual use.</div><!--real-sticky-->	<item>
		<title>PyContracts</title>
		<link>http://www.cds.caltech.edu/~ender/blog/2011/07/pycontracts/</link>
		<comments>http://www.cds.caltech.edu/~ender/blog/2011/07/pycontracts/#comments</comments>
		<pubDate>Sun, 10 Jul 2011 16:00:00 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://www.cds.caltech.edu/~ender/blog/?p=271</guid>
		<description><![CDATA[In the past two years I have fallen in love with Python. In the course of my work I developed a few libraries that I use consistently across projects and save me quite a bit of development time. Some of them are worth sharing, and I hope to have the time to do it (ah!). [...]]]></description>
			<content:encoded><![CDATA[<p>In the past two years I have fallen in love with Python. In the course of my work I developed a few libraries that I use consistently across projects and save me quite a bit of development time. Some of them are worth sharing, and I hope to have the time to do it (ah!).</p>
<p><a href='http://andreacensi.github.com/contracts/'>PyContracts</a> is one such library, stable enough to merit a version number larger than 1.0. I uploaded it on the <a href='http://pypi.python.org/pypi/PyContracts'>PyPI</a> software repository, so that anybody can install it using:</p>
<pre><code>easy_install PyContracts</code></pre>
<p>(or: <code>pip install PyContracts</code>)</p>
<p><a href='http://andreacensi.github.com/contracts/'>PyContracts</a> can be used to declare constraints on the arguments and return value of the functions. While it can be used for type-checking, I found it much more valuable for expressing complicated constraints on the <em>values</em> rather than on the types. For example:</p>
<pre><code>@contract(color=&#39;seq[3](&gt;=0,&lt;=1)&#39;)
def paint(color):
    ...</code></pre>
<p>This checks that <code>color</code> is a sequence of 3 elements, and each element is a number between 0 and 1. Any sequence is allowed: lists, tuples, Numpy arrays, etc.</p>
<p>Note that it would be very tedious to do by hand:</p>
<pre><code>def paint(color):
    if ( not isinstance(color, Sequence)
         or len(color) != 3):
        raise ValueError(&#39;I need a sequence of length 3.&#39;)
    for c in color:
        if (not isinstance(c, (int, float))
           or c&lt;0 or c&gt;1):
            raise ValueError(&#39;Colors must be in [0,1]&#39;)
    ...</code></pre>
<p>All these tests are done automatically by PyContracts, and similar error messages are given.</p>
<p>Here&#8217;s a more complicated example. Suppose you want to write a function <code>blend()</code> that takes a list of RGB or RGBA images, blends them together, and return the blended images.</p>
<p>There are several checks you need to do: the input is a list, there are at least two images, each image is RGB/RGBA, each image is the same size, and so on.</p>
<p>With PyContracts you can express all of that very compactly:</p>
<pre><code>@contract(images=&quot;list[&gt;=2]( array[HxWx(3|4)](uint8) )&quot;,
         returns=&quot;array[HxWx3](uint8)&quot;)
def blend(images):
    &#39;&#39;&#39; Blends a series of images together. &#39;&#39;&#39;
    ...</code></pre>
<p>See the <a href='http://andreacensi.github.com/contracts/'>PyContracts home page</a> for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cds.caltech.edu/~ender/blog/2011/07/pycontracts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Estimating stress and procrastination levels from inbox data</title>
		<link>http://www.cds.caltech.edu/~ender/blog/2011/02/estimating-stress-and-procrastination-levels-from-inbox-data/</link>
		<comments>http://www.cds.caltech.edu/~ender/blog/2011/02/estimating-stress-and-procrastination-levels-from-inbox-data/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 16:00:00 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://www.cds.caltech.edu/~andrea/blog/?p=239</guid>
		<description><![CDATA[I&#8217;ve been stuck home with a bad flu for the last few days. The headache and paracetamol intoxication impacted my abilities and willpower, to the point that the only productive thing I did was polishing my backup strategies. I added duplicity to my Time Machine setup for day-to-day backups. I also found a way to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been stuck home with a bad flu for the last few days. The headache and paracetamol intoxication impacted my abilities and willpower, to the point that the only productive thing I did was polishing my backup strategies.</p>
<p>I added <a href='http://duplicity.nongnu.org'>duplicity</a> to my <a href='http://www.apple.com/macosx/what-is-macosx/time-machine.html'>Time Machine</a> setup for day-to-day backups. I also found a way to backup my GMail account using <a href='http://pyropus.ca/software/getmail/'>getmail</a>. Getmail is written in Python, so I looked a little bit into the libraries that can be used to interact with IMAP. It&#8217;s actually very easy to retrieve messages or other statistics; so I <em>had</em> to do something with it.</p>
<p>You&#8217;re asking why? <em>Why</em>? Because I love data! I love data <a href='http://www.youtube.com/watch?v=wblrPRB4YAM'>like Tarantino likes making movies</a>.</p>
<p>I wrote a script that periodically logs the headers of flagged messages in my inbox, and another that reads the logged data, and plots a couple of statistics: <em>stress</em>, defined as the number of flagged messages; and <em>procrastination</em>, defined as the median age of those messages.</p>
<p>Here&#8217;s a snapshot of the result:</p>
<div class='flickr'>
	<a href='http://www.flickr.com/photos/censi/5426964493/' class='photo'><br />
	<img src='http://static.flickr.com/5218/5426964493_d8a8f4291a_m.jpg' alt='Plotting procrastination'/><br />
	</a>
	</div>
<p>For now, I only have three days of data, but you can <a href='http://www.cds.caltech.edu/~andrea/'>see it live on my webpage</a> and track my stats in the future.</p>
<p>This is especially useful if you&#8217;re waiting for an answer from me!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cds.caltech.edu/~ender/blog/2011/02/estimating-stress-and-procrastination-levels-from-inbox-data/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Tools of the trade</title>
		<link>http://www.cds.caltech.edu/~ender/blog/2010/12/tools-of-the-trade/</link>
		<comments>http://www.cds.caltech.edu/~ender/blog/2010/12/tools-of-the-trade/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 16:00:00 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://www.cds.caltech.edu/~andrea/blog/?p=235</guid>
		<description><![CDATA[My old Macbook was in terrible conditions after a long and productive life: it’s been powered on for an average of 16 hours per day for 3 years, and it has traveled to several continents. It will be fondly remembered. I got a new Macbook pro and spent a considerable amount of time reinstalling my [...]]]></description>
			<content:encoded><![CDATA[<p>My old Macbook was in terrible conditions after a long and productive life: it’s been powered on for an average of 16 hours per day for 3 years, and it has traveled to several continents. It will be fondly remembered.</p>
<p>I got a new Macbook pro and spent a considerable amount of time reinstalling my development and research environment. In the hope of saving some time during the next reinstall, I documented everything I installed. I thought I’d write a blog post about it, thinking that this list might be useful to someone else.</p>
<p><strong>Developing environment</strong></p>
<ul>
<li>First thing first: the developer tools from Apple; they come in the install CD.</li>
<li><a href="http://www.macports.org/">macports</a> is my choice to complete the Unix environment. Packages installed: <a href="http://www.gnu.org/software/wget/">wget</a>, <a href="http://www.ffmpeg.org/">ffmpeg</a>, <a href="http://www.mplayerhq.hu/">mplayer</a>, <a href="http://www.imagemagick.org/">imagemagick</a>, <a href="http://www.harding.motd.ca/autossh/">autossh</a>, aspell.</li>
<li><a href="http://www.python.org/">python</a> is my current language of choice. The indispensable packages to learn and use are <a href="http://numpy.scipy.org/">numpy</a>, <a href="http://www.scipy.org/">scipy</a>, <a href="http://matplotlib.sourceforge.net/">matplotlib</a>, <a href="http://www.pytables.org/">pytables</a>, <a href="http://opencv.willowgarage.com/">opencv</a>. The <a href="http://www.enthought.com/products/epd.php">Enthought Python Distribution</a> is the most convenient package, although I have been having a few small problems with the 64 bit version.</li>
<li><a href="http://www.eclipse.org/">Eclipse</a> is my favorite multilingual IDE, of course with <a href="http://pydev.org/">pydev</a>, the Python plugin.</li>
<li><a href="http://macromates.com/">textmate</a> is the best casual editor you can find for OS X. The essential plugins are the <a href="https://svn.ux.uis.no/svn/textmate/Matlab.tmbundle/">matlab bundle</a>, and the <a href="http://ciaranwal.sh/remate/">remate plugin</a>, to work over sftp links.</li>
<li>The <a href="http://www.levien.com/type/myfonts/inconsolata.html">inconsolata</a> fonts are my favorite programming fonts. On Mac there is already <em>Consolas</em>, but <em>Inconsolata</em> is a free equivalent that you can install on Linux as well.</li>
<li><a href="http://www.cmake.org/">cmake</a> is the best solution for building and packaging C/C++ projects.</li>
<li>After years with subversion, I am now a <a href="http://git-scm.com/">git</a> convert. I found the best solution for Mac is to just install the binaries from the official website.</li>
<li><a href="http://www.hdfgroup.org/hdf-java-html/hdfview/">hdfview</a> is a nice <a href="http://en.wikipedia.org/wiki/HDF">HDF</a> viewer. See <a href="http://dx.doi.org/10.1109/MCSE.2010.107">a few reasons why you should use HDF</a>.</li>
<li>I dumped <a href="http://www.parallels.com/">Parallels</a> for <a href="http://www.virtualbox.org/">VirtualBox</a>: it’s free, and better.</li>
<li>You should drop <a href="http://en.wikipedia.org/wiki/Bash_(Unix_shell)">bash</a> for <a href="http://en.wikipedia.org/wiki/Zsh">zsh</a>. The best theme/plugin manager for zsh is <a href="http://github.com/robbyrussell/oh-my-zsh/">oh-my-sh</a>.</li>
</ul>
<p><strong>Networking</strong></p>
<ul>
<li><a href="http://sourceforge.net/projects/cotvnc/">Chicken of the VNC</a> is still the best <a href="http://en.wikipedia.org/wiki/Virtual_Network_Computing">VNC</a> client around. In theory all VNC clients should be compatible with all servers; in practice, there are all sorts of incompatibilities, and Chicken of the VNC seems to play along well, especially with older Linux servers.</li>
<li>With <a href="http://synergy2.sourceforge.net/">synergy</a> and a couple of computers, you can create a fancy Matrix-style C&amp;C environment.</li>
<li><a href="http://www.jungledisk.com/">JungleDisk</a> is my current favorite solution for automatic offsite backup (coupled with Time Machine for onsite backup).</li>
<li><a href="http://www.expandrive.com/">expandrive</a> is a must if you are working with multiple machines.</li>
<li>I switched from <a href="http://www.getfirefox.com/">Firefox</a> to <a href="http://www.google.com/chrome">Chrome</a>; it’s faster, and has better memory handling. The indispensable plugin is <a href="http://www.chromeextensions.org/appearance-functioning/adblock/">adblockplus</a>.</li>
<li><a href="http://www.harding.motd.ca/autossh/">autossh</a> might be useful if you need to establish SSH tunnels towards your machines (example: to secure VNC).</li>
</ul>
<p><strong>Doing research</strong></p>
<ul>
<li><a href="http://www.evernote.com/">Evernote</a> saved my sanity! It is my solution for all the random bits of information (everything that I care about, but not so “stable” as to require a repository.)</li>
<li><a href="http://mekentosj.com/papers/">Papers</a> is the other piece of software that saved my sanity. Highly recommended.</li>
<li><a href="http://jabref.sourceforge.net/">Jabref</a> is better than Papers at handling .bib references; useful at writing time when you want to have more control on formatting.</li>
<li><a href="http://skim-app.sourceforge.net/">Skim</a> is better than Preview for reading long PDF files.</li>
<li><a href="http://www.apple.com/iwork/keynote/">Keynote</a> has been a welcome liberation from Powerpoint. There was a period in which I used to do presentations with LaTeX using <a href="http://stuwww.uvt.nl/~hendri/Downloads/powerdot.html">PowerDot</a>, but nowadays I do everything with Keynote.</li>
<li>The best <a href="http://http://en.wikipedia.org/wiki/LaTeX">LaTeX</a> distribution for Mac is <a href="http://www.tug.org/mactex/">MacTex</a>.</li>
<li>If you are writing raw LaTeX, you are probably wasting your time; <a href="http://www.lyx.org/">LyX</a> gives you a nice GUI environment, and you still can have the flexibility of LaTeX when you need it.</li>
<li>Staying up late in front of your screen screws up your <a href="http://en.wikipedia.org/wiki/Melatonin">melatonin</a> production. Use <a href="http://www.stereopsis.com/flux/">flux</a> to minimize this problem.</li>
<li>Use <a href="http://macfreedom.com/">Freedom</a> to cut your internet connection when you <strong>really</strong> have to work. (Unfortunately it is not free anymore.)</li>
<li>Use <a href="http://www.rescuetime.com/">RescueTime</a> to assess your productivity (warning: it can be very demoralizing!)</li>
<li><a href="http://www.simplynoise.com/">SimplyNoise</a> is useful when your work environment gets too noisy.</li>
<li>Piping to <a href="http://www.mplayerhq.hu/">mplayer/mencoder</a>, with perhaps a second pass with <a href="http://www.ffmpeg.org/">ffmpeg</a>, is the best solution to create high-quality videos for your research.</li>
<li><a href="http://www.videolan.org/vlc/">VLC</a> plays everything.</li>
<li>Sometimes I forget huge log files in some remote directory. I solved this problem using <a href="http://grandperspectiv.sourceforge.net/#download">GrandPerspective</a>.</li>
</ul>
<p><strong>Software that I have to install but I get no joy in using</strong></p>
<ul>
<li><a href="http://get.adobe.com/reader/">Adobe Acrobat</a> is the bloatest piece of software I have ever seen. I hate its intrusive “update manager”. But it is sometimes useful for checking which fonts a PDF is using.</li>
<li><a href="http://www.mathworks.com/products/matlab/">Matlab</a> is something I sweared to use again only when forced.</li>
<li><a href="http://www.wolfram.com/mathematica/">Mathematica</a> is still enigmatic and profoundly non intuitive for me.</li>
<li>There’s no alternative to <a href="http://www.skype.com/">Skype</a>.</li>
</ul>
<p><strong>Miscellaneous</strong></p>
<ul>
<li><a href="http://kevingessner.com/software/functionflip/">FunctionFlip</a> for turning off F9/F7. Useful if you have big and imprecise fingers that always press F9 (forward song) while going for F10 (mute).</li>
<li><a href="http://musicbrainz.org/">Music Brainz Picard</a> is the best tagger/organizer for MP3 files. MP3 tagging is my favorite procrastination activity.</li>
<li><a href="http://toolbar.google.com/toolbar/gmail-helper/">gmail notifier</a></li>
<li><a href="http://www.xiph.org/quicktime/download.html">OGG drivers for QuickTime</a></li>
<li><a href="http://projects.tynsoe.org/en/geektool/">geektool</a> has some interesting uses (<a href="http://lifehacker.com/244026/geek-to-live--monitor-your-mac-and-more-with-geektool">example</a>).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.cds.caltech.edu/~ender/blog/2010/12/tools-of-the-trade/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Lessons learned</title>
		<link>http://www.cds.caltech.edu/~ender/blog/2010/10/lessons-learned/</link>
		<comments>http://www.cds.caltech.edu/~ender/blog/2010/10/lessons-learned/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 16:00:00 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://www.cds.caltech.edu/~andrea/blog/2010/10/lessons-learned/</guid>
		<description><![CDATA[Spot the bug: def compute_derivative(x, dt): deriv_filter = numpy.array([-0.5, 0, 0.5]) / dt d = scipy.signal.convolve(x, deriv_filter, mode=1) d[0] = d[1] d[-1] = d[-2] return d Hint: this snipped is correct: def second_derivative(x, dt): return compute_derivative(compute_derivative(x, dt), dt) Moral of the story: always, always, always write unit tests, otherwise you run the risk of spending [...]]]></description>
			<content:encoded><![CDATA[<p>Spot the bug:</p>
<pre><code>def compute_derivative(x, dt):
  deriv_filter = numpy.array([-0.5, 0, 0.5]) / dt
  d = scipy.signal.convolve(x, deriv_filter, mode=1)
  d[0] = d[1]
  d[-1] = d[-2]
  return d</code></pre>
<p>Hint: this snipped is correct:</p>
<pre><code>def second_derivative(x, dt):
  return compute_derivative(compute_derivative(x, dt), dt)</code></pre>
<p>Moral of the story: always, always, always write <a href='http://en.wikipedia.org/wiki/Unit_testing'>unit tests</a>, otherwise you run the risk of spending nights trying to understand why certain flies go left when they are supposed to go right, and in the end, who knows, they might prefer to go left, this is not an exact science, maybe this is an important discovery, perhaps I need more coffee.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cds.caltech.edu/~ender/blog/2010/10/lessons-learned/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Graduation day</title>
		<link>http://www.cds.caltech.edu/~ender/blog/2010/05/graduation-day/</link>
		<comments>http://www.cds.caltech.edu/~ender/blog/2010/05/graduation-day/#comments</comments>
		<pubDate>Thu, 27 May 2010 16:00:00 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://www.cds.caltech.edu/~andrea/blog/?p=216</guid>
		<description><![CDATA[It is graduation day at Willow Garage: the first batch of PR-2 robots leaves home for their final destinations in research and industry. The money shot is at 4:23.]]></description>
			<content:encoded><![CDATA[<p>It is graduation day at Willow Garage: the first batch of PR-2 robots leaves home for their final destinations in research and industry. The money shot is at 4:23.</p>
<p><object height='340' width='560'><param name='movie' value='http://www.youtube.com/v/PTv6YujapGQ&#038;hl=en_US&#038;fs=1&#038;'/><param name='allowFullScreen' value='true'/><param name='allowscriptaccess' value='always'/><embed src='http://www.youtube.com/v/PTv6YujapGQ&#038;hl=en_US&#038;fs=1&#038;' allowfullscreen='true' type='application/x-shockwave-flash' allowscriptaccess='always' height='340' width='560'/></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cds.caltech.edu/~ender/blog/2010/05/graduation-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Midnight with Gray&#8217;s anatomy</title>
		<link>http://www.cds.caltech.edu/~ender/blog/2010/05/midnight-with-grays-anatomy/</link>
		<comments>http://www.cds.caltech.edu/~ender/blog/2010/05/midnight-with-grays-anatomy/#comments</comments>
		<pubDate>Sun, 09 May 2010 16:00:00 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[caltech]]></category>

		<guid isPermaLink="false">http://www.cds.caltech.edu/~andrea/blog/?p=210</guid>
		<description><![CDATA[It&#8217;s midnight. I find myself in the library with &#8220;Gray&#8217;s anatomy&#8221;. For my homework I have to draw the brain and label several areas. The result looks more like a pizza with too many toppings. I think that everybody will turn in something like that. By chance, the only other person in the library is [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s midnight. I find myself in the library with &#8220;Gray&#8217;s anatomy&#8221;.</p>
<div class='flickr'>
	<a href='http://www.flickr.com/photos/censi/4589323932/' class='photo'><br />
	<img src='http://static.flickr.com/3312/4589323932_3f7f023870_m.jpg' alt='Midnight and Gray&apos;s anatomy'/><br />
	</a>
	</div>
<p>For my homework I have to draw the brain and label several areas. The result looks more like a pizza with too many toppings.</p>
<div class='flickr'>
	<a href='http://www.flickr.com/photos/censi/4588734267/' class='photo'><br />
	<img src='http://static.flickr.com/4047/4588734267_d4620d6346_m.jpg' alt='brain'/><br />
	</a>
	</div>
<p>I think that everybody will turn in something like that. By chance, the only other person in the library is an undergrad doing the same homework. When I walk by, I glance at her work, and, well, it looks better than the tables in the book. I go home, I&#8217;m too old for this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cds.caltech.edu/~ender/blog/2010/05/midnight-with-grays-anatomy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>David MacKay: Sustainable energy without the hot air</title>
		<link>http://www.cds.caltech.edu/~ender/blog/2010/04/david-mackay-sustainable-energy-without-the-hot-air/</link>
		<comments>http://www.cds.caltech.edu/~ender/blog/2010/04/david-mackay-sustainable-energy-without-the-hot-air/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 16:00:00 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[caltech]]></category>

		<guid isPermaLink="false">http://www.cds.caltech.edu/~andrea/blog/2010/04/david-mackay-sustainable-energy-without-the-hot-air/</guid>
		<description><![CDATA[The other day I&#8217;ve been to David MacKay&#8217;s talk &#8220;Sustainable energy &#8212; without the hot air&#8221;. MacKay got a PhD in Computational and Neural Systems at Caltech and went on to became a leading researcher in estimation and machine learning. Later he became interested in sustainable energy; now he is Chief Scientific Advisor ofHer Majesty&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I&#8217;ve been to <a href='http://www.inference.phy.cam.ac.uk/mackay/'>David MacKay</a>&#8217;s talk &#8220;Sustainable energy &#8212; without the hot air&#8221;. MacKay got a PhD in <a href='http://www.cns.caltech.edu/'>Computational and Neural Systems</a> at Caltech and went on to became a leading researcher in estimation and machine learning. Later he became interested in sustainable energy; now he is Chief Scientific Advisor of<br/>Her Majesty&#8217;s Department of Energy and Climate Change.</p>
<p>His approach is to explain the problem of sustainability in terms of quantities to which every person can relate. This makes the discussion more meaningful and pragmatic. It works! Even if I&#8217;m not that good at remembering numbers, today I still remember that the average European consumes 125 KWh/day, the average American about twice than that. If I fly once internationally every year, that averages to about 25 KWh/day. The same can be done for energy sources: the output of each technology is measured in energy per square meters. For example, we learned that to supply the UK&#8217;s energy consumption with solar energy one would have to cover a huge part of the territory with solar panels.</p>
<p>The bottom line is that the only technologies that are sustainable, that is, they will produce energy for the next 1000 years with limited pollution, are nuclear energy, clean coal, and solar power &#8220;in other people&#8217;s deserts&#8221;. All other renewable sources just do not produce enough energy. His views are collected in <a href='http://www.withouthotair.com/'>a book that is available online</a>.</p>
<p>It&#8217;s refreshing to see that one can start in a narrow field such as machine learning and go on to make some policy contribution for one of the main problems of mankind.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cds.caltech.edu/~ender/blog/2010/04/david-mackay-sustainable-energy-without-the-hot-air/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Robotic cloth folding</title>
		<link>http://www.cds.caltech.edu/~ender/blog/2010/04/robotic-cloth-folding/</link>
		<comments>http://www.cds.caltech.edu/~ender/blog/2010/04/robotic-cloth-folding/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 16:00:00 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://www.cds.caltech.edu/~andrea/blog/?p=196</guid>
		<description><![CDATA[Watch this video from Pieter Abbeel&#8217;s group in Berkeley. Given Abbeel&#8217;s research curriculum, I jumped to reading the preprint to see if there was some learning involved. Unfortunately, it seems that the techniques used are fairly standard (precise state estimation + giant state graph + motion planning). Still, it is a very impressive application. The [...]]]></description>
			<content:encoded><![CDATA[<p>Watch <a href='http://www.youtube.com/watch?v=gy5g33S0Gzo'>this video</a> from <a href='http://www.eecs.berkeley.edu/~pabbeel/'>Pieter Abbeel</a>&#8217;s group in Berkeley.</p>
<p><object height='240' width='320'><param name='movie' value='http://www.youtube.com/v/gy5g33S0Gzo&#038;hl=en_US&#038;fs=1&#038;rel=0'/><param name='allowFullScreen' value='true'/><param name='allowscriptaccess' value='always'/><embed src='http://www.youtube.com/v/gy5g33S0Gzo&#038;hl=en_US&#038;fs=1&#038;rel=0' allowfullscreen='true' type='application/x-shockwave-flash' allowscriptaccess='always' height='240' width='320'/></object></p>
<p>Given Abbeel&#8217;s research curriculum, I jumped to reading the <a href='http://www.cs.berkeley.edu/~pabbeel/papers/Maitin-ShepardCusumano-TownerLeiAbbeel_ICRA2010.pdf'>preprint</a> to see if there was some <em>learning</em> involved. Unfortunately, it seems that the techniques used are <br/>fairly standard (precise state estimation + giant state graph + motion planning). Still, it is a very impressive application.</p>
<p>The contribution highlighted by the paper is the detection of appropriate folding points. While the robot is holding and slowly rotating the cloth, several cameras observe the scene and can reconstruct a 3D model. The analysis of the 3D model allows to detect the towel&#8217;s borders, which are the appropriate folding points.</p>
<p>The paper certainly shows that <a href='http://www.willowgarage.com/'>Willow Garage</a>&#8217;s robots, and accompanying software, are a robust platform for developing complex applications. For example, this application involves interplay between robot locomotion, stereo vision, and motion planning. The robot must move its arms to grab the towel at the desired folding point, but, at the same time, it must not impact it in other parts. This implies that the (a priori unknown) shape of the towel must be included in the motion planner&#8217;s world representation.</p>
<p>All in all, it&#8217;s one step towards the robotic maid!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cds.caltech.edu/~ender/blog/2010/04/robotic-cloth-folding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Judging at a middle school science fair</title>
		<link>http://www.cds.caltech.edu/~ender/blog/2010/03/judging-at-a-middle-school-science-fair/</link>
		<comments>http://www.cds.caltech.edu/~ender/blog/2010/03/judging-at-a-middle-school-science-fair/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 16:00:00 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[caltech]]></category>
		<category><![CDATA[life]]></category>

		<guid isPermaLink="false">http://www.cds.caltech.edu/~andrea/blog/?p=189</guid>
		<description><![CDATA[Last week I&#8217;ve been a judge for the science fair at Marhsall fundamental High School. The kids were 6-8th grade (11-14 year old). No, there were no volcanoes. There was much variety in the complexity of the projects. We went from the classics (&#8220;how does light influence plants growth&#8221;, &#8220;what is my dog&#8217;s favorite toy&#8221;, [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I&#8217;ve been a judge for the science fair at <a href='http://www.marshallfundamental.org/'>Marhsall fundamental High School</a>. The kids were 6-8th grade (11-14 year old). No, there were no volcanoes.</p>
<p><div class='flickr'>
	<a href='http://www.flickr.com/photos/censi/4461295596/' class='photo'><br />
	<img src='http://static.flickr.com/4021/4461295596_b4182ff047_m.jpg' alt='DSC07071'/><br />
	</a>
	</div>
<div class='flickr'>
	<a href='http://www.flickr.com/photos/censi/4460516861/' class='photo'><br />
	<img src='http://static.flickr.com/2680/4460516861_83fd61e768_m.jpg' alt='DSC07080'/><br />
	</a>
	</div>
</p>
<p>There was much variety in the complexity of the projects. We went from the classics (&#8220;how does light influence plants growth&#8221;, &#8220;what is my dog&#8217;s favorite toy&#8221;, &#8220;which kitchen paper is more absorbent&#8221;) to the more innovative (&#8220;which home surface has more bacteria&#8221;, &#8220;which bridge design bears more load&#8221;). This girl checked what was the best method to treat the discoloration of her blond air after swimming.</p>
<div class='flickr'>
	<a href='http://www.flickr.com/photos/censi/4461296394/' class='photo'><br />
	<img src='http://static.flickr.com/4013/4461296394_677eb83209_m.jpg' alt='DSC07083'/><br />
	</a>
	</div>
<p>The most courageous effort was by a group that found a way to justify six hours of video-game playing as a science project. I tried to insist to give them a special mention, but the teacher didn&#8217;t want to. Probably she didn&#8217;t want to encourage insubordinate behavior.</p>
<p><div class='flickr'>
	<a href='http://www.flickr.com/photos/censi/4460516579/' class='photo'><br />
	<img src='http://static.flickr.com/4046/4460516579_e805862c11_m.jpg' alt='DSC07075'/><br />
	</a>
	</div>
<div class='flickr'>
	<a href='http://www.flickr.com/photos/censi/4460516715/' class='photo'><br />
	<img src='http://static.flickr.com/4018/4460516715_192ce4bf44_m.jpg' alt='DSC07078'/><br />
	</a>
	</div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cds.caltech.edu/~ender/blog/2010/03/judging-at-a-middle-school-science-fair/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Censi&#8217;s Census</title>
		<link>http://www.cds.caltech.edu/~ender/blog/2010/03/censis-census/</link>
		<comments>http://www.cds.caltech.edu/~ender/blog/2010/03/censis-census/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 16:00:00 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[caltech]]></category>

		<guid isPermaLink="false">http://www.cds.caltech.edu/~andrea/blog/2010/03/censis-census/</guid>
		<description><![CDATA[I felt this was the only correct answer.]]></description>
			<content:encoded><![CDATA[<p>I felt this was the only correct answer.</p>
<div class='flickr'>
	<a href='http://www.flickr.com/photos/censi/4446516885/' class='photo'><br />
	<img src='http://static.flickr.com/4009/4446516885_6f39cd90d3_m.jpg' alt='Census 2010'/><br />
	</a>
	</div>
]]></content:encoded>
			<wfw:commentRss>http://www.cds.caltech.edu/~ender/blog/2010/03/censis-census/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

