<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US">
  <title>Docendo discitur - Home</title>
  <id>tag:jwhitmire.com,2007:mephisto/</id>
  <generator version="0.7.3" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  
  <link href="http://jwhitmire.com/" rel="alternate" type="text/html" />
  <updated>2007-11-16T16:01:22Z</updated>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/DocendoDiscitur" /><feedburner:info uri="docendodiscitur" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>DocendoDiscitur</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry xml:base="http://jwhitmire.com/">
    <author>
      <name>Jeff</name>
    </author>
    <id>tag:jwhitmire.com,2007-11-16:6</id>
    <published>2007-11-16T15:49:00Z</published>
    <updated>2007-11-16T16:01:22Z</updated>
    <category term="Grockit" />
    <link href="http://feedproxy.google.com/~r/DocendoDiscitur/~3/G_wwVd_icMQ/what-is-grockit" rel="alternate" type="text/html" />
    <title>What is Grockit?</title>
<summary type="html">&lt;p&gt;What is a Grockit, and why was it there?
And why was it lifted and taken somewhere…&lt;/p&gt;


	&lt;p&gt;Sorry, I digress (and yes I read Dr. Seuss’ Lorax way too many times).  I thought it would be cool in the early days of this blog to talk about what I was doing now.  Read on to find out more.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;What is a Grockit, and why was it there?
And why was it lifted and taken somewhere…&lt;/p&gt;


	&lt;p&gt;Sorry, I digress (and yes I read Dr. Seuss’ Lorax way too many times).  I thought it would be cool in the early days of this blog to talk about what I was doing now.  Read on to find out more.&lt;/p&gt;
&lt;p&gt;I love what I do as a developer.  As I’ve grown in my profession, I’ve come to realize that writing good code for the sake of writing good code is not enough for me any more.  I have been on too many never-ending projects that outside of the narrow scope of the company had a pretty low &lt;span class="caps"&gt;POGG&lt;/span&gt; score (POGG = my new metric for determining the worthiness of any endeavor:  Purpose of Greater Good).  There is nothing wrong or inherently evil about those projects, I am just at a point where I want my work to count for something better if I have that as an option.&lt;/p&gt;


	&lt;p&gt;So with that as a backdrop, I’d like to brag a bit about my current job.  Anybody that knows me, and especially those who have been to my house an been pwned by my 5 year old at a game of Jenga knows I’ve always been passionate about gaming, especially good ones that make you think in different ways.  I’ve had very animated conversations with many people about the educational power of games and how that’s been so underutilized in mainstream education.  As a homeschooling family with five incredible children (and an amazing wife who shoulders the bulk of that immense burden) education itself is also something I take very seriously.&lt;/p&gt;


	&lt;p&gt;Back in the summer, my contract at &lt;a href="http://revolutionhealth.com"&gt;Revolution Health&lt;/a&gt; was quickly coming to an end and I was concerned with what I would find to do next, the prospects were not that encouraging.  Like a cloudburst on a dry parched day, along comes &lt;a href="http://grockit.com"&gt;Grockit&lt;/a&gt;.  I answered a post on the &lt;a href="http://jobs.rubynow.com"&gt;ruby jobs list&lt;/a&gt; with some fear and trepidation because the opportunity sounded too perfect.  Some while later, on a Tuesday morning I had a phone conversation with Michael Buffington (technical co-founder).  Later that day I had a call with Farbood Nivi (CEO and education ninja).  It was a perfect match and by Wednesday evening I had an offer in hand and a place to go.  (There are some other interesting parts to this story involving haiku, but that can wait)&lt;/p&gt;


	&lt;p&gt;So that’s my part of the story, but what’s Grockit all about?  For the bulk of that answer you’ll have to be patient.  We are working very intensely on a platform that will be released at some later date.  I can tell you it’s a game platform about education, and it’s all about helping people teach each other.  The premise is that you learn better when trying to help others learn as well (not coincidentally, kind of like the title of this blog :) ).  I could tell you more, but then I’d have to kill you so let’s just keep things simple for everybody and I’ll keep quiet.  It would be better for you to get the vision from the our “Chief Teachnology Officer” himself (no that’s not a misspelling).  He recently did an interview with Brian Norgard that’s worth a look.  It shows his passion and drive to pull this off.  &lt;a href="http://www.briannorgard.com/?p=69"&gt;Check it out&lt;/a&gt; and stay tuned.  I’ll post updates as the important dates are nailed down.&lt;/p&gt;
          </content>  <feedburner:origLink>http://jwhitmire.com/2007/11/16/what-is-grockit</feedburner:origLink></entry>
  <entry xml:base="http://jwhitmire.com/">
    <author>
      <name>Jeff</name>
    </author>
    <id>tag:jwhitmire.com,2007-11-16:5</id>
    <published>2007-11-16T04:02:00Z</published>
    <updated>2007-11-16T17:33:39Z</updated>
    <category term="RSpec" />
    <link href="http://feedproxy.google.com/~r/DocendoDiscitur/~3/MjgvaN1KHFc/rspec-pending-goodness" rel="alternate" type="text/html" />
    <title>RSpec pending goodness</title>
