<?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>ihumanable &#187; open source</title>
	<atom:link href="http://ihumanable.com/blog/tag/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://ihumanable.com/blog</link>
	<description>usable in any place a human can be used</description>
	<lastBuildDate>Wed, 11 May 2011 15:10:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>unlicense&#8217;d</title>
		<link>http://ihumanable.com/blog/2010/01/21/unlicensed/</link>
		<comments>http://ihumanable.com/blog/2010/01/21/unlicensed/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 13:34:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[philosophy]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://ihumanable.com/blog/?p=605</guid>
		<description><![CDATA[I wrote yesterday about the importance of open source software. I got one comment saying that prosper would be awesome if it were in the public domain. Here is the comment from Arto Bendiken Prosper looks *sweet*. It’d be awesome if Prosper indeed were in the public domain. I think such a move would make [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_606" class="wp-caption alignright" style="width: 310px"><a href="http://ihumanable.com/blog/wp-content/uploads/2010/01/colbert-lockwood.jpg"><img src="http://ihumanable.com/blog/wp-content/uploads/2010/01/colbert-lockwood-300x225.jpg" alt="colbert portrait by lockwood" title="colbert-lockwood" width="300" height="225" class="size-medium wp-image-606" /></a><p class="wp-caption-text">Freedom has never kicked so much ass</p></div>
<p>I wrote yesterday about the importance of open source software.  I got one comment saying that <a href="http://prosper-lib.com">prosper</a> <strong>would</strong> be awesome <strong>if</strong> it were in the public domain.  Here is the comment from <a href="http://ar.to/">Arto Bendiken</a></p>
<blockquote><p>Prosper looks *sweet*. It’d be awesome if Prosper indeed were in the public domain. I think such a move would make for a decisive selling point over the numerous competing PHP libraries, setting Prosper clearly apart from the herd and allowing it to be easily embedded into any new emerging PHP web frameworks.</p>
<p>It’s worth mentioning that a key reason that SQLite, which is in the public domain, has prospered (no pun intended) has been the fact that it can be so easily (both technically and legally speaking) embedded into any other software. The end results of technical excellence combined with singularly liberal licensing speak for themselves: http://www.sqlite.org/famous.html</p>
<p>I think a lot of these same benefits could come into play also in such a potentially key higher-level web app infrastructure piece as Prosper. It certainly seems that you have the technical side of things well in hand, already, so here’s hoping for a bright and prosperous future.</p></blockquote>
<p>Well I completely agree with Arto and want to clear up any confusion about prosper and its license.  Prosper was original hosted on Google Code, which requires you to choose a license, at the time I selected the MIT/X11 license based off of my belief that it was the most free.  A little further down the road I saw the <a href="http://sam.zoy.org/wtfpl/">WTFPL &#8211; Do What The Fuck You Want To Public License </a> and thought about switching to that.  There is a bluntness to the ideal of that license that appealed to me.</p>
<p>The problem with the WTFPL is of course its name, I want prosper to power lots of things and that means taking into account a wider audience.  While hackers and rock star programmers can easily adopt something with WTFPL, I didn&#8217;t want to be responsible for some corporation turning their back on an otherwise useful library because they were squeamish about a word in the license.</p>
<div id="attachment_607" class="wp-caption alignright" style="width: 230px"><a href="http://ihumanable.com/blog/wp-content/uploads/2010/01/no-copyright.png"><img src="http://ihumanable.com/blog/wp-content/uploads/2010/01/no-copyright.png" alt="no copyright" title="no-copyright" width="220" height="220" class="size-full wp-image-607" /></a><p class="wp-caption-text">I always thought people just hated the letter C... then I found out this means no copyright</p></div>
<p>Then I found <a href="http://ar.to/2010/01/set-your-code-free">this post</a> on Hacker News (ironically by the same Arto Bendiken) and it lead me to the <a href="http://unlicense.org/">Unlicense</a>.  The Unlicense is exactly what I was looking for and simple to adopt.  If you go to the <a href="http://github.com/ihumanable/prosper-lib">GitHub repo</a> you will see that the project is now officially Unlicense&#8217;d.  The 0.8 release will be the first official Unlicense&#8217;d release, and so will every release going forward.  I believe in free and open source software and so <strong>I&#8217;m publicly declaring now that prosper will always be free, open source, and unencumbered</strong>.  The mechanism that I will use to ensure this going forward will be Unlicense.</p>
<p>What&#8217;s the big deal, plenty of things are open source, why is this any different?  The difference is that I&#8217;m giving this away fully, without any restrictions.  Want to build a cool new library that uses prosper as the low-level database abstraction layer, go for it.  Want to build a proprietary ORM that utilizes prosper, go for it.  Want to repackage prosper and try to sell it (as underhanded as that is), go for it.  Want to smother prosper with jam and eat it, if you can find a way to, go for it.  Want to&#8230;. enough already, you can do whatever you like.</p>
<p>It is easy to talk about things like freedom and support them in the abstract, it becomes more difficult when you have something concrete.  People could very well take prosper and take it in directions I don&#8217;t care to see it go, but that is life, that is creation, that is the essence of open source.  It is my goal to see prosper provide a solid foundation for building new and better tools and frameworks in php.  I want as many people as possible to use it, and so this was a logical choice.</p>
<p>The next time you have some useful chunk of code lying around and you want to give it to the public domain for the good of the public, think about using <a href="http://unlicense.org">Unlicense</a>.  I can&#8217;t say it any better than they can so I will just quote their section about why you should use Unlicense.  &#8220;Because you have more important things to do than enriching lawyers or imposing petty restrictions on users of your code.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://ihumanable.com/blog/2010/01/21/unlicensed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>i can&#8217;t stop you from being stupid</title>
		<link>http://ihumanable.com/blog/2009/11/03/i-cant-stop-you-from-being-stupid/</link>
		<comments>http://ihumanable.com/blog/2009/11/03/i-cant-stop-you-from-being-stupid/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 18:19:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[teaser]]></category>

		<guid isPermaLink="false">http://ihumanable.com/blog/?p=50</guid>
		<description><![CDATA[I&#8217;ve been working on a skunkworks side project that is nearing release, I&#8217;m down to the last 5%, which is the most difficult part. Suffice it to say that this project is a library meant to be used by other developers (and myself) to develop neat and nifty things. One of the most complicated things [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://ihumanable.com/blog/wp-content/uploads/2009/11/computer-stupid-300x291.jpg" alt="computer-stupid" title="computer-stupid" width="300" height="291" class="alignright size-medium wp-image-51" /></p>
<p>I&#8217;ve been working on a <a href="http://en.wikipedia.org/wiki/Skunk_Works">skunkworks</a> side project that is nearing release, I&#8217;m down to the last 5%, which is the most difficult part.  Suffice it to say that this project is a library meant to be used by other developers (and myself) to develop neat and nifty things.  One of the most complicated things is trying to define an API that makes doing the right thing easy and doing the wrong thing really hard or impossible.  The problem is that the as I pressed on I realized that almost half my code was checking for some stupid thing and protecting against it, attempting to build up state machines and syntax trees in the hope of reporting to you that you had done something stupid, and then it dawned on me, <strong>I can&#8217;t stop you from being stupid</strong>.</p>
<p>The other thing that dawned on me is that I shouldn&#8217;t try to, there are already built in errors that will point out what you did wrong, I don&#8217;t need to add another layer on top.  So I came up with some simple guidelines, applied it to my project, and watched unnecessary code melt away.</p>
<ul>
<li>Pick sane defaults</li>
<li>Assume the developer knows what they are doing</li>
<li>Make it easy to do the right things</li>
<li>Make it hard to do the wrong things</li>
</ul>
<p>The beautiful part of all of it is that my code became easier to read and understand, which means when there is a problem and you need to drop into my code (since it is open source), you will be able to understand what&#8217;s going on.  Let&#8217;s take a look at what I mean with a contrived example, an HTML building library with 4 functions for clarity.</p>
<pre class="brush: php; title: ;">
class HTML {
  static function open_html() {
    echo &amp;quot;&amp;lt;html&amp;gt;&amp;quot;;
  }

  static function open_body() {
    echo &amp;quot;&amp;lt;body&amp;gt;&amp;quot;;
  }

  static function close_body() {
    echo &amp;quot;&amp;lt;/body&amp;gt;&amp;quot;;
  }

  static function close_html() {
    echo &amp;quot;&amp;lt;/html&amp;gt;&amp;quot;;
  }
}
</pre>
<p>The way I was programming did a bunch of handholding and sanity checks, which were nice but unnecessary.  The class became bloated with so much state and sanity checking that it was becoming unwieldy, let&#8217;s take a look at an overly protective incarnation of the above code.</p>
<pre class="brush: php; title: ;">
class HTML {
  private static $html_open = false;
  private static $body_open = false;

  static function open_html() {
    if(self::$html_open) {
      self::handle_error(&amp;quot;html is already open&amp;quot;);
    }
    echo &amp;quot;&amp;lt;html&amp;gt;&amp;quot;;
    self::$html_open = true;
  }

  static function open_body() {
    if(self::$body_open) {
      self::handle_error(&amp;quot;body is already open&amp;quot;);
    } else if (!self::$html_open) {
      self::handle_error(&amp;quot;body must be contained in html&amp;quot;);
    }
    echo &amp;quot;&amp;lt;body&amp;gt;&amp;quot;;
    self::$body_open = true;
  }

  static function close_body() {
    if(!self::$body_open) {
      self::handle_error(&amp;quot;cannot close unopened body&amp;quot;);
    } else if(!self::$html_open) {
      self::handle_error(&amp;quot;body must be contained in html&amp;quot;);
    }
    echo &amp;quot;&amp;lt;/body&amp;gt;&amp;quot;;
    self::$body_open = false;
  }

  static function close_html() {
    if(self::$body_open) {
      self::handle_error(&amp;quot;cannot close html, unclosed body exists&amp;quot;);
    } else if(!self::$html_open) {
      self::handle_error(&amp;quot;cannot close unopened html&amp;quot;);
    }
    echo &amp;quot;&amp;lt;/html&amp;gt;&amp;quot;;
    self::$html_open = false;
  }

  static function handle_error($message) {
    //What is the correct behavior, should we attempt to fix the error, report it, who knows.
    //We'll just stop execution
    die($message);
  }
}
</pre>
<p>Those sure are some nice error messages and it keeps you from creating malformed html, but what&#8217;s the point of it all.  The browser is more than happy to tell you that your markup is invalid, or run the output through a lint checker or W3C validator, why should this class have some buggy half-implemented validator inside of it.  The answer is, it shouldn&#8217;t.</p>
<p>If you write stupid code you should get stupid results, Garbage In &#8211; Garbage Out.  Library code shouldn&#8217;t hold your hand making absolutely sure that you never make a mistake, what&#8217;s the point of it.  If you write the following code</p>
<pre class="brush: php; title: ;">
HTML::open_body();
HTML::close_html();
HTML::open_html();
</pre>
<p>You are clearly missing something about how markup works, it&#8217;s not the library&#8217;s job to hold your hand and guide you through this crisis, the browser will slap you in the face and you will have to learn something.  Now there is a caveat, here we are generating HTML, there are great utilities for finding errors in HTML, so we don&#8217;t need to reinvent the wheel.  If you are writing a library or application code where if something goes wrong the error displayed is fine, don&#8217;t reinvent the wheel.  If the error is unacceptable you may need to do some error reporting.</p>
<p>At the end of the day you can&#8217;t keep the user of your creation from being stupid, they are going to do stupid things and stub their toes and curse your name and you need to make sure that they had to go far off the beaten trail to do so, overlooking obvious better ways to do it, so that it&#8217;s their fault and not yours.  Make it easy to do the right thing and hard to do the wrong thing, but if the user wants to open the body tag before the html tag, let them, they have to learn sooner or later.</p>
]]></content:encoded>
			<wfw:commentRss>http://ihumanable.com/blog/2009/11/03/i-cant-stop-you-from-being-stupid/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

