<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Emil Sit: Thoughts on Systems</title>
	
	<link>http://www.emilsit.net/blog</link>
	<description />
	<lastBuildDate>Sat, 04 Sep 2010 04:50:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/EmilSitMainBlog" /><feedburner:info uri="emilsitmainblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>How to install ThinkUp on NearlyFreeSpeech</title>
		<link>http://feedproxy.google.com/~r/EmilSitMainBlog/~3/P3w1RQQg4FU/</link>
		<comments>http://www.emilsit.net/blog/archives/how-to-install-thinkup-on-nearlyfreespeech/#comments</comments>
		<pubDate>Sat, 04 Sep 2010 04:50:21 +0000</pubDate>
		<dc:creator>Emil Sit</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[gina trapani]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[thinkup]]></category>

		<guid isPermaLink="false">http://www.emilsit.net/blog/?p=343</guid>
		<description><![CDATA[Gina Trapani and ExpertLabs have put ThinkUp, a cool tool for tracking replies to your posts on Twitter.  As of September 2010, ThinkUp has a nifty drop-in web-based installer, much like WordPress.  Simply grab ThinkUp 0.007 or later, unzip it somewhere that your PHP/MySQL-enabled web server can get at and it&#8217;ll prompt you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://smarterware.org">Gina Trapani</a> and ExpertLabs have put <a href="http://expertlabs.org/thinkup.html">ThinkUp</a>, a cool tool for tracking replies to your posts on Twitter.  As of September 2010, ThinkUp has a nifty drop-in web-based installer, much like WordPress.  Simply <a href="http://github.com/ginatrapani/ThinkUp/downloads">grab ThinkUp 0.007 or later</a>, unzip it somewhere that your PHP/MySQL-enabled web server can get at and it&#8217;ll prompt you through the installation.</p>

<p>In response to Gina&#8217;s post <a href="http://smarterware.org/6638/long-weekend-hacking-how-to-help-out-with-thinkup">asking for help testing/hacking this long-weekend</a>, I ran through this in about 10 minutes on <a href="http://www.nearlyfreespeech.net/">NearlyFreeSpeech</a>.  Here are some quick tips where NFSN&#8217;s set-up is a bit different than what is expected by the default installer:</p>

<ul>
<li>After you unzip the ThinkUp dist, run <code>chgrp -R web _lib/view/compiled_view</code> and <code>chmod -R g+w _lib/view/compiled_view</code> so that the templating engine can cache its views.</li>
<li>Make sure you have a MySQL process enabled in your NearlyFreeSpeech control panel.  A basic <a href="https://www.nearlyfreespeech.net/services/mysql">MySQL process costs $0.02/day</a> but you can share the process with your WordPress database.  Spin up phpMyAdmin in the right-hand sidebar and create a user called <code>thinkup</code> and make sure to check off the option to create a database with the same name and grant all rights to that user.  Generate a random password, and copy that password.</li>
<li>In the ThinkUp database configuration section, enter <code>thinkup</code> as the user name and database name and paste your generated password.  Open the advanced section and change the database host from <code>localhost</code> to your database host name.  It&#8217;ll be something like <em>username</em>.db; mine, for example, is <code>sit.db</code>.</li>
<li>ThinkUp will fail to write the configuration file due to perms but helpfully offers the ability to copy and paste a file.  Select the text in the config text box and go back to the terminal where you unzipped the dist.  In the <code>thinkup</code> directory, <code>cat &gt; config.inc.php</code>, paste and then Ctrl-D to save the file.</li>
</ul>

<p>Check your e-mail for the activation link and configure your account.  You&#8217;ll need to register your installation as a Twitter application and paste in the consumer key and consumer secret.  The config page will send you to the Twitter registration page and tell you the callback URL to provide.  Leave ThinkUp as a read-only application and leave the &#8216;Use Twitter for login&#8217; unchecked.</p>

<p>That should do it!</p>

<p>For more details, check out the <a href="http://wiki.github.com/ginatrapani/ThinkUp/">ThinkUp wiki</a> for more up-to-date instructions.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=P3w1RQQg4FU:7i5X70VJ1xQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=P3w1RQQg4FU:7i5X70VJ1xQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?i=P3w1RQQg4FU:7i5X70VJ1xQ:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EmilSitMainBlog/~4/P3w1RQQg4FU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.emilsit.net/blog/archives/how-to-install-thinkup-on-nearlyfreespeech/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.emilsit.net/blog/archives/how-to-install-thinkup-on-nearlyfreespeech/</feedburner:origLink></item>
		<item>
		<title>Understanding SpringSource and the Spring Framework</title>
		<link>http://feedproxy.google.com/~r/EmilSitMainBlog/~3/IbegRpLJBMs/</link>
		<comments>http://www.emilsit.net/blog/archives/understanding-springsource-and-the-spring-framework/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 03:35:44 +0000</pubDate>
		<dc:creator>Emil Sit</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[dependency-injection]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jee]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[spring-framework]]></category>
		<category><![CDATA[springsource]]></category>

		<guid isPermaLink="false">http://www.emilsit.net/blog/?p=318</guid>
		<description><![CDATA[In light of recent announcements like vmForce or the SpringSource/Google App Engine integration, you may be wondering, what the Spring Framework is, precisely.  What does the SpringSource company provide?

According to their homepage, SpringSource is in the business of &#8220;eliminating enterprise Java complexity&#8221; and is a leader in Java application infrastructure and management.  That&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>In light of recent announcements like <a href="http://www.vmforce.com">vmForce</a> or the <a href="http://blog.springsource.com/2010/05/19/spring-google-appengine/">SpringSource/Google App Engine integration</a>, you may be wondering, what the <a href="http://www.springsource.com/products/enterprise">Spring Framework</a> is, precisely.  What does the SpringSource company provide?</p>

<p>According to their <a href="http://www.springsource.com/">homepage</a>, SpringSource is in the business of &#8220;eliminating enterprise Java complexity&#8221; and is a leader in Java application infrastructure and management.  That&#8217;s not very concrete, and so I don&#8217;t feel it is particularly helpful, particularly if you are not an J2EE/JEE (Java Enterprise Edition) developer. In this post, I&#8217;ll talk about SpringSource in general and focus on the Spring Framework.  Note that while I work for VMware (which owns SpringSource) and use the Spring Framework (commonly referred to as Spring) at work, I am not part of our SpringSource division nor do I have any particularly special access to the innards of SpringSource.  I did get to take the <a href="http://mylearn.vmware.com/mgrReg/courses.cfm?ui=S2&amp;a=one&amp;id_subject=17750">Core Spring training</a> for free, but it is only after 5 months of programming with Spring that I&#8217;ve started to understand the SpringSource philosophy.</p>

<p>SpringSource products <em>let you write code that is as focused as possible on the needs of your application</em>, and as little as possible on the boilerplate or hassle of dealing with different underlying environments (e.g., dev, test, production may have different database backends) or infrastructures (e.g., GAE, vCloud).  This is the core value that underlies SpringSource, but it is only explored indirectly via its various instantiations in the SpringSource literature and product line.</p>

<p>The <a href="http://www.springsource.com/products/enterprise">Spring Framework (aka Spring)</a> provides glue.  Spring <em>provides glue in a relatively uniform manner</em>, so that once you understand the basic approach(es), you can apply it to interfacing with different components.  From the documentation, Spring seems to do everything, but at the same time, when you try to use it, you may feel that it seems to do almost nothing.  It may be useful to compare the Spring Framework to the <a href="http://www.debian.org">Debian Linux distribution</a>: Debian provides a nice out-of-the-box experience with a <a href="http://en.wikipedia.org/wiki/Dpkg">uniform mechanism for managing software</a>, and in particular, <a href="http://www.debian-administration.org/articles/91">alternative software packages</a> that can provide a common service. But to get at the power of the underlying packages, you must learn how to configure and use them.  Likewise, Spring does not actually provide many services on its own.  It does not free you from having to learn how to write a unit test, access a database, manage a messaging system, or implement security.  Instead, it makes it possible for you to write code to do these things in a somewhat generic manner, so that your code can be as generic as possible.</p>

<p>Understanding these two key points will help you make sense of the variety of things written about Spring.</p>

<p>The core glue provided by Spring is its <a href="http://martinfowler.com/articles/injection.html">dependency injection</a> support, also known as the &#8220;inversion of control&#8221; or <a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html">IoC container</a>.  This means that, instead of class Foo explicitly instantiating an object implementing interface Bar, Foo will have a constructor argument or setter that accepts a Bar.  The inversion of control container lets you specify the right kind of Bar for Foo in a given environment and handles constructing that Bar, and injecting it by calling the setter.  This makes code less fragile because it no longer needs special-casing for testing (e.g., a stub Bar) or anything else.  The mapping of a particular Bar to Foo becomes part of a configuration file that also captures all of Foo&#8217;s other dependencies.</p>

<p>Spring also provides more special-purpose glue; the Spring Framework page writes:</p>

<blockquote>
  <p>Spring provides the ultimate programming model for modern enterprise Java applications by <strong>insulating business objects from the complexities of platform services</strong> for application component management, Web services, transactions, security, remoting, messaging, data access, aspect-oriented programming and more.</p>
</blockquote>

<p>For example, your application can use the Spring Framework with straight JDBC, or with generic <a href="http://en.wikipedia.org/wiki/Object-relational_mapping">object-relational mappers (ORMs)</a> like JPA through to highly specific ones like iBatis or Hibernate.  You can configure your application to then talk to a variety of database back-ends, with minimal changes in the actual configuration files, and write minimal code related to setting up database connections and processing error cases.  Spring provides wrappers and translators to help unify service-specific method names, such as the one that causes an ORM system to generate database tables, and exceptions into more generic expressions of those concepts.  This means you might be able to switch between JPA providers, for example, without changing too much configuration.  However, you still have to configure your JPA provider correctly.</p>

<p>In line with allowing you flexibility from the infrastructure, Spring also provides flexibility of mechanism, so that the code and configuration that you write to integrate with Spring&#8217;s services are at a level that you are comfortable with.   You can <a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html#beans-factory-metadata">configure the IoC</a> with XML or with Java; you can use annotations or you can use explicit configuration.  To specify which of your business methods should <a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/transaction.html">be in a database transaction</a>, you can annotate with <code>@Transactional</code> in your source code, or you can use an aspect-oriented programming filter to tag the relevant methods in an external configuration file.</p>

<p>All of this glue and the flexibility of mechanism contribute to making Spring hard to understand; however, their presence emphasizes the idea that Spring wants to get out of your way so that you can focus on application development.  Other SpringSource tools such as <a href="http://www.springsource.org/roo">Roo</a> and <a href="http://static.springsource.com/projects/tc-server/6.0/devedition/">Insight</a> work similarly: they simplify development and debugging (respectively) without requiring that you make extensive changes to your source, and respecting current best-practices.</p>

<p>I&#8217;ve left out various components of Spring to focus on the core philosophy of SpringSource, but this background should help you make sense of resources like the <a href="http://en.wikipedia.org/wiki/Spring_Framework">Wikipedia article on Spring</a>, the <a href="http://www.springsource.org/documentation">Spring Framework documentation</a>, and books like <a href="http://www.manning.com/walls2/">Spring in Action</a>.  If you&#8217;re running into problems, however, the best place to get concrete questions about Spring answered is <a href="http://stackoverflow.com/questions/tagged/spring">Stack Overflow</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=IbegRpLJBMs:_0fg9OfnPDI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=IbegRpLJBMs:_0fg9OfnPDI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?i=IbegRpLJBMs:_0fg9OfnPDI:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EmilSitMainBlog/~4/IbegRpLJBMs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.emilsit.net/blog/archives/understanding-springsource-and-the-spring-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.emilsit.net/blog/archives/understanding-springsource-and-the-spring-framework/</feedburner:origLink></item>
		<item>
		<title>Examining your personal programming style</title>
		<link>http://feedproxy.google.com/~r/EmilSitMainBlog/~3/5TmX-Zy6Luo/</link>
		<comments>http://www.emilsit.net/blog/archives/examining-your-personal-programming-style/#comments</comments>
		<pubDate>Mon, 03 May 2010 04:23:29 +0000</pubDate>
		<dc:creator>Emil Sit</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[creativity]]></category>
		<category><![CDATA[go]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[style]]></category>

		<guid isPermaLink="false">http://www.emilsit.net/blog/?p=295</guid>
		<description><![CDATA[When I was growing up, we would listen to classical music stations in the car and try to figure out the composer and sometimes even the performer.  Both musicians and composers often have their own distinctive style: you can hear the mathematical precision of Gould, or the clarity of Horowitz, whether they are interpreting [...]]]></description>
			<content:encoded><![CDATA[<p>When I was growing up, we would listen to classical music stations in the car and try to figure out the composer and sometimes even the performer.  Both musicians and composers often have their own distinctive <em>style</em>: you can hear the mathematical precision of Gould, or the clarity of Horowitz, whether they are interpreting Bach or Mozart.  My last post started me thinking about a musician or composer&#8217;s style and drawing a parallel in the context of computer programming.</p>

<p>When thinking about music, one&#8217;s style is a matter of personal expression, but if you say &#8220;coding style&#8221; to a programmer (or really, to <a href="http://www.google.com/search?q=coding+style">Google</a>), you&#8217;ll find rules about whitespace, variable naming, plus some proverbs about how to write maintainable code (e.g., &#8220;avoid global variables&#8221;).  Overall, I don&#8217;t think these are particularly relevant to the <em>art</em> of programming.</p>

<p>For example, formatting and naming conventions are important in a codebase only that a properly followed convention becomes invisible&#8212;just like your nose becomes acclimated to a smell, your brain quickly learns to recognize a formatting convention and ignore it.  Having a convention (any convention!) allows you to focus on what the source code is really doing.  Following a convention is good for everyone reading your code, even you.  <a href="http://www.gnu.org/software/indent/">Automate your coding conventions</a> and forget about it.  (In the extreme, check out what the <a href="http://research.swtch.com/2009/12/gofmt.html">Go Language formatter</a> can do.)</p>

<p>Similarly, coding style proverbs, like &#8220;write tests before code&#8221; or &#8220;keep code in a function at one level of abstraction&#8221;, are like any other proverb: these statements capture an element of experience from programmers past, but are often blindly followed by people new to the practice.  It takes significant time before a programmer can truly internalize the reasons for and nuance behind any proverb.  (Incidentally, if you are interested in studying proverbs, I highly recommend you examine the <a href="http://senseis.xmp.net/?GoProverbs">game of Go</a>.)</p>

<p>What I am interested in exploring is personal expression and style in programming, outside of language/library/tools, proverbs or code formatting. Having a personal style is not a concept that we as computer programmers are generally exposed to.  School focuses almost exclusively on the technical, ignoring both the practice (i.e., the stuff of proverbs) and the art (the subject of this post).  Indeed, I am only beginning to be able to express what my personal style might be.</p>

<p>So, how do you express yourself in code?  To begin exploring our artistic programming style, let&#8217;s continue to draw an analogy from the arts&#8212;instead of music, let&#8217;s look at the process of <a href="http://www.luminous-landscape.com/columns/aesthetics9.shtml">establishing a personal photographic style</a>.  The author talks about the importance of the choices&#8212;the choice of equipment (camera), subject matter, the approach to <em>making</em> a picture.  You come upon a way of doing things that you believe is right, that supports your personal values.  When looking at myself:</p>

<ul>
<li>Equipment: Linux/Vim/Mutt/Xmonad/Git.</li>
<li>Subject matter: I care strongly about the process with which you build programs, and so I wind up working a lot on tools and scripting, but I&#8217;m also interested in distributed systems problems.</li>
<li>Approach: I like (re)using what is present; I strive for consistency, simplicity, elegance. I am somewhat inclined towards using functional constructs in imperative languages (though I never did like OCaml&#8217;s syntax). I always look at a diff of my code to ensure it is minimal before committing it, and I like to write verbose log messages.</li>
<li>Examples: Some things I&#8217;ve worked on that you can look at include of course <a href="http://hg.pdos.csail.mit.edu/hg/">Chord</a>, and some contributions to Gina Trapani&#8217;s <a href="http://github.com/ginatrapani/todo.txt-cli">todo.txt</a> tool.</li>
</ul>

<p>I&#8217;m not entirely happy with this &#8220;approach&#8221; because it feels like mostly a list of platitudes.  But some of my difficulty, I think is in not having thought about this specifically as I look at other people&#8217;s code, not even having the words that I can use to compare and contrast my approach with that of others.  So, I&#8217;d like this post be a start for each of us to explore our own style.</p>

<p>Spend a few minutes thinking about what you value in your own code, and how you define yourself as an artistic programmer and write about it in a comment, perhaps using the template I&#8217;ve set for myself above.  I hope we&#8217;ll each learn something!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=5TmX-Zy6Luo:qExHqzYcMnY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=5TmX-Zy6Luo:qExHqzYcMnY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?i=5TmX-Zy6Luo:qExHqzYcMnY:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EmilSitMainBlog/~4/5TmX-Zy6Luo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.emilsit.net/blog/archives/examining-your-personal-programming-style/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.emilsit.net/blog/archives/examining-your-personal-programming-style/</feedburner:origLink></item>
		<item>
		<title>Music education versus computer science education</title>
		<link>http://feedproxy.google.com/~r/EmilSitMainBlog/~3/w6j4FzXtFMc/</link>
		<comments>http://www.emilsit.net/blog/archives/music-education-versus-computer-science-education/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 04:41:58 +0000</pubDate>
		<dc:creator>Emil Sit</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[education]]></category>

		<guid isPermaLink="false">http://www.emilsit.net/blog/?p=287</guid>
		<description><![CDATA[My mother recently forwarded me this interview of the pianist Glenn Gould:


I encourage you to watch this (and all 6 parts), even if you know nothing about classical music.

What stood out to me in viewing this series of videos was the fluidity with which Gould is able to discuss a piece of music, in its [...]]]></description>
			<content:encoded><![CDATA[<p>My mother recently forwarded me this interview of the pianist <a href="http://en.wikipedia.org/wiki/Glenn_Gould">Glenn Gould</a>:
<object width="425" height="324"><param name="movie" value="http://www.youtube.com/v/thPd18JGvbE&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/thPd18JGvbE&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>

<p>I encourage you to watch this (and all 6 parts), even if you know nothing about classical music.</p>

<p>What stood out to me in viewing this series of videos was the fluidity with which Gould is able to discuss a piece of music, in its historical context, and to simply jump in to play a phrase from a different piece to call out a point for discussion.  This demonstrates an incredible mastery of the subject matter, unifying history and context, theory, and practical implementation.  </p>

<p>From <a href="http://www.msmnyc.edu/precollege/curriculum/">my experience at the Manhattan School of Music</a>, musical training seeks precisely to bring this unification into its students. As you study, you learn to play a variety of pieces or styles, from different time period.  You are taught some history, to be able to understand the evolution of styles; you are taught the underlying theory, to be able to discuss this evolution using precise terms; and then you practice the mechanics needed to actually play the pieces.</p>

<p>How does this compare to computer programming? Computer &#8220;science&#8221;, as you may know, has a fair amount of artistry to it.</p>

<p>We are simply not trained to have these kinds of discussions. How many people do you know who, during a code or design discussion, might say, &#8220;Oh, this is very similar to System X, in contrast to how System Y did things,&#8221; and then pull up the source code (or architecture diagram) for System X and Y and compare them with the relevant pieces under discussion?</p>

<p>At MIT, the classes are (were?) organized around ideas and then around technical implementation (leading, hopefully, to understanding).  Little emphasis is placed on <em>how</em> to be a programmer, such as prototyping, testing, revision control, or code-review; that is, these things rarely factor significantly into your grade.  Even less emphasis is given to the ability to discuss ideas in context, even at the graduate level.  Undergraduate classes at most schools seem to focus on learning best practices for a particular programming language.  As graduate students, only the extremely motivated would explore beyond the papers presented in the course syllabus, or the immediate related work for a given project; tracking down the source code of other systems is almost never done (perhaps simply because it is not often available).</p>

<p>In the professional world, no one teaches you how to do code or design reviews at this level either.  Just like in school, professional programmers are constantly subject to deadlines which override just about any extra-curricular work.  Reviews are often focused on mechanics or on vague, unsubstantiated worries.  Again, extreme personal motivation is required to move beyond this.</p>

<p>How can we improve this situation?  Is there room at the undergraduate level for <a href="http://ucosp.wordpress.com/">more capstone projects</a> that unify the theory, the history, and the mechanics with the craft of programming? What about at the graduate level?  How about in a professional environment? What has been your experience?</p>

<p>I&#8217;d like to find programmers that work this way, that are excited and passionate about the craft of programming. Are you one? Get in touch.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=w6j4FzXtFMc:63ne34_5PJU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=w6j4FzXtFMc:63ne34_5PJU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?i=w6j4FzXtFMc:63ne34_5PJU:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EmilSitMainBlog/~4/w6j4FzXtFMc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.emilsit.net/blog/archives/music-education-versus-computer-science-education/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://www.emilsit.net/blog/archives/music-education-versus-computer-science-education/</feedburner:origLink></item>
		<item>
		<title>Repeated and Reproducible Systems Research</title>
		<link>http://feedproxy.google.com/~r/EmilSitMainBlog/~3/iO3ca4t-Y2w/</link>
		<comments>http://www.emilsit.net/blog/archives/repeated-and-reproducible-systems-research/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 19:52:36 +0000</pubDate>
		<dc:creator>Emil Sit</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[reproducibility]]></category>
		<category><![CDATA[science]]></category>

		<guid isPermaLink="false">http://www.emilsit.net/blog/?p=281</guid>
		<description><![CDATA[Daniel Lemire (@lemire) recently posted on the Mythical Reproducibility of Science, noting that sharing code also makes it easier to spread your ideas:


  The reproducibility that matters is getting people to use your ideas. Merely proving you are honest falls short of your potential!


He&#8217;s also written on this in the past with statistics on [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.daniel-lemire.com/">Daniel Lemire</a> (<a href="http://twitter.com/lemire">@lemire</a>) recently posted on the <a href="http://www.daniel-lemire.com/blog/archives/2010/04/20/the-mythical-reproducibility-of-science/">Mythical Reproducibility of Science</a>, noting that sharing code also makes it easier to spread your ideas:</p>

<blockquote>
  <p>The reproducibility that matters is getting people to use your ideas. Merely proving you are honest falls short of your potential!</p>
</blockquote>

<p>He&#8217;s also written on this in the past with <a href="http://www.daniel-lemire.com/blog/archives/2010/02/10/open-sourcing-your-software-hurts-your-competitiveness-as-a-researcher/">statistics on downloads</a> of his software.</p>

<p>Here are some more writings on reproducibility:</p>

<ul>
<li><a href="http://doi.acm.org/10.1145/991130.991131">The case for repeated research in operating systems</a> from ACM SIGOPS 2004.</li>
<li><a href="http://www.usenix.org/event/hotos05/final_papers/red_team.html">The Many Faces of Systems Research&#8212;And How to Evaluate Them</a> from HotOS 2005.</li>
<li><a href="http://www.emilsit.net/blog/archives/tools-for-repeatable-research/">Tools for repeatable research</a>, that I wrote four (!) years ago, has some pointers.</li>
</ul>

<p>At <a href="http://pdos.csail.mit.edu/">PDOS</a>, Frans Kaashoek and Robert Morris definitely encourage us to build real systems and make the system available.  I definitely like this approach and never found that publishing the full source to <a href="http://pdos.csail.mit.edu/chord/">Chord</a>, including our work-in-progress/submission, caused any problems.  It has also meant that a lot of people still play with Chord, even if I no longer actively maintain it.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=iO3ca4t-Y2w:JACjaAU3yhc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=iO3ca4t-Y2w:JACjaAU3yhc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?i=iO3ca4t-Y2w:JACjaAU3yhc:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EmilSitMainBlog/~4/iO3ca4t-Y2w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.emilsit.net/blog/archives/repeated-and-reproducible-systems-research/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.emilsit.net/blog/archives/repeated-and-reproducible-systems-research/</feedburner:origLink></item>
		<item>
		<title>Interview non-questions</title>
		<link>http://feedproxy.google.com/~r/EmilSitMainBlog/~3/jYEHo54RH2A/</link>
		<comments>http://www.emilsit.net/blog/archives/interview-non-questions/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 04:42:24 +0000</pubDate>
		<dc:creator>Emil Sit</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[question]]></category>
		<category><![CDATA[techniques]]></category>

		<guid isPermaLink="false">http://www.emilsit.net/blog/?p=277</guid>
		<description><![CDATA[Once you get a job at a company, you move from one side of the interview table to the other.  My ideal candidate for just about any engineering position:


has the ability to present technical ideas on the fly;
has practical Unix knowledge;
can write clearly and concisely in English and in code;
has a strong technical background.


Knowledge [...]]]></description>
			<content:encoded><![CDATA[<p>Once you get a job at a company, you move from one side of the interview table to the other.  My ideal candidate for just about any engineering position:</p>

<ul>
<li>has the ability to present technical ideas on the fly;</li>
<li>has practical Unix knowledge;</li>
<li>can write clearly and concisely in English and in code;</li>
<li>has a strong technical background.</li>
</ul>

<p>Knowledge of particular technologies or programming languages is generally not interesting.  Rather, the candidate should be smart and passionate.</p>

<p>One way I&#8217;ve started looking for passion is to see if the candidate has been involved in any volunteer work or open source projects.  But it can be hard to assess the other qualities, even in an hour long interview.  Typically, an interview assesses your ability to solve a particular problem, possibly in code, but not much about how it would be actually work with you.</p>

<p>As we hire some more people for MVP, I&#8217;m considering changing up our standard &#8220;bring in candidate for a series of 45m one on ones&#8221; to include some ways to probe for my desired qualities before the interview.  I&#8217;d like to have  candidates perhaps:</p>

<ul>
<li>Send in a dot-file of some sort (e.g., .bashrc, .vimrc, .emacs, httpd.conf, etc.)  That is: does the candidate use Unix and customize it?  Does the candidate comment dot-files?</li>
<li>Prepare and deliver for the interview panel, a 5m presentation on some (any!) technical topic.  Ensures the ability to communicate ideas clearly and answer questions.</li>
<li>Provide some samples of bug reports the candidate has filed or technical discussions that the candidate has had on a mailing list.  (Say, 3 from the past 3 years, ideally from an open source project.) Alternately, provide a pointer to the candidate&#8217;s blog.  That is, can this person write cogently?  &#8220;Excellent communication skills&#8221; anyone?  </li>
<li>Provide a code sample, something the candidate has had primary responsibility for developing, on the order of 100&#8211;500 lines of code.  Two interviewers will review the code with the candidate.  </li>
<li>Provide a commit, i.e., a diff to existing code (perhaps the code sample provided) and a commit message.  This would demonstrate the ability to provide a clean functional change and document it for the team.</li>
</ul>

<p>Most companies I interviewed with (at the PhD level) required a presentation, but only one asked for code samples.  I&#8217;ve not seen any requests personally for anything else.  Have you?</p>

<p>Incidentally, the Mobile Virtualization Platform team at VMware is hiring (mostly for our Cambridge office).  Get in touch if you&#8217;re interested.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=jYEHo54RH2A:ambkKgWzlFo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=jYEHo54RH2A:ambkKgWzlFo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?i=jYEHo54RH2A:ambkKgWzlFo:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EmilSitMainBlog/~4/jYEHo54RH2A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.emilsit.net/blog/archives/interview-non-questions/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.emilsit.net/blog/archives/interview-non-questions/</feedburner:origLink></item>
		<item>
		<title>Getting started with Git</title>
		<link>http://feedproxy.google.com/~r/EmilSitMainBlog/~3/NmfwIezrsgI/</link>
		<comments>http://www.emilsit.net/blog/archives/getting-started-with-git/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 16:12:11 +0000</pubDate>
		<dc:creator>Emil Sit</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.emilsit.net/blog/?p=259</guid>
		<description><![CDATA[Because of our work with the Linux kernel and with Android, we have started using Git more extensively at work, and my colleagues often have questions about how to get things done with Git.  While the every-day command lists are helpful, most of the time, people would benefit more from getting a fundamental understanding [...]]]></description>
			<content:encoded><![CDATA[<p>Because of our work with the Linux kernel and with Android, we have started using <a href="http://git-scm.com/">Git</a> more extensively at work, and my colleagues often have questions about how to get things done with Git.  While the <a href="http://www.kernel.org/pub/software/scm/git-core/docs/everyday.html">every-day command lists</a> are helpful, most of the time, people would benefit more from <a href="http://blog.nelhage.com/2010/01/on-git-and-usability/">getting a fundamental understanding of how git works</a>.
Here is a brief list of useful resources to help achieve that:</p>

<ul>
<li><a href="http://whygitisbetterthanx.com">Why Git is Better than X</a>, where X is one of hg, bzr, svn, perforce.  Also, why git can be more confusing.</li>
<li>Git&#8217;s <a href="http://eagain.net/articles/git-for-computer-scientists/">data model in a nutshell</a>.</li>
<li>Scott Chacon&#8217;s <a href="http://progit.org/book/">ProGit book</a> is a good tutorial and reference.</li>
<li>Scott Chacon&#8217;s <a href="http://gitcasts.com/">Git screencasts</a>, if you&#8217;re a visual learner.</li>
<li>Like presentations? Slides from an MIT SIPB <a href="http://web.mit.edu/cluedumps/slides/understanding-git-2008.pdf">Understanding Git</a> class [PDF, 1MB], if you&#8217;re in a hurry, or <a href="http://www.slideshare.net/chacon/getting-git">Getting Git</a> from Scott Chacon if you&#8217;re not.</li>
<li>Use Mark Lodato&#8217;s <a href="http://marklodato.github.com/visual-git-guide/">Visual Git Reference</a> to help you understand how commands interact with history, the staging area and your working directory.</li>
</ul>

<p>For me, the core difficulty is that people have to explicitly think about the history of their code and how they would like to share it with others.  Git gives you many options whereas tools like Subversion and Perforce don&#8217;t; this plethora of options can make things confusing.  In fact, it can lead to very philosophically different approaches for all aspects of your development process, ranging from <a href="http://whygitisbetterthanx.com/#any-workflow">shared-repository vs integrator</a> to whether or not to merge frequently (<a href="http://robey.lag.net/2009/11/29/more-git.html">yes?</a> or <a href="http://gitster.livejournal.com/42247.html">no!</a>).  Here are a few useful readings on how people actually can <em>use</em> git:</p>

<ul>
<li>Oliver Steele&#8217;s <a href="http://osteele.com/archives/2008/05/my-git-workflow">Git Workflow</a> and <a href="http://osteele.com/archives/2008/05/commit-policies">commit policies</a>. Helpful for understanding how people use the index and remotes.</li>
<li>Ryan Tomako has another <a href="http://tomayko.com/writings/the-thing-about-git">way to use the index</a> to help you split logically separate work into separate commits.  Though some people <a href="http://fourkitchens.com/blog/2009/02/03/importance-atomicity-or-why-git-staging-area-bad">don&#8217;t like the index</a>.</li>
</ul>

<p>Once you&#8217;re ready for more &#8220;tips&#8221;, be sure to follow:</p>

<ul>
<li><a href="http://gitster.livejournal.com">Junio Hamano&#8217;s blog</a>.  Junio is the maintainer of git and writes deep and useful technical posts.</li>
<li><a href="http://progit.org/">Scott Chacon&#8217;s ProGit blog</a>.  Scott has done more for advocacy of Git than anyone else.</li>
<li><a href="http://gitready.com">Git Ready</a>; an inactive but very useful set of tips from Nick Quaranto.</li>
</ul>

<p>For more regularly updated and possibly esoteric resources, check out my <a href="http://delicious.com/sit/git">git bookmarks on delicious</a>.  Do you have some useful resources for getting people started with Git? Leave them in the comments.</p>

<p><em>Update:</em> Added a link to the Visual Git Reference.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=NmfwIezrsgI:HdmGp3PawFE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=NmfwIezrsgI:HdmGp3PawFE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?i=NmfwIezrsgI:HdmGp3PawFE:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EmilSitMainBlog/~4/NmfwIezrsgI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.emilsit.net/blog/archives/getting-started-with-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.emilsit.net/blog/archives/getting-started-with-git/</feedburner:origLink></item>
		<item>
		<title>StackOverflow DevDays Boston 2009, Afternoon</title>
		<link>http://feedproxy.google.com/~r/EmilSitMainBlog/~3/m3V54piYH-8/</link>
		<comments>http://www.emilsit.net/blog/archives/stackoverflow-devdays-boston-2009-afternoon/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 12:21:55 +0000</pubDate>
		<dc:creator>Emil Sit</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[devdays]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[John Resig]]></category>
		<category><![CDATA[Miguel De Icaza]]></category>
		<category><![CDATA[mono]]></category>
		<category><![CDATA[stackoverflow]]></category>

		<guid isPermaLink="false">http://www.emilsit.net/blog/?p=245</guid>
		<description><![CDATA[The afternoon of Boston DevDays 2009 was, in my opinion, not as broadly appealing as the morning sessions (see my writeup of the morning here).  However, there was still a lot of interesting material presented.

Joel welcomed us back from lunch by plugging
StackExchange and how it&#8217;ll mean the end of &#8220;crappy
old copies of Usenet&#8221; (by [...]]]></description>
			<content:encoded><![CDATA[<p>The afternoon of <a href="http://stackoverflow.carsonified.com/events/boston">Boston DevDays</a> 2009 was, in my opinion, not as broadly appealing as the morning sessions (see my writeup of the morning <a href="http://www.emilsit.net/blog/archives/stackoverflow-devdays-boston-2009-morning/">here</a>).  However, there was still a lot of interesting material presented.</p>

<p>Joel welcomed us back from lunch by plugging
<a href="http://stackexchange.com">StackExchange</a> and how it&#8217;ll mean the end of &#8220;crappy
old copies of Usenet&#8221; (by which he meant phpBB).  He showed a pretty graph of
StackOverflow edging out ExpertsExchange in traffic. He also announced a new job search
site called <a href="http://careers.stackoverflow.com/">careers.stackoverflow.com</a> that
charges job seekers some money and asks you what your favorite editor is.
There was also a video ad for the FogCreek training videos.  This man knows how
to monetize.</p>

<h3>Patrick Hynds and Chris Bowen</h3>

<p>The first technical session of the afternoon was on <a href="http://asp.net/mvc/">ASP.NET
MVC</a>.  Patrick started the session with an expanation of ASP.NET MVC&#8217;s history relative to ASP
Classic and ASP.NET, and why one might want to use a
<a href="http://en.wikipedia.org/wiki/Model–view–controller)">model-view-controller (MVC)</a> architecture for a website: for example, much finer control over generated HTML compared to traditional ASP, test-driven development,  and better URLs for SEO.</p>

<p>The rest of the talk was a demo of creating a hello world MVC
application in Visual Studio.  The presenters walked through
updating models and view and controllers, setting up some basic
routing.  It seems that ASP.NET MVC is a fine re-implementation of
Ruby on Rails or Django for the Microsoft world.  One concrete
tip I learned was that in Visual Studio, Control-. will offer you some
completions or other shortcuts.</p>

<p>Reception to this talk was somewhat mixed, at least as far as I
can tell from the blogs and Tweets about it. The talk itself could have been
improved, of course; for example it
would have helped for Patrick to have explained what MVC
stood for (with a few architecture diagrams) before plugging its
advantages for ten minutes.  My take is that if
you knew nothing about MVC, it was a straightforward talk that
gave an introduction to the concepts and the implementation in
.NET.  If you were already familiar with MVC, I think you
would have thought it pretty content-free as there wasn&#8217;t a tremendous
amount of focus on the ASP.NET side of things. </p>

<h3>John Resig</h3>

<p><a href="http://ejohn.org/">John Resig</a>, the creator and lead developer
of <a href="http://jquery.org">jQuery</a>, a very popular JavaScript library,
next took the stage to talk about JavaScript testing.</p>

<p>&#8220;Developing for JavaScript is a lot like whack-a-mole,&#8221; John
reported.  The large space of operating systems, browsers,
browser versions, JavaScript engines, and browser plugins mean
that typically if you fix one thing you&#8217;re more than likely
to break something else.  And so, in some informal studies,
John found that people just don&#8217;t test.  This is something
John would like to change.</p>

<p>A unit test suite for JavaScript apparently isn&#8217;t that hard to
write.  John threw up a bunch of increasingly feature-rich test
harnesses&#8212;with asserts, grouping by role, and a test runner
web-page&#8212;using a few dozen lines of JavaScript.  The hardest
part of writing a test suite is likely to be adding support for
asynchronous events (e.g. XMLHttpRequests).  Fortunately, there
are several pre-built suites such as
<a href="http://docs.jquery.com/QUnit">QUnit</a>,
<a href="http://www.jsunit.net">JSUnit</a>, <a href="http://developer.yahoo.com/yui/yuitest/">YUI
Test</a>, and
<a href="http://seleniumhq.com/">Selenium</a>.  John spent a bit of time
talking about the differences between these frameworks, and
particularly plugged QUnit and YUITest.</p>

<p>Selenium is of particular interest since, unlike the others,
it is not just a unit test framework.  It also has plugins
to allow recording and scripting events to a browser, so you
can do whole site testing.  It even comes with <a href="http://selenium-grid.seleniumhq.org/">Selenium
Grid</a> which will let
you distribute and automate testing.  This seems like a big win.</p>

<p>There are JavaScript engines like
<a href="http://www.mozilla.org/rhino/">Rhino</a>.  To help test code
in a browserless environment, John wrote <a href="http://groups.google.com/group/envjs">env.js</a>, which is a
browser-like environment that runs in pure JavaScript.  He talked about how this could be used for
screen scraping.</p>

<p><div class="wp-caption alignright" style="width: 343px">
<a href="http://www.flickr.com/photos/emilsit/3999843934/"
title="John Resig at DevDays Boston by Emil Sit, on Flickr"><img src="http://farm3.static.flickr.com/2582/3999843934_61ceeb4fce_m.jpg"
width="240" height="160" alt="John Resig plugs testswarm.com for
distributed JavaScript testing." /></a>
<p class="wp-caption-text">John Resig at DevDays Boston</p></div>
Finally, John introduced <a href="http://testswarm.com/">testswarm.com</a>.
This is a SETI@Home style site where anyone can visit the
site, download some tests to run and report back the results.
This should give very broad coverage and allow developers to
get feedback from a wide range of real environments (e.g.
mobile!).</p>

<p>Overall, John&#8217;s talk was a rapid-fire overview of JavaScript
testing resources from a JavaScript ninja.  It was very practical,
easy to follow and probably great for anyone who does JavaScript
development.  However, it lacked the &#8220;Python is awesome!&#8221; feel of
Ned Batchelder&#8217;s morning talk and so for a non-Javascript
developer such as myself, it was not as appealing.</p>

<h3>Miguel De Icaza</h3>

<p><a href="http://tirania.org/blog/">Miguel De Icaza</a> closed out the day
with a talk on Mono.  Miguel explained that he wasn&#8217;t really sure
what he should talk about&#8212;Mono is a giant universe and
explaining &#8220;Mono&#8221; it is &#8220;kind of like explaining God&#8221;&#8212;and his
<a href="http://tirania.org/blog/archive/2009/Sep-30.html">informal survey</a> didn&#8217;t
really provide a mandate.  He would up giving some nice technical
demonstrations of some recent Mono developments, with a fair amount
of personal flair to keep the audience engaged.</p>

<p>The core of Mono is an implementation of the Common Language
Runtime for Linux.  One of the goals of this project was
to bring the best development tools to Linux.</p>

<p>The first demonstration Miguel gave was an impressive combination
of tools.  Using a <a href="http://www.go-mono.com/monovs/">plugin to Visual
Studio</a>, Miguel demonstrated that
you could develop a Linux port of a .NET application entirely using
Visual Studio on Windows, and seamlessly testing and packaging
on a Linux machine (or VM), by walking through a live example
of porting BlogEngine.NET.  This made use of Bonjour to
dynamically discover the Linux machines, pushing execution
to the selected machine, and viewing the debugging results 
in Visual Studio.</p>

<p>Miguel then decided that a developer might want to publish their
application as a <a href="http://nat.org/blog/2009/07/suse-studio-10/">software
appliance</a>, so he
walked through a complete demonstration of using <a href="http://susestudio.com/">SUSE
Studio</a>.  He seamlessly built an RPM on
his Linux box from Visual Studio and pushed it into &#8220;the cloud&#8221; of
SUSE Studio.  From his browser, he configured an appliance with
that RPM, baked it the way they do on cooking shows, booted the
virtual machine in the cloud, accessed it using a Flash-based console in
the web browser, and accessed the port of BlogEngine.NET that he
had just booted.</p>

<p>For his second major demonstration, Miguel moved over to
<a href="http://monotouch.net">MonoTouch</a>.  This showed using
<a href="http://monodevelop.com/">MonoDevelop</a>, an IDE for Mono
developers, running on a Mac, to work with the iPhone interface
builder application, to build a simple flashlight application
(i.e., a giant white button) for the iPhone simulator.  He
talked a little also about the technical work involved here,
which was to compile the developer&#8217;s Mono code into ARM assembly
and link it into the Mono runtime, to create an iPhone
application.  This gets around Apple&#8217;s &#8220;no interpreters&#8221; rule.</p>

<p>Miguel&#8217;s talk was easily the most entertaining one of the day.  It
was perhaps most entertaining because, in addition to his wry
humor (check out <a href="http://twitter.com/irobinson/status/4691930719">the pictures from Ian Robinson&#8217;s
Tweet</a>, for
example), as he performed his live demonstrations, things would
break, whereupon Miguel would think, realize what was wrong,
pop open a Terminal and fix it.  That&#8217;s not something you
see in the usual carefully scripted demos at most shows.
Of course, Miguel was also demonstrating some interesting
technical features and giving an advertisement for a wide-range
of Mono-related tools as well, so there was something for
everyone.</p>

<h3>Wrap-up</h3>

<p>After Miguel&#8217;s talk, Joel suggested that the audience break
up into informal groups and get dinner, loosely organized
around seven areas that he suggested.  I hadn&#8217;t planned for
that and had to get home; not sure how many people went.</p>

<p>Overall, I think DevDays was well worth attending.  On the networking side, I got
to meet a few local developers (of whom I&#8217;ve posted a few <a href="http://www.flickr.com/photos/emilsit/sets/72157622558403216/">pictures on Flickr</a>)
and catch up briefly with some acquaintances from school.  On the technical side, I got a broad overview of several popular technical areas from leading
figures in those areas. </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=m3V54piYH-8:WmfZJnkrFY4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=m3V54piYH-8:WmfZJnkrFY4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?i=m3V54piYH-8:WmfZJnkrFY4:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EmilSitMainBlog/~4/m3V54piYH-8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.emilsit.net/blog/archives/stackoverflow-devdays-boston-2009-afternoon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.emilsit.net/blog/archives/stackoverflow-devdays-boston-2009-afternoon/</feedburner:origLink></item>
		<item>
		<title>StackOverflow DevDays Boston 2009, Morning</title>
		<link>http://feedproxy.google.com/~r/EmilSitMainBlog/~3/DaIgUTmUb2M/</link>
		<comments>http://www.emilsit.net/blog/archives/stackoverflow-devdays-boston-2009-morning/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 14:47:44 +0000</pubDate>
		<dc:creator>Emil Sit</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[Dan Pilone]]></category>
		<category><![CDATA[devdays]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Joel Spolsky]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[Ned Batchelder]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[stackoverflow]]></category>

		<guid isPermaLink="false">http://www.emilsit.net/blog/?p=231</guid>
		<description><![CDATA[Boston DevDays kicked
off a month-long tour of technical talks aimed at programmers, organized
by StackOverflow and Carsonified.
I had the good fortune to attend, meet a few interesting people and see
some fun talks.  I tried to write a bit in real-time (search Twitter here)
but the WiFi was pretty over-subscribed and there was no cell coverage
to speak [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://stackoverflow.carsonified.com/events/boston">Boston DevDays</a> kicked
off a month-long tour of technical talks aimed at programmers, organized
by <a href="http://stackoverflow.com/">StackOverflow</a> and <a href="http://carsonified.com">Carsonified</a>.
I had the good fortune to attend, meet a few interesting people and see
some fun talks.  I tried to write a bit in real-time <a href="http://search.twitter.com/search?q=from:emilsit+%23devdays">(search Twitter here)</a>
but the WiFi was pretty over-subscribed and there was no cell coverage
to speak of so eventually I gave up.  Here are some more detailed notes, starting with
the morning sessions.</p>

<p>The day ran very much on schedule, and after some very loud music, DevDays opened with a funny video demonstrating the
competent technical leadership of the keynote speaker&#8230;</p>

<h3>Joel Spolsky</h3>

<p>Joel opened the day by giving a demonstration of the tyranny of computers:
you are constantly interrupted with questions asking for decisions, like &#8220;Do you want to install these
10 updates to Windows?&#8221; or &#8220;Enable caret browsing?&#8221;, that can be really hard to answer.
He argued that one of the reasons that computers ask us so many questions is that programmers want to give
users the power (and control) to do what they want.  But that&#8217;s another way of
saying that programmers don&#8217;t want to make the decisions to keep things simple.  The
rest of Joel&#8217;s somewhat meandering but always entertaining talk was a discussion
of how programmers (us!) should approach decision making, framed as a trade-off
between simplicity and power.</p>

<p>Decisions are ultimately hard to make&#8212;there have been many studies that
demonstrate that when people have too many choices, they freeze up and choose
nothing.  Thus, we&#8217;ve seen strong push towards simplicity in recent years; one
clear example of that has been the <a href="http://gettingreal.37signals.com/">Getting Real book from 37signals</a>.  Joel
(jokingly?) points out that three of the four 37signals apps are in fact just
one big textarea tag that you type into.  Other examples, given later, include
of course Apple&#8217;s products and Google.</p>

<p>But why do we wind up with programs with lots of options?  Well, if you have a
simple program, you find that most people won&#8217;t buy your product if it doesn&#8217;t
have feature X (or Y or Z or &#8230;).  So you wind up adding features over
time, as you get more customers and more experience.  Thus, removing simplicity
often happens as a side-effect of making money.</p>

<p>How to balance these?  If we don&#8217;t want to take away all decisions from the
user, we need a rule to guide us in what to remove and what to keep.  One rule
to follow is that <em>the computer does not get to set the agenda</em>.  Good decision
points are those that should help the user achieve what they want to do.  Bad
decision points are those that interrupt the user, that the user really isn&#8217;t
equipped to answer (e.g., should GMail automatically display inline images in
HTML?), that are things that the programmer cares about.</p>

<p>To decide what is good or bad, developers need a good model to understand what the user is trying
to do&#8212;Joel says every user is ultimately trying to replicate their DNA, but
you may have some more refined model.  Joel gave the example of Amazon&#8217;s
1-Click purchasing where the user should just be able to buy something with
a single click.  Apparently, early drafts of 1-Click really weren&#8217;t
one click: programmers kept wanting to put in things like confirmation pages.
Eventually, they arrived at just one click&#8212;by not immediately starting the
order processing, but holding it for a few minutes to consolidate related
1-Click orders and allow for cancellation of errors.  This was more work for
the developers, but simpler for the user.  This is what we want to see happen.</p>

<p>Overall, I think Joel&#8217;s talk set a nice tone for how we should think as developers
but didn&#8217;t offer anything particularly ground-breaking.</p>

<h3>Ned Batchelder on Python</h3>

<p><a href="http://netbatchelder.com/">Ned Batchelder</a> presented Python as a &#8220;Clean noise free environment to type your ideas.&#8221;
Or, alternatively, &#8220;Python is awesome.&#8221;  With a few bullets to lead-off (e.g.,
the REPL, duck typing, and &#8220;batteries included&#8221; nature of Python), we dove into code to
really understand what Python is capable of doing.
<a href="http://nedbatchelder.com/text/devdays.html">Ned&#8217;s slides</a> are online if you want to
take a look.  I won&#8217;t cover his talk in much detail since it was largely
explaining the Python language but will list some high points.</p>

<p>The first example was Peter Norvig&#8217;s concise <a href="http://norvig.com/spell-correct.html">spell corrector</a>.
This code makes ample use of <a href="http://docs.python.org/tutorial/datastructures.html#list-comprehensions">list comprehensions</a> and <a href="http://docs.python.org/tutorial/datastructures.html#sets">sets</a>, plus functions like <a href="http://docs.python.org/library/re.html#re.findall"><code>re.findall</code></a>,
<a href="http://docs.python.org/library/collections.html#collections.defaultdict"><code>collections.defaultdict</code></a>, and <a href="http://docs.python.org/library/functions.html#max">parameterized <code>max</code></a>, which were all new to me.</p>

<p>The second example was a custom build-up of a simple Python
templating engine, loosely based on <a href="http:/www.djangoproject.com/">Django</a>&#8217;s template styles.
This example demonstrated simple formatting with the <a href="http://docs.python.org/tutorial/inputoutput.html#fancier-output-formatting">percent operator</a>, but then quickly moved into more advanced features
like duck-typing (by implementing <a href="http://docs.python.org/reference/datamodel.html#object.__getitem__"><code>__getitem__</code></a>) and <a href="http://docs.python.org/library/functions.html#callable"><code>callable</code></a>.</p>

<p>One of the nice things about Ned&#8217;s presentation is that he demonstrated the
power of Python in two short but extremely powerful examples that left people
who didn&#8217;t know Python thinking, &#8220;Wow! That is really amazing!&#8221;</p>

<p>Ned recommended reading <a href="http://diveintopython.org">Dive into Python</a>
to learn more, and if you are in the Boston-area,  checking out the <a href="http://python.meetup.com/181/">Cambridge Python meetup</a>.</p>

<h3>Dan Pilone</h3>

<p><a href="http://twitter.com/danpilone">Dan Pilone</a>&#8217;s talk was an overview of iPhone development,
first giving a quick market overview, then giving a broad overview
of the nitty-gritty of developing in Objective C, and finally diving
into the practical economics and realities of selling iPhone apps.
The iPhone app market (as of Apple&#8217;s September numbers), consists of
something like 85,000 applications, of which 75% are pay
applications.  Some 35% of applications are games, whereas 6% fall
into more social applications.  There are 5 or 6 different
iPhone/iTouch hardware platforms, and something like 20 million
plus devices sold.  The iPhone has a great user
experience and comes with a great delivery model (the iTunes app
store).  This combined with some of the numbers make it a
good platform to develop for, with significant amounts of money
that can be earned.  (Dan emphasized that you really have to work
to develop and market the application, hence the &#8220;earned&#8221;.)</p>

<p>The iPhone development environment is very shiny.  I&#8217;m sure
<a href="http://arstechnica.com/apple/news/2008/10/iPhone-SDK.ars">Ars Technica</a>
has a much better overview but in short Dan demonstrated some
tools like XCode, CoreData (a graphical SQLite data modeler),
reference counting support (aka retain), and Instruments (a memory
profiler).  Dan suggested that this shininess is to make up
for some of the oddities of <a href="http://en.wikipedia.org/wiki/Objective-C">Objective C</a>
that you&#8217;ll have to live with.  He also demonstrated some of
the interface builder tools and how they link up.</p>

<p>Testing turns out to be quite interesting; the simulator
is okay but limited and often your app will work in the simulator
but fail on real devices.  For example, your app on a real device
might &#8220;run so slow you wish it had crashed&#8221;.  The simulator also doesn&#8217;t
enforce sandboxing as strictly as real devices, where
each app has its own uid and single directory where it
can store data.  There are also many different hardware
variants that you have to support that limit you in different ways: for example, early iPhones only give you
40MB of memory to play with whereas newer ones give you almost 120MB.  This is not reflected well in the simulator either.</p>

<p>Shipping an iPhone app on the app store requires approval,
a process that can take two weeks <em>per round-trip</em>.
There&#8217;s no way to get around it so you must budget in time
for that in development.  The approval store helps guarantee
a minimal level of quality of apps&#8212;they will verify that
your app indeed works on all different hardware, and they will
(eventually) catch any licensing violations but they&#8217;re
overall pretty reasonable.</p>

<p>Once you get approval, you show up in the recent releases section
of the app store, and there you have about 24 hours to get popular or
else you will fade into the long tail of oblivion. In fact, if you are in the top 50 apps,
you will easily get double the sales (presumably relative to the 51st app); if you
are in the top 10, you&#8217;ll be getting an order-of-magnitude more sales. So, make
sure you get your approval/release-date lined up with your marketing blitz.
The alternative is to charge a bit more than $0.99, and go for slow but steady sales.</p>

<p>As a Blackberry owner and Linux user, I found Dan&#8217;s talk to be a great introduction
to iPhone development.  Presumably his new ORA book, <a href="https://www.amazon.com/dp/0596803540?tag=indashe-20&amp;camp=0&amp;creative=0&amp;linkCode=as4&amp;creativeASIN=0596803540&amp;adid=11M4W940YFT2A0HNB3MM&amp;">Head First iPhone Development</a>, would be a good buy if you are in to that sort of thing.</p>

<h3>Joel on FogBugz</h3>

<p>Before lunch, Joel took the opportunity to give a pitch for his company&#8217;s FogBugz product,
and announce some new features.  He gave us a walk-through of its capabilities, from
organizing documentation, to project planning, to bug tracking, to user support.  New features announced
are a rich plugin architecture, plus support for Mercurial and code reviews
in a new hosted plug-in to FogBugz called <a href="http://fogcreek.com/kiln/">Kiln</a>.  He spent a fair amount of time
on that, demonstrating calling <code>hg push</code> from the command line.  He also demonstrated the <a href="http://www.joelonsoftware.com/items/2007/10/26.html">evidence-based scheduling</a> features of FogBugz.</p>

<p>Nothing too exciting for me working in a big company using Perforce, but a good marketing opportunity for FogCreek
and a nice chance to see how some other people do scheduling and bug tracking.  I was a bit disappointed that
there&#8217;s no direct way to do pre-commit (i.e. pre-push) reviews a la <a href="http://code.google.com/p/gerrit/">Gerrit</a>, but <a href="http://twitter.com/jasonrr/status/4689929004">@jasonrr</a> says you can set up a branch repo, push to that and then review there before merging to main.  I expect this means
that <a href="http://github.com">GitHub</a> will be getting code review support soon.</p>

<h3>Lunch!</h3>

<p>With that, we broke for lunch. <a href="http://twitter.com/jldio">@jldio</a> has the <a href="http://www.jimdio.net/?p=23">scoop on lunch</a>, and his own write-up of the day too.
More to come later, thanks for reading.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=DaIgUTmUb2M:-u0WVEiFXRQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=DaIgUTmUb2M:-u0WVEiFXRQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?i=DaIgUTmUb2M:-u0WVEiFXRQ:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EmilSitMainBlog/~4/DaIgUTmUb2M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.emilsit.net/blog/archives/stackoverflow-devdays-boston-2009-morning/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.emilsit.net/blog/archives/stackoverflow-devdays-boston-2009-morning/</feedburner:origLink></item>
		<item>
		<title>Systems Researchers: Mike Freedman</title>
		<link>http://feedproxy.google.com/~r/EmilSitMainBlog/~3/hKptx3wifVY/</link>
		<comments>http://www.emilsit.net/blog/archives/systems-researchers-mike-freedman/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 11:00:49 +0000</pubDate>
		<dc:creator>Emil Sit</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[academia]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[coral]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[interviews]]></category>
		<category><![CDATA[planetlab]]></category>
		<category><![CDATA[tarzan]]></category>

		<guid isPermaLink="false">http://www.emilsit.net/blog/?p=219</guid>
		<description><![CDATA[Mike Freedman and I have known each other since we were Masters students at MIT, working on things like the Tarzan anonymizing network (a parallel, pre-cursor to Tor).  He went on to build the hugely successful (&#8220;as seen on Slashdot&#8221;) Coral content distribution network, which figured largely in his dissertation.  It&#8217;s a great [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cs.princeton.edu/~mfreed/">Mike Freedman</a> and I have known each other since we were Masters students at MIT, working on things like the Tarzan anonymizing network (a parallel, pre-cursor to Tor).  He went on to build the hugely successful (&#8220;as seen on Slashdot&#8221;) Coral content distribution network, which figured largely in his dissertation.  It&#8217;s a great treat to have him talk here about how Coral was built and deployed.  Be sure also to check out his <a href="http://sns.cs.princeton.edu/blog/">research group blog</a> for more interesting thoughts from him and his students!</p>

<p><em>What did you build?</em><br />
<a href="http://www.coralcdn.org/">CoralCDN</a> is a semi-open content distribution network.  Our stated goal with <a href="http://www.coralcdn.org/">CoralCDN</a> was to
&#8220;democratize content publication&#8221;: namely, allow websites to scale by
demand, without requiring special provisioning or commercial CDNs to
provide the &#8220;heavy lifting&#8221; of serving their bits.  Publishing with
CoralCDN is as easy as slightly modifying a URL to include <code>.nyud.net</code>
in its hostname (e.g., <a href="http://www.cnn.com.nyud.net/">http://www.cnn.com.nyud.net/</a>),
and the content is subsequently requested from and served by
CoralCDN&#8217;s network of caching web proxies.</p>

<p>Our initial goal for deploying <a href="http://www.coralcdn.org/">CoralCDN</a> was a network of volunteer
sites that would cooperate to provide such &#8220;automated mirroring&#8221;
functionality, much like sites do somewhat manually with open-source
software distribution.  As we progressed, I also imagined that small
groups of users could also cooperate in a form of time-sharing for
network bandwidth: they each would provide some relatively constant
amount of upload capacity, with the goal of being able to then handle
any sudden spikes (from the Slashdot effect, for example) to any
participant.  This model fits well with how 95th-percentile billing
works for hosting and network providers, as it then becomes very
important to flatten out bandwidth spikes.  We started a deployment of
CoralCDN on <a href="http://www.planet-lab.org/">PlanetLab</a>, although it never really migrated off that
network.  (We did have several hundred users, and even some major
Internet exchange points, initially contact us to run CoralCDN nodes,
but we didn&#8217;t go down that path, both for manageability and security
reasons.)</p>

<p>CoralCDN consists of three main components, all written from scratch:
a special-purpose web proxy, nameserver, and distributed hash table
(DHT) indexing node.  CoralCDN&#8217;s proxy and nameserver are what they
sound like, although they have some differences given that they are
specially designed for our setting.  The proxy has a number of design
choices and optimizations well-suited for interacting with websites
that are on their last legs&#8212;CoralCDN is designed for dealing with
&#8220;Slashdotted&#8221; websites, after all&#8212;as well as being part of a big
cooperative caching network.  The nameserver, on the other hand, is
designed to dynamically synthesize DNS names (of the form <code>.nyud.net</code>),
provide some locality and load balancing properties when selecting
proxies (address records it returns), and ensure that the returned
proxies are actually alive (as the proxy network itself is comprised
of unreliable servers).  The indexing node forms a DHT-based
structured routing and lookup structure that exposes a put/get
interface for finding other proxies caching a particular web object.
Coral&#8217;s indexing layer differs from traditional DHTs (such as 
<a href="http://pdos.csail.mit.edu/chord/">MIT&#8217;s Chord/DHash</a>) in that it creates a hierarchy of locality-based
clusters, each which maintains a separate DHT routing structure and
put/get table, and it provides weaker consistency properties within
each DHT structure.  These latter guarantees are possibly because
Coral only needs to find <em>some</em> proxies (preferably nearby ones)
caching a particular piece of content, not <em>all</em> such proxies.</p>

<p><em>Tell us about what you built it with.</em><br />
CoralCDN is built in C++ using <a href="http://www.scs.stanford.edu/~dm/">David Mazieres</a>&#8216;
<a href="http://www.okws.org/doku.php?id=sfslite">libasync and libarpc</a>
libraries, originally built for the Self-certifying File System (SFS).
This came out of my own academic roots in MIT&#8217;s PDOS group, where SFS
was developed by David and its libraries are widely used.  (David was
my PhD advisor at NYU/Stanford, and I got my MEng degree in PDOS.)
Some of the HTTP parsing libraries used by CoralCDN&#8217;s web proxy were
from <a href="http://www.okws.org/">OKWS</a>, <a href="http://maxk.org/">Max Krohn</a>&#8217;s webserver also written using SFS libraries.
Max was research staff with David at NYU during part of the time I was
there.  It&#8217;s always great to use libraries written by people you know
and can bother when you find a bug (although for those two, that was a
rare occurrence indeed!).</p>

<p>When I started building CoralCDN in late 2002, I initially attempted
to build its hierarchical indexing layer on top of the <a href="http://pdos.csail.mit.edu/chord/">MIT Chord/DHash</a>
implementation, which also used SFS libraries.  This turned out to be
a mistake (dare I say nightmare?), as there was a layering mismatch
between the two systems: I wanted to build distinct, localized DHT
clusters in a certain way, while Chord/DHash sought to build a single,
robust, global system.  It was thus rather promiscuous in maintaining
group membership, and I was really fighting the way it was designed.
Plus, <a href="http://pdos.csail.mit.edu/chord/">MIT Chord</a> was still research-quality code at the time, so bugs
naturally existed, and it was really difficult to debug the resulting
system with large portions of complex, distributed systems code that I
hadn&#8217;t written myself.  Finally, we initially thought that the &#8220;web
proxy&#8221; part of the system would be really simple, so our original
proxy implementation was just in python.  CoralCDN&#8217;s first
implementation was scrapped after about 6 months of work, and I
restarted by writing my own DHT layer and proxy (in C++ now) from
scratch.  It turns out that the web proxy has actually become the
largest code base of the three, continually expanded during the
system&#8217;s deployment to add security, bandwidth shaping and
fair-sharing, and various other robustness mechanisms.</p>

<p>Anyway, back to development libraries. I think the SFS libraries
provide a powerful development library that makes it easy to build
flexible, robust, fast distributed services&#8230;provided that one spends
time overcoming their higher learning curve.  Once you learn them,
however, they make it really easy to program in an event-based style,
and the RPC libraries prevent many of the silly bugs normally
associated with writing your own networking protocols.  I think Max&#8217;s
<a href="http://www.okws.org/doku.php?id=sfslite:tame2">tame</a> libraries significantly improve the readability and (hopefully)
lessen the learning curve of doing such event-based programming, as
tame <a href="http://www.usenix.org/events/usenix07/tech/krohn.html">removes the &#8220;stack-ripping&#8221;</a> that one normally sees associated
with events.  Perhaps I&#8217;ll use tame in future projects, but as I&#8217;ve
already climbed the learning curve of <a href="http://www.okws.org/doku.php?id=sfslite">libasync</a> myself, I haven&#8217;t yet.</p>

<p>That said, one of my PhD students at Princeton, <a href="http://www.cs.princeton.edu/~jterrace/">Jeff Terrace</a>, is
building a high-throughput, strongly-consistent object-based
(key/value) storage system called CRAQ using tame.  He&#8217;s seemed to
really like it.</p>

<p><em>How did you test your system for correctness?</em><br />
I deploy it?  In seriousness, it&#8217;s very difficult to test web proxies,
especially ones deployed in chaotic environments and interacting with
poorly-behaving clients and servers.  </p>

<p>I did most of my testing during initial closed experiments on about
150-300 PlanetLab servers, which is a distributed testbed deployed at
a few hundred universities and other institutions that each operate
two or more servers.  Testing that the DHT &#8220;basically&#8221; worked was
relatively easy: see if you actually get() what you put().  There are
a lot of corner cases here, however, especially when one encounters
weird network conditions, some of which only became apparent after we
moved Coral from the network-friendly North American and European
nodes to those PlanetLab servers in China, India, and Australia.
Always be suspicious with systems papers that describe the authors&#8217;
&#8220;wide deployment&#8221; on &#8220;selected&#8221; (i.e., cherry-picked) U.S. PlanetLab
servers.</p>

<p>Much of the testing was just writing the appropriate level of debug
information so we could trace requests through the system.  I got
really tired of staring at routing table dumps at that time.  Last
year I worked with Rodrigo Fonseca to integrate <a href="http://x-trace.net">X-Trace</a> into CoralCDN, which would have
made it <em>significantly</em> easier to trace transactions through the DHT
and the proxy network.  I&#8217;m pretty excited about such tools for
debugging and monitoring distributed systems in a fine-grained
fashion.</p>

<p>Testing all the corner cases for the proxy turned out to be another
level of frustration.  There&#8217;s really no good way to completely debug
these systems without rolling them out into production deployments,
because there&#8217;s no good suite of possible test cases: The potential
&#8220;space&#8221; of inputs is effectively unlimited.  You constantly run into
clients and servers which completely break the HTTP spec, and you just
need to write your server to deal with these appropriately.  Writing a
proxy thus because a little bit of learning to &#8220;guess&#8221; what developers
mean.  I think this actually has become worse with time.  Your basic
browser (FireFox, IE) or standard webserver (Apache) is going to be
quite spec-compliant.  The problem is that you now have random
developers writing client software (like podcasters, RSS readers,
etc.) or generating Ajax-y XmlHttpRequest&#8217;s.  Or casual developers
dynamically generating HTTP on the server-side via some scripting
language like PHP.  Because who needs to generate vaguely
spec-compliant HTTP if you are writing both the client and server?
(Hint: there might be a middlebox on path.)  And as it continues to
become even easier to write Web services, you&#8217;ll probably continue to
see lots of messy inputs and outputs from both sides.</p>

<p>So while I originally tested CoralCDN using its own controlled
PlanetLab experiments, after the system went live, I started testing
new versions by just pushing them out to one or a few nodes in the
live deployment.  Then I just monitor these new versions carefully
and, if things seemed to work, slowly push them out across the entire
network.  Coral nodes include a shared secret in their packet headers,
which excludes random people from joining our deployment.  I also use
these shared secrets to deploy new (non-backwards-compatible) versions
of the software, as the new version (with a new secret nonce) won&#8217;t
link up with DHT nodes belonging to previous versions.</p>

<p><em>How did you deploy your system? How big of a deployment?</em><br />
CoralCDN has been running 24/7 on 200-400 PlanetLab servers since
March 2004.  I manage the network using <a href="http://appmanager.berkeley.intel-research.net/">AppManager</a>, built by Ryan
Huebsch from Berkeley, which provides a SQL server that keeps a record
of current node run state, requested run state, install state, etc.
So AppManager gives me a Web interface to control the desired runstate
of nodes, then all nodes &#8220;call home&#8221; to the AppManager server to
determine updated runstate.  You write a bunch of shell scripts to
actually use these run states to start or stop nodes, manage logs,
etc.  This &#8220;bunch of shell scripts&#8221; eventually grew to be about 3000
lines of <code>bash</code>, which was somewhat unexpected.  While AppManager is a
single server (although nodes are configured with a backup host for
failover), CoralCDN&#8217;s scripts are designed for nodes to &#8220;fail same&#8221;.
That is, requested runstate is stored durably on each node, so if the
management server is offline or returns erroneous data (which it has
in the past), the nodes will maintain their last requested runstate
until the management server comes back online and provides a valid
status update.</p>

<p><em>How did you evaluate your system?</em><br />
We performed all the experiments one might expect in an academic
evaluation on an initial test deployment on PlanetLab. Our <a href="http://www.cs.princeton.edu/~mfreed/docs/coral-nsdi04.pdf">NSDI
&#8216;04</a> paper discusses these experiments.</p>

<p>After that stage, CoralCDN just runs &#8212; people continue to use it, so
it provides some useful functionality.  My interest transitioned from
providing great service to just keeping it running (while I moved onto
other research).</p>

<p>I probably spend about 10 minutes a week &#8220;keeping CoralCDN running&#8221;,
which is typically spent answering abuse complaints, rather than
actually managing the system.  This is largely because the system&#8217;s
algorithms were designed to be completely self-organizing &#8212; as we
initially thought of CoralCDN as a peer-to-peer system &#8212; as opposed
to a centrally-managed system designed for PlanetLab.  System
membership, fault detection and recovery, etc., is all completely
automated.</p>

<p>Unfortunately, dynamic membership and failover doesn&#8217;t extend to the
primary nameservers we have registered for <code>.nyud.net</code> with the <code>.net</code>
gTLD servers.  These 10-12 nameservers also run on PlanetLab servers,
so if one of these servers go offline, our users experience bad DNS
timeouts until I manually remove that server from the list registered
with Network Solutions.  (PlanetLab doesn&#8217;t provide any IP-layer
virtualization that would allow us to failover to alternate physical
servers without modifying the registered IP addresses.)  And I have to
admit I&#8217;m pretty lazy about updating the DNS registry, especially
given the rather painful web UI that Network Solution provides.  (In
fairness, the UIs for GoDaddy and other registrars I&#8217;ve used are
similarly painful).  I think registrars should really provide a
programmatic API for updating entries, but haven&#8217;t found one for
low-cost registrars yet.  Anyway, offline nameservers are probably the
biggest performance problem with CoralCDN, and probably the main
reason it seems slow at times.  This is partly a choice I made,
however, in not becoming a vigilant system operator for which managing
CoralCDN becomes a full-time job.</p>

<p>There&#8217;s a lesson to be had here, I think, for academic systems that
somehow &#8220;escape the lab&#8221; but don&#8217;t become commercial services: either
promote lessened expectations for your users (and accept that reality
yourself), build up a full-time developer/operations staff (a funding
quandary), or expect the project to soon die-off after its initial
developers lose interest or incentives.</p>

<p><em>Anything you’d like to add?</em><br />
My research group actually just launched a <a href="http://sns.cs.princeton.edu/blog/">blog</a>.  In the next few
weeks, I&#8217;ll be writing a series about some of the lessons I&#8217;ve learned
from building and deploying CoralCDN.  I want to invite all your
readers to look out for those posts and really welcome any comments or
discussion around them.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=hKptx3wifVY:q6MT_ZNYASk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EmilSitMainBlog?a=hKptx3wifVY:q6MT_ZNYASk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/EmilSitMainBlog?i=hKptx3wifVY:q6MT_ZNYASk:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EmilSitMainBlog/~4/hKptx3wifVY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.emilsit.net/blog/archives/systems-researchers-mike-freedman/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.emilsit.net/blog/archives/systems-researchers-mike-freedman/</feedburner:origLink></item>
	</channel>
</rss><!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
