<?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>22 idea street &#187; Open Source</title>
	<atom:link href="http://22ideastreet.com/blog/tag/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://22ideastreet.com/blog</link>
	<description></description>
	<lastBuildDate>Thu, 17 May 2012 13:00:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Open Source for Retired People</title>
		<link>http://22ideastreet.com/blog/2010/05/29/open-source-for-retired-people/</link>
		<comments>http://22ideastreet.com/blog/2010/05/29/open-source-for-retired-people/#comments</comments>
		<pubDate>Sun, 30 May 2010 03:20:55 +0000</pubDate>
		<dc:creator>Anthony Panozzo</dc:creator>
				<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Retirement]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://22ideastreet.com/blog/?p=981</guid>
		<description><![CDATA[I whipped together a quick video to somewhat explain this idea. video platform video management video solutions video player I forgot to mention the GTK+ UVC Viewer, which is what I used to record using the webcam on Ubuntu. It was excellent. With Kaltura (open source version), you can host it on their CDN, or [...]<p><br/><br/>Original article:  <a href="http://22ideastreet.com/blog/2010/05/29/open-source-for-retired-people/">Open Source for Retired People</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I whipped together a quick video to somewhat explain this idea.</p>
<p><object id="kaltura_player" name="kaltura_player" type="application/x-shockwave-flash" allowFullScreen="true" allowNetworking="all" allowScriptAccess="always" height="330" width="400" xmlns:dc="http://purl.org/dc/terms/" xmlns:media="http://search.yahoo.com/searchmonkey/media/" rel="media:video" resource="http://www.kaltura.com/index.php/kwidget/cache_st/1275195012/wid/_284702/uiconf_id/1693522/entry_id/0_g3f3qu02" data="http://www.kaltura.com/index.php/kwidget/cache_st/1275195012/wid/_284702/uiconf_id/1693522/entry_id/0_g3f3qu02"><param name="allowFullScreen" value="true" /><param name="allowNetworking" value="all" /><param name="allowScriptAccess" value="always" /><param name="bgcolor" value="#000000" /><param name="flashVars" value="&#038;" /><param name="movie" value="http://www.kaltura.com/index.php/kwidget/cache_st/1275195012/wid/_284702/uiconf_id/1693522/entry_id/0_g3f3qu02" /><a href="http://corp.kaltura.com">video platform</a> <a href="http://corp.kaltura.com/technology/video_management">video management</a> <a href="http://corp.kaltura.com/solutions/overview">video solutions</a> <a href="http://corp.kaltura.com/technology/video_player">video player</a> <a rel="media:thumbnail" href="http://cdn.kaltura.com/p/284702/sp/28470200/thumbnail/entry_id/0_g3f3qu02/width/120/height/90/bgcolor/000000/type/2" /> <span property="dc:description" content="" /><span property="media:title" content="first_video_blog_post.avi" /> <span property="media:width" content="400" /><span property="media:height" content="330" /> <span property="media:type" content="application/x-shockwave-flash" /><span property="media:duration" content="{DURATION}" /> </object></p>
<p>I forgot to mention the <a href="http://guvcview.berlios.de/">GTK+ UVC Viewer</a>, which is what I used to record using the webcam on Ubuntu.  It was excellent.</p>
<p>With <a href="http://corp.kaltura.com/">Kaltura</a> (<a href="http://www.kaltura.org/">open source version</a>), you can host it on their CDN, or host it yourself.  It seems like that is pretty flexible.</p>
<p>From watching it once, I see that I should probably talk slower.  Mostly the video seemed in-sync with the audio.  What did you think about the quality and/or the idea?</p>
<p><br/><br/>Original article:  <a href="http://22ideastreet.com/blog/2010/05/29/open-source-for-retired-people/">Open Source for Retired People</a></p>
]]></content:encoded>
			<wfw:commentRss>http://22ideastreet.com/blog/2010/05/29/open-source-for-retired-people/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Software Documentation</title>
		<link>http://22ideastreet.com/blog/2009/09/19/free-software-documentation/</link>
		<comments>http://22ideastreet.com/blog/2009/09/19/free-software-documentation/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 19:00:25 +0000</pubDate>
		<dc:creator>Anthony Panozzo</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://22ideastreet.com/blog/?p=789</guid>
		<description><![CDATA[Found a site that is trying to improve free software documentation. I found this interesting because the idea is related to a previous post that I had about open source tech writers. It seems that their goal is to improve the documentation of free software products to increase their adoption. You can check this out [...]<p><br/><br/>Original article:  <a href="http://22ideastreet.com/blog/2009/09/19/free-software-documentation/">Free Software Documentation</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Found a site that is trying to improve <a href="http://en.flossmanuals.net/">free software documentation</a>.  I found this interesting because the idea is related to a previous post that I had about <a href="http://22ideastreet.com/blog/2009/01/13/open-source-tech-writer">open source tech writers</a>.</p>
<p>It seems that their goal is to improve the documentation of free software products to increase their adoption.  You can check this out on the about tab.  The discussion on their <a href="http://en.flossmanuals.net/flossmanuals">FLOSS manuals overview</a> reminded me of thoughts that I was having about having some sort of open source documentation or tech writing business.  They basically outline the major models for producing content and being compensated for it.  There were several sections that focused on the prevailing mindset, technologies, and economics of doing open source (in this case, for free software) documentation.  I agree with them that adequate and consistent documentation is something that keeps most open source and free software from being widely adopted on the desktop.</p>
<p>There have been some free software products out there that have been very widely accepted, such as Firefox.  I wonder if it is because the program itself was leaps ahead of the proprietary alternative, or if something else contributed to its success.</p>
<p><br/><br/>Original article:  <a href="http://22ideastreet.com/blog/2009/09/19/free-software-documentation/">Free Software Documentation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://22ideastreet.com/blog/2009/09/19/free-software-documentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Source Tech Writer</title>
		<link>http://22ideastreet.com/blog/2009/01/13/open-source-tech-writer/</link>
		<comments>http://22ideastreet.com/blog/2009/01/13/open-source-tech-writer/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 01:30:19 +0000</pubDate>
		<dc:creator>Anthony Panozzo</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Value]]></category>
		<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://22ideastreet.com/blog/?p=427</guid>
		<description><![CDATA[A majority of open source projects have a paucity of documentation. However, they still have value as a working system. I argue that improving the documentation of a codebase intended for general use is one of the highest value activities that a developer can do. Although documentation may not be directly contributing to the codebase, [...]<p><br/><br/>Original article:  <a href="http://22ideastreet.com/blog/2009/01/13/open-source-tech-writer/">Open Source Tech Writer</a></p>
]]></description>
			<content:encoded><![CDATA[<p>A majority of open source projects have a paucity of documentation.  However, they still have value as a working system.  I argue that improving the documentation of a codebase intended for general use is one of the highest value activities that a developer can do.  Although documentation may not be directly contributing to the codebase, the writer provides a valuable service by understanding the code and imparting that knowledge to others.  </p>
<p>I would go so far as to say that there should be open source technical writers.  They look for interesting projects to write basic documentation for.  While there are a smattering of tutorials for certain frameworks, they are not condensed, are not authoritative, and are often misleading because of changes to the framework or convoluted examples.  When the core developers move at the speed of the forum or even IRC, it&#8217;s tough for a new person to have anywhere near that amount of knowledge.  A centralized wiki with pertinent and up-to-date examples is quite useful.</p>
<p>If you are not yet a badass developer, this kind of project aids you in three ways.  First, you gain experience looking at unfamiliar code bases and reasoning about them.  This is especially helpful if you maintain code, and also assists you in writing more maintainable code.  Second, you get some street cred for being closely involved with the developers on the project and working with them.  You&#8217;re likely to learn something from the alpha geeks and advance your skills.  Third, your writing skills improve, which helps you out in many areas over the long run.</p>
<p>In a nutshell, the kind of people who are building their own system or framework are generally not obsessed with documenting for average people.  This could be due to time constraints or general personality traits.  But the value that they create is wasted if people are not comfortable interacting with it.</p>
<h4>Clojure</h4>
<p>There is an interesting thread on the Clojure discussion group about <a href="http://groups.google.com/group/clojure/browse_thread/thread/48aacb9892a79bc4">making examples readable</a> and general ways to help developers who are new to the language and want to code idiomatically.  One post mentioned <a href="http://clojure.org/concurrent_programming">the Clojure page on concurrency</a>.  If you can read through the example code there and want to tackle concurrency (which is supposed to be a <i>strength</i> of Clojure), then I applaud you.  This isn&#8217;t a knock against Clojure, it&#8217;s just so new that most everyone who&#8217;s interested has been playing around with it and trying to understand it better.</p>
<p>One of the most important points in the post is that to get a community rallied around a language or framework, it&#8217;s necessary to have good documentation so people aren&#8217;t put off by it.  The Clojure folks are getting there, as there are a couple of wikis around that people dump stuff into.</p>
<h4>qooxdoo</h4>
<p><a href="http://qooxdoo.org/documentation">The qooxdoo framework</a> illustrates one of my favorite examples of excellent open source documentation.  When I first started looking at it, I was impressed by the amount of examples, pictures, screenshots that were included.  The manual is rife with examples and code snippets.</p>
<p>They have a huge demo area that shows how simple effects can be created using at it.  Looking at these demos, I started visualizing about how exciting it would be to work with this framework.  As another great demo, it has an API documentation viewer, which <i>itself</i> is written with qooxdoo.  It must have taken time to generate all of this&#8230;</p>
<h4>Parting thoughts</h4>
<p>On the other hand, one could argue that with a nascent open-source product, having too many people involved early is problematic for direction and quality density.  Also, the people who create code which uses the product will constantly have to change their code because the underlying architecture or best practices change.  It&#8217;s the bleeding part of the bleeding edge.</p>
<p>I&#8217;m not saying that I&#8217;m committing to doing any of this&#8230; <img src='http://22ideastreet.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Just thought that this was an interesting line of thinking.</p>
<p><br/><br/>Original article:  <a href="http://22ideastreet.com/blog/2009/01/13/open-source-tech-writer/">Open Source Tech Writer</a></p>
]]></content:encoded>
			<wfw:commentRss>http://22ideastreet.com/blog/2009/01/13/open-source-tech-writer/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Introduction to Theories</title>
		<link>http://22ideastreet.com/blog/2008/10/20/introduction-to-theories/</link>
		<comments>http://22ideastreet.com/blog/2008/10/20/introduction-to-theories/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 15:00:25 +0000</pubDate>
		<dc:creator>Anthony Panozzo</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Specification]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Theories]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://22ideastreet.com/blog/?p=107</guid>
		<description><![CDATA[It seems like the more I read about different development models, the more I see overlap between the different paradigms. Even if you aren&#8217;t using one of them for a given project, just knowing about all of them makes your code better because you realize how to make your code more testable. One thing that [...]<p><br/><br/>Original article:  <a href="http://22ideastreet.com/blog/2008/10/20/introduction-to-theories/">Introduction to Theories</a></p>
]]></description>
			<content:encoded><![CDATA[<p>It seems like the more I read about different development models, the more I see overlap between the different paradigms.  Even if you aren&#8217;t using one of them for a given project, just knowing about all of them makes your code better because you realize how to make your code more testable.</p>
<p>One thing that has piqued my interest of late is theories in <a href="http://junit.sourceforge.net/doc/ReleaseNotes4.4.html">JUnit 4.4+</a>.</p>
<h4>Overview</h4>
<p>In JUnit, the still experimental theory functionality is derived from the open-source <a href="http://popper.tigris.org/">Popper project</a>.  The name comes from <a href="http://en.wikipedia.org/wiki/Karl_Popper">Karl Popper&#8217;s</a> work on the philosophy of science.  He was a major proponent of saying that something isn&#8217;t scientific unless it is falsifiable, and that theories cannot be proven correct, merely shown to have exceptions.  If someone can provide an exception, it means that the theory does not match all of our observations.  Theories are models of the world, so while a model may not be correct, it can still be useful.</p>
<p>So what are theories in software good for?  When using test-driven development, the tests serve as a form of code documentation.  However, there are certain properties of code that are known or assumed by the developers that are difficult to codify as simple tests.  Theories provide a simple and expressive means for at least the following cases:</p>
<li>identities and data conversion</li>
<li>globally disallowed behavior</li>
<li>data that should be preserved after performing an operation or set of operations</li>
<p>For example, you might have a theory that data that is serialized into XML and then unserialized should always result in the original object.  This seems to make sense, but it might be time-consuming or error-prone to specify all of the different tests that you have to consider.  A single theory can codify this assumption.</p>
<p>In JUnit, theories are a special case of parameterized test.  So instead of using the standard test that has no parameters, you add parameters to make testing various combinations of values shorter and easier.  You can then take these parameterized tests further by specifying data points to test for by default in an expressive manner.</p>
<h4>Example</h4>
<p>Alright enough theory.  What does a JUnit theory actually look like?  Given that you have a theory about two methods on a Currency object that should be inverses of each other, one nice example is:</p>
<pre>
    @Theory public void multiplyIsInverseOfDivide(
            @TestedOn(ints={0, 5, 10}) int amount,
            @TestedOn(ints={1, 2, 3})  int multiplier) {
        assertThat(new Currency(amount).times(multiplier).divideBy(multiplier).getAmount(), is(amount));
    }
</pre>
<p>On the first line, we declare that we are going to postulate a theory, and give it a unique name.  This method would typically live in a test suite or test file of some sort.  The next two lines are the parameters to the test method.  The parameters are prefixed by annotations to put in sample test values.  All permutations of these values will be attempted when running the theory, and the values will be reported for any failures so we know what happened when the theory failed.  On the last line, we test that the functions are indeed inverses by invoking them and making sure that the original value is the same as the end value.</p>
<h4>Going further</h4>
<p>So big deal, we could easily just create a helper test method that does something similar and we could pass whatever values to the method that we wanted.  Well, hold on a second.  One thing I haven&#8217;t mentioned yet is that there are some nifty tools that support automatically inserting values in to test theories.  The tools automate searching the theory space for members that fit the theory assumptions but cause the theory to fail.  Something like this might be useful in detecting an off-by-one error or corner case that you hadn&#8217;t considered while implementing.  Typically for development you would just run the test cases presented with the method, and then would search the theory parameter space with spare cycles.  This enables you to have great power as well as having blazing unit tests, which is key for any test-driven development.</p>
<p>If we allow automated searching of the theory space, there is one small problem with the example theory listed above.  Can you see it?</p>
<p>The assert attempts to multiply by the multiplier and then divide by the multiplier, so a zero value for the multiplier will cause a divide by zero error.  When we use automated tools for searching the theory space, we want to say that this theory only holds when the multiplier is not zero.  We can easily do this:</p>
<pre>
    @Theory public void multiplyIsInverseOfDivide(
            @TestedOn(ints={0, 5, 10}) int amount,
            @TestedOn(ints={1, 2, 3})  int multiplier) {
        <b>assumeThat(multiplier, not(0));</b>
        assertThat(new Currency(amount).times(multiplier).divideBy(multiplier).getAmount(), is(amount));
    }
</pre>
<p>Similar expressions exist for ensuring the value is positive, and so forth.  You might create a different test or theory to show the expected behavior when the multiplier is zero.</p>
<p>I really liked the use of <a href="http://www.developer.com/java/other/article.php/3556176">Java annotations</a> to make this code considerably more readable.  You would probably need a runner of some sort to specify the values if you didn&#8217;t do it right there in the method signature.</p>
<p>It seems like there is some overlap between theories and contracts, but I won&#8217;t go into that at this time.  Theories exert positive design pressures like tests do, in that they tend to lead to leaner code that just does what the theory asks for.</p>
<h4>Extensions</h4>
<p>In Ruby on Rails, it would be nice to be able to easily test methods with multiple models that you have defined.  For example, you might have a theory:</p>
<pre>
  fixtures :users

  def test_admin_user_can_access_this_page
    login(users(:admin_user_1))
    get :this_page
    assert_response :success
  end

  # the previous test, but better
  def theory_that_admin_users_can_access_this_page(User user)
    assume(user.is_a? AdminUser)
    login(user)
    get :this_page
    assert_response :success
  end
</pre>
<p>So, instead of using just one user or manually going through a set of users, you could just specify a whole bunch of fixtures and go to town.  This might make fixtures less brittle by pointing out subtle interactions between parameters that would cause the theory to fail.  I&#8217;m not sure how the syntax would look, and I&#8217;m not sure how you could use something better than annotations in Ruby.</p>
<p>Another thing that might be nice would be to say:  I have a theory that any strings we put to the page from the database will always be escaped.  The automated theory explorer could step through the pages that you define and try once with some basic data and then start generating HTML and JavaScript garbage and ensure that nothing gets through to the users.  This might be a nice way of preventing cross-site scripting attacks (although I would imagine that there are tools that already exist for just this purpose.)</p>
<p>I looked, but could not find a Ruby plugin to handle theories.  Hmmm&#8230;  <img src='http://22ideastreet.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h4>Further reading</h4>
<p>Some excellent resources are:<br />
<a href="http://popper.tigris.org/tutorial.html">The Popper tutorial</a><br />
<a href="http://shareandenjoy.saff.net/2006/12/new-paper-practice-of-theories.html">A great paper with examples of use and benefits</a> (see the pdf on that page)<br />
<a href="http://groups.csail.mit.edu/pag/pubs/test-theory-demo-oopsla2007.pdf">General overview of Theories in JUnit [pdf]</a></p>
<p><br/><br/>Original article:  <a href="http://22ideastreet.com/blog/2008/10/20/introduction-to-theories/">Introduction to Theories</a></p>
]]></content:encoded>
			<wfw:commentRss>http://22ideastreet.com/blog/2008/10/20/introduction-to-theories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

