<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>bencoffman.com/blog</title>
  <link rel="alternate" type="text/html" href="http://bencoffman.com/blog/" />
  <link rel="self" href="http://bencoffman.com/blog/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2010-03-10T13:26:12.0703421-07:00</updated>
  <author>
    <name>Ben Coffman</name>
  </author>
  <subtitle>Tech and a few other things</subtitle>
  <id>http://bencoffman.com/blog/</id>
  <generator uri="http://dasblog.info/" version="2.1.8102.813">DasBlog</generator>
  <entry>
    <title>Naked : David Sedaris</title>
    <link rel="alternate" type="text/html" href="http://bencoffman.com/blog/2010/03/10/NakedDavidSedaris.aspx" />
    <id>http://bencoffman.com/blog/PermaLink,guid,31f3d7d9-1709-45f8-ac68-ec97531e4230.aspx</id>
    <published>2010-03-10T10:38:00.971-07:00</published>
    <updated>2010-03-10T13:26:12.0703421-07:00</updated>
    <category term="readings" label="readings" scheme="http://bencoffman.com/blog/CategoryView,category,readings.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <br />
        <img id="jt1l" src="http://bencoffman.com/blog/content/binary/ScreenShot0011.jpg" style="float: left; height: 251.288px; margin-left: 0pt; margin-right: 1em; width: 160px;" />I
love David Sedaris (translation, my reviews are very biased). I've heard he is ridiculously
funny when he does readings, but I've never had the chance to see him.  In the
second book I read of his, <i>Naked</i>, he provides the reader with insights to his
childhood through teenage years as perceived by his funny, tainted, and feminine perspective.
What made the book a funny read was picturing a little, unknowingly gay 10 year old
thinking and saying what I was reading. 
<br /><br />
Here is a brief snip-it of David at home after a day at school where he watched the
drama teacher act as a mime:<br /><br /><div style="margin-left: 80px;"><i>"I went home and demonstrated the invisible wall
for my two-year-old brother, who pounded on the very real wall beside his playpen,
shrieking and wailing in disgust. When my mother asked what I'd done to provoke him,
I threw up my hands in mock innocence before lowering them to retrieve the imaginary
baby that lay fussing at my feet. I patted the back of my little ghost to induce gas
and was investigating its soiled diaper when I noticed my mother's face assume an
expression she reserved for unspeakable horror. I had seen this look only twice before:
once when she was caught in the path of a charging, rabid pig and then again when
I told her I wanted a peach-colored velveteen blazer with matching slacks." 
<br /></i></div><br /><div>The book itself is darker than what I have come to expect with Sedaris. I believe
in the book Naked, he is revealing more of the hardships he encountered in his life,
taking a more raw approach, hence the title <i>naked.</i> Surprisingly, some of the
chapters leaving you feeling sad. The title of the book is based off the last chapter
where D. Sedaris lives in a nudist colony for a few weeks. My interpretation of this
closing chapter is him comparing cloths to personalities. After not living in cloths
for weeks, he could look at fully clothed people and know what their body really looked
like, what they were trying to hide, and what image they were trying to convey. Realizing,
much like personalities clothing portrays a portrait that people want you to see,
when in reality the true you is something different.<br /></div><img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=31f3d7d9-1709-45f8-ac68-ec97531e4230" /></div>
    </content>
  </entry>
  <entry>
    <title>error: A valid signing identity matching this profile could not be found ...</title>
    <link rel="alternate" type="text/html" href="http://bencoffman.com/blog/2010/03/09/errorAValidSigningIdentityMatchingThisProfileCouldNotBeFound.aspx" />
    <id>http://bencoffman.com/blog/PermaLink,guid,17ed733b-68c1-4f27-9354-f99f48baaac0.aspx</id>
    <published>2010-03-09T08:37:21.974-07:00</published>
    <updated>2010-03-10T08:36:24.3794294-07:00</updated>
    <category term="App Store" label="App Store" scheme="http://bencoffman.com/blog/CategoryView,category,AppStore.aspx" />
    <category term="iPhone" label="iPhone" scheme="http://bencoffman.com/blog/CategoryView,category,iPhone.aspx" />
    <category term="xCode" label="xCode" scheme="http://bencoffman.com/blog/CategoryView,category,xCode.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <img src="http://bencoffman.com/blog/content/binary/ScreenShot001.jpg" border="0" />
        <br />
        <br />
        <b>Error Readout:</b>
        <br />
