<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>the Wagaman Web &#187; programming</title>
	<atom:link href="http://wagaman.org/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://wagaman.org</link>
	<description>thoughts, theories, theology, and the rest</description>
	<lastBuildDate>Thu, 05 Apr 2012 02:26:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Becoming the Man</title>
		<link>http://wagaman.org/2010/becoming-the-man/</link>
		<comments>http://wagaman.org/2010/becoming-the-man/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 03:36:53 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[management]]></category>
		<category><![CDATA[philosophy]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://wagaman.org/?p=355</guid>
		<description><![CDATA[A month ago, I was promoted to the Manager of my group. When I agreed to take the position, I knew it wouldn&#8217;t be all lollipops and ice-sculptures. There are a lot people that have needs. There are a lot of things to think about, and there are a lot of things to do. Ergo, [...]]]></description>
			<content:encoded><![CDATA[<p>A month ago, I was promoted to the Manager of my group.  When I agreed to take the position, I knew it wouldn&#8217;t be all lollipops and ice-sculptures.  There are a lot people that have needs.  There are a lot of things to think about, and there are a lot of things to do.  Ergo, it is important to know what things to do at any given moment.  There is little leeway for incompetence when you have demands coming from all directions.</p>
<p><strong>My Strategy</strong></p>
<p>1. <strong>Maintain and Rebalance Priorities.</strong><br />
  Keep a short list (no more than 3 or 4 items) of my big priorities.  These are the things that must be focused on.  I keep them ordered so that I know what takes precedence.  I rebalance this weekly so that I am adjusting to the current needs.</p>
<p>2. <strong>Make Progress.</strong><br />
Identify the most important gaps to fill and start there.  I realize that I can&#8217;t finish everything I want to right now, but I can make progress as long as I break down each item into small enough tasks so that they will get done.</p>
<p>3. <strong>Communicate clearly.</strong><br />
  One of the first things I did was to write up a position focus document for everyone on my team.  It is important that everyone knows what is expected of them.  How else can you know if you are successful?</p>
<p>4. <strong>Write things down.</strong><br />
I was doing this before, but I am trying to focus on recording my thoughts, discussions, and actions, so that they are available to review.</p>
<p>I have yet to come up with a plan to maintain the backlog of my position, but as long as I know what to do to make progress, it&#8217;s just a matter of time before I have things under control.</p>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2010/becoming-the-man/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Core of the Core: Reflection Talk</title>
		<link>http://wagaman.org/2010/core-of-the-core-reflection-talk/</link>
		<comments>http://wagaman.org/2010/core-of-the-core-reflection-talk/#comments</comments>
		<pubDate>Mon, 17 May 2010 23:34:02 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://wagaman.org/?p=312</guid>
		<description><![CDATA[Tonight at the Columbus Ruby Brigade meeting, I gave part two of my &#8220;Core of the Core&#8221; speaking series. Part two was on Reflection in Ruby. Core of the Core: Reflection Presentation]]></description>
			<content:encoded><![CDATA[<p><a href="http://wagaman.org/wp-content/uploads/2010/05/ruby-reflection.jpg"><img src="http://wagaman.org/wp-content/uploads/2010/05/ruby-reflection.jpg" alt="ruby reflection" title="ruby reflection" width="135" height="150" class="alignright size-full wp-image-315" /></a>Tonight at the <a href="http://www.columbusrb.com/">Columbus Ruby Brigade</a> meeting, I gave part two of my &#8220;Core of the Core&#8221; speaking series.</p>
<p>Part two was on <strong>Reflection</strong> in Ruby.</p>
<p><a href='http://wagaman.org/wp-content/uploads/2010/05/Reflection.pdf'>Core of the Core: Reflection Presentation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2010/core-of-the-core-reflection-talk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Core of the Core: Class Class</title>
		<link>http://wagaman.org/2010/core-of-the-core-class-class/</link>
		<comments>http://wagaman.org/2010/core-of-the-core-class-class/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 23:36:32 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://wagaman.org/?p=307</guid>
		<description><![CDATA[Here is the presentation from my Class Class Talk at the Columbus Ruby Brigade tonight.]]></description>
			<content:encoded><![CDATA[<p><a href='http://wagaman.org/wp-content/uploads/2010/04/Class_Class.pdf'>Here is the presentation from my Class Class Talk</a> at the <a href="http://www.columbusrb.com/">Columbus Ruby Brigade</a> tonight.</p>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2010/core-of-the-core-class-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My CodeMash 2.0.1.0</title>
		<link>http://wagaman.org/2010/my-codemash/</link>
		<comments>http://wagaman.org/2010/my-codemash/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 19:37:25 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://wagaman.org/?p=294</guid>
		<description><![CDATA[I thought it would be good to write down a few of my thoughts from CodeMash before I forget about it. There&#8217;s certainly more that impacted me, but something is better than nothing. Pre-Compiler: Test Driven Development: From Concept to Deployment by Leon Gersing Leon did a great job of somehow getting 50 people in [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://wagaman.org/wp-content/uploads/2010/01/January.png" alt="CodeMash" title="CodeMash" width="200" height="200" class="alignright size-full wp-image-297" /></p>
<p>I thought it would be good to write down a few of my thoughts from <a href="http://codemash.org">CodeMash</a> before I forget about it.  There&#8217;s certainly more that impacted me, but something is better than nothing.</p>
<p><strong>Pre-Compiler: Test Driven Development: From Concept to Deployment by Leon Gersing</strong></p>
<p>Leon did a great job of somehow getting 50 people in the room to contribute to the same project.  I was also amazed that the same number of people were able to share &#8220;what they did yesterday, what they are going to do today, and any blockers&#8221; in under 15 minutes.  It was actually closer to 8 minutes on a few of the stand-ups.</p>
<p>I came away with some more GIT experience and a better idea of how to run an agile team. I liked the idea of starting from story cards and decomposing them into tasks and then allowing them to be spread out amongst the crowd.  The one thing that was a little haphazard was the coordination of connected tasks.</p>
<p><strong>The Not-GIT Talk by Jim Weirich</strong></p>
<p>Jim is definitely one of my A-List speakers.  He always prepares so well, knows his stuff, but also knows how to communicate it so dummies like me can understand it.  I loved the way that he built up a so-called source control system from scratch (conceptually), solving problems along the way.  This is top-of-the-line material.  Oh, and you can see his presentation at the Pragmatic Programmer&#8217;s store in a <a href="http://pragprog.com/screencasts/v-jwsceasy/source-control-made-easy">screencast</a> format.</p>
<p><strong><a href="http://www.slideshare.net/bscofield/nosql-codemash-2010">NoSQL: Death to Relational Databases</a> by Ben Scofield</strong></p>
<p>There are a lot of non-relational databases.  Need to explore them on my own to discover pros and cons of when they are beneficial and non-beneficial.</p>
<p>Ben encouraged us to start with a non-relational database from the beginning of a project to see how you would do things differently.  He also mentioned the idea of polyglot persistence, that is having many different storage means for different purposes.  This could be an interesting idea to explore as well</p>
<p><strong><a href="http://www.poppendieck.com/pdfs/Five%20Habits.pdf">The Five Habits of Successful Lean Development</a> by Mary Poppendieck</strong></p>
<p>Purpose, Passion, Persistence, Pride, Profit</p>
<p>Mary gave a lot of examples of how these P&#8217;s play out.  Persistence stuck out to me the most.  She asked the question &#8220;What makes people really good at what they do?&#8221;  The answer she gave was deliberate practice, and expert performance over a long period of time (10 years or 10,000 hours).  This corroborates what Malcolm Gladwell talks about in <a href="http://www.amazon.com/Outliers-Story-Success-Malcolm-Gladwell/dp/0316017922">Outliers</a>.</p>
<ol>
<li>Identify a specific skill that needs improvement</li>
<li>Devise (or learn from a teacher) a focused exercise designed to improve the skill</li>
<li>Practice repeatedly</li>
<li>Obtain immediate feedback immediately and adjust accordingly</li>
<li>Focus on pushing the limits and expect repeated failures</li>
<li>Practice regularly and intensely, perhaps three hours a day.</li>
</ol>
<p><strong>User Stories: Closing the Agile Loop  by Barry Hawkins</strong></p>
<p>You&#8217;ll never be as ignorant while building software about what is required for a project then when you negotiate the contract of what is in scope.</p>
<p>Treat a User Story as a placeholder for interaction, not a substitute for interaction.  Here&#8217;s how User Stories differ from a Use Case.</p>
<ul>
<li>Smaller in Scope</li>
<li>Not permanent artifacts</li>
<li>Too brief to stuff with UI requirements</li>
<li>Focus on functionality</li>
<li>Facilitate iteration planning</li>
<li>Analysis catalyst, not an analysis product</li>
</ul>
<p>A User Story follows a format such as </p>
<blockquote><p><strong>Description of what&#8217;s needed</strong></p>
<p>As a ________ User,          (who is doing the action)<br />
I want to ___________       (what do they want to do)<br />
so that ______________.    (to clarify the purpose and business value)</p>
<p><strong>Conditions of Success (Acceptance criteria)</strong></p>
<p>Scenario: _________<br />
Given _____________<br />
When I ____________<br />
Then _____________</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2010/my-codemash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SOLID design principles</title>
		<link>http://wagaman.org/2009/solid-design-principles/</link>
		<comments>http://wagaman.org/2009/solid-design-principles/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 13:01:52 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://wagaman.org/?p=290</guid>
		<description><![CDATA[I&#8217;m electronifying my notes from conferences and such. Here&#8217;s my notes from Jim Weirich&#8217;s SOLID design principles in Ruby talk from eRubyCon 2009. 1.) Single Responsibility Principle a class should have 1 reason to exist describe the purpose of your class in a single sentence (you shouldn&#8217;t need and/or) 2.) Open/Closed Principle you should be [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m electronifying my notes from conferences and such.  Here&#8217;s my notes from Jim Weirich&#8217;s SOLID design principles in Ruby talk from eRubyCon 2009.</p>
<p>1.) Single Responsibility Principle<br />
a class should have 1 reason to exist<br />
describe the purpose of your class in a single sentence (you shouldn&#8217;t need and/or)</p>
<p>2.) Open/Closed Principle<br />
you should be able to extend a class&#8217; behavior without modifying it</p>
<p>3.) Liskov Substitution Priniciple<br />
require no more, promise no less</p>
<p>4.) Interface Segregation Principle</p>
<p>5.) Dependency Inversion Principle<br />
depend on abstractions, not concrete-tions</p>
<p>** Note that my notes are a little bit shotty, because the days prior to the conference I was totally totally strapped at work and thus rest-deprived.</p>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2009/solid-design-principles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing my patience. A skeptic&#8217;s thoughts on beginning to write tests</title>
		<link>http://wagaman.org/2009/testing-my-patience-a-skeptics-thoughts-on-beginning-to-write-tests/</link>
		<comments>http://wagaman.org/2009/testing-my-patience-a-skeptics-thoughts-on-beginning-to-write-tests/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 03:43:43 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://wagaman.org/?p=220</guid>
		<description><![CDATA[It&#8217;s been a long time since I posted anything in my blog, so I thought I ought to break the silence. Lately, I&#8217;ve been trying to get myself caught up on the test-driven/behavior-driven development philosophy. If you are a programmer, maybe you can relate to my struggles of learning how to get it right. Test-Driven [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time since I posted anything in my blog, so I thought I ought to break the silence.  Lately, I&#8217;ve been trying to get myself caught up on the test-driven/behavior-driven development philosophy.  If you are a programmer, maybe you can relate to my struggles of learning how to get it right.</p>
<p>Test-Driven Development is a programming philosophy that encourages the developer to specify test test conditions before writing the code to meet the specification. To me, this is counter-intuitive. I guess I am naturally a brute and think the best way to figure something out is to play with it, and than after a while it should just work.</p>
<p>Ironically, the chapter on Testing in the Agile Web Development with Rails book comes well after the first attempts at hammering out Rails code for a shopping cart application.  I understand why the book is written the way that it is, and am greatly appreciative of the book, but there ought to be a Test-Driven version of the same tutorial, so that people can see first-hand how to test-first in development.</p>
<p>It also hasn&#8217;t helped that my first attempt at writing tests have been less than perfect too.  I&#8217;ll end up writing 6 or 7 lines of test code to test one case for a method. The verboseness of tests has negatively reinforced me in to thinking that testing is hard. </p>
<p>What&#8217;s more frustrating is that I&#8217;ve heard expert developers talk about only having a line or two of test code to test a method.  This has seemed to me to be an unatainable ideal.  How are you supposed to test code that is ten lines long (or more) with one or two lines of test code? That&#8217;s unpossible.</p>
<p>But, recently I came to the realization that if the methods I am writing are smaller and do more specific things, then they are a whole lot easier to test.  This is mostly because the tests can move towards the ideal of the expert: short, meaningful, specifications.  This in turn helps me to actually write the test first, because I know I can specify the behavior of code that is less complex.</p>
<p>Some of the recent developments in <a href="http://rspec.info">RSpec</a> have helped this ideal even further. For instance, see <a href="http://blog.davidchelimsky.net/2009/1/13/rspec-1-1-12-is-released">David Chelimsky&#8217;s post on RSpec 1.1.12</a> He notes that what you could have done </p>
<p>In order to test this:</p>
<pre><code>class Person
  validates_presence_of :email
end
</code></pre>
<p>You would have in previous versions of RSpec written:</p>
<pre><code>describe Person do
  it "should validate presence of email" do
    person = Person.new(:email => nil)
    person.should_not be_valid
    person.should have(1).error_on(:email)
  end
end
</code></pre>
<p>In RSpec 1.1.12, you can reduce this down to the following:</p>
<pre><code>describe Person do
  it { should validate_presence_of(:email) }
end
</code></pre>
<p>This is due to:</p>
<ul>
<li>an implicit receiver from the describe block Person.new</li>
<li>custom matchers for validate_presence_of (which are available through plugins like rspec-on-rails-matchers or you can make your own matchers</li>
<li>self commenting specification code</li>
</ul>
<p>Three lines of code.  Three lines of test.  That&#8217;s pretty darn cool.  Perhaps, it&#8217;s not possible to have a line by line spec for everything, but this is a lot better than before.</p>
<p>I&#8217;ve still got a fair bit of inertia to overcome before I&#8217;ve got TDD under my belt. The more I  tell myself that test-driven development is less about testing than it is about developing well-written code, the more motivated I am to do it.  I hope this is an encouragement to unit testing newbies.</p>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2009/testing-my-patience-a-skeptics-thoughts-on-beginning-to-write-tests/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MyRubyClass.reload!</title>
		<link>http://wagaman.org/2008/myrubyclassreload/</link>
		<comments>http://wagaman.org/2008/myrubyclassreload/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 20:46:18 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://wagaman.org/?p=213</guid>
		<description><![CDATA[Today I was writing some specs with RSpec, the Ruby BDD Testing Framework. In between tests, classes aren&#8217;t reloaded by default, so I went about try to figure out how to reload a class for certain tests. Active Support defines a method on Class called remove_class. This provides half of the equation. The other half [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was writing some specs with <a href="http://rspec.info/">RSpec</a>, the Ruby BDD Testing Framework.  In between tests, classes aren&#8217;t reloaded by default, so I went about try to figure out how to reload a class for certain tests.</p>
<p>Active Support defines a method on Class called <a href="http://www.noobkit.com/show/ruby/rails/rails-stable/activesupport/class/remove_class.html">remove_class</a>. This provides half of the equation.  The other half was to reload the class again.  So, I wrote a method on the Object class that should handle most cases.  Note, this may not work with namespaced classes, but it did the quick and dirty job of helping my specs to reload the class.</p>
<pre><code># Call this method like
# MyRubyClass.reload!
# or
# MyRubyClass.reload!('/path/to/file/my_ruby_class.rb')
class Object
  def reload!(file = nil)
    remove_class(self)
    load(file || "#{self.to_s.underscore}.rb")
  end
end
</code></pre>
<p>All I needed to do was then call this method when I needed to reload the class.</p>
<p><code>MyRubyClass.reload!</code></p>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2008/myrubyclassreload/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Upgrading to Rails 2.0</title>
		<link>http://wagaman.org/2007/upgrading-to-rails-20/</link>
		<comments>http://wagaman.org/2007/upgrading-to-rails-20/#comments</comments>
		<pubDate>Sat, 15 Dec 2007 17:45:51 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[how to]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://wagaman.org/2007/upgrading-to-rails-20/</guid>
		<description><![CDATA[With Rails 2.0 out now, it&#8217;s time to explore the new source. It&#8217;s hard to believe that it&#8217;s already been 2 years since I first checked out Rails 1.0 for the first time. To update your Rails code, you can run gem update rails However, when I tried to run this command I was unfortunately [...]]]></description>
			<content:encoded><![CDATA[<p>With Rails 2.0 out now, it&#8217;s time to explore the new source.  It&#8217;s hard to believe that it&#8217;s already been 2 years since I first checked out Rails 1.0 for the first time.</p>
<p>To update your Rails code, you can run<br />
<code>gem update rails</code></p>
<p>However, when I tried to run this command I was unfortunately greeted with a nasty error, when getting to update ActiveRecord.</p>
<p><code>Attempting remote update of activerecord<br />
ERROR:  While executing gem ... (Zlib::BufError)<br />
    buffer error</code></p>
<p>According to a <a href="http://www.ruby-forum.com/topic/134400">Ruby Form post</a>, I found a solution to the problem, updating ruby gems.</p>
<p>While you could run this line to update RubyGems to 0.9.5, I don&#8217;t recommend it.<br />
<code>gem update --system</code></p>
<p>Instead download <a href="http://rubyforge.org/frs/download.php/20990/rubygems-0.9.4.zip">rubygems-0.9.4</a>, unzip it and then run<br />
<code>ruby setup.rb</code></p>
<p>This will allow you to continue to use Mongrel, because there are some incompatibilities with Mongrel running on Win32 with RubyGems 0.9.5. See the following:</p>
<ul>
<li><a href="http://justaddwater.dk/2007/12/09/rails-20-gem-install-windows-mongrel-trouble/">justaddwater.dk blog</a></li>
<li><a href="http://www.ruby-forum.com/topic/133033">Ruby Forum Topic: Mongrel install crash on win32</a></li>
</ul>
<p>and then update rails as you would expect.<br />
<code>gem update rails</code></p>
<p>Voila!</p>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2007/upgrading-to-rails-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