<summary type="html">&lt;p&gt;I’ve always liked the way RSpec succinctly clarifies the intentions of your tests in such a non-computer fashion so testing in fact turn into requirements gathering exercises.  At Rubyconf last week David Chelimsky showed off some new syntax sugar that I absolutely loved.  For all I know it could have been in RSpec from the start, but it was new to me and it’s now a regular part of my repertoire.  It’s the pending block syntax.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;I’ve always liked the way RSpec succinctly clarifies the intentions of your tests in such a non-computer fashion so testing in fact turn into requirements gathering exercises.  At Rubyconf last week David Chelimsky showed off some new syntax sugar that I absolutely loved.  For all I know it could have been in RSpec from the start, but it was new to me and it’s now a regular part of my repertoire.  It’s the pending block syntax.&lt;/p&gt;
&lt;p&gt;I’ve always liked the way RSpec succinctly clarifies the intentions of your tests in such a non-computer fashion so testing in fact turn into requirements gathering exercises.  At Rubyconf last week David Chelimsky showed off some new syntax sugar that I absolutely loved.  For all I know it could have been in RSpec from the start, but it was new to me and it’s now a regular part of my repertoire.  It’s the pending block syntax.&lt;/p&gt;


	&lt;p&gt;The ability to mark tests as pending has always been a strength of RSpec over any other testing framework I’ve ever used.  It’s easy enough to rename a test method so it doesn’t execute, but before RSpec I’ve never worked with one where you can mark it as pending and it then reminds you that you still have work to come back too.  Too often renamed tests get forgotten.  Here are the many ways to mark tests as pending.&lt;/p&gt;


&lt;pre&gt;&lt;code class="ruby"&gt;describe &amp;quot;Test some object with pending tests&amp;quot; do
  it &amp;quot;should make sure 2 + 2 = 4&amp;quot; do
    4.should == (2 + 2)
  end

  it &amp;quot;should make sure the second derivative of something calcs fine&amp;quot;

end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;That will run with one green test, and one yellow test marked ‘PENDING: Not Yet Implemented’.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://jwhitmire.com/assets/2007/11/16/Picture_1.png" width="550" /&gt;&lt;/p&gt;


	&lt;p&gt;(That’s the output you get from Textmate’s most excellent spec runner).  Another way to do the same thing, but add some context is as follows:&lt;/p&gt;


&lt;pre&gt;&lt;code class="ruby"&gt;describe &amp;quot;Test some object with pending tests&amp;quot; do
  it &amp;quot;should make sure 2 + 2 = 4&amp;quot; do
    4.should == (2 + 2)
  end

  it &amp;quot;should make sure the second derivative of something calcs fine&amp;quot; do
    pending &amp;quot;This test can't be implemented until derivatives make sense to me&amp;quot;
  end

end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;It still marks the spec as pending, but instead of ‘Not Yet Implemented’, it gives the text you specified (in this case: ‘This test can’t be implemented until derivatives make sense to me’ &lt;del&gt;-&lt;/del&gt; seemed like a good reason to me).&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://jwhitmire.com/assets/2007/11/16/Picture_2.png" width="550" /&gt;&lt;/p&gt;


	&lt;p&gt;Both of these forms are very useful for marking entire specs as pending.  I tend to use the first form when I’m first trying to capture all the specs I need to write to implement a piece of functionality.  Then I come back and implement each spec, then get it passing, but I’ve already captured what I think would be the entire scope of functionality necessary in the pending specs.  I’ve seen people use the second form (the &lt;em&gt;pending&lt;/em&gt; keyword) a lot to skip a spec that is suddenly failing.  There is a better way.  Instead of marking the whole spec as pending, add a block to the pending keyword and use it to wrap the part of the spec that is misbehaving.  You get a double benefit.  Take the following test for instance:&lt;/p&gt;