error: A valid signing identity matching this profile could not be found in 
your keychain<br /><b><br />
The Problem:</b><br />
In <i>Keychain Access</i> it reads the error above.<br /><b><br />
The Solution:</b><br />
This can be cause by several issues. The highest probability is, you didn't install
the certificate you created in the <i>distribution</i> or <i>development</i> page
of "certificates" in the iPhone Provisioning Portal.<br /><img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=17ed733b-68c1-4f27-9354-f99f48baaac0" /></div>
    </content>
  </entry>
  <entry>
    <title>Code Sign error: The identity 'iPhone Distribution' doesn't match any valid ...</title>
    <link rel="alternate" type="text/html" href="http://bencoffman.com/blog/2010/03/09/CodeSignErrorTheIdentityIPhoneDistributionDoesntMatchAnyValid.aspx" />
    <id>http://bencoffman.com/blog/PermaLink,guid,deec0bbd-41e5-431e-a2b3-b20f52438596.aspx</id>
    <published>2010-03-09T08:14:18.08-07:00</published>
    <updated>2010-03-10T08:28:39.0981878-07:00</updated>
    <category term="App Store" label="App Store" scheme="http://bencoffman.com/blog/CategoryView,category,AppStore.aspx" />
    <category term="iPhone" label="iPhone" scheme="http://bencoffman.com/blog/CategoryView,category,iPhone.aspx" />
    <category term="xCode" label="xCode" scheme="http://bencoffman.com/blog/CategoryView,category,xCode.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <img src="http://bencoffman.com/blog/content/binary/ScreenShot001.jpg" border="0" />
        <b>
          <br />
          <br />
Error Readout:<br /></b>Code Sign error: The identity 'iPhone Distribution' doesn't match any valid certificate/private
key pair in the default keychain<b><br /><br />
The Problem:</b><br />
I try and build my application and I get the error above<br /><br /><b>The Solution:</b><br />
Many things can cause this error. The error is probably caused by one of the steps
being done incorrectly in the <i>Program User Guide</i>. Most won't like reading this,
but the best way to fix this is to go back and follow, very precisely, the steps in
"<a href="http://developer.apple.com/iphone/download.action?path=/iphone/iphone_developer_program_user_guides/iphone_developer_program_user_guide__standard_program_v2.6__final_3410.pdf" id="chlr" title="Program User Guide">Program
User Guide</a>." In case the link changes you can get to the pdf by going to <a href="http://developer.apple.com/iphone" id="woww" title="http://developer.apple.com/iphone">http://developer.apple.com/iphone</a>,
logging in, clicking "iPhone Provisioning Profile" and in the box on the left hand
side of the screen titled "Provisioning Resources," you can download the <i>Program
User Guide</i> pdf.<br /><br /><b>Explanation:</b><br />
Yes, we ALL wish this process could be more streamlined, and require less reading,
but it doesn't. If you want to get that app out there, suck it up, read the 60 pages
[lots of pictures :) ] and be done with it.<br /><img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=deec0bbd-41e5-431e-a2b3-b20f52438596" /></div>
    </content>
  </entry>
  <entry>
    <title>Making An iPhone Icon Is Easy</title>
    <link rel="alternate" type="text/html" href="http://bencoffman.com/blog/2010/02/28/MakingAnIPhoneIconIsEasy.aspx" />
    <id>http://bencoffman.com/blog/PermaLink,guid,d3e50de2-10b6-48b1-8c0e-ec09128a908f.aspx</id>
    <published>2010-02-27T20:41:41.6101376-07:00</published>
    <updated>2010-02-27T20:41:41.6101376-07:00</updated>
    <category term="iPhone" label="iPhone" scheme="http://bencoffman.com/blog/CategoryView,category,iPhone.aspx" />
    <category term="xCode" label="xCode" scheme="http://bencoffman.com/blog/CategoryView,category,xCode.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">Making an iPhone icon is way easier than
