<?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:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;DEACQXwzfyp7ImA9WhRVGUk.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853</id><updated>2012-01-18T21:19:20.287-07:00</updated><title>CodeCuriosity</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>49</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/Codecuriosity" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="codecuriosity" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;Dk4AR389cSp7ImA9WhdbGU0.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-8626199616093516945</id><published>2011-10-17T20:29:00.000-06:00</published><updated>2011-10-17T20:29:06.169-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-17T20:29:06.169-06:00</app:edited><title>Conditions and Dictionaries</title><content type="html">Last week I was involved in some new employee code reviews and pairing interviews. Since most people that apply to &lt;a href="http://www.thoughtworks.com/"&gt;ThoughtWorks &lt;/a&gt;do our Mars Rover problem, I decided that I should probably give the problem a try. The solution is pretty simple, which is probably why most people select this problem. I happened to be in a programming mood at the time, so I decided to make the problem a little more difficult.&lt;br /&gt;
&lt;br /&gt;
Could I write a solution without an IF statement?&lt;br /&gt;
&lt;br /&gt;
It turns out that I can and the results were very interesting. Here is the first cut of my spin left method before the change over.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1294455.js"&gt;
 
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
Here is another deviation with if statements, because you know... switches are smelly.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1294457.js"&gt;
 
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
Then here is what I came up with when trying to remove all my conditions.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1294459.js"&gt;
 
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
Personally, I find it much more readable than the other two. This is something I would not have expected given an arbitrary challenge. Maybe those &lt;a href="http://www.antiifcampaign.com/"&gt;anti-if people&lt;/a&gt; are onto something.&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-8626199616093516945?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/8626199616093516945/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2011/10/conditions-and-dictionaries.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/8626199616093516945?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/8626199616093516945?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2011/10/conditions-and-dictionaries.html" title="Conditions and Dictionaries" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;CEYCRHs9fCp7ImA9WhdUFEU.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-7568634379889535908</id><published>2011-10-01T09:16:00.000-06:00</published><updated>2011-10-01T09:16:05.564-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-01T09:16:05.564-06:00</app:edited><title>Tackling Business Complexity</title><content type="html">This week at a client site, one of our stories came back from the dead because some condition wasn't handled. As we were implementing the story, our understanding increased and along with understanding came new questions. After asking these new questions, it became clear that there was a lack of holistic understanding for the both the developers and the business. The developers wanted a rationalized set of conditions, the business wanted things to be displayed in different ways when certain conditions were met. Basically, we wanted the same thing, but could not meet on a common language.&lt;br /&gt;
&lt;br /&gt;
The thing we could agree on was what parts were important, so I came up with the idea of producing a truth table to hash out the different combinations. It looked a lot like the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAX8AAAEJCAIAAADzXbDsAAAXVWlDQ1BJQ0MgUHJvZmlsZQAAeAHVWXk8Vd3X3+fO93JN1zzP8yxz5jnzPGS65nm8hDQYUqGBEFEKGUODkEQIlZKhUCglIZJCyvge9TzP7/d+fu/73/vPuz+fs8/3rrX22vuetc7ea60DANsi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rKsictyt6zsjNEeOuxEo23YO5LirXQ+SU6s2s2EtADnuF4+3tBwcHDzYsnm8+tZywxBDQdUggHXcsY47P17g1XGHZxHfe+a/gnXcsY67TpTC47jDs0jHfea/hHXcsY67TpSC47gTeBbpuM/cl7COO9ZxLx+hcDjueVvhWZS3zEqvWMfdSt5qiq7wOO7wLGpKYDRwUqzj3kAw4YiCx3GHZ5G1ow3ruFvbf+K0h8dxh2eROO8bIhnruBsCsxUngcdxh2eRFeOqSGes414EBp4iAogAIlAHAshxLw8ectzLY4Q9akYAOe41Q2eDgchxt4GTm2cictybh70FZkaOuwWcZF0VkeNuXd8ZoTly3I1A2bZzIMdd7XrkuKsx0WtBjrseOnitXgRArkfur8qDrBtdbwjojIdXxx2eRTruM/0lkOuRm31A1o0WGWPwGOHwLBLpf8GyQa5HbvahYMKrGy02QuAxwuFZJDYCxEqHtx71so+MJai60WKjQ5YOjxEOzyIDwkDYFKDWo172gVc3WlhM5ATDY4TDs0h0DIiTD2898rNPrm50R2htbXfnvXs6+T3F4W0pyQVG+O6dPfv6IfwOGzyLLBVQpcpCXI9cpgXIutGl/mzoO3iMcHgWNdThBgsDuR65dzQg60YLjBh4jHB4Fgl0v3DRINcj995HOJw4ASKACNgbAcw+5f2PHPfyGGGPmhGwMce9JZvN1oybTQZei8Zbe7vbAVmbuRbfaO0GZZJ1vZNJxVOt3bdx90Csa1lZzTH7lIUIOyACiIAQBPDJSwisKBQRQATKIoDZpyxE2AERQASEIIDZRwisKBQRQATKIoDZpyxE2AERQASEIIDZRwisKBQRQATKIoDZpyxE2AERQASEIIDZRwisKBQRQATKIoDZpyxE2AERQASEIPD/bXcnwZOCBXMAAAAASUVORK5CYII=" /&gt;&lt;br /&gt;
&lt;br /&gt;
After creating the table, it was a matter of going through each combination and recording what expected result should be displayed. This produced five potential outcomes that turned out to be relatively simple to handle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1256127.js"&gt;
&lt;/script&gt;
&lt;br /&gt;
Looks almost too easy right? I'll assure you that the vernacular of the story did not cover the problem in such logical terms. The distillation of these guard statements (each condition returned) was a direct result of the truth table. Had we gone with a more classical approach, it would have likely resulted in a fair bit of cyclomatic complexity or the introduction of more classes to tackle this problem through polymorphism.&lt;br /&gt;
&lt;br /&gt;
As it turned out, we wrote some tests, wired everything up and it worked just like the BA wanted, but could not logically define.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-7568634379889535908?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/7568634379889535908/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2011/10/tackling-business-complexity.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/7568634379889535908?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/7568634379889535908?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2011/10/tackling-business-complexity.html" title="Tackling Business Complexity" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkMASXY6cSp7ImA9WhZSE0k.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-8365925530055453396</id><published>2011-03-28T13:27:00.000-06:00</published><updated>2011-03-28T13:27:28.819-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-28T13:27:28.819-06:00</app:edited><title>What is NuGet</title><content type="html">After spending some time with Ruby on Rails and the wonderful package management tool &lt;a href="http://rubygems.org/"&gt;RubyGems&lt;/a&gt;, I was very excited to hear about NuGet, a .NET package manager that comes bundled with &lt;a href="http://www.asp.net/mvc/mvc3"&gt;ASP.NET MVC 3&lt;/a&gt;. Finally, the .NET community gets a Microsoft supported package manager. The NuGet page has a pretty good description of what it is and why you should care...&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;NuGet is a Visual Studio extension that makes it easy to install and update open source libraries and tools in Visual Studio.&lt;br /&gt;
When you use NuGet to install a package, it copies the library files  to your solution and automatically updates your project (add references,  change config files, etc). If you remove a package, NuGet reverses  whatever changes it made so that no clutter is left.&lt;/blockquote&gt;You can think of it as a much more convenient way to include third party libraries if you haven't used something like ruby gems before. As a &lt;a href="http://en.wikipedia.org/wiki/Package_management_system"&gt;package manager&lt;/a&gt;, NuGet will do many things for you to make your life easier.&lt;br /&gt;
&lt;br /&gt;
First, it makes it simple to find and include a library. You don't have to google for the library, find the project page, find the download page, find the right version, etc... You can easily install the package the way you would a local library (almost).&lt;br /&gt;
&lt;br /&gt;
It will pull in dependencies for that library. Want to use Fluent-NHibernate? Just grab the NuGet package and it will include NHibernate, along with NHibernates own dependencies.&lt;br /&gt;
&lt;br /&gt;
It can also allow the injection of useful template code into your project to help get you started. &lt;a href="http://www.hanselman.com/blog/NuGetPackageOfTheWeek2MvcMailerSendsMailsWithASPNETMVCRazorViewsAndScaffolding.aspx"&gt;MVCMailer&lt;/a&gt; does just this to help get you started with sample views and mailers.&lt;br /&gt;
&lt;br /&gt;
If this sounds worthwhile, head over to Justin Etheredge's &lt;a href="http://www.codethinked.com/you-really-should-be-using-nuget"&gt;blog&lt;/a&gt; and follow his tutorial, which is really good.&lt;br /&gt;
&lt;br /&gt;
Also be sure to check out some of the available packages in the &lt;a href="http://nuget.org/List/Packages"&gt;NuGet Gallery&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-8365925530055453396?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/8365925530055453396/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2011/03/what-is-nuget.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/8365925530055453396?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/8365925530055453396?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2011/03/what-is-nuget.html" title="What is NuGet" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEIMRno8fCp7ImA9WxFXGU4.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-2310034819425722782</id><published>2010-05-26T21:56:00.001-06:00</published><updated>2010-05-26T21:56:27.474-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-26T21:56:27.474-06:00</app:edited><title>PURE HTML Templates</title><content type="html">&lt;p&gt;I’ve been pressured into writing about &lt;a href="http://beebole.com/pure/"&gt;PURE templates&lt;/a&gt; by a couple of my colleagues at &lt;a href="http://www.thoughtworks.com/"&gt;ThoughtWorks&lt;/a&gt;. My blogging has died down after rolling off my previous iPhone project, but while doing some work in ASP.NET MVC I came across something useful. A very nice HTML templating engine.&lt;/p&gt;  &lt;p&gt;My biggest complaint when looking at HTML templating engines is that they are very similar to PHP or ASP code, littering my HTML with different forms of placeholders. They are very simple and quick to pick up, but very limited once you need to do something more than map A onto B without creating a lot of one off functions that will fit in one line.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:430a1cc2-6c33-4ae5-b211-09a1537b3ad7" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: javascript;"&gt;&amp;lt;script type="text/html" id="item_tmpl"&amp;gt;
  &amp;lt;div id="&amp;lt;%=id%&amp;gt;" class="&amp;lt;%=(i % 2 == 1 ? " even" : "")%&amp;gt;"&amp;gt;
    &amp;lt;div class="grid_1 alpha right"&amp;gt;
      &amp;lt;img class="righted" src="&amp;lt;%=profile_image_url%&amp;gt;"/&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="grid_6 omega contents"&amp;gt;
      &amp;lt;p&amp;gt;&amp;lt;b&amp;gt;&amp;lt;a href="/&amp;lt;%=from_user%&amp;gt;"&amp;gt;&amp;lt;%=from_user%&amp;gt;&amp;lt;/a&amp;gt;:&amp;lt;/b&amp;gt; &amp;lt;%=text%&amp;gt;&amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;font size="4"&gt;Introducing PURE Templates&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;Have a look at this fully functional &lt;a href="http://beebole.com/pure_git/tutorial/tuto1.html"&gt;example&lt;/a&gt; (view source) using PURE. There is some HTML and a small script block. In the block is a javascript object literal representing the data and a single call to PURE giving the root of the HTML template and the data to render. Clean HTML, very little code and no dirty template placeholders. This shows that, in the happy day scenario, PURE is very simple and easy to use, like most other templating engines.&lt;/p&gt;

