<?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>Dragons in the Algorithm &#187; Uncategorized</title>
	<atom:link href="http://mcherm.com/permalinks/1/category/uncategorized/feed" rel="self" type="application/rss+xml" />
	<link>http://mcherm.com</link>
	<description>Adventures in Programming</description>
	<lastBuildDate>Tue, 08 Jun 2010 18:54:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Viewing a dependency tree in Maven</title>
		<link>http://mcherm.com/permalinks/1/viewing-a-dependency-tree-in-maven</link>
		<comments>http://mcherm.com/permalinks/1/viewing-a-dependency-tree-in-maven#comments</comments>
		<pubDate>Tue, 08 Jun 2010 18:54:48 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=477</guid>
		<description><![CDATA[To find out what dependencies you are getting and from where, execute &#8220;mvn dependency:tree&#8221;. Send it to a file using &#8220;mvn dependency:tree -Doutput=file&#8221;.
]]></description>
			<content:encoded><![CDATA[<p>To find out what dependencies you are getting and from where, execute &#8220;mvn dependency:tree&#8221;. Send it to a file using &#8220;mvn dependency:tree -Doutput=file&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/viewing-a-dependency-tree-in-maven/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Estimate Units</title>
		<link>http://mcherm.com/permalinks/1/estimate-units</link>
		<comments>http://mcherm.com/permalinks/1/estimate-units#comments</comments>
		<pubDate>Fri, 13 Feb 2009 18:44:57 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=268</guid>
		<description><![CDATA[When you estimate tasks, should the estimates be done in hours, or in days?
As I see it, the big advantage of estimating in hours is that if you THINK in hours, you tend to get a more accurate estimate. There are lots of development tasks which will seem like they should take &#8220;no more than [...]]]></description>
			<content:encoded><![CDATA[<p>When you estimate tasks, should the estimates be done in hours, or in days?</p>
<p>As I see it, the big advantage of estimating in hours is that if you THINK in hours, you tend to get a more accurate estimate. There are lots of development tasks which will seem like they should take &#8220;no more than 2 days&#8221;, but if you think about all the individual steps (I have write create the page and the new service. And the stored procedure. And I&#8217;ll have to get a security review and a code review. And I have to remember to do the unit tests. Oh yes, and save time for bug fixes), the total comes out a big bigger.</p>
<p>As I see it, the big advantage of estimating in days is that it&#8217;s quicker and simpler. If you team is sitting there arguing whether a task is 3 hours or 4 hours, then you&#8217;re wasting time &#8212; after all, development estimates are never THAT accurate anyway: we always need to allow for the unexpected.</p>
<p>Considering these, I could be persuaded to do it either way. What is NOT useful is to think how many days it will take, multiply by the number of hours per day, then spend time arguing about whether it is one more or one less than this number.</p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/estimate-units/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Separation of Concerns</title>
		<link>http://mcherm.com/permalinks/1/separation-of-concerns</link>
		<comments>http://mcherm.com/permalinks/1/separation-of-concerns#comments</comments>
		<pubDate>Mon, 27 Oct 2008 11:59:24 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=127</guid>
		<description><![CDATA[Once upon a time (in the dark ages of web application development) we built our applications as a single monolithic Perl CGI script, or perhaps a large JSP file containing the entire application.  The code looked something like this:
costs.jsp

&#60;% Cost[] costs = CostHelper.calculateCosts(loanData, currentDecision); %&#62;
&#60;h3&#62;Current Costs:&#60;/h3&#62;
&#60;table border=&#34;0&#34;&#62;
  &#60;tr&#62;
    &#60;th&#62;Cost&#60;/th&#62;
  [...]]]></description>
			<content:encoded><![CDATA[<p>Once upon a time (in the dark ages of web application development) we built our applications as a single monolithic Perl CGI script, or perhaps a large JSP file containing the entire application. <span id="more-127"></span> The code looked something like this:</p>
<p><strong>costs.jsp</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;% Cost[] costs = CostHelper.calculateCosts(loanData, currentDecision); %&gt;
&lt;h3&gt;Current Costs:&lt;/h3&gt;
&lt;table border=&quot;0&quot;&gt;
  &lt;tr&gt;
    &lt;th&gt;Cost&lt;/th&gt;
    &lt;th&gt;Amount&lt;/th&gt;
  &lt;/tr&gt;
  &lt;% for(int i=0; i&lt;costs.length; i++) { %&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;b&gt;&lt;%costs[i].getName()%&gt;&lt;/b&gt;&lt;/td&gt;
      &lt;td&gt;$ &lt;%costs[i].getValue()%&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;% } %&gt;
&lt;/table&gt;
&lt;p style=&quot;text-align: center; font-style: italic&quot;&gt;
  &lt;a href=&quot;costHelp.html&quot; 
      onclick=&quot;
        window.open(this.href, 'Help');
        return false;
      &quot;
  &gt;Explain these&lt;/a&gt;
&lt;/p&gt;</pre></div></div>

<p>And it was confusing. But after a time we became enlightened and we realized that we should separate out the business logic from the rest of the presentation. We used tag libraries or velocity macros or any of a host of other technologies, and the code looked something like this:</p>
<p><strong>CostController.java</strong></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">Cost<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> costs <span style="color: #339933;">=</span> CostHelper.<span style="color: #006633;">calculateCosts</span><span style="color: #009900;">&#40;</span>loanData, currentDecision<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
modelAndView.<span style="color: #006633;">addObject</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;costs&quot;</span>, costs<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>costs.vm</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;h3&gt;Current Costs:&lt;/h3&gt;
&lt;table border=&quot;0&quot;&gt;
  &lt;tr&gt;
    &lt;th&gt;Cost&lt;/th&gt;
    &lt;th&gt;Amount&lt;/th&gt;
  &lt;/tr&gt;
  #foreach( $cost in $costs )
    &lt;tr&gt;
      &lt;td&gt;&lt;b&gt;$cost.name&lt;/b&gt;&lt;/td&gt;
      &lt;td&gt;$ $cost.value&lt;/td&gt;
    &lt;/tr&gt;
  #end
&lt;/table&gt;
&lt;p style=&quot;text-align: center; font-style: italic&quot;&gt;
  &lt;a href=&quot;costHelp.html&quot; 
      onclick=&quot;
        window.open(this.href, 'Help');
        return false;
      &quot;
  &gt;Explain these&lt;/a&gt;
&lt;/p&gt;</pre></div></div>

<p>And it was confusing. But after a time we became enlightened and we realized that we should separate out the styling from the rest of the presentation. We used CSS markup in separate files, and the code looked something like this:</p>
<p><strong>CostController.java</strong></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">Cost<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> costs <span style="color: #339933;">=</span> CostHelper.<span style="color: #006633;">calculateCosts</span><span style="color: #009900;">&#40;</span>loanData, currentDecision<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
modelAndView.<span style="color: #006633;">addObject</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;costs&quot;</span>, costs<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>costs.css</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.costName</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.helpLink</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">italic</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>costs.vm</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;h3&gt;Current Costs:&lt;/h3&gt;
&lt;table border=&quot;0&quot;&gt;
  &lt;tr&gt;
    &lt;th&gt;Cost&lt;/th&gt;
    &lt;th&gt;Amount&lt;/th&gt;
  &lt;/tr&gt;
  #foreach( $cost in $costs )
    &lt;tr&gt;
      &lt;td class=&quot;costName&quot;&gt;$cost.name&lt;/td&gt;
      &lt;td&gt;$ $cost.value&lt;/td&gt;
    &lt;/tr&gt;
  #end
&lt;/table&gt;
&lt;p class=&quot;helpLink&quot;&gt;
  &lt;a href=&quot;costHelp.html&quot; 
      onclick=&quot;
        window.open(this.href, 'Help');
        return false;
      &quot;
  &gt;Explain these&lt;/a&gt;
&lt;/p&gt;</pre></div></div>

<p>And it was confusing. But after a time we became enlightened and we realized that we should separate out the dynamic JavaScript from the rest of the presentation. We called this <a href="http://www.slideshare.net/simon/unobtrusive-javascript-with-jquery">unobtrusive JavaScript</a>, and the code looked something like this:</p>
<p><strong>CostController.java</strong></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">Cost<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> costs <span style="color: #339933;">=</span> CostHelper.<span style="color: #006633;">calculateCosts</span><span style="color: #009900;">&#40;</span>loanData, currentDecision<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
modelAndView.<span style="color: #006633;">addObject</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;costs&quot;</span>, costs<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>costs.css</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.costName</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.helpLink</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">italic</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>costs.js</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.popup'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    window.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'href'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'Help'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p><strong>costs.vm</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;h3&gt;Current Costs:&lt;/h3&gt;
&lt;table border=&quot;0&quot;&gt;
  &lt;tr&gt;
    &lt;th&gt;Cost&lt;/th&gt;
    &lt;th&gt;Amount&lt;/th&gt;
  &lt;/tr&gt;
  #foreach( $cost in $costs )
    &lt;tr&gt;
      &lt;td class=&quot;costName&quot;&gt;$cost.name&lt;/td&gt;
      &lt;td&gt;$ $cost.value&lt;/td&gt;
    &lt;/tr&gt;
  #end
&lt;/table&gt;
&lt;p class=&quot;helpLink&quot;&gt;
  &lt;a href=&quot;costHelp.html&quot; class=&quot;popup&quot;&gt;Explain these&lt;/a&gt;
&lt;/p&gt;</pre></div></div>

<p>And it was better. Things get a little bit confusing because each screen is rendered from several different files instead of from a single one, but separating out the concerns of business logic, styling, and dynamic behavior made each piece easier to understand and work with.</p>
<p>Recently, though, I became enlightened, and realized that we still have too many things going on in the same file. The HTML file still contains two independent concerns: the definition of the <em>structure</em> and the actual <em>text</em>. These facets are not really related, and they tend to be edited by different people. (HTML designers don&#8217;t necessarily produce the marketing copy and other text.) So this is a perfect candidate for another separation of concerns. That&#8217;s why my current project is organized like this instead:</p>
<p><strong>CostController.java</strong></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">Cost<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> costs <span style="color: #339933;">=</span> CostHelper.<span style="color: #006633;">calculateCosts</span><span style="color: #009900;">&#40;</span>loanData, currentDecision<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
modelAndView.<span style="color: #006633;">addObject</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;costs&quot;</span>, costs<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>costs.css</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.costName</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.helpLink</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">italic</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>costs.js</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.popup'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    window.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'href'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'Help'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p><strong>cmstext.properties</strong></p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;">cost-title: Current Costs:
cost-col1-label: Cost
cost-col2-label: Amount
cost-help: Explain these</pre></div></div>

<p><strong>costs.vm</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;h3&gt;#cms(&quot;cost-title&quot;)&lt;/h3&gt;
&lt;table border=&quot;0&quot;&gt;
  &lt;tr&gt;
    &lt;th&gt;#cms(&quot;cost-col1-label&quot;)&lt;/th&gt;
    &lt;th&gt;#cms(&quot;cost-col2-label&quot;)&lt;/th&gt;
  &lt;/tr&gt;
  #foreach( $cost in $costs )
    &lt;tr&gt;
      &lt;td class=&quot;costName&quot;&gt;$cost.name&lt;/td&gt;
      &lt;td&gt;$ $cost.value&lt;/td&gt;
    &lt;/tr&gt;
  #end
&lt;/table&gt;
&lt;p class=&quot;helpLink&quot;&gt;
  &lt;a href=&quot;costHelp.html&quot; class=&quot;popup&quot;&gt;#cms(&quot;cost-help&quot;)&lt;/a&gt;
&lt;/p&gt;</pre></div></div>

<p>The code that processes this allows no markup in the cmstext.properties file &#8212; any metacharacters will be properly escaped. So in principle it would be easy to give this file directly to the business to edit without IT help &#8212; or even to allow them to edit it on the live website without needing a QA cycle. The down-side is that we have yet another file to deal with: time will tell whether the benefits outweigh that cost.</p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/separation-of-concerns/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Many ways to attack websites</title>
		<link>http://mcherm.com/permalinks/1/many-ways-to-attack-websites</link>
		<comments>http://mcherm.com/permalinks/1/many-ways-to-attack-websites#comments</comments>
		<pubDate>Thu, 09 Oct 2008 14:26:51 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=105</guid>
		<description><![CDATA[Developers of web applications have quite a few different kinds of &#8220;attacks&#8221; to worry about. I will try to describe the major categories I know of, including one which is &#8220;new&#8221; as of the past month or so.
SQL Injection
The most venerable is the SQL-injection attack (and related attacks for things other than databases). This is [...]]]></description>
			<content:encoded><![CDATA[<p>Developers of web applications have quite a few different kinds of &#8220;attacks&#8221; to worry about. I will try to describe the major categories I know of, including one which is &#8220;new&#8221; as of the past month or so.<span id="more-105"></span></p>
<h2>SQL Injection</h2>
<p>The most venerable is the SQL-injection attack (and related attacks for things other than databases). This is the danger that data entered by users will be treated as meta-characters not just as text, and will allow a visitor to your site to execute arbitrary code in your database (or some other system). Nothing illustrates this kind of attack better than this <a title="Random XKCD cartoon" href="http://dynamic.xkcd.com/comic/random/">XKCD</a> cartoon:</p>
<p><a href="http://xkcd.com/327/"><img class="aligncenter" title="SQL Injection Attack" src="http://imgs.xkcd.com/comics/exploits_of_a_mom.png" alt="" width="666" height="205" /></a></p>
<h2>XSS</h2>
<p>There are XSS attacks &#8211; which stands for &#8220;Cross Site Scripting&#8221; (the acronym &#8220;CSS&#8221; was <a title="Cascading Style Sheets" href="http://www.w3.org/TR/CSS2/">already taken</a>). XSS is the danger that your site might serve up some content which was entered by a user (or perhaps loaded from a 3rd party site). Normally, this makes sense: whole <a title="MySpace" href="http://www.myspace.com/">empires</a> have been built on the concept of allowing users to customize their own pages on your site. But browsers assume that any code served up by your site is <em>trusted</em>, and will allow it to do things like accessing you site&#8217;s cookies. Particularly if users can get <em>others</em> to view their content, this can be quite dangerous. The first line of defense is to carefully sanitize and properly escape all content from users that it intended as plain text. As for content from users that is <em>intended</em> to contain markup, some sites just prohibit this, while others can use a solution like <a title="Google Caja" href="http://code.google.com/p/google-caja/">Google caja</a>, which provides a secure sandbox for untrusted code to run in.</p>
<h2>CSRF</h2>
<p><img class="size-full wp-image-112 alignright" title="wikipedia lolcat" src="http://mcherm.com/blog/wp-content/uploads/2008/10/175px-wikipedia-lolcat.jpg" alt="Wikipedia lolcat" width="175" height="140" /></p>
<p>XSS attacks exploited the fact that the user (or the user&#8217;s browser) trusted content coming from your website (even if that content wasn&#8217;t written by the site owner). The <a title="&quot;converse&quot;" href="http://www.jimloy.com/logic/converse.htm">converse</a> is a CSRF attack which exploits the fact that the site trusts content coming from it&#8217;s user&#8217;s browser. One of your users visits a malicious site which contains some sort of link to your site &#8212; preferably a link which causes some action to be taken. The request comes from the user&#8217;s browser, it has the user&#8217;s cookies and everything, so your site thinks the user intended to send the request. The idea is for a site containing <a href="http://icanhascheezburger.com/">pictures of cute cats</a> to trick your banking site into transferring money to someone&#8217;s account. There are several defenses such as always using POST (helps, but doesn&#8217;t fix the problem), a per-session unique ID, and double-submit cookies.</p>
<h2>Clickjacking</h2>
<p>The latest <a title="Computer World jumps on the clickjacking issue" href="http://www.computerworld.com/action/article.do?command=viewarticlebasic&amp;articleid=9115818">hot issue</a> in the web security community is &#8220;<a title="What is Clickjacking?" href="http://hackademix.net/2008/09/27/clickjacking-and-noscript/">clickjacking</a>&#8220;. This is a variant of CSRF in that it occurs when your site&#8217;s user navigates through a malicious website. But instead of the foreign site trying to generate a &#8220;click&#8221; on your website by embedding an image or executing some JavaScript, the foreign site embeds your site, perhaps within an IFrame. They then cover it up so you can&#8217;t SEE it, but when you click you perform an action on the attacked site. You can see an innocuous example at <a href="http://noscript.net/getit">http://noscript.net/getit</a>, where the &#8220;install now&#8221; button installs from Firefox&#8217;s site, not from noscript&#8217;s site. The most evil versions will continually move the attacked site so it stays under the cursor&#8230; no matter <em>where</em> you click, the button you don&#8217;t see will be under your cursor. Some of the details of this exploit have <a title="Clickjack presentation cancelled" href="http://jeremiahgrossman.blogspot.com/2008/09/cancelled-clickjacking-owasp-appsec.html">not been released yet</a>, so it is too early to make clear statements about how a website (or a user) can protect themselves.</p>
<h2>Plenty of others</h2>
<p>I am sure that there are other fundamental forms of attack against web applications. Go ahead and add your own items in the comments below!</p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/many-ways-to-attack-websites/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to email MY blog posts from Outlook</title>
		<link>http://mcherm.com/permalinks/1/how-to-email-blog-posts-from-outlook-2</link>
		<comments>http://mcherm.com/permalinks/1/how-to-email-blog-posts-from-outlook-2#comments</comments>
		<pubDate>Mon, 15 Sep 2008 12:40:35 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=94</guid>
		<description><![CDATA[This post is mostly for my own use; it updates a previous posting with the details of exactly how I am sending out the email version of these blog postings.
I am sending email copies of the technical postings to this blog to an email list of people at my work (I suppose I&#8217;d accept others [...]]]></description>
			<content:encoded><![CDATA[<p>This post is mostly for my own use; it updates a <a href="http://mcherm.com/permalinks/1/how-to-email-blog-posts-from-outlook">previous posting</a> with the details of exactly how I am sending out the email version of these blog postings.<span id="more-94"></span></p>
<p>I am sending email copies of the technical postings to this blog to an email list of people at my work (I suppose I&#8217;d accept others also) who expressed interest. It started as a bonus goal project. Here is the process I came up with for sending the email from Outlook:</p>
<ol>
<li>First, publish the blog entry to the web normally.</li>
<li>Launch Outlook</li>
<li>Go to &#8220;Tools &gt; Options &gt; Mail Format&#8221; and set the email format to HTML while disabling the use of Microsoft Word for editing emails.</li>
<li>Go to “View &gt;  Toolbars &gt; Web” to enable the web toolbar.</li>
<li>Navitage to the website (http://mcherm.com/) and follow the link to the story to be emailed. Manually add &#8220;?stylesheet=outlook&#8221; to the end of the URL and hit return to view it.</li>
<li>Go to “Actions &gt; Send Web Page by E-mail”. This will launch Outlook’s terrible, almost unusable HTML editor. The page will look entirely wrong &#8211; for instance, it will ignore the stylesheet. Fortunately, only one thing really has to be fixed (everything else will look OK when viewed. That one thing is to delete the first three characters at the beginning of the page. (Sometimes is messes up quotes too&#8230; you can check the body of the story.)</li>
<li>Now copy the mailing list and add it to the BCC field. Be sure it&#8217;s the BCC field, not the CC or TO field, to protect the privacy of the message recipients.</li>
<li>Fix the email subject. It should read &#8220;Technical Essay Series: &lt;title-of-article&gt;&#8221;.</li>
<li>Hit send.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/how-to-email-blog-posts-from-outlook-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Wager</title>
		<link>http://mcherm.com/permalinks/1/the-wager</link>
		<comments>http://mcherm.com/permalinks/1/the-wager#comments</comments>
		<pubDate>Mon, 25 Aug 2008 12:38:55 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bet]]></category>
		<category><![CDATA[lazy]]></category>
		<category><![CDATA[mozy]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[wager]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=86</guid>
		<description><![CDATA[You are really lazy. It&#8217;s nothing personal of course &#8212; everyone tends to procrastinate to some extent, but right now it&#8217;s YOUR turn. In just a moment, I am going to convince you that you want to do something. You&#8217;ll agree that it&#8217;s a good idea, you&#8217;ll tell yourself that you are going to do [...]]]></description>
			<content:encoded><![CDATA[<p>You are really lazy. It&#8217;s nothing personal of course &#8212; everyone tends to procrastinate to some extent, but right now it&#8217;s YOUR turn. In just a moment, I am going to convince you that you want to do something. You&#8217;ll agree that it&#8217;s a good idea, you&#8217;ll tell yourself that you are going to do it, but I&#8217;m betting that you are so lazy that in the end you won&#8217;t do it.<span id="more-86"></span></p>
<p>You probably have antivirus software protecting your computer from malicious computer viruses &#8212; in fact, you&#8217;d be a bit nervous about connecting to the internet if you didn&#8217;t have it. After all, viruses can make everything run more slowly, take over your computer and use it to send spam, or worst of all they can even delete files and destroy data. There are even a few viruses that <a href="http://www.schneier.com/blog/archives/2008/06/ransomware_1.html#c279319">take your data hostage</a> &#8212; encrypting it, deleting the original, then offering to decrypt it if an anonymous payment is made to a certain account.</p>
<p>It is less common these days (hard drives have gotten much better), but occasionally you&#8217;ll have a catastrophic failure &#8212; your hard drive will crash with no way to recover it. This can be a real disaster: the cost of a new hard drive is nothing compared to the loss of all your precious data.</p>
<p>Or it&#8217;s even POSSIBLE (unlikely, to be sure), that while you were cooking dinner your five-year-old got onto the computer you had left on (despite KNOWING he wasn&#8217;t supposed to) and sort of accidentally dragged into the trash a folder containing some files &#8212; files you had been working on for quite a long time. And, unlikely though it sounds, it&#8217;s possible that you didn&#8217;t notice this until AFTER you had already emptied the trash can and deleted the files forever.</p>
<p>Of course there is one solution to ALL of these problems &#8212; backups. Everyone knows that they ought to back up their files. But not everyone gets around to doing it; in fact nearly everyone doesn&#8217;t &#8211; until right after they have an accident and lose data. In fact, I am guessing that you, yes YOU have data someplace (probably at home) that isn&#8217;t backed up properly.</p>
<p>There is an obvious &#8220;right&#8221; way to do backups; just follow a few simple rules. First, the backups have to be frequent &#8212; a 9-month old backup isn&#8217;t going to be very useful; every few days is about right for most people. Second, you MUST test your backup.  A backup process, even one designed with the best of intentions, can&#8217;t be considered safe unless you have tried doing a restore from it. And succeeded. It doesn&#8217;t matter whether the backup is to CDs, tape, a spare hard drive, or over the internet, but you should store the backups someplace separate from the computer (otherwise they won&#8217;t be much help in case of a housefire).</p>
<p>And doing all this is a pain&#8230; particularly the part about doing it regularly. Murphy&#8217;s law says that you won&#8217;t lose data until sometime after you finally become lax and start skipping your backups. It is FAR better if the backups can be done automatically&#8230; so if you are lazy like the rest of us it will still get backed up. But for most of us, setting up some automated system is even harder than doing backups.</p>
<p>So what you really need is some product which will automatically back up your files for you every few days. It should be trivially easy to use, should take almost no time to install, and should work even if your computer isn&#8217;t on or net-connected 24/7. It should make restoring files a breeze (and not something you do only in case of catastrophe) and should automatically warn you if backups are NOT working for some reason. It should not require purchasing any special tape drives or other hardware. Oh yeah, and it should be free, or at least cheap.</p>
<p><img class="alignright size-full wp-image-88" title="Mozy" src="http://mcherm.com/blog/wp-content/uploads/2008/08/mozy-logo.png" alt="" width="206" height="52" />Fortunately, such a product exists! Actually, several such products exist, but I&#8217;m just going to talk about my favorite which is called &#8220;Mozy&#8221; (it&#8217;s for Windows and Mac&#8230; you Linux users will need to find a different alternative). <a title="Mozy" href="http://mozy.com" target="_self">Mozy</a>&#8217;s software installs quite easily. Once installed, it asks you to create an account: home use is FREE if you need to back up less than 2GB, and costs $5/month for unlimited amounts. (They have small business backup solutions also.) It will ask you to specify which directories need to be backed up and will send the data over the internet to Mozy&#8217;s servers. The documentation says that it is encrypted, so Mozy themselves cannot access your data without the password. (In case you were wondering, that&#8217;s a good thing.)</p>
<p>After the initial setup, Mozy runs without any supervision. It waits for a time when your internet connection is up and running but you are not currently working on your computer, and then it sends the changes (only the changes) from the backed-up directories over to Mozy&#8217;s servers. If it does not manage to do a backup within 7 days, then it begins to warn you that the backups are not current. And any time that you want to get files back, you can review the files stored on the server and restore any amount from a single file to the entire backup set.</p>
<p>There are a couple of features that I would want in an ideal backup system which Mozy lacks. I would want the entire disk backed up, including the OS so that I could completely swap in a new disk if needed. And I would want all versions of a backed-up file to be saved, not just the latest, so I could return to previous states of things rather like a version control system. But Mozy provides the most important features: it backs up my data, and it is very easy to use (good, because I&#8217;m too lazy to use it otherwise).</p>
<p><a href="http://www.flickr.com/photos/kubina/347687455/"><img class="alignleft size-full wp-image-87" style="margin: 2px; float: left;" title="slot_machine" src="http://mcherm.com/blog/wp-content/uploads/2008/08/slot_machine.jpg" alt="Wagers" width="160" height="240" /></a>So now we come to the wager. At this point, as I predicted, you are thinking to yourself &#8220;Gee, this Mozy sounds like a good idea. I should really install it on my own computer.&#8221; But it&#8217;s one thing to THINK about it, and quite another to actually go DO it. There is a certain mental inertia to overcome. So I&#8217;m placing a small bet &#8211; shall we say $5? &#8211; that you won&#8217;t actually step up and do it. If I lose&#8230; if because of reading this article, you actually DO go install Mozy or another automated backup tool, then post a reply using the reply box below, and I&#8217;ll pay up on my bet. (For the record: Yes, Mozy does have an affiliate program but No, I am not participating. I get no kickbacks with this deal &#8211; just the warm fuzzy feeling of having saved someone else from losing their data. <span style="font-size: x-small;">(Offer good only for the first 12 days after this is posted. Offer may be rescinded if this gets posted to the front page of <a href="http://slashdot.org/">Slashdot</a>, <a href="http://digg.com/">Digg</a>, <a href="http://reddit.com/">reddit</a>, or the like.)</span>)  You could have your data safe AND win $5 at the same time&#8230; what are you waiting for? Or are you too lazy?</p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/the-wager/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to email blog posts from Outlook</title>
		<link>http://mcherm.com/permalinks/1/how-to-email-blog-posts-from-outlook</link>
		<comments>http://mcherm.com/permalinks/1/how-to-email-blog-posts-from-outlook#comments</comments>
		<pubDate>Wed, 02 Apr 2008 20:56:07 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mcherm.com/permalinks/1/how-to-email-blog-posts-from-outlook</guid>
		<description><![CDATA[Suppose (just for the sake of discussion) you wanted to share some blog postings with a group of people at work &#8211; and the company email system uses Outlook 2003. Sending HTML email with the blog posting seems like it would be a nice way to do it. But getting Outlook to send properly-crafted HTML [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose (just for the sake of discussion) you wanted to share some blog postings with a group of people at work &#8211; and the company email system uses Outlook 2003. Sending HTML email with the blog posting seems like it would be a nice way to do it. But getting Outlook to send properly-crafted HTML emails is surprisingly difficult<span id="more-61"></span></p>
<p>Following a hint I learned <a href="http://www.emailaddressmanager.com/tips/html-email.html" title="How to send HTML email using Outlook">from the web</a>, here is the procedure I came up with.</p>
<ol>
<li>Launch Outlook.</li>
<li>Go to &#8220;Tools &gt; Options &gt; Mail Format&#8221; and set the email format to HTML while disabling the use of Microsoft Word for editing emails.</li>
<li> Go to &#8220;View &gt;  Toolbars &gt; Web&#8221; to enable the web toolbar.</li>
<li>In the web toolbar, navigate to the page containing the HTML you want to send. If the page you are sending is not an existing blog post, you can write it by hand in the HTML editor of your choice then navigate there.</li>
<li>Go to &#8220;Actions &gt; Send Web Page by E-mail&#8221;.</li>
<li>This will launch Outlook&#8217;s terrible, almost unusable HTML editor. Fortunately, it will prefill it with the content of your web page, so if the web page was correct then you should be able to fill in the headers (subject and To) and just hit &#8220;send&#8221;. I found some character set problems (e.g.: EM dashes replaced with patches of line noise) so you may want to watch out for these.</li>
</ol>
<p>I still recommend creating a sample and sending it to an email address beforehand. Test every link and image to make sure that they&#8217;re working before you send out the mass mailing.</p>
<p><img src="http://mcherm.com/blog/wp-content/uploads/2008/04/html_in_outlook_small.png" alt="HTML email in my Outlook" /></p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/how-to-email-blog-posts-from-outlook/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Treat Your Customers Well</title>
		<link>http://mcherm.com/permalinks/1/treat-your-customers-well</link>
		<comments>http://mcherm.com/permalinks/1/treat-your-customers-well#comments</comments>
		<pubDate>Mon, 17 Dec 2007 02:38:16 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mcherm.com/blog/permalinks/1/treat-your-customers-well</guid>
		<description><![CDATA[Google, MySpace, Wikipedia, YouTube, facebook, craigslist, digg—what (besides runaway success) do these have in common?
No one at Google decides how to rank the sites, they rely on how other sites throughout the net link to them. The administrators of MySpace and facebook don&#8217;t produce any of its content. Wikipedia doesn&#8217;t employ experts to write its [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.google.com/">Google</a>, <a href="http://www.myspace.com/">MySpace</a>, <a href="http://wikipedia.org/">Wikipedia</a>, <a href="http://www.youtube.com/">YouTube</a>, <a href="http://www.facebook.com/">facebook</a>, <a href="http://www.craigslist.org/about/sites.html">craigslist</a>, <a href="http://digg.com/">digg</a>—what (besides runaway success) do these have in common?<span id="more-34"></span></p>
<p>No one at Google decides how to rank the sites, they rely on how other sites throughout the net link to them. The administrators of MySpace and facebook don&#8217;t produce any of its content. Wikipedia doesn&#8217;t employ experts to write its articles. <img src="http://mcherm.com/blog/wp-content/uploads/2007/12/myspace_logodotcom.gif" alt="MySpace Logo" align="right" />The owners of YouTube don&#8217;t film videos themselves. Craigslist itself doesn&#8217;t buy or sell anything. Digg doesn&#8217;t write articles, select them or even comment on them. These (<a href="http://www.ebizmba.com/articles/user-generated-content.html">and many others</a>) rely on user generated content.</p>
<p><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>It&#8217;s pretty clear that there are huge profits to be made off of content that other people produce for you. But there is a trick to doing it properly, and some of these sites &#8220;get it&#8221; while others don&#8217;t. The secret is nothing new: businessmen have <a href="http://sethgodin.typepad.com/seths_blog/2006/04/the_customer_is.html">said</a> for years that &#8220;<a href="http://www.phrases.org.uk/meanings/106700.html">The Customer Is Always Right</a>&#8220;. With user generated content, it is more important than ever to treat your customers well—even if you don&#8217;t &#8220;have to&#8221;. Here are some examples of companies that understand this and some that don&#8217;t.</p>
<p><a href="http://www.google.com/"><img src="http://mcherm.com/blog/wp-content/uploads/2007/12/google_logo.gif" alt="Google Logo" align="right" /></a>Google <a href="http://www.sec.gov/Archives/edgar/data/1288776/000119312507044494/d10k.htm#toc70021_12">says</a> they make 40% of their revenue from AdSense, and I&#8217;m surprised it&#8217;s not higher. Everywhere you go on the web, you see small Google ads. To the owners of the small websites they run on it&#8217;s great: a way to make money with very little effort. To the advertisers, it&#8217;s great because they don&#8217;t have to pay unless people click on the ads. Even the viewers (not normally someone that advertisers cater to) are mostly pleased to have small inobtrusive text ads rather than <a href="https://addons.mozilla.org/en-US/firefox/addon/433">huge flash animations that cover up the page they&#8217;re trying to view</a>. Everyone is so happy that they don&#8217;t mind Google making off with a huge chunk of the revenue.</p>
<p><a href="http://wikipedia.org/"><img src="http://mcherm.com/blog/wp-content/uploads/2007/12/wiki-en.png" alt="Wikipedia Logo" align="left" /></a>Wikipedia seeks to resolve conflicts by consensus and by maintaining a neutral point of view. Yet the people who run the site often <a href="http://www.theregister.co.uk/2007/12/06/wikipedia_and_overstock/">silence any criticism of themselves or the way they run it</a>.</p>
<p>YouTube doesn&#8217;t plaster the screen with ads. But they recently introduced the practice of putting ads next to a video—but <em>only</em> if the poster permits it. And they share part of the <a href="http://www.youtube.com/"><img src="http://mcherm.com/blog/wp-content/uploads/2007/12/youtube_logo.gif" alt="YouTube Logo" align="right" /></a>revenue with the poster. Somehow, the YouTube community does not seem to be up in arms about this new advertising: it&#8217;s almost as if they think it is fair.</p>
<p>Facebook recently decided to partner with numerous businesses including Blockbuster, and tell all of one&#8217;s &#8220;friends&#8221; every time a user rented a video (or whatever the business was selling. Although it was <a href="http://laboratorium.net/archive/2007/12/10/facebook_and_the_vppa_uhoh">probably illegal</a>, this was a great business deal for the companies involved: Blockbuster gets more &#8220;shelfspace&#8221; in their customer&#8217;s minds, Facebook gets a useful business partnership. <a href="http://civ.moveon.org/facebookprivacy/071120email.html">The only ones hurt are the customers</a> who just <em>might</em> not want everyone knowing what video they rented last night (at least Blockbuster doesn&#8217;t rent porn).</p>
<p><a href="http://www.amazon.com/">Amazon</a> recently started highlighting one good <em>and one poor</em> review for each product. This may hurt the sales of certain products, but it won&#8217;t hurt Amazon.</p>
<p>The message is clear. If all you have is your customer&#8217;s content, you&#8217;d better make certain that you treat them well.</p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/treat-your-customers-well/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Future of Television</title>
		<link>http://mcherm.com/permalinks/1/the-future-of-television</link>
		<comments>http://mcherm.com/permalinks/1/the-future-of-television#comments</comments>
		<pubDate>Thu, 15 Nov 2007 21:04:21 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[IP-Law]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mcherm.com/blog/?p=16</guid>
		<description><![CDATA[A few days ago, version 1.0 of &#8220;Miro&#8220;, an open-source application, was released. It is a video player with a nearly-perfect design combining the powerful VLC video player, an intuitive UI design, BitTorrent distribution, and a thoughtful approach to copyright law. And it will change Television forever.
What is Miro?
Miro is a video player. You launch [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago, version 1.0 of &#8220;<a href="http://www.getmiro.com/">Miro</a>&#8220;, an open-source application, was released. It is a video player with a nearly-perfect design combining the powerful <a href="http://www.videolan.org/">VLC video player</a>, an intuitive UI design, <a href="http://www.bittorrent.com/">BitTorrent</a> distribution, and a thoughtful approach to copyright law. And it will change Television forever.<span id="more-16"></span></p>
<h4>What is Miro?</h4>
<p><img align="right" src="http://mcherm.com/blog/wp-content/uploads/2007/11/playing01.jpg" alt="Miro Playing a Video" />Miro is a video player. You launch the program and it displays a list of &#8220;channels&#8221;. Each channel contains a series of videos. Some could be short (a couple minutes, like YouTube videos), others longer (like whole 1-hr TV episodes). Click on a video and it downloads (unless it pre-loaded) then you can watch it.</p>
<h4>The VLC video player</h4>
<p>Video today is a mess of different formats. <a href="http://en.wikipedia.org/w/index.php?title=Video_codec&amp;oldid=170719462#Commonly_used_standards_and_codecs">Wikipedia currently lists 22 different commonly used video codecs</a>, and that&#8217;s not to mention <a href="http://mcherm.com/blog/wp-content/uploads/2007/11/guide.jpg" title="Miro Guide"><img align="left" src="http://mcherm.com/blog/wp-content/uploads/2007/11/fullscreen-playing01.jpg" alt="Miro in Fullscreen Mode" /></a>the other levels of formatting aside from the codec itself. There are numerous sorts of DRM applied and different delivery mechanisms. Aside from the passionate videophiles who invent these encoding schemes, no one really cares what format they have &#8212; they just want their video to play properly (and look decent!). Instead of having to remember what to view using Real Player and what to use Windows Media Player or iTunes for, we&#8217;d rather have something that just knew how to play everything. <a href="http://www.videolan.org/">VLC</a> is an open-source (GPL&#8217;ed) video player that handles <a href="http://www.videolan.org/vlc/features.html">lots of different formats</a>. It plays small or full-screen and the controls are intuitive.</p>
<h4>Intuitive UI Design</h4>
<p><a href="http://mcherm.com/blog/wp-content/uploads/2007/11/channel.jpg" title="Miro Channels"><img align="left" src="http://mcherm.com/blog/wp-content/uploads/2007/11/channel.thumbnail.jpg" alt="Miro Channels" /></a>The UI for VLC is really quite easy to use. &#8220;Channels&#8221; (really just RSS feeds with video content) appear on the left-hand side of the screen. They can be organized into folders if desired. Viewing a channel shows the content of that channel &#8212; in blue if not yet downloaded, orange if currently downloading, and green if already downloaded. Click on a blue item to start downloading it, or click on a green item to play it. You can also set a channel to automatically download new videos when they appear &#8212; use this option in combination with running Miro in the background and you&#8217;ll find your video already downloaded and waiting for you when you get there! And there is a search and ratings system for discovering new channels.</p>
<p>Miro also allows one to download video from several major video sites, like YouTube, Google Video, Revver, and so forth. For these it provides a search capability for finding content. You can even save a search as a &#8220;channel&#8221; in the main Miro interface. Moving a step beyond what YouTube and all the abilities to pre-load video, save it on disk, and so forth are all available even for this content.</p>
<h4>BitTorrent Distribution</h4>
<p>Video files can be fairly large. Posting such a file on your server to be downloaded by a couple of friends is quite manageable, but if tens of thousands of people want to download you&#8217;ve suddenly got a problem. If your video becomes popular, then your bandwidth bill might suddenly become enormous &#8212; or it might not even matter because your server might fail while trying to handle the load.</p>
<p>It would be great if all of those tens of thousands of people who want to view your video could help. If everyone who downloaded it were to pass on a copy to someone else, that would be enough bandwidth to transmit it everywhere. BitTorrent <a href="http://www.bittorrent.org/protocol.html">is a protocol</a> for doing exactly this &#8212; with a few nuances, like breaking the file into many small bits and distributing them so no one has to stand in line waiting for someone upstream, and like passing around hashes of the pieces to protect against transmission errors or intentional modification of data. Miro uses BitTorrent to distribute the files, and it automatically &#8220;pays back&#8221; by helping to upload files that you have downloaded as long as they are available on your drive.</p>
<h4>A Thoughtful Approach to Copyright Law</h4>
<p><a href="http://mcherm.com/blog/wp-content/uploads/2007/11/guide.jpg" title="Miro Guide"><img align="right" src="http://mcherm.com/blog/wp-content/uploads/2007/11/guide.thumbnail.jpg" alt="Miro Guide" /></a>BitTorrent is a wonderful tool, but it gets a bad name because its most common use is to distribute pirated copies of video and audio. For that matter, many video and audio distribution sites have been shut down due to legal issues with copyright law (remember <a href="http://w2.eff.org/IP/P2P/Napster/">Napster</a>?). Many people (myself included) feel that the <a href="http://www.zdnet.com.au/news/software/soa/US-ruling-makes-server-RAM-a-document-/0,130061733,339278641,00.htm">current laws in this area ought to be revised</a>, but it is difficult to make a case for this when one is viewed as a &#8220;pirate&#8221; or lawbreaker.</p>
<p>Miro is owned by a non-profit called the <a href="http://participatoryculture.org/">Participatory Culture Foundation</a>. This group&#8217;s board is staffed by well-known luminaries such as Cory Doctorow (&#8220;the guy from BoingBoing&#8221;) and John Lilly (&#8220;the guy who runs Mozilla&#8221;). Even more significantly, the PCF has taken the &#8220;right&#8221; approach to copyright law.</p>
<p>Feeds can come from anywhere (including searches on sites like YouTube which are famously full of unauthorized copyrighted material. And if you get your feed from someone who distributes pirated material, it will work fine with Miro. But the feeds which Miro advertises, and the ones which it lists on their website, are all reviewed by the PCF in an attempt to ensure that they only contain material with an open (<a href="http://creativecommons.org/">Creative Commons</a>) license. Of course, at some point someone will slip in some inappropriate material, but the folks who run things at Miro are doing their best to prevent it.</p>
<p>And this is exactly the right approach to take. There are plenty of people who want to share their work. Encourage them to do so legally. Encourage the Miro viewers to view these fully-legal videos (by featuring them in the Channel Guide). If some Miro users also choose to take in some pirated works, well&#8230; that&#8217;s their own choice.</p>
<p>Recently, <a href="http://scrawford.net/blog/comcast-is-pretending-to-be-you/1031/">Comcast has been interfering with BitTorrent</a>. They get away with this because&#8230; well, they get away with it because they are a monopoly, but they feel like it is acceptable because they figure that most people using BitTorrent are pirates. Miro&#8217;s role as an &#8220;upstanding citizen&#8221; here is an important one.</p>
<h4>It Will Change Television Forever</h4>
<p>Television will be changing quite dramatically in the very near future. Already one wave of changes has replaced advertising-supported free-over-the-air broadcast of several channels with pay-to-subscribe to a few hundred channels delivered over cable. [PS: I don't have cable. But everyone else does.] Tivo and it&#8217;s ilk are currently changing us from shows-scheduled-by-broadcaster to your-choice-of-shows-available-when-YOU-want and breaking the old advertising model at the same time. An even bigger change will come when &#8220;anyone&#8221; can produce shows, instead of the select few networks acting as gatekeepers.</p>
<p>Imagine a future where shows are distributed by BitTorrent on the net (almost no cost to distribute!). Where many shows are produced on a shoestring by dedicated fans, and those with bigger production budgets are supported by a combination of advertising, product placement, and donations. Where viewers can see what they want whenever they are ready &#8212; even catch up on old shows after they discover a new series. It&#8217;s a world where <a href="http://www.savewonderfalls.com/">Wonderfalls</a> and <a href="http://www.fireflyfans.net/">Firefly</a> would never have been canceled. Where open licensing would allow fans to create follow-on materials that would boost the value of the core shows enormously. And the only <em>technological </em>problem keeping us from this world today is that not every household has a copy of Miro installed.</p>
<p>But you could solve solve that one (for your household anyway) <a href="http://www.getmiro.com/download/">right now</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/the-future-of-television/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