I had anticipated. You don't need to round the corners, you don't have to give it
the little glow as if the sun is shining down upon it. Simply make your icon in a
57x57 png and the iPhone SDK does the rest for you. Here is a <a href="http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html" id="z.b6" title="link">link</a> to
some good apple <a href="http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html" id="e4yi" title="documentation">documentation</a> on
making an iPhone Icon. See the icon I created below (1) and the icon that showed up
once I plugged the image into xcode (2).<br /><br /><br />
1.             2. 
<div id="p:4r" style="text-align: left;"><div><img id="yzae" src="http://bencoffman.com/blog/content/binary/Icon.png" style="float: left; height: 57px; margin-left: 0pt; margin-right: 1em; width: 57px;" /><img id="yx8h" src="http://bencoffman.com/blog/content/binary/Screen%20shot%202010-02-27%20at%209.24.10%20PM.png" style="float: left; height: 82px; margin-left: 0pt; margin-right: 1em; width: 69px;" /><br /></div>
      
<br /></div>
 <br /><br /><img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=d3e50de2-10b6-48b1-8c0e-ec09128a908f" /></div>
    </content>
  </entry>
  <entry>
    <title>Running with Scissors -- Augusten Burroughs</title>
    <link rel="alternate" type="text/html" href="http://bencoffman.com/blog/2010/02/06/RunningWithScissorsAugustenBurroughs.aspx" />
    <id>http://bencoffman.com/blog/PermaLink,guid,c7a1df0e-60b5-4ad5-bc34-1bcff0c8e9ab.aspx</id>
    <published>2010-02-06T13:24:05.877-07:00</published>
    <updated>2010-02-06T13:30:58.5814424-07:00</updated>
    <category term="readings" label="readings" scheme="http://bencoffman.com/blog/CategoryView,category,readings.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <img style="width: 160px; height: 251.285px; float: left; margin-left: 0pt; margin-right: 1em;" src="http://bencoffman.com/blog/content/binary/Screen%20shot%202010-02-06%20at%201.54.10%20PM.png" />Augusten