&lt;p&gt;However, as the web becomes more and more about creating and interacting with services. Consuming third party sources becomes necessity and those sources will not be providing data in the human readable format your require, nor will their names be exactly what you need.&lt;/p&gt;

&lt;p&gt;For these situations, we need something more powerful than all these happy day templates can provide (assuming you don’t just want to remap everything you consume). In PURE, they accommodate this by way of a &lt;a href="http://beebole.com/pure/documentation/what-is-a-directive/"&gt;Directive&lt;/a&gt;. At a basic level, a directive is a javascript object literal defining how to map your data onto your HTML. The keys are &lt;a href="http://www.w3.org/TR/css3-selectors/#selectors"&gt;CSS Selectors&lt;/a&gt; and the values are Actions, where Actions can be strings, objects or functions.&lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:8235aabf-29a4-4fa4-afda-d4574dffe442" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: javascript;"&gt;  &amp;lt;!-- HTML template --&amp;gt;
  &amp;lt;ul&amp;gt;
    &amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;
  &amp;lt;/ul&amp;gt;

  &amp;lt;script&amp;gt;
    var data = {
      legs:4,
      animals:[
        {name:'dog', legs:4},
        {name:'cat', legs:4},
        {name:'bird', legs:2},
        {name:'mouse', legs:4}
      ]
    };

    //declaration of the actions PURE has to do
    var directive = {
      'li':{
        'animal&amp;lt;-animals':{
          '.':'animal.name'
        },
        sort:function(a, b){
          return a.name &amp;gt; b.name ? 1 : -1;
        },
        filter:function(a){
          return a.context.legs === a.item.legs;
        }
      }
    };

    // note the use of render instead of autoRender, and the 2nd argument
    $('ul').render(data, directive);