&lt;pre&gt;&lt;code class="ruby"&gt;describe &amp;quot;Test some object with pending tests&amp;quot; do
  it &amp;quot;should make sure 2 + 2 = 4&amp;quot; do
    4.should == (2 + 2)
  end

  it &amp;quot;should follow the rules of basic arithmetic&amp;quot; do
    4.should be &amp;lt; 5
    9.should_not == 76
    3.should == (1 + 1)
  end

end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;It fails as follows:&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://jwhitmire.com/assets/2007/11/16/Picture_6.png" width="550" /&gt;&lt;/p&gt;


	&lt;p&gt;Ignoring the trivial nature of the spec, if the failing test is part of a library or in some code which you are dependent on somebody else to fix it.  Take the failing spec, wrap it in a pending block with an appropriate comment like so:&lt;/p&gt;


&lt;pre&gt;&lt;code class="ruby"&gt;describe &amp;quot;Test some object with pending tests&amp;quot; do
  it &amp;quot;should make sure 2 + 2 = 4&amp;quot; do
    4.should == (2 + 2)
  end

  it &amp;quot;should follow the rules of basic arithmetic&amp;quot; do
    4.should be &amp;lt; 5
    9.should_not == 76

    pending &amp;quot;need to alter the rules of the universe to make this happen&amp;quot; do
      3.should == (1 + 1)
    end
  end

end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;This produces:&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://jwhitmire.com/assets/2007/11/16/Picture_3.png" width="550" /&gt;&lt;/p&gt;


	&lt;p&gt;Now, not only does the spec pass, you get a huge benefit.  While it appears that the entire test is skipped as pending, it’s not.  The specs outside the pending block are still evaluated and the spec will fail if any of their assumptions are broken.  Another unexpected benefit is that the code inside the pending block is actually run with each spec execution.  As soon as it passes, you’ll get an error notification saying that though you expected this spec to fail but it didn’t (in this case I modified the code to work, but you get the idea).&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://jwhitmire.com/assets/2007/11/16/Picture_4.png" width="550" /&gt;&lt;/p&gt;


	&lt;p&gt;Consider it a friendly reminder to come back and clean up your pending specs as soon as they no longer need to be pending.  That way you can stay lean and mean and keep those specs green.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://jwhitmire.com/assets/2007/11/16/Picture_5.png" width="550" /&gt;&lt;/p&gt;


	&lt;p&gt;If this is the first time you’ve seen RSpec in action, you don’t know what you’re missing.  If you like to read up on cool stuff, head on over to the &lt;a href="http://rspec.rubyforge.org"&gt;RSpec Homepage&lt;/a&gt;.  If you’d rather sit back and let some smart person explain it to you and show you how to get it all set up, I’d say &lt;a href="http://peepcode.com/products/rspec-basics"&gt;this would be a better bet.&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Enjoy!&lt;/p&gt;
          </content>  <feedburner:origLink>http://jwhitmire.com/2007/11/16/rspec-pending-goodness</feedburner:origLink></entry>
  <entry xml:base="http://jwhitmire.com/">
    <author>
      <name>Jeff</name>
    </author>
    <id>tag:jwhitmire.com,2007-11-15:1</id>
    <published>2007-11-15T06:09:00Z</published>
    <updated>2007-11-16T17:30:23Z</updated>
    <link href="http://feedproxy.google.com/~r/DocendoDiscitur/~3/np4LjJbxUjE/doscendo-discitur" rel="alternate" type="text/html" />
    <title>Doscendo discitur</title>
<content type="html">
            &lt;h6&gt;It is learned by teaching—Seneca&lt;/h6&gt;

	&lt;p&gt;So why another blog?  Because I have much to learn, I must teach.  I have other blogs elsewhere, this one is solely for technical goodness that I need to expound on so I learn it better.  My current &lt;a href="http://grockit.com"&gt;employer&lt;/a&gt; is obsessed with this idea, and I couldn’t agree more.&lt;/p&gt;


	&lt;p&gt;As I come across things I want to investigate, share, or generally discuss, I’ll post them here.  No promises of frequency or quality, so read at your own risk and enjoy.&lt;/p&gt;
          </content>  <feedburner:origLink>http://jwhitmire.com/2007/11/15/doscendo-discitur</feedburner:origLink></entry>
</feed>