Burroughs, sounds familiar, oh yeah that's right, William Burroughs. Did Augusta choose
to use a nom de plume because his real name has a direct correlation to <a href="http://en.wikipedia.org/wiki/Winnie-the-Pooh"><i>Winnie-The-Pooh</i></a>?
Let me guess,  he choose Burroughs because he too is gay and wrote a shock novel
similar to <a href="http://www.amazon.com/Naked-Lunch-William-S-Burroughs/dp/0802132952"><i>Naked
Lunch</i></a> like Willy B.?<br /><br />
Augusten isn't quite as revolutionary for his time as William nor is his best friend
Jack Kerouac, but then again <a href="http://www.amazon.com/Running-Scissors-Memoir-Augusten-Burroughs/dp/0312425414/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1265487578&amp;sr=1-1"><i>Running
With Scissors</i></a> has a clear story line, a welcome difference from <i>Naked Lunch</i>. <i>Running
with Scissors</i> is a memoir of Augusten Burroughs (<a href="http://en.wikipedia.org/wiki/Augusten_Burroughs">Christopher
Robison</a>). It intimately describes his life growing up and how far it fell from
the norm. It is a fun read if you really enjoy setting the book down every 20 minutes,
looking up at the sky in retrospect at what you just read and saying "what the fuck!"
Would I recommend reading it -- maybe. I would classify it as the <a href="http://www.mtv.com/shows/jersey_shore/series.jhtml">Jersey
Shore</a> of novels; nothing revolutionary or mind bending, but you just can't turn
away from watching the characters with their skewed sense of reality and themselves.<br />
 <br /><img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=c7a1df0e-60b5-4ad5-bc34-1bcff0c8e9ab" /></div>
    </content>
  </entry>
  <entry>
    <title>Make Powershell run a batch script </title>
    <link rel="alternate" type="text/html" href="http://bencoffman.com/blog/2010/02/05/MakePowershellRunABatchScript.aspx" />
    <id>http://bencoffman.com/blog/PermaLink,guid,12a5c304-d05e-4e7b-adaa-14a0230a951c.aspx</id>
    <published>2010-02-05T14:47:22.263-07:00</published>
    <updated>2010-03-09T08:22:42.6760913-07:00</updated>
    <category term=".Net" label=".Net" scheme="http://bencoffman.com/blog/CategoryView,category,Net.aspx" />
    <category term="powershell" label="powershell" scheme="http://bencoffman.com/blog/CategoryView,category,powershell.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <img src="http://bencoffman.com/blog/content/binary/powershell1.jpg" style="float: left; margin-left: 0px; margin-right: 1em; width: 160px; height: 118px;" />
        <br />
        <br />
        <br />
        <br />
        <br />
        <div>
          <br />
        </div>
        <div>
          <br />
        </div>
        <div>
          <br />
        </div>
        <div>
          <br />
        </div>
        <div>
          <br />
        </div>
        <div>
          <b>The Problem:</b>
          <br />
Getting a Powershell script to run a batch script.<br /><br /><b>The Solution:</b><br />
powershell.exe -noexit d:\&lt;path to my batch script&gt;\Reporting_Code_Load.bat<br /><br /><b>Explanation:</b><br />
All you need to do is add the line above as is to your Powershell script. The "-noexit"
tells the command prompt to stay open, simply remove it if you don't want the command
prompt to open.<br /></div>
        <img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=12a5c304-d05e-4e7b-adaa-14a0230a951c" />
      </div>
    </content>
  </entry>
  <entry>
    <title>New Years Resolutions</title>
    <link rel="alternate" type="text/html" href="http://bencoffman.com/blog/2010/01/21/NewYearsResolutions.aspx" />
    <id>http://bencoffman.com/blog/PermaLink,guid,42221909-c1f9-4e99-81b7-5bdfa0f5bf6f.aspx</id>
    <published>2010-01-20T22:05:55.783-07:00</published>
    <updated>2010-01-25T12:26:42.4345212-07:00</updated>
    <category term="Me" label="Me" scheme="http://bencoffman.com/blog/CategoryView,category,Me.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <img src="http://bencoffman.com/blog/content/binary/checklist.jpg" style="width: 160px; height: 206.637px; float: left; margin-left: 0px; margin-right: 1em;" id="dgvr" />
        <br />
        <div>I'm told the best way to keep your New Years resolutions is to write them down.