&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="http://beebole.com/pure/documentation/iteration-with-directives/"&gt;source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above example&amp;#160; shows what a directive looks like while consuming data that must be iterated over. It also shows how the directive can accommodate sorting and filtering, which can come in handy at times. If you like what you see, check out the rest of the &lt;a href="http://beebole.com/pure/demos/"&gt;demos&lt;/a&gt; or the &lt;a href="http://beebole.com/pure/documentation/tutorials/"&gt;tutorials&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-2310034819425722782?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/2310034819425722782/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2010/05/pure-html-templates.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/2310034819425722782?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/2310034819425722782?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2010/05/pure-html-templates.html" title="PURE HTML Templates" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0QERHw_cSp7ImA9WxFTFU0.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-6935876658780993196</id><published>2010-03-29T22:25:00.001-06:00</published><updated>2010-04-05T17:15:05.249-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-05T17:15:05.249-06:00</app:edited><title>Objective-c Inheritance &amp; Message Passing</title><content type="html">Came across an interesting result while overriding a base class last week. Assume we have a class with two methods, one overloading the other as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_VrsVJGFhz4c/S7F7ZD0ANyI/AAAAAAAABwE/BrnX4UOZIC0/s1600/Picture+2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_VrsVJGFhz4c/S7F7ZD0ANyI/AAAAAAAABwE/BrnX4UOZIC0/s320/Picture+2.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Assume both methods are defined within the interface (intentionally public). Now when we&amp;nbsp;inherit&amp;nbsp;from this class and override the first method (create:id), where does the "create:int" message in the second method get passed too? It is calling "self" from the context of the parent, but we just overrode the method in the child.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_VrsVJGFhz4c/S7F7m8udbLI/AAAAAAAABwM/A4cEkpZY3U4/s1600/Picture+3.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_VrsVJGFhz4c/S7F7m8udbLI/AAAAAAAABwM/A4cEkpZY3U4/s320/Picture+3.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given the above, where does the message go? Will it call create:id on the child or the parent?&lt;br /&gt;
&lt;br /&gt;
Turns out, it is all in what you declare within your interface for the child. Define&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_VrsVJGFhz4c/S7F7uyj8NAI/AAAAAAAABwU/x8jj2ivfITE/s1600/Picture+4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_VrsVJGFhz4c/S7F7uyj8NAI/AAAAAAAABwU/x8jj2ivfITE/s320/Picture+4.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
in the child interface and it will pass the message to the child (using your override). Don't and the message will instead go to the parent. Thought it was very curious behavior as a C# guy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-6935876658780993196?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/6935876658780993196/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2010/03/objective-c-inheritance-message-passing.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/6935876658780993196?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/6935876658780993196?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2010/03/objective-c-inheritance-message-passing.html" title="Objective-c Inheritance &amp; Message Passing" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_VrsVJGFhz4c/S7F7ZD0ANyI/AAAAAAAABwE/BrnX4UOZIC0/s72-c/Picture+2.png" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Dk8AQX0-cSp7ImA9WxBUGEU.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-7065118774653142249</id><published>2010-03-06T07:14:00.001-07:00</published><updated>2010-03-06T07:14:00.359-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-06T07:14:00.359-07:00</app:edited><title>Objective-C Libraries and Tools</title><content type="html">There are quite a few open source cocoa touch libraries and frameworks.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.mulle-kybernetik.com/software/OCMock/"&gt;OCMock&lt;/a&gt;, the winner by default when it comes to mocking in objective-c. It is actually a really decent mocking framework with all the elements you would come to expect (mocks, stubs and partial mocks). Setting it up can be a bit of a pain, fortunately Colin Barret has &lt;a href="http://iamthewalr.us/blog/2008/11/ocmock-and-the-iphone/"&gt;figured that out for us&lt;/a&gt; already. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://code.google.com/p/google-toolbox-for-mac/"&gt;Google Toolbox&lt;/a&gt;, augments the SenTestingKit (OCUnit) providing more assertions, log tracking, binding testing and &lt;a href="http://code.google.com/p/google-toolbox-for-mac/wiki/CodeVerificationAndUnitTesting"&gt;more&lt;/a&gt;. A very &lt;a href="http://www.luisdelarosa.com/2009/02/19/how-to-create-an-iphone-project-in-xcode-that-can-run-unit-tests/"&gt;visual tutorial&lt;/a&gt; on setting up Google Toolbox.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://github.com/gabriel/gh-unit"&gt;GHUnit&lt;/a&gt;, I am still spending time with this one. Seems promising so far. Key features are running individual tests, running tests from the command line (easier) and testing macros.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://code.google.com/p/uispec/"&gt;UISpec&lt;/a&gt; is a test automation tool. It’s key feature is that it can run automation tests within the simulator (OCUnit must deploy to the iPhone). Documentation is pretty sparse.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://allseeing-i.com/ASIHTTPRequest/"&gt;ASIHTTPRequest&lt;/a&gt; is a library that wraps the CFNetwork API, handling quite a bit of the grunt work for you. Great for working with RESTful services.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://code.google.com/p/json-framework/"&gt;json-framework&lt;/a&gt;, another key element of working with RESTful services. JSON is lighter weight and uses key-value pairs to represent data. This plays very nicely with the KVC techniques you should be using in Cocoa.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://osxdaily.com/2009/08/19/limit-connection-bandwidth-with-speedlimit/"&gt;SpeedLimit&lt;/a&gt;, this is a great utility for simulating the network speeds you are likely to have on the iPhone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-7065118774653142249?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/7065118774653142249/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2010/03/objective-c-libraries-and-tools.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/7065118774653142249?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/7065118774653142249?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2010/03/objective-c-libraries-and-tools.html" title="Objective-C Libraries and Tools" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUcGSHc9eip7ImA9WxBUFUQ.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-6433570374399861083</id><published>2010-03-02T22:10:00.001-07:00</published><updated>2010-03-02T22:10:29.962-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-02T22:10:29.962-07:00</app:edited><title>IPhone Development Guide</title><content type="html">&lt;p&gt;Just a collection of information and useful advice that I have collected. Hope this helps you get started.&lt;/p&gt;  &lt;p&gt;Start &lt;a href="http://icodeblog.com/2008/07/26/iphone-programming-tutorial-hello-world/"&gt;where I started&lt;/a&gt; doing something simple &lt;em&gt;hello world&lt;/em&gt; type examples. All of the &lt;a href="http://icodeblog.com/"&gt;icodeblog&lt;/a&gt; tutorials are worth doing if you are starting out (though watch out for the SQLite ones as Core Data replaces that now). Try this &lt;a href="http://icodeblog.com/2008/07/29/iphone-programming-tutorial-beginner-interface-builder-hello-world/"&gt;one&lt;/a&gt; to get a feel for interface builder and this &lt;a href="http://icodeblog.com/2008/07/30/iphone-programming-tutorial-connecting-code-to-an-interface-builder-view/"&gt;one&lt;/a&gt; next for tying the code into IB. It can take a little while to learn the name of the different controls you will be using. This &lt;a href="http://icodeblog.com/2008/10/13/iphone-programming-tutorial-using-tabbarview-to-switch-between-views/"&gt;tutorial&lt;/a&gt; is on one of the navigation controls, the &lt;strong&gt;&lt;a href="http://devworld.apple.com/iphone/library/documentation/UIKit/Reference/UITabBarController_Class/Reference/Reference.html"&gt;UITabBarController&lt;/a&gt;&lt;/strong&gt;, which visually rests on the bottom of the window and will be one of your staples.&lt;/p&gt;  &lt;p&gt;Cocoa has a learning curve of its own, get up to speed on &lt;a href="http://theocacao.com/document.page/161"&gt;Key-Value Coding&lt;/a&gt; (further &lt;a href="http://cocoawithlove.com/2010/01/5-key-value-coding-approaches-in-cocoa.html?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed:+CocoaWithLove+(Cocoa+with+Love)&amp;amp;utm_content=Google+Reader"&gt;reading&lt;/a&gt;), the framework makes use of many dictionaries. There is also a good post (with even more links) on the &lt;a href="http://www.bit-101.com/blog/?p=1969"&gt;MVC Model&lt;/a&gt; used on the iPhone. It differs slightly from other representations of the Model View Controller pattern.&lt;/p&gt;  &lt;p&gt;&lt;img alt="Model-View-Controller design pattern" src="http://developer.apple.com/mac/library/documentation/General/Conceptual/DevPedia-CocoaCore/Art/model_view_controller.jpg" /&gt;&lt;a href="http://developer.apple.com/mac/library/documentation/General/Conceptual/DevPedia-CocoaCore/MVC.html"&gt;&lt;em&gt;source&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The primary difference is in the behavior between the different flows back to the view. On the iPhone, only your controller should be interacting with the &lt;a href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html"&gt;UIView&lt;/a&gt; where as traditionally it is acceptable for the Model to have some interactions (Notifications or checking state).&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bit-101.com/blog/?p=1969"&gt;&lt;/a&gt;&lt;/p&gt; Matt Gallagher’s &lt;a href="http://cocoawithlove.com/"&gt;blog&lt;/a&gt; is probably something that you want to &lt;a href="http://feeds.feedburner.com/CocoaWithLove"&gt;subscribe to&lt;/a&gt;. A few of my favorites:  &lt;p&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://cocoawithlove.com/2009/12/design-of-iphone-application.html?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed:+CocoaWithLove+(Cocoa+with+Love)&amp;amp;utm_content=Google+Reader"&gt;The design of an iPhone application&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://cocoawithlove.com/2010/01/high-quality-in-software-development.html?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed:+CocoaWithLove+(Cocoa+with+Love)&amp;amp;utm_content=Google+Reader"&gt;Quality control without unit tests&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://cocoawithlove.com/2009/12/sample-iphone-application-with-complete.html?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed:+CocoaWithLove+(Cocoa+with+Love)&amp;amp;utm_content=Google+Reader"&gt;Application with unit tests&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://cocoawithlove.com/2009/10/objective-c-niche-why-it-survives-in.html?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed:+CocoaWithLove+(Cocoa+with+Love)&amp;amp;utm_content=Google+Reader"&gt;Objective-C’s niche&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-6433570374399861083?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/6433570374399861083/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2010/03/iphone-development-guide.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/6433570374399861083?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/6433570374399861083?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2010/03/iphone-development-guide.html" title="IPhone Development Guide" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C08ERHY5eCp7ImA9WxBVGUQ.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-4233907006089406105</id><published>2010-02-23T23:10:00.001-07:00</published><updated>2010-02-23T23:10:05.820-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-23T23:10:05.820-07:00</app:edited><title>30 Days of iPhone Development</title><content type="html">&lt;p&gt;Having programmed professionally in C# for the last four years, something new was certainly welcome. I decided to give objective-c a month before really expressing my opinions of the language, so it doesn’t come off as, “I hate it, it isn’t what I am familiar with”. Since I have done objective-c almost exclusively for the last month, so give me some credit.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The IDE&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developer.apple.com/tools/xcode/"&gt;Xcode&lt;/a&gt; described in one word would be, &lt;em&gt;sufficient&lt;/em&gt;. It gets the job done and if you are running Snow Leapord version 3.2 is a bit better than 3.1.2 (Leapord) that I am running. The differences are minimal though. My major gripes are that xcode uses something called “groups” which look like folders, but are not. You can “group” your code into actual files and they will look the same, but you have to do that on the command line (or Finder), which is a bit unexpected. So assuming you didn’t know that and had been working on a project for a while it could look something like this.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_VrsVJGFhz4c/S4TCpMJNpxI/AAAAAAAABvU/-qMlZuFl_-M/s1600-h/Picture%201%5B14%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Picture 1" border="0" alt="Picture 1" src="http://lh6.ggpht.com/_VrsVJGFhz4c/S4TCpqBDzoI/AAAAAAAABvY/5CFPqRvNMjE/Picture%201_thumb%5B10%5D.png?imgmax=800" width="187" height="351" /&gt;&lt;/a&gt; &lt;a href="http://lh4.ggpht.com/_VrsVJGFhz4c/S4TCrPo3vNI/AAAAAAAABvc/jUhicZg0iGM/s1600-h/Picture%202%5B10%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Picture 2" border="0" alt="Picture 2" src="http://lh4.ggpht.com/_VrsVJGFhz4c/S4TCtdda0wI/AAAAAAAABvg/J9c0y8Oca5A/Picture%202_thumb%5B6%5D.png?imgmax=800" width="423" height="428" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Bit disappointing to see that mess when you assumed you had created some sort of order in all the chaos. Also, files are not listed alphabetically. You can have .m files listed before the .h or after. Whatever strikes your fancy.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The Debugger&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I don’t really mind the debugger and it can be really helpful for… well… debugging. It’s good, honest. However, Xcode loves putting everything into its own window, so the debugger is not on the same page as your coding window (akin to eclipse). This is done so things like console output, stack trace and variables in scope can be displayed, but it still feels vastly inferior to the Visual Studio debugging experience where that kind of information is pulled in during debugging, but context remains the same.&lt;/p&gt;  &lt;p&gt;Also, whoever decided the break points needed more than one state needs to be shot. Seriously, why would I want a breakpoint that the debugger won’t enter? There is undoubtedly some way to change this, as the forcing save alert before running and undo alerts can be done away with, but I have not found it yet. In the meantime, it means I need to add breakpoints and re-click them if I start coding and need to debug the same piece of code again. You know, try something, debug, it fails, try something else, debug the new solution. &lt;/p&gt;  &lt;p&gt;Note: Undo trick is in user defaults. &lt;/p&gt;  &lt;p&gt;&lt;em&gt;defaults write com.apple.Xcode XCShowUndoPastSaveWarning NO&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Header Files&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Having little real experience with C/C++, header files are not something I have ever really had to worry about. All I can say is they are huge waste of time. People complain about unit testing, but these are worse and with none of the benefits. I understand why they have to be written in C/C++, but the thing is you don’t even need them in objective-c. They are there to prevent warnings and give guidance on how to use your code. Essentially nothing is private, so you have to be careful what you show (hence header files). Below is an example of a “public” method called &lt;strong&gt;logMySimpleString.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:34cab83d-3c24-403f-9ccf-137d24739820" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: c;"&gt;#import &amp;lt;UIKit/UIKit.h&amp;gt;

@interface MyClass : NSObject {
	NSString *aSimpleString;
}

- (void) logMySimpleString;

@property(nonatomic, retain) NSString *aSimpleString;

@end

@implementation MyClass
@synthensize aSimpleString

- (void) logMySimpleString {
	NSLog(@"%@", aSimpleString);
}