What a better place than my personal blog to attempt to keep me on the strait and
narrow. Here is my list.<b><br /><br /></b><blockquote><blockquote><blockquote><blockquote><blockquote><b>1. Read 1 book
a month.</b><br />
Since I recently finished school I now have my time back to read what I like. I have
decided to start off reading fiction for some feel good wins during the first couple
months then move on to something that I may improve from. I'll do a quick post of
every book I read.<br /><br /><b>2. Get my PMP</b><br />
Apparently a Masters in Business Administration with a very strong focus in finance
from a reputable, though not tier 1, business school isn't a big deal anymore. Being
a slave to the corporate demands I'm diving into becoming a project manager professional
(PMP). It might be a little interesting I suppose. Though I'm betting the challenge
of organizing teams will be a tiny bit easier than calculating derivatives. <b><br /><br />
3. Finish my Second iPhone Application</b><br />
My first application is a fun little Online Banking hack for the company I work for.
The second one I would like to create is a wine cellar type application for the phone.
I know a few wine'os out there that have a huge "library", I believe this would be
useful and YES someone else has done this, but I think I can do it better. :)<br /><br /><b>4. Use Less Cliche Statements</b><br />
This could just be me, but I feel statements I use such as "The grass is green on
the other side," are because I am lacking the creativity to express how I truly feel
so I go with something easy to grab, because it's, what is said, and not necessarily
indicative of my true feelings.<br /></blockquote></blockquote></blockquote></blockquote></blockquote><div><div align="center"></div><ol></ol><ol></ol><p></p><br /></div></div>
        <img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=42221909-c1f9-4e99-81b7-5bdfa0f5bf6f" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Comparing Values with Objective C, Alpha Or Numeric</title>
    <link rel="alternate" type="text/html" href="http://bencoffman.com/blog/2010/01/02/ComparingValuesWithObjectiveCAlphaOrNumeric.aspx" />
    <id>http://bencoffman.com/blog/PermaLink,guid,431e0740-bc17-4b05-b9bb-157fa113fea8.aspx</id>
    <published>2010-01-01T18:51:02.653-07:00</published>
    <updated>2010-01-02T22:07:51.2619138-07:00</updated>
    <category term="Mac" label="Mac" scheme="http://bencoffman.com/blog/CategoryView,category,Mac.aspx" />
    <category term="Mac OS X" label="Mac OS X" scheme="http://bencoffman.com/blog/CategoryView,category,MacOSX.aspx" />
    <category term="Objective C" label="Objective C" scheme="http://bencoffman.com/blog/CategoryView,category,ObjectiveC.aspx" />
    <content type="html">&lt;img src="http://bencoffman.com/blog/content/binary/Screen%20shot%202009-09-17%20at%208.55.44%20PM.png"&gt;
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;The Problem:&lt;/b&gt;
&lt;br&gt;
Not being able to do a simple compare in an "if statement" between two alpha or numerical
statements while programing in objective C.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;The Solution:&lt;/b&gt;&lt;span style="color: Black; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;
&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html#//apple_ref/doc/c_ref/NSOrderedSame"&gt;NSOrderedSame&lt;/a&gt;&lt;/b&gt;
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Example Of Use:&lt;/b&gt;
&lt;br&gt;
This compares the value of "key" to the value of "support." If they are equal then
you get a return value of true.&lt;span style="color: Black; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;
&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;blockquote&gt;
&lt;div align="left"&gt;&lt;span style="color: Black; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;if&lt;/span&gt; ([key
compare:Support] == NSOrderedSame) &lt;/span&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;/blockquote&gt;&lt;b&gt;Explanation:&lt;/b&gt;
&lt;br&gt;
For some reason Objective-C decided to make it a little bit harder to compare values.
Instead of just using the traditional way "[key compare:Support]" return a true value
for the if statement OR "([key compare:Support] == 0) OR "([key compare:Support] ==
true)" they decided to make it a little bit more complex. As demonstrated above. I'm
sure the writers of Objective-C have a good reason for this, but one more level of
abstraction could make Objective-C that much friendlier to it's programmers and isn't
that what it's all about in the end...getting more people to develop in your language.&lt;br&gt;
&lt;br&gt;
&lt;i&gt;Some of other comparisons you might want to use are:&lt;br&gt;
&lt;/i&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html#//apple_ref/doc/c_ref/NSOrderedAscending"&gt;&lt;b&gt;NSOrderedAscending&lt;/b&gt;&lt;/a&gt; --
The left operand is smaller than the right operand. 
&lt;br&gt;&lt;" in most languages.&lt;br&gt;
This is equivalent to using "&lt;br&gt;
&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html#//apple_ref/doc/c_ref/NSOrderedDescending"&gt;&lt;b&gt;NSOrderedDescending&lt;/b&gt;&lt;/a&gt; --
The left operand is greater than the right operand.&lt;br&gt;
This is equivalent to using "&gt;" in most languages.&lt;img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=431e0740-bc17-4b05-b9bb-157fa113fea8" /&gt;</content>
  </entry>
  <entry>
    <title>NUnit, NUnit Mocks, NMock2, DotNetMock, and Selenium : Pragmatic Unit Testing In C# with NUnit</title>
    <link rel="alternate" type="text/html" href="http://bencoffman.com/blog/2009/11/11/NUnitNUnitMocksNMock2DotNetMockAndSeleniumPragmaticUnitTestingInCWithNUnit.aspx" />
    <id>http://bencoffman.com/blog/PermaLink,guid,495ff9e5-688e-4110-a9ff-3594a6a55edc.aspx</id>
    <published>2009-11-11T14:12:32.76-07:00</published>
    <updated>2009-11-13T13:56:34.6824109-07:00</updated>
    <category term=".Net" label=".Net" scheme="http://bencoffman.com/blog/CategoryView,category,Net.aspx" />
    <category term="readings" label="readings" scheme="http://bencoffman.com/blog/CategoryView,category,readings.aspx" />
    <category term="Unit Testing" label="Unit Testing" scheme="http://bencoffman.com/blog/CategoryView,category,UnitTesting.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <img src="http://bencoffman.com/blog/content/binary/PragmaticUnitTesting.jpg" style="width: 320px; height: 320px; float: left;" id="PragmaticUnitTesting" />If <a href="http://www.hanselman.com/blog/">Scott
Hanselman</a> lives and die's by unit tests, why don't we all just fall in line? It
seems the nerd community, has an uncanny ability to adopt silly things quickly. Things
like <a href="http://www.xkcd.com/">xkcd.com</a> or the idea of ninja's. I have yet
to laugh at one xkcd or understand how ninja's are relative in any shape or form,
because of this I felt I needed to read up on unit tests, specifically for C#, to
find out if it's just hype or this is something development shops with a strong QA
team really need to look at. 
<div><br /></div><div>I read two books that covered the topic of unit testing. The first book was <i><a href="http://www.openmymind.net/FoundationsOfProgramming.pdf">Foundations
of Programming</a></i> (recommended by Scottie H. himself and is free) and the second
is <i><a href="http://www.amazon.com/Pragmatic-Unit-Testing-NUnit-Programmers/dp/0974514020">Pragmatic
Unit Testing In C# with NUnit</a></i>. Both of them start off with the same old song
and dance on how you might have up front costs of introducing unit tests to your code,
but the stability these tests provide over the duration of your codes lifetime will
cause such dramatic cost savings for the company, it would be foolish not to explore
the idea. What a compelling sales pitch, a pitch salesmen, for just about any technology,
have used since the beginning of technology in businesses. I'll cut all the used car
salesman tactics out and state the most intriguing argument to unit test. It increases
code stability and it's easy.<br /></div><br /><div>The next question I asked myself: What do I exactly test in the code-base I am
working on? In <i>Pragmatic Unit Testing</i> (PUT) they give us an acronym to use
in order to answer this question. BICEP. 
<br /><br /></div><div><br />
BICEP, breaks down as such.
</div><div><br /></div><div><b>B</b>oundary Tests
</div><div><b>I</b>nversion Tests
</div><div><b>C</b>ross Check Tests
</div><div><b>E</b>rror Tests
</div><div><b>P</b>erformance Tests
</div><div><br /></div><div>These are the 5 major aspects one should test, according to PUT and it provides
unit testers with a place to start. The next major topic in discussing how to test
code is decoupling one piece of code to another. Does your code talk to a middleware?
How do you test if middleware is not done creating your service to consume or if middleware
is down? In steps <a href="http://www.nunit.org/index.php">NUnit Mocks</a>, <a href="http://www.nunit.org/index.php">NMock2</a>,
and <a href="http://www.nunit.org/index.php">DotNetMock</a>. These 3 mock frameworks
provide the developer with the ability to feed your tests predefined values, values
decided by you. Without going into how to use these mock frameworks, I believe that
outside of a few isolated situations they should not be used. The entire purpose of
testing your code is to test that you are getting information back that fits the criteria
you are looking for. If this information, that is beyond your control, changes on
whatever level for whatever reason, you as a developer need to know. Putting in mock
objects hides this.
</div><div><br /></div><div>Since I work for a web shop, the topic of web UI unit tests interested me. PUT
recommend using <a href="http://seleniumhq.org/">Selenium</a>. This makes sense because
it still uses the nunit style of testing keeping all your tests to one testing style.
Selenium seems a bit cumbersome in comparison to <a href="http://watin.sourceforge.net/">WaitN</a> or <a href="https://addons.mozilla.org/en-US/firefox/addon/3863">iMacro</a>,
but I feel keeping all your testing in the same style outweighs the cons of not using
Selenium. The more desperate testing sources you introduce, the more confusing it
is for an outsider to step in and see the whole picture when learning the code, especially
when it's not contained in a single <i>solution</i>.
</div><div><br /></div><div>Finally, I recommend reading both of the books mentioned, but lets be honest
most of us care so little about unit testing we'll be lucky to read all of 1 of these
books let alone all of both. If this is the case I recommend PUT, while the first
few chapters read like the high school teacher striving to gain his students social
acceptance, it's an easy read and you can jump into the book at nearly any chapter
and get the exact information you are looking for on unit testing. This is something
I wish all programming books could achieve. 
<br /></div><img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=495ff9e5-688e-4110-a9ff-3594a6a55edc" /></div>
    </content>
  </entry>
  <entry>
    <title>this class is not key value coding-compliant for the key managedObjectContext</title>
    <link rel="alternate" type="text/html" href="http://bencoffman.com/blog/2009/09/28/thisClassIsNotKeyValueCodingcompliantForTheKeyManagedObjectContext.aspx" />
    <id>http://bencoffman.com/blog/PermaLink,guid,054403bc-fa5b-44b0-9dd2-e8150e71c9ed.aspx</id>
    <published>2009-09-28T09:55:19.003-07:00</published>
    <updated>2009-12-27T17:43:26.8833759-07:00</updated>
    <category term="Mac OS X" label="Mac OS X" scheme="http://bencoffman.com/blog/CategoryView,category,MacOSX.aspx" />
    <category term="Objective C" label="Objective C" scheme="http://bencoffman.com/blog/CategoryView,category,ObjectiveC.aspx" />
    <category term="Snow Leopard" label="Snow Leopard" scheme="http://bencoffman.com/blog/CategoryView,category,SnowLeopard.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <b>Error Readout:</b>
        <br />
        <i>1st Error:</i>
        <br />