@end&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Objective-c 2.0 includes support for auto properties, you can see one declared above. Aside from how obviously useless the header file is, look at the &lt;strong&gt;three&lt;/strong&gt; places I have to reference aSimpleString to have an autoproperty. While nicer than writing the getters and setters by hand, it still introduces a lot of repeat code that offers very little value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Templates and Customization&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Finally, more of the positive! Templates for files and projects in xcode are pretty easy to accomplish. This &lt;a href="http://blog.highorderbit.com/2009/03/15/customizing-xcode-cocoa-touch-file-templates/"&gt;post&lt;/a&gt; covers it pretty well, but if you are familiar with ReSharper templates, they are almost as easy and certainly the same fashion. You have to put them into an Xcode/user directory which is unique for iPhone SDK elements (see below).&lt;/p&gt;

&lt;p&gt;/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/File Templates&lt;/p&gt;

&lt;p&gt;To its credit, most of Xcode is pretty customizable with really good short-cuts. You can define your own in preferences.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_VrsVJGFhz4c/S4TCt7_asTI/AAAAAAAABvk/qp9RZpVZ-Ek/s1600-h/Picture%203%5B3%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Picture 3" border="0" alt="Picture 3" src="http://lh4.ggpht.com/_VrsVJGFhz4c/S4TCvBAD4dI/AAAAAAAABvo/ac2dhucen-E/Picture%203_thumb%5B1%5D.png?imgmax=800" width="429" height="247" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Objective-c!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Objective-c is a superset of the C language, so you can both include and use C/C++ code along with your objc code. Yea… that wouldn’t sell me on it either… Sometimes this means you can include useful libraries, but mostly it just means some of your code will go off into some foreign and scary land.&lt;/p&gt;

&lt;p&gt;Fortunately, this new language comes with a completely different framework. Coming from ASP.NET/WinForms background, I am very pleased to be working in an MVC pattern which is really well implemented for the iPhone. I also love the observer pattern via &lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNotification_Class/Reference/Reference.html"&gt;NSNotifications&lt;/a&gt;. I’ll probably do a post on that next as they are pretty slick.&lt;/p&gt;

&lt;p&gt;There is a good document on the apple site on other &lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaDesignPatterns/CocoaDesignPatterns.html#//apple_ref/doc/uid/TP40002974-CH6-SW6"&gt;patterns common to cocoa&lt;/a&gt;. There is also a good one on &lt;a href="http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/CocoaObjects.html#//apple_ref/doc/uid/TP40002974-CH4-SW32"&gt;implementing a singleton&lt;/a&gt;, which you’ll need if you don’t want to create &lt;a href="http://en.wikipedia.org/wiki/Big_ball_of_mud"&gt;Big Ball of Mud&lt;/a&gt; in your AppDelegate.&lt;/p&gt;