this class is not key value coding-compliant for the key managedObjectContext<br /><br /><i>2nd Error:</i><br />
NSImageCell's object value must be an NSImage<br /><br /><b>Fix:</b><br />
1st Error:<br />
There is one prominent reason you could get this answer. You didn't spell your property
correctly when you were binding it to....well....whatever you want to bind it to,
in my case it was an <i>Array Controller</i>.<br /><br />
My problem however had nothing to do with this. When I created a new project after
I upgraded to xCode 3.2 I forgot to check one very import checkbox, <i>Create document-based
application (</i><i>Note: it was not a check box in older version of xCode it was
a full icon selection upon creating a project)</i>. By not checking this I created
a big variety of problems for myself. One of the errors occurring when I didn't check
the <i>Create document-based application, </i>was the error <i>this class is not key
value coding-compliant for the key managedObjectContext. </i><br /><br />
2nd Error:<br />
This error is very clear in it's issue. I was creating an entity with a property of
native type binary and the compiler wanted NSImage. Grrr but I should be able to pass
an image as a binary object, I would say to myself as I had urges to break my laptop
and anything else in reach over my knee. My fix again was to simply create a project
and remember to click <i>Create document-based application. </i>I know this is not
your typical fix, but in case someone else runs into this issue the same way I did
I hope they find this and it will be a quick and easy resolution.<br /><br /><b>Explanation:<br /></b>All of this pain could have been resolved from the very beginning had I known
to click <i>Create document-based application. </i>It was a silly little mistake that
cost me a few hours. In my defense however I was under the impression of not checking <i>Create
document-based</i> because in Hillegass's book he states that for this exercise we
will not be using NSDocument, but NSPersistentDocument instead. It turns out this
still means you have to check <i>Create document-based application.</i><br /><br />
I will state that I should have known something was wrong when I didn't have a MyDocument.xib
in the <i>Resource</i> folder after I created the project.<br /><br />
I've attached an image, mainly because blog posts are more fun when there is an image,
but also because it shows where this one simple little check box changed my life for
a hot minute.<br /><br /><img src="http://www.bencoffman.com/xcode3.2.png" /><br /><br /><p></p><img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=054403bc-fa5b-44b0-9dd2-e8150e71c9ed" /></div>
    </content>
  </entry>
  <entry>
    <title>HTTP Error 404 - File Not Found  or   HTTP Error 404- File or Directory not found </title>
    <link rel="alternate" type="text/html" href="http://bencoffman.com/blog/2009/09/25/HTTPError404FileNotFoundOrHTTPError404FileOrDirectoryNotFound.aspx" />
    <id>http://bencoffman.com/blog/PermaLink,guid,9f9ed0fa-263b-4c24-b526-6f22cdfab1d4.aspx</id>
    <published>2009-09-25T13:22:50.884-07:00</published>
    <updated>2009-09-25T13:35:14.6105599-07:00</updated>
    <category term="IIS 6.0" label="IIS 6.0" scheme="http://bencoffman.com/blog/CategoryView,category,IIS60.aspx" />
    <category term="Windows" label="Windows" scheme="http://bencoffman.com/blog/CategoryView,category,Windows.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <b>Error Readout:</b>
        <br />
HTTP Error 404 - File Not Found 
<br />
HTTP Error 404- File or Directory not found 
<br /><br /><b>Fix:</b><br /><b>Enable a Pre-existing Web Service Extension in IIS 6.0 </b><br /><br />
To permit IIS to serve content that requires a specific ISAPI or CGI extension that
is already listed in the Web service extensions list, follow these steps: 
<ol><li>
Open IIS Manager, expand the master server node (that is, the <var>Servername</var> node),
and then select the <strong class="uiterm">Web service extensions</strong> node. 
</li><li>
In the right pane of IIS Manager, right-click the extension that you want to enable.
In this example, this is <strong class="uiterm">Active Server Pages</strong>. 
</li><li>
Click to select the <strong class="uiterm">Allow</strong> check box. 
</li></ol>
Microsoft Link: <a href="http://support.microsoft.com/kb/315122">http://support.microsoft.com/kb/315122</a><br /><br /><b>Explanation:<br /></b>Apparently there was no easy Google search for this stupidly easy fix. <b>(UPDATE:
I'm wrong Google the title of this blog entry and a Microsoft fix is the first result</b>)
Consequently, I spent more time than I would like on trying to fix it. 
<br /><br />
Here is how it went down. I recive a HTTP Error 404 - File Not Found error on a page
I was browsing to from IIS 6.0. How could this be I ask myself, the page does exists,
I know because I see it in IIS 6.0, I right click the file and I select browse. WTF.
Upon a little investigation I found out what was wrong and I found a Microsoft website
furthers my fix. Soooo  easy! Anyways moving on, going to go drink a beer and
forget this time was lost in which I will never get back.<br /><br /><br /><br /><p></p><img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=9f9ed0fa-263b-4c24-b526-6f22cdfab1d4" /></div>
    </content>
  </entry>
</feed>