&lt;p&gt;I’ll probably continue this later with an observer example using NSNotifications and talk more about how some of the Small Talk elements work within Objective-c.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-4233907006089406105?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/4233907006089406105/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2010/02/30-days-of-iphone-development.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/4233907006089406105?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/4233907006089406105?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2010/02/30-days-of-iphone-development.html" title="30 Days of iPhone Development" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/_VrsVJGFhz4c/S4TCpqBDzoI/AAAAAAAABvY/5CFPqRvNMjE/s72-c/Picture%201_thumb%5B10%5D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEMHSH05fyp7ImA9WxBXEEU.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-8404046048314849495</id><published>2010-01-21T08:07:00.002-07:00</published><updated>2010-01-21T08:07:19.327-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-21T08:07:19.327-07:00</app:edited><title>StackOverflow - Garbage In, Garbage Out</title><content type="html">&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;I have been using stackoverflow for over a year now. It surprises me how great the answers you can find there are and in some cases, the pure quality and effort some individuals will put into them. Take this iPhone&amp;nbsp;&lt;a href="http://stackoverflow.com/questions/569940/whats-the-best-way-to-communicate-between-view-controllers" id="d-1k" style="color: #551a8b;" title="question"&gt;question&lt;/a&gt;&amp;nbsp;for example.&lt;/div&gt;&lt;br /&gt;
&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;A stackoverflow user is asking a question about the best way to pass data to ViewControllers in the iPhone (Which uses MVC for its UI). The top answer there is both informative and useful in that it provides a concise answer, as well as, example code to get the user started. Obviously this question took time out of someone else's day to think about and reply, then edit and update. Truly a wonderful example of the simple yet highly valuable resource stackoverflow can be.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Then you get questions like this&amp;nbsp;&lt;a href="http://stackoverflow.com/questions/2109969/c-is-there-a-way-to-classify-enums/2110065#2110065" id="gjgd" style="color: #551a8b;" title="one"&gt;one&lt;/a&gt;. I've seen that question both asked and answered over and over for years now. I've even asked it myself at one point and let me just say that providing an explicit answer to that question never did me any favors. The question is born out of looking for the wrong solution. The stackoverflow user, in this case, is looking for the wrong solution and getting it handed to him on a silver platter.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;This is just like using a calculator, they always give you an answer, they don't always give you the right one. Stackoverflow is full of people eager to give you an answer to your question, but no one will spend the time questioning the origins of it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-8404046048314849495?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/8404046048314849495/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2010/01/stackoverflow-garbage-in-garbage-out.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/8404046048314849495?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/8404046048314849495?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2010/01/stackoverflow-garbage-in-garbage-out.html" title="StackOverflow - Garbage In, Garbage Out" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUQMRnY-fyp7ImA9WxBTFEk.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-1262065825165224931</id><published>2009-12-10T04:09:00.001-07:00</published><updated>2009-12-10T04:09:47.857-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-10T04:09:47.857-07:00</app:edited><title>sp_help</title><content type="html">&lt;p&gt;I am ashamed to admit I never knew about the &lt;a href="http://msdn.microsoft.com/en-us/library/aa933429(SQL.80).aspx"&gt;sp_help&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/ms176112.aspx"&gt;sp_helptext&lt;/a&gt; commands in sql server until today. Why has no one ever shown me this earlier?&lt;/p&gt;  &lt;p&gt;sp_help will find a stored proc by just providing its name. It will then show all the matches, where they are located and what parameters they take.&lt;/p&gt;  &lt;p&gt;sp_helptext will something similar, expect it will display the actual stored procedure. Much easier than hunting through a list.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-1262065825165224931?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/1262065825165224931/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/12/sphelp.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/1262065825165224931?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/1262065825165224931?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/12/sphelp.html" title="sp_help" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUENRX88eCp7ImA9WxNVFkg.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-6730647876916090898</id><published>2009-10-27T08:27:00.001-06:00</published><updated>2009-10-27T08:28:14.170-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-27T08:28:14.170-06:00</app:edited><title>Programmer Professionalism</title><content type="html">&lt;p&gt;I repeatedly hear, as a programmer, that I should be concerned with my overall professionalism. I should be concerned with the quality of what I produce, the knowledge and experience that I have obtained through work and education and the attitude I bring towards solving complexity. &lt;/p&gt;  &lt;p&gt;I should be a professional, no different than say a doctor, a lawyer or an engineer. Engineer is even in my title, it is so clear.&lt;/p&gt;  &lt;p&gt;On the other hand,&amp;#160; I also feel that I should be more like a tradesman or a craftsman. Learning under a master on a linear path that never ends, always improving.&lt;/p&gt;  &lt;p&gt;Here is an analogy that I used to describe programmer to my father, a tradesman. &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Working as a programmer is not too dissimilar to building a house. There is an initial design, planning of the work, sign-off on everything&amp;#160; and then the actual building commences. &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Only recently have we started practicing the fact that the user must be involved if we want to succeed. The strict set of rules to follow in design are always changing, especially if the designer is constantly self improving, as they should be.&lt;/p&gt;  &lt;p&gt;Programmers must both design and build the systems they work on. They are a tradesman (builder) and a professional (designer). With all these different expectations and the only constant being change, it would be surprising if one person was capable in one of these directions.&lt;/p&gt;  &lt;p&gt;We will probably never have a clear Apprentice to Journeyman to Master tradesman approach nor a professional accreditation. What we will have is the highest expectations any career has known and so much change that we will never be able to agree on things of consequence.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-6730647876916090898?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/6730647876916090898/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/10/programmer-professionalism.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/6730647876916090898?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/6730647876916090898?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/10/programmer-professionalism.html" title="Programmer Professionalism" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEMCSX8zcSp7ImA9WxNVEk4.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-3172141631317448108</id><published>2009-10-22T11:27:00.001-06:00</published><updated>2009-10-22T11:27:48.189-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-22T11:27:48.189-06:00</app:edited><title>Object-Oriented Design Basics</title><content type="html">&lt;p&gt;In order to achieve each of the metrics defined &lt;a href="http://www.codecuriosity.com/2009/09/object-oriented-design-metrics.html"&gt;previously&lt;/a&gt; we can employ some very fundamental techniques. Techniques that should appear to be common sense, hopefully. Though broad in scope and concept, they are the basis for much of what we currently try to achieve in programming.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Abstraction&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The notion of abstraction is to distill a complicated system down to its most fundamental parts and describe these parts in a simple, precise language. Typically, describing the parts of a system involves naming them and describing their functionality. For instance, take a design pattern such as the &lt;a href="http://sourcemaking.com/design_patterns/abstract_factory"&gt;Abstract Factory&lt;/a&gt;. When I use this pattern, declaring its name in the class definition, I am telling the next programmer what this class is supposed to do without documentation and without comments. When I declare some class called, CarFactory, a programmer should know that an instance of this class with provide instances of Car objects.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Encapsulation&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Another important principle of object-oriented design is the concept of encapsulation or information hiding. Encapsulation means that different components of a software system should not reveal the internal details of their respective implementations.&amp;#160; In general terms, the principle of encapsulation states that all the different components of a large software system should operate on a strictly need-to-know basis. There is a common saying surrounding this, “TELL, DON’T ASK”.&lt;/p&gt;  &lt;p&gt;One of the main advantages of encapsulation is that it gives the programmer freedom in implementing the details of a system. The only constraint on the programmer is to maintain the abstract interface that is visible. Encapsulation aids in adaptability because it allows the how to change without altering the expected outcome.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Modularity&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In addition to abstraction and encapsulation, a principle fundamental to object-oriented design is modularity. Software systems typically consist of several different components that must interact correctly in order for the entire system to work properly. Keeping these interactions straight requires that these different components be well organized. In the object-oriented approach, this structure centers around the concept of modularity, which refers to an organizing structure in which different components of a software system are divided into separate functional units. &lt;/p&gt;  &lt;p&gt;The structure imposed by modularity helps to enable software reusability. If software modules are written in an abstract way to solve general problems, then modules can be reused when instance of these same general problems may arise under a different context. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-3172141631317448108?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/3172141631317448108/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/10/object-oriented-design-basics.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/3172141631317448108?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/3172141631317448108?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/10/object-oriented-design-basics.html" title="Object-Oriented Design Basics" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUAHQ3k9eSp7ImA9WxNWFkk.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-7643990048342209937</id><published>2009-10-15T17:02:00.001-06:00</published><updated>2009-10-15T17:02:12.761-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-15T17:02:12.761-06:00</app:edited><title>Problematic Processes</title><content type="html">&lt;p&gt;I have always disliked following process for the most part. There is something dehumanizing when I enter into the conversation where I am told about some event and then told what I am expected to do. I understand what processes are in place for in the broader sense and often try to discover the particular reason for each process before I will follow it. Generally though, the employer wants workers A through Z to all behave in a similar fashion. Why though?&lt;/p&gt;  &lt;p&gt;Consistency. If all your workers do the same thing, then they will be consistent in their day to day work. This also means they are predicable and replaceable. Each worker is desired to be a replacement for any other as long as they follow the same processes. Is that a good thing?&lt;/p&gt;  &lt;p&gt;In some case, I would argue yes it is. There was a time in my life when I worked on an assembly line&amp;#160; and process would make or break the productivity. Each day followed a specific process, breaks followed a process, each task always had a specific and predicable process. When the feeder has space, put in another tray. When the pallet of trays are gone, get another pallet. Very rudimentary process that is basic and practical. Often this process is the discovered best techniques of what you are supposed to be doing and essentially giving you the optimized way to do each task. Do this because it has proven to be the fastest or most maintainable way of doing things. Great I say.&lt;/p&gt;  &lt;p&gt;However, bureaucratic process is a whole different beast. The domain is larger, the number of employees usually greater and the types of tasks being done much more complex. Process in this case is often more to do with getting each groups interests met rather than providing the most efficient or maintainable way of doing things. That is the part I dislike. A giant muddled mess of wide concerns, each at a different level of importance based entirely upon your current job, department and/or pay grade. Yuck.&lt;/p&gt;  &lt;p&gt;Thinking about how many concerns are no longer valid or important will only depress you further. How much of your day is spent doing tasks that don’t provide any benefit to you, your employer or your employer’s customers. You can tell things are bad when you ask, “Why do we do X?” and you get a response such as, “Because legal wants us to” or worse, “Because I told you to”.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-7643990048342209937?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/7643990048342209937/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/10/problematic-processes.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/7643990048342209937?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/7643990048342209937?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/10/problematic-processes.html" title="Problematic Processes" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;AkcBQ3c6eyp7ImA9WxNXEEo.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-7346353557704918853</id><published>2009-09-25T10:49:00.001-06:00</published><updated>2009-09-27T13:00:52.913-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-27T13:00:52.913-06:00</app:edited><title>Quality Time</title><content type="html">&lt;p&gt;In case you didn’t know, there has been a round of squabbling going because of Joel Spolsky’s post on &lt;a href="http://www.joelonsoftware.com/items/2009/09/23.html"&gt;Duct Tape Programmers&lt;/a&gt;. Robert C. Martin (Uncle Bob) has a good &lt;a href="http://blog.objectmentor.com/articles/2009/09/24/the-duct-tape-programmer"&gt;response&lt;/a&gt; that argues against shipping low quality code. Everyone else is trying to make this into a dichotomy, though it simply feels like one individual puts more priority on release date, while the later puts more priority on code professionalism. Maybe it is because of the recession, but both could be happy if we could just throw more resources at it, in theory.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_VrsVJGFhz4c/Srz0sprWxSI/AAAAAAAABtE/6VbMTReUolE/s1600-h/SoftwareTriangle%5B2%5D.png"&gt;&lt;img title="SoftwareTriangle" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="171" alt="SoftwareTriangle" src="http://lh5.ggpht.com/_VrsVJGFhz4c/Srz0tLE48VI/AAAAAAAABtI/bkEDueJayc4/SoftwareTriangle_thumb.png?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The age old idiom, show the above triangle, agree that Quality should be high, while Cost and Time should be low. Then you say, “I know all three are desired, but please only pick two”. Money must be limited on most projects these days, reducing the question to priority on Quality or Time?&lt;/p&gt;  &lt;p&gt;Since Uncle Bob is a huge proponent of TDD, his main focus for quality is surrounding unit testing, while Joel is focused on individuals that can make nearly anything “work” quickly. Joel shrugs off unit testing as a lofty goal for academics and Uncle Bob focuses more on the common ground between the two and agreeing simplicity should be favored.&lt;/p&gt;  &lt;p&gt;Personally, I see the relationship as follows.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Shipping Late &amp;gt; Shipping Shit &amp;gt; Not Shipping&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Not shipping or not writing a hack or two to get the product out the door is your worst option. If the product doesn’t go live, all your effort is for nothing. However, hacking the entire thing out the door because proper design and testing takes too much “Time” is only going to paint you into a corner. Sure you will ship something faster than your competitors and maybe that is all your care about. You must consider some important things before saying all that matters is time. Will your customers want to use it? Probably not. Will the developers want to maintain and enhance it? Probably not.&lt;/p&gt;  &lt;p&gt;Clearly Time and Quality are important, otherwise they wouldn’t be on the triangle. The key is to balance them appropriately, which is what most individuals are saying. Zealous animosity against or for unit testing aside, the entire argument is subjective. Consider what your demands are and plan appropriately.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-7346353557704918853?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/7346353557704918853/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/09/quality-time.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/7346353557704918853?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/7346353557704918853?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/09/quality-time.html" title="Quality Time" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/_VrsVJGFhz4c/Srz0tLE48VI/AAAAAAAABtI/bkEDueJayc4/s72-c/SoftwareTriangle_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A04MQXg7cCp7ImA9WxNQEUo.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-8789097622872224329</id><published>2009-09-17T03:33:00.000-06:00</published><updated>2009-09-17T03:33:00.608-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-17T03:33:00.608-06:00</app:edited><title>Unicode Transformation Format</title><content type="html">&lt;p&gt;Had another one of those days yesterday where you get deep in discussion about some of the nitty gritty. This time it was surrounding Unicode and though I knew some pieces of the picture, I could have certainly done with more information.&lt;/p&gt;  &lt;p&gt;First and foremost, Unicode is a way of encoding characters as a sequence of bytes. In this case, characters (and even more so strings) are an abstraction. UTF-8/16/32 define different encoding schemes that we can use for those &lt;i&gt;bytes&lt;/i&gt;. Each of those bytes are being represented by one &lt;a href="http://en.wikipedia.org/wiki/Hexadecimal"&gt;hexidecimal&lt;/a&gt; value.&lt;/p&gt;  &lt;p&gt;&lt;img alt="Some sample character encodings" src="http://i2.sitepoint.com/g/nl/tt/character-encodings-fixed.gif" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.sitepoint.com/blogs/2006/03/15/do-you-know-your-character-encodings/"&gt;source&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Looking at the UTF-8/16/32 section of the diagram, we see the different byte representations of the three characters. Also notice that UTF-8 byte representation of 'A' is identical to ASCII. This is true for a large set of the Latin alphabet and ties into why UTF-8, in Latin languages, is usually the most compact Unicode encoding choice. For this reason, storage and data exchange systems prefer it.&lt;/p&gt;  &lt;p&gt;C# for example uses UTF-16 encoding for &lt;i&gt;strings&lt;/i&gt;, but will default to UTF-8 for streams. UTF-8 isn’t all good though and it should be noted that UTF-8 is significantly more complex to process than UTF-16 because lead bytes have a relatively complex encoding and up to three trail bytes must be counted. This is due to the fact that Unicode is optimized for 16 bits.&lt;/p&gt;  &lt;p&gt;If this interests you, the below documents provide even more insightful information.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://unicode.org/notes/tn12/#UTF8"&gt;Unicode Technical Notes&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://enjoydoingitwrong.wordpress.com/2009/06/22/unicode-is-not-utf/"&gt;Unicode is not UTF-\d{1,2}&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://diveintopython3.org/strings.html"&gt;Python Document on Unicode&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-8789097622872224329?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/8789097622872224329/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/09/unicode-transformation-format.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/8789097622872224329?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/8789097622872224329?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/09/unicode-transformation-format.html" title="Unicode Transformation Format" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEAAR389cSp7ImA9WxNQEU4.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-2221179521242021370</id><published>2009-09-16T03:32:00.000-06:00</published><updated>2009-09-16T15:32:26.169-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-16T15:32:26.169-06:00</app:edited><title>Object-Oriented Design Metrics</title><content type="html">&lt;p&gt;I have had many discussions with colleagues and friends about the different things we value in software. Why we favor one thing over another, why we implement something a particular way, etc… However, I have also had numerous discussions with developers whose values differed drastically to my own. Arguably, many of these values can be subjective, and when we both reached that conclusion the argument became simply an expression of what we favor and why.&lt;/p&gt;  &lt;p&gt;For example, how can you argue the value of something like the &lt;a href="http://www.objectmentor.com/resources/articles/srp.pdf"&gt;single responsibility principle [pdf]&lt;/a&gt;? Ask them if they agree and call them an idiot if they say no? Ad hominem has hardly proven to be an effective argument technique. So what do you do to effectively introduce new ideas and argue their value when the other party just keeps asking why that has value?&lt;/p&gt;  &lt;p&gt;The technique that has worked for me, in discovering why someone feels a certain way about a principle, is to break everything down to very basic parts that are nearly universally true and introduce your idea under those truths, explaining how it affects them positively. These pieces must be so small that to challenge them would signal the warning signs that the individual is ignorant of the subject matter or intentionally breaking it. In the case of the later, this gives you an ideal platform to challenge why the decision was made and why it is or is not valid. This is more than saying SRP is good because it improves code quality. You must get to the heart of everything, including code quality. And this is where I wish to begin, with OOD metrics that I feel are universally true.&lt;/p&gt;  &lt;p&gt;The measure of quality software is more than simply achieving the list of requirements on a specification document. The design of the software itself is equally, if not more so, paramount to the overall quality of the software. In order to properly design complex systems we must have metrics by which to judge that design. These metrics should be so fundamental that they appear to be common sense.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Robustness&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Every good programmer wants to produce software that is correct, which means that the program produces the right output for all the anticipated inputs in the program’s application. In addition, we want software to be &lt;em&gt;robust&lt;/em&gt;, that is, capable of handling unexpected inputs that are not explicitly defined for its application. For example, if a program is expecting a positive integer and instead is given a negative integer, then the program should be able to recover gracefully from this error. A program that does not gracefully handle such unexpected-input errors is not robust and can be embarrassing for the programmer.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Adaptability&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Modern software projects will typically involve large programs that are expected to last for years. Software, therefore, needs to be able to evolve over time in response to changing conditions in its environment. These changes can be expected, such as gradual hardware improvements, or they can be unexpected, such as new requirements. Software should be able to adapt to unexpected events that, in hindsight, really should have been expected. Thus, another important goal of quality software is that it achieves adaptability.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Reusability&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Going hand in hand with adaptability is the desire that software be reusable, that code should be usable as a component of different systems in various applications. Developing quality software can be an expensive enterprise, and its cost can be offset somewhat if the software is designed in a way that makes it easily reusable in future applications. Such reuse should be done with care, however, for one of the major sources of software errors can come from inappropriate reuse of software. This means software must also be clear about what it does and does not do. From this clarity, however, software reuse can be a significant cost-saving and time-saving technique.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-2221179521242021370?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/2221179521242021370/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/09/object-oriented-design-metrics.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/2221179521242021370?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/2221179521242021370?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/09/object-oriented-design-metrics.html" title="Object-Oriented Design Metrics" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D08FQ3o7cSp7ImA9WxNREEo.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-8521619067385138730</id><published>2009-09-04T03:04:00.000-06:00</published><updated>2009-09-04T08:50:12.409-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-04T08:50:12.409-06:00</app:edited><title>Technical Debt</title><content type="html">&lt;p&gt;Technical Debt is a&amp;#160; metaphor coined by &lt;a href="http://www.c2.com/cgi/wiki?TechnicalDebt"&gt;Ward Cunningham&lt;/a&gt;. It refers to anything that isn’t done right during development. This includes things like breaking coding rules, introducing potential defects, increasing code complexity, code duplication or even ignoring necessary documentation. We’ve all been through crunch time and when something needs to work and work right NOW, the ends begin to justify the means.&lt;/p&gt;  &lt;p&gt;There are quite a few sources describing technical debt, why it is bad, ways around it. There are even &lt;a href="http://sonar.codehaus.org/evaluate-your-technical-debt-with-sonar/"&gt;applications&lt;/a&gt; that try to calculate the actual cost of your technical debt.&lt;/p&gt;  &lt;p&gt;It is funny all the ways developers need to “trick” management into appreciating elements of our craft. I cannot remember the last time I spoke to a developer about the monetary cost of using something as fundamental as SOAP vs REST. Yet, here we are, trying to make developers care about the actual value to the company of things with the hope that developers caring about budget and cost will somehow get management caring about the code.&lt;/p&gt;  &lt;p&gt;I mean, sometimes technical debt makes sense. Startups are rarely known for their innovative programming improvements and more for their innovative programming. That isn’t to say startups can’t produce elegant code that is a pleasure to work on and easy to enhance. Some probably do, but those that try, likely don’t last long. When you are a startup, money is tight. A few dollars of incurred technical debt today are easily covered by the billions you will be worth in the future...&lt;/p&gt;  &lt;p&gt;At least you get to wear a hat afterwards.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_VrsVJGFhz4c/Sp9Ff1YugNI/AAAAAAAABr0/mi49-yAV8YA/s1600-h/done_did_er_hat-p148974867077107365uh2y_400%5B3%5D.jpg"&gt;&lt;img title="done_did_er_hat-p148974867077107365uh2y_400" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="240" alt="done_did_er_hat-p148974867077107365uh2y_400" src="http://lh5.ggpht.com/_VrsVJGFhz4c/Sp9FgBGlWyI/AAAAAAAABr4/KRPr9uE5dZU/done_did_er_hat-p148974867077107365uh2y_400_thumb%5B1%5D.jpg?imgmax=800" width="240" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The real problem with technical debt,&amp;#160; even for startups, is that most developers are perfectionists.&amp;#160; A study done (&lt;a href="http://www.ambysoft.com/surveys/success2007.html"&gt;link&lt;/a&gt;) found that…&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;87.3% of respondents believe that delivering high quality is more important than delivering on time and on budget.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Not only is that number high, but it was the highest factor when compared with scope, time, staff and money. For me, this says that not only is technical debt bad for the code environment, but it is just as bad to the programmer’s environment and morale.&lt;/p&gt;  &lt;p&gt;That is exactly why SCRUM sometimes includes a refactoring backlog to be worked on after releases, as much for improving the code as improving team morale. There are few things more rewarding than slaying dragons. Code dragons that is.&lt;/p&gt;  &lt;p&gt;If you want to read more about technical debt, read &lt;a href="http://forums.construx.com/blogs/stevemcc/archive/2007/11/01/technical-debt-2.aspx"&gt;this&lt;/a&gt; article. It really does the best job I have seen analyzing technical debt from both developer/management perspectives, as well as, what is really important about technical debt.&lt;/p&gt;  &lt;p&gt;UPDATE: It appears someone else was thinking about technical debt.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_VrsVJGFhz4c/SqEpCtGB-6I/AAAAAAAABsE/vBiuomkTqLk/s1600-h/3886492586_6f29183994_o%5B3%5D.jpg"&gt;&lt;img title="3886492586_6f29183994_o" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="440" alt="3886492586_6f29183994_o" src="http://lh3.ggpht.com/_VrsVJGFhz4c/SqEpDOYBFtI/AAAAAAAABsI/QbqB7ozEwTI/3886492586_6f29183994_o_thumb%5B1%5D.jpg?imgmax=800" width="335" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Available &lt;a href="http://blog.hasmanythrough.com/2009/9/3/circle-of-death"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-8521619067385138730?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/8521619067385138730/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/09/technical-debt.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/8521619067385138730?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/8521619067385138730?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/09/technical-debt.html" title="Technical Debt" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/_VrsVJGFhz4c/Sp9FgBGlWyI/AAAAAAAABr4/KRPr9uE5dZU/s72-c/done_did_er_hat-p148974867077107365uh2y_400_thumb%5B1%5D.jpg?imgmax=800" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D08DR3c9eyp7ImA9WxNREE8.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-873456646792314863</id><published>2009-09-03T18:57:00.001-06:00</published><updated>2009-09-03T18:57:56.963-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-03T18:57:56.963-06:00</app:edited><title>Too Many Articles</title><content type="html">&lt;p&gt;Did you ever want access to over 80 different articles on programming ranging from SRP to code bombs?&lt;/p&gt;  &lt;p&gt;Me too!!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://programmer.97things.oreilly.com/wiki/index.php/Edited_Contributions"&gt;link&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-873456646792314863?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/873456646792314863/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/09/too-many-articles.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/873456646792314863?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/873456646792314863?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/09/too-many-articles.html" title="Too Many Articles" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEUGQX88eip7ImA9WxNREE8.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-5685658065977447117</id><published>2009-09-02T03:00:00.000-06:00</published><updated>2009-09-03T19:03:40.172-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-03T19:03:40.172-06:00</app:edited><title>Predicates</title><content type="html">&lt;p&gt;I love predicates. They are a rather recent addition to my toolkit, but already I use them every time I can. What is a predicate you ask?&lt;/p&gt;  &lt;p&gt;A predicate is a piece of logic to affirm or deny the subject of a proposition. Programmatically, a predicate is a function that returns true or false when given a class or value. For example.&lt;/p&gt;  &lt;div id="codeSnippetWrapper" style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4; text-align: left; max-height: 200px"&gt;   &lt;div id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; Contains(IProduct product)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    Func&amp;lt;IProduct, &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt;&amp;gt; predicate = x =&amp;gt; x.Name == product.Name;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (var item &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; products)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (predicate(item))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;        {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100.47%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; height: 18px; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Pretty cool, but let’s get rid of that foreach.&lt;/p&gt;

&lt;div id="codeSnippetWrapper" style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4; text-align: left; max-height: 200px"&gt;
  &lt;div id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; Contains(IProduct product)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    Func&amp;lt;IProduct, &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt;&amp;gt; predicate = x =&amp;gt; x.Name == product.Name;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; products.FirstOrDefault(predicate) != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;And finally…&lt;/p&gt;

&lt;div id="codeSnippetWrapper" style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4; text-align: left; max-height: 200px"&gt;
  &lt;div id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; Contains(IProduct product)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; products.FirstOrDefault(x =&amp;gt; x.Name == product.Name) != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;We can also filter lists in a similar fashion using &lt;em&gt;Where&lt;/em&gt;&lt;/p&gt;

&lt;div id="codeSnippetWrapper" style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4; text-align: left; max-height: 200px"&gt;
  &lt;div id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; IEnumerable&amp;lt;IProduct&amp;gt; FindByName(IProduct product)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; products.Where(x =&amp;gt; x.Name == product.Name);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Update: Thanks to Conrad for helping me improve this and remove the need for an Extension Method.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-5685658065977447117?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/5685658065977447117/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/09/predicates.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/5685658065977447117?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/5685658065977447117?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/09/predicates.html" title="Predicates" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0AER34-eyp7ImA9WxNSGEw.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-8833905905139276761</id><published>2009-09-01T08:10:00.000-06:00</published><updated>2009-09-01T08:35:06.053-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-01T08:35:06.053-06:00</app:edited><title>Gzip Issue</title><content type="html">&lt;p&gt;A co-worker was facing down a problem with one of his asp.net portals last week and asked for some help. The full details about what this portal does are not important, but suffice to say that it would zip up some files on the server and allow users to download them.&lt;/p&gt;  &lt;p&gt;The problem was that on one of the two servers where this portal was hosted, files were coming down smaller than the other and failing to unzip. It almost appeared that the last 5-8KB of the files was just being truncated. I spent a fair amount of time with this person checking the versions were consistent, that the configuration files were consistent and that basically nothing was wrong on the developers end.&lt;/p&gt;  &lt;p&gt;At this point we were ready to point the finger at IIS, but we needed to be sure.&lt;/p&gt;  &lt;p&gt;I logged onto the failing server (this is in dev), ran &lt;em&gt;inetmgr&lt;/em&gt; and compared the IIS settings to the working server. Aside from a few false leads, everything is more or less that same. The particular site is running as a virtual directory, all the usual settings look like carbon copies of one another (security, permissions, thread pool, .net version, etc…) and nothing appears to be out of place.&lt;/p&gt;  &lt;p&gt;At this point we are starting to think it must be in some part of IIS we were not familiar with and decide to give &lt;a href="http://www.fiddler2.com/fiddler2/"&gt;fiddler&lt;/a&gt; a try on the user’s end instead. For those that are unfamiliar with fiddler, it is a lot like &lt;a href="http://www.wireshark.org/"&gt;wireshark&lt;/a&gt; except it plugs directly into internet explorer and captures all the network traffic in a much more friendly and active way. I ran into this tool a couple of years ago and it has remained in my toolbox since.&lt;/p&gt;  &lt;p&gt;Request header for the working server.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_VrsVJGFhz4c/SpvyhVvqAhI/AAAAAAAABrE/qzKAp6coQk0/s1600-h/fiddler_workingserver_request%5B11%5D.jpg"&gt;&lt;img title="fiddler_workingserver_request" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="217" alt="fiddler_workingserver_request" src="http://lh3.ggpht.com/_VrsVJGFhz4c/SpvyhrEFWZI/AAAAAAAABrI/RKG5oPA-1TU/fiddler_workingserver_request_thumb%5B7%5D.jpg?imgmax=800" width="791" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Request header for the failing server.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_VrsVJGFhz4c/Spvyh9FFWcI/AAAAAAAABrM/EjmvrI-ymak/s1600-h/fiddler_failingserver_request%5B8%5D.jpg"&gt;&lt;img title="fiddler_failingserver_request" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="228" alt="fiddler_failingserver_request" src="http://lh6.ggpht.com/_VrsVJGFhz4c/SpvyinAYolI/AAAAAAAABrQ/nwSXFi9WjuE/fiddler_failingserver_request_thumb%5B6%5D.jpg?imgmax=800" width="791" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Other than different session ids, they are identical.&lt;/p&gt;  &lt;p&gt;This was the response header from the working server.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_VrsVJGFhz4c/SpvyiztCjVI/AAAAAAAABrU/d_Ah7vjXEGU/s1600-h/fiddler_workingserver_response%5B10%5D.jpg"&gt;&lt;img title="fiddler_workingserver_response" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="258" alt="fiddler_workingserver_response" src="http://lh6.ggpht.com/_VrsVJGFhz4c/SpvykEHu6OI/AAAAAAAABrY/u7X9ZYGVuW0/fiddler_workingserver_response_thumb%5B8%5D.jpg?imgmax=800" width="790" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This was the response header from the failing server.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_VrsVJGFhz4c/SpvykcAfgrI/AAAAAAAABrc/_Li7HVLmGm0/s1600-h/fiddler_failingserver_response%5B9%5D.jpg"&gt;&lt;img title="fiddler_failingserver_response" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="279" alt="fiddler_failingserver_response" src="http://lh5.ggpht.com/_VrsVJGFhz4c/Spvyk0E-_2I/AAAAAAAABrg/sQ7f1enNkGo/fiddler_failingserver_response_thumb%5B7%5D.jpg?imgmax=800" width="793" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Notice the difference? If somehow you missed it, the transport mechanism from the server to the client is using gzip on the failing server. I decided to disable it for that server to see if it would fix the issue as a proof that the issue was with gzip compressing the zip files.&lt;/p&gt;  &lt;p&gt;A quick way to disable something for gzip compression is to check if the file extension you don’t want compressed is included in the MetaBase (IIS configuration file).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_VrsVJGFhz4c/SpvyldtQvoI/AAAAAAAABrk/rZe6M-6v-S8/s1600-h/metabase_location%5B1%5D.png"&gt;&lt;img title="metabase_location" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="290" alt="metabase_location" src="http://lh4.ggpht.com/_VrsVJGFhz4c/SpvymB3w04I/AAAAAAAABro/OjXoEwoQjHU/metabase_location_thumb%5B1%5D.png?imgmax=800" width="581" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The tag you want to look for is &lt;strong&gt;IISCompressionScheme&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_VrsVJGFhz4c/SpvymYsZNzI/AAAAAAAABrs/dvzCmvr6xF8/s1600-h/metabase_iiscompressionscheme%5B1%5D.png"&gt;&lt;img title="metabase_iiscompressionscheme" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="445" alt="metabase_iiscompressionscheme" src="http://lh3.ggpht.com/_VrsVJGFhz4c/SpvymxUcFBI/AAAAAAAABrw/0LYSWQBxsog/metabase_iiscompressionscheme_thumb%5B1%5D.png?imgmax=800" width="488" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;There is a decent step by step guide on enabling gzip compression &lt;a href="http://dev1.wordpress.com/2008/12/30/step-by-step-setting-up-gzip-on-iis-6-compressing-servers-output-stream/"&gt;here&lt;/a&gt;. The biggest tip is that you need to shut down IIS before editing the MetaBase file. There is an option to do this in the restart procedure.&lt;/p&gt;  &lt;p&gt;That all said and done, it was indeed gzip that was causing the issue. It really shouldn’t matter if the content is compressed between the server and the browser, but for some reason none of the major browsers would uncompress the file. Another issue for another day I suppose.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-8833905905139276761?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/8833905905139276761/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/09/gzip-issue.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/8833905905139276761?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/8833905905139276761?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/09/gzip-issue.html" title="Gzip Issue" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/_VrsVJGFhz4c/SpvyhrEFWZI/AAAAAAAABrI/RKG5oPA-1TU/s72-c/fiddler_workingserver_request_thumb%5B7%5D.jpg?imgmax=800" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkQNQXo9eSp7ImA9WxNSFkQ.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-5463217684448787599</id><published>2009-08-30T13:35:00.001-06:00</published><updated>2009-08-30T22:53:10.461-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-30T22:53:10.461-06:00</app:edited><title>Blog Migration</title><content type="html">&lt;p&gt;What better way is there to spend a Sunday afternoon than migrating old data…&lt;/p&gt;  &lt;p&gt;I am just happy that it is done. I’ve also migrated an old domain so that blogspot can use it. Enjoy viewing my blog from &lt;a href="http://www.codecuriosity.com/"&gt;codecuriosity.com&lt;/a&gt; instead of &lt;a href="http://www.codecuriosity.blogspot.com/"&gt;codecuriosity.blogspot.com&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-5463217684448787599?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/5463217684448787599/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/08/blog-migration.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/5463217684448787599?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/5463217684448787599?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/08/blog-migration.html" title="Blog Migration" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0UGR3o_fCp7ImA9WxNSFEU.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-213042925661920018</id><published>2009-08-28T13:53:00.001-06:00</published><updated>2009-08-28T13:53:46.444-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-28T13:53:46.444-06:00</app:edited><title>Simpson’s Paradox</title><content type="html">&lt;p&gt;According to Wikipedia, &lt;a href="http://en.wikipedia.org/wiki/Simpson's_paradox"&gt;Simpson’s paradox&lt;/a&gt; is an apparent paradox in which the successes of groups seem reversed when the groups are combined. Often encountered in social and medical science statistics when frequency data are given causal interpretations.&lt;/p&gt;  &lt;p&gt;That probably did as much for you as it did for me when I first read it. Let’s look at the example.&lt;/p&gt;  &lt;p&gt;There are two departments (Department A and Department B). Each department receives an equal number of male and female applicants. Of the 510 male applicants, 251 men were accepted and of the 510 female applicants, 109 women were accepted. That means for 360 positions, men took almost 70% of the positions. &lt;strong&gt;Initially, this seems like a clear cut case of sexism in favor of men.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;However, when the departments are analyzed individually we find that department A had 500 male applicants and only 10 female applicants. Of the male applicants, 50% were accepted while 90% of the female applicants were accepted. In department B, 10 males applied and 10% were accepted, while 500 females applied and 20% were accepted.&lt;/p&gt;  &lt;p&gt;What is the result? Overall we see men taking 70% of the available jobs, yet department A favored women by 40% over men and department B favored women by 10% over men. &lt;strong&gt;Now it appears that we have sexism in favor of women.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="552" border="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="109"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="207"&gt;Men&lt;/td&gt;        &lt;td valign="top" width="234"&gt;Women&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="109"&gt;Department A&lt;/td&gt;        &lt;td valign="top" width="207"&gt;500 applicants (50% accepted)&lt;/td&gt;        &lt;td valign="top" width="234"&gt;10 applicants (&lt;strong&gt;90% accepted&lt;/strong&gt;)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="109"&gt;Department B&lt;/td&gt;        &lt;td valign="top" width="207"&gt;10 applicants (10% accepted)&lt;/td&gt;        &lt;td valign="top" width="234"&gt;500 applicants (&lt;strong&gt;20% accepted&lt;/strong&gt;)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="109"&gt;Totals&lt;/td&gt;        &lt;td valign="top" width="207"&gt;&lt;strong&gt;251 accepted&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="234"&gt;109 accepted&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;How is it that two departments, both favoring women, resulted in men taking more jobs than women? It is all about where the majority of each sex put their application. In the case of the male applicants, most applied to a department that had a much greater hiring rate.&lt;/p&gt;  &lt;p&gt;There are some other great examples, one in particular where something quite similar to the above occurred.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-213042925661920018?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/213042925661920018/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/08/simpsons-paradox.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/213042925661920018?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/213042925661920018?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/08/simpsons-paradox.html" title="Simpson’s Paradox" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUYNQHw_fCp7ImA9WxNSFE0.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-1597566331002482919</id><published>2009-08-27T15:06:00.001-06:00</published><updated>2009-08-27T15:06:31.244-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-27T15:06:31.244-06:00</app:edited><title>Instant Django</title><content type="html">&lt;p&gt;Came across a very easy to set up Django environment. No install, one file to download and only configuration for whatever you want to run as a configuration requirement. You can even set this up to run off of a flash drive, which I thought was pretty sweet.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.instantdjango.com/"&gt;Instantdjango&lt;/a&gt; should be able to start you on your first django web app in under 30 mins on most windows machines with no other pre-requisites. &lt;/p&gt;  &lt;p&gt;There is also a hand holding &lt;a href="http://www.instantdjango.com/chapter1.html"&gt;guide&lt;/a&gt; from beginning to end targeted at very beginner level audience. Now back to tweaking my crime map.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-1597566331002482919?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/1597566331002482919/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/08/instant-django.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/1597566331002482919?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/1597566331002482919?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/08/instant-django.html" title="Instant Django" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck8NQX89eip7ImA9WxNSE0U.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-7495323482541663698</id><published>2009-08-27T07:48:00.001-06:00</published><updated>2009-08-27T07:48:10.162-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-27T07:48:10.162-06:00</app:edited><title>Web Related Links</title><content type="html">&lt;p&gt;I have a terrible tendency to accumulate bookmarks and not get the chance to go back and properly implement or use the article in question. In this case, that has more to do with spending little or no time on my web skills (HTML/CSS/Javascrip) in the last three months. Sure I have done some web work, but my spare time has been primarily on other things. &lt;/p&gt;  &lt;p&gt;The first is a monstrous link dump on CSS techniques including obvious css related topics such as Page Layout, Menu/Navigation, Typography and others. Now perhaps you are not &lt;a href="http://www.maxkerning.com/"&gt;Max Kerning&lt;/a&gt; and typography doesn’t concern you more than life itself. Covering ways to avoid &lt;a href="http://en.wikipedia.org/wiki/Clickjacking"&gt;click jacking&lt;/a&gt; is also a good touch.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.smashingmagazine.com/2009/07/20/50-new-css-techniques-for-your-next-web-design/"&gt;link&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The second is something I came across after doing something similar myself. I’ve always disliked ASP.NET web forms, especially the XML tag soup and bloated code behind involved in forms validation (and most things). Something like &lt;a href="http://www.position-relative.net/creation/formValidator/"&gt;this&lt;/a&gt; isn’t too difficult to implement, provides much more direct and immediate feedback to the user and can use server side validation to validate the data on the client side (validate it again just to be sure on submit though)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/"&gt;link&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The last is very design centric, which is something I have never been very adapt at. Sure I can make something good, but it always feels like it takes longer than it should. Creating new sites from scratch is something I usually try to defer to something like &lt;a href="http://www.freecsstemplates.org/"&gt;free-css-templates&lt;/a&gt;. In any case, learning how to do this on your own is certainly a valuable skill when you cannot just reference someone else’s work and do away with hours of your own.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sixrevisions.com/tutorials/web-development-tutorials/coding-a-clean-illustrative-web-design-from-scratch/"&gt;link&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-7495323482541663698?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/7495323482541663698/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/08/web-related-links.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/7495323482541663698?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/7495323482541663698?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/08/web-related-links.html" title="Web Related Links" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Dk8CRn09eCp7ImA9WxNSE0w.&quot;"><id>tag:blogger.com,1999:blog-7907132636558724853.post-8956369110165492181</id><published>2009-08-26T13:27:00.001-06:00</published><updated>2009-08-26T13:27:47.360-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-26T13:27:47.360-06:00</app:edited><title>ReSharper Shortcuts</title><content type="html">&lt;p&gt;I’ve been a huge fan of &lt;a href="http://blogs.jetbrains.com/dotnet/2009/03/resharper-45-beta-released/"&gt;ReSharper&lt;/a&gt; since I first started using it almost 6 months ago. It takes time and effort to make the most of any tool and ReSharper is no different. That said, the benefits are paid back ten times over with a tool that rarely lets you down. As I’ll likely bring up ReSharper in the near future, I’d like to post my favorite shortcuts. I can look at features like live templates or issues like memory usage another time.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="726" border="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Ctrl-Alt-T&lt;/td&gt;        &lt;td valign="top" width="524"&gt;Bring up unit test explorer&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Ctrl-E&lt;/td&gt;        &lt;td valign="top" width="524"&gt;Lists files in order of last access&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Ctrl-N / Ctrl-Shift-N&lt;/td&gt;        &lt;td valign="top" width="524"&gt;Open type / Open file (SystemInfo can be found by shortcut SI)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Alt-Shift-L&lt;/td&gt;        &lt;td valign="top" width="524"&gt;Moves focus to currently open file in the solution folder&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Ctrl-Shift-G&lt;/td&gt;        &lt;td valign="top" width="524"&gt;“Super Go”, brings up usuage, declaration, base, more…&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Alt-Insert&lt;/td&gt;        &lt;td valign="top" width="524"&gt;Code generation, constructor, implement interface, more…&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Ctrl-Shift-R&lt;/td&gt;        &lt;td valign="top" width="524"&gt;Refactoring options, rename, move, extract, pull up, more…&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Ctrl-F6&lt;/td&gt;        &lt;td valign="top" width="524"&gt;Change method signature.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Ctrl-Shift-Alt-Arrow Key&lt;/td&gt;        &lt;td valign="top" width="524"&gt;Move item up or down, including whole methods&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7907132636558724853-8956369110165492181?l=www.codecuriosity.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codecuriosity.com/feeds/8956369110165492181/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.codecuriosity.com/2009/08/resharper-shortcuts.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/8956369110165492181?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7907132636558724853/posts/default/8956369110165492181?v=2" /><link rel="alternate" type="text/html" href="http://www.codecuriosity.com/2009/08/resharper-shortcuts.html" title="ReSharper Shortcuts" /><author><name>Tyler Mercier</name><uri>https://profiles.google.com/118348864204478517743</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-c7qz3BibyjA/AAAAAAAAAAI/AAAAAAAAB1U/iAzTbkOAcB0/s512-c/photo.jpg" /></author><thr:total>1</thr:total></entry></feed>

