<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/" version="2.0">
    <channel>
        <title>The Code Bucket</title>
        <link>http://codebucket.org/Default.aspx</link>
        <description>You're only as smart as your last line of code</description>
        <language>en-US</language>
        <copyright>Lee Brandt</copyright>
        <managingEditor>leebrandt@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>The Code Bucket</title>
            <url>http://codebucket.org/images/RSS2Image.gif</url>
            <link>http://codebucket.org/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/TheCodeBucket" type="application/rss+xml" /><item>
            <title>Behavior Driven Development Part 2 of n &amp;ndash; Three Types of BDD</title>
            <category>BDD</category>
            <link>http://codebucket.org/archive/2009/07/06/behavior-driven-development-part-2-of-n-ndash-three-types.aspx</link>
            <description>&lt;p&gt;&lt;strong&gt;The Way I've Come To See BDD&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Over the last year and a half, I have been moving from &lt;a target="_blank" href="http://en.wikipedia.org/wiki/Test-driven_development"&gt;TDD&lt;/a&gt; to &lt;a target="_blank" href="http://en.wikipedia.org/wiki/Behavior_Driven_Development"&gt;BDD&lt;/a&gt;. For those who don't know, this is not a tool or technology switch so much as it is a mental paradigm shift. Luckily, I didn't work in a lot of shops that ever did a lot of unit testing (testing units of code after you write them). Most often, we'd be under time crunches that forced PMs to make the decision to forego unit testing in order to meet a hard deadline that they got from some estimation crystal ball (that's a rant for another time). The positive outcome was that I didn't get sucked into many of the pitfalls that plagues those who came from shops that did more unit testing. However, I was still convinced it was about testing.&lt;/p&gt;
&lt;p&gt;It's not about testing. As &lt;a target="_blank" href="http://techblog.daveastels.com/"&gt;Dave Astels&lt;/a&gt; would say, &lt;a target="_blank" href="http://video.google.com/videoplay?docid=8135690990081075324"&gt;"TDD is not aboot testing, it's aboot design."&lt;/a&gt; That's a good way to say it (without the Canadian accent, of course). TDD is about driving the design of your code based on what the &lt;em&gt;consumer&lt;/em&gt; of that code &lt;em&gt;specifies&lt;/em&gt;. The problem is, most people start with what the consumer needs and try and break that into small pieces of engineering and then test that. BDD takes a different approach.&lt;/p&gt;
&lt;p&gt;BDD (for me) starts and ends with user voice. If you can't describe it in the user's language, you should stop and think about whether or not you're over engineering. It may start with a simple, "A user should be able to log in.", and that can spawn several scenarios. What should happen if the user's username is bad? their password? What happens if they DON'T have a username and password? Should we allow the user to "stay logged in"? Once the user successfully logs in, where should they be taken? All these things are tenets of good requirements gathering, and they become specifications for building what the consumer wants/needs. After much reading, discussing and practicing, I have seen two major styles of BDD. I've come to call them "Concentric Circle BDD" and "Context Specification". &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Concentric Circle BDD&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/BehaviorDrivenDevelopmentPart2ofnThreeTy_49/ConcentricCircleBDD_2.gif"&gt;&lt;img height="208" width="208" border="0" align="right" src="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/BehaviorDrivenDevelopmentPart2ofnThreeTy_49/ConcentricCircleBDD_thumb.gif" alt="ConcentricCircleBDD" title="ConcentricCircleBDD" style="border-width: 0px; margin: 0px 0px 10px 10px; display: inline;" /&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Concentric Circle BDD starts with a plain English scenario, written exactly as a user or BA might write it. The generally accepted pattern for these scenarios is the "Given, When, Then" syntax. For instance, "Given that I have a valid username and password, when I enter them in the login screen, I should be successfully logged in”. In this more "traditional" BDD style, you use a tool like &lt;a target="_blank" href="http://cukes.info/"&gt;Cucumber&lt;/a&gt;, &lt;a target="_blank" href="http://jbehave.org/"&gt;JBehave&lt;/a&gt; or &lt;a target="_blank" href="http://nbehave.org/"&gt;NBehave&lt;/a&gt; to write code that will pull in that text and parse it and execute it in a observable, provable way. Once you have a failing scenario, you drop into the inner concentric circle and begin writing more focused specifications, that observe small, independent pieces of that scenario. Once each inner piece is working, the scenario should be proven as well.&lt;strong&gt; &lt;/strong&gt;Concentric Circle BDD is, I believe, what &lt;a target="_blank" href="http://dannorth.net/"&gt;Dan North&lt;/a&gt; had in mind when he &lt;a target="_blank" href="http://dannorth.net/introducing-bdd"&gt;introduced BDD&lt;/a&gt;. If you've done any BDD with &lt;a target="_blank" href="http://rspec.info/"&gt;rSpec&lt;/a&gt; and &lt;a target="_blank" href="http://cukes.info/"&gt;Cucumber&lt;/a&gt;, using the two together leads to this type of BDD. &lt;/p&gt;
&lt;p&gt;Using this outside-in circular approach, lets developers start right where the user leaves off. Take the story and scenarios and make them executable. Easy enough, and it overcomes one of the biggest barriers for those new to TDD and that is where to start. The main drawback, is that once developers get to the "inner" concentric circle, they might become lazy about keeping specs in the user's voice. It's easy to write a spec called "should_call_login_method_on_authentication_service" instead of calling it, "should_authenticate_user_against_registered_users". Staying in user voice makes it easier to ask a user how something in the system SHOULD behave, when you are unsure.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Context Specification&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The &lt;a target="_blank" href="http://blog.scottbellware.com/2008/07/sustaining-capacity-in-maturing-agile_14.html"&gt;Context Specification&lt;/a&gt; style of BDD foregoes the need for the Scenarios written in plain English and the need to write the wrapper code that will ensure they are executable. Instead it takes those scenarios into the "inner" circle directly. They break the scenarios into contexts and observations that look an awful lot like the &lt;a target="_blank" href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/07/24/arrange-act-assert-and-bdd-specifications.aspx"&gt;Arrange/Act/Assert&lt;/a&gt; used in TDD (Which is all &lt;a target="_blank" href="http://wiki.github.com/aslakhellesoy/cucumber/given-when-then"&gt;Given/When/Then&lt;/a&gt; is if you think about it). By breaking the larger scenario into smaller pieces, it's a bit easier to write the specifications that will prove the system does what it should, but it can be a bit of a disconnect for developers compared to the "outer" circle of the Concentric Circle method that takes the scenarios right out of the user's mouth. Some developers break the specifications into "Bullet Point" specifications, to make them easier to translate directly into Contexts and Observations. These specs are usually kept closer to user's voice when they are written, generally because they will be the artifacts presented to the user or Business Analyst when communicating what you have made the system do so far. It can, however, confuse those new to BDD when trying to figure out where to start.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A Third Approach&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I might be late to the party and perhaps everyone else was doing this from the start, but I've recently noticed that our development team's &lt;a target="_blank" href="http://elegantcode.com/2009/02/27/some-alternative-ways-of-reading-contextspecification/"&gt;Context Specification&lt;/a&gt; specs have evolved into almost a hybrid of the Concentric Circle and &lt;a target="_blank" href="http://elegantcode.com/2009/02/27/some-alternative-ways-of-reading-contextspecification/"&gt;Context Specification&lt;/a&gt; approach. I don't think we moved there consciously, but I've noticed the BDD really getting easier and moving faster. Also, I've noticed a marked improvement in the quality and simplicity of our code. We are less and less often wandering down a path toward "over-engineering " a solution to a given problem. This approach rids us of having to write a bunch of code to parse and execute "User English" scenarios, but helps us to get started with an outside-in approach to specifying what the system should do. Here's how it works:&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/BehaviorDrivenDevelopmentPart2ofnThreeTy_49/muchroom_2.jpg"&gt;&lt;img height="164" width="244" border="0" align="right" src="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/BehaviorDrivenDevelopmentPart2ofnThreeTy_49/muchroom_thumb.jpg" alt="muchroom" title="muchroom" style="border: 0px none ; margin: 0px 0px 0px 10px; display: inline;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Everything is written as a spec, but the first spec almost mirrors the user's scenario. This "outer" circle is almost completely an "interaction" or "integration" specification. Most of what you see in the context is mocked objects, and each observation is an observation about how each piece interacts. Almost every observation is an "AssertWasCalled" (that I have extended with a ShouldRecieveCall method) call. To me, this represents the outer ring of the system. Then for every "interaction" observation, there is an opportunity to pull a concrete implementation of that mocked object (or subsystem) and specify how it should behave. This inside circle may be a subsystem that requires another interaction type specification, that observes how each piece of that subsystem interacts with every other piece in it. Eventually, you will move down to a very small independently observable specification. In the inner circle, you deal more with concrete classes. Specifying the implementation details of those behaviors. In the next few weeks, I will be blogging more about the samples of this approach. Leave some comments and let me know what you think. Am I on to something or just ON something?&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=133275"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=133275" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://codebucket.org/aggbug/133275.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lee Brandt</dc:creator>
            <guid>http://codebucket.org/archive/2009/07/06/behavior-driven-development-part-2-of-n-ndash-three-types.aspx</guid>
            <pubDate>Mon, 06 Jul 2009 05:01:17 GMT</pubDate>
            <wfw:comment>http://codebucket.org/comments/133275.aspx</wfw:comment>
            <comments>http://codebucket.org/archive/2009/07/06/behavior-driven-development-part-2-of-n-ndash-three-types.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://codebucket.org/comments/commentRss/133275.aspx</wfw:commentRss>
            <trackback:ping>http://codebucket.org/services/trackbacks/133275.aspx</trackback:ping>
        </item>
        <item>
            <title>Conversation Starter: The Tools DO NOT Make the Developer</title>
            <link>http://codebucket.org/archive/2009/06/30/conversation-starter-the-tools-do-not-make-the-developer.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/ConversationStarterTheToolsDONOTMaketheD_12589/crescent_wrench_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px 10px; display: inline; border-top: 0px; border-right: 0px" title="crescent_wrench" border="0" alt="crescent_wrench" align="right" src="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/ConversationStarterTheToolsDONOTMaketheD_12589/crescent_wrench_thumb.jpg" width="136" height="103" /&gt;&lt;/a&gt; I see a lot of talk online about this tool being better than that tool. It may sound obvious, but the tools do NOT make the developer. A tool is only a tool. If I gave my mother the best set of Snap-On tools that money could buy, she still wouldn’t be able to changer her own oil. On the other hand, if you gave my cousin Scotty a crescent wrench from Wal-Mart, he could probably rebuild a short block 350 in a weekend. Again, this may sound obvious, but the tools are only a way to help a good developer get the job done easier. A more inexperienced developer may even have MORE trouble with a good tool. I think that some people believe that the right tool will help a less experienced developer do things right. Generally, they just make it easier for him to turn a 300-line program into a 3000-line program.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=133175"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=133175" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://codebucket.org/aggbug/133175.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lee Brandt</dc:creator>
            <guid>http://codebucket.org/archive/2009/06/30/conversation-starter-the-tools-do-not-make-the-developer.aspx</guid>
            <pubDate>Wed, 01 Jul 2009 01:52:34 GMT</pubDate>
            <wfw:comment>http://codebucket.org/comments/133175.aspx</wfw:comment>
            <comments>http://codebucket.org/archive/2009/06/30/conversation-starter-the-tools-do-not-make-the-developer.aspx#feedback</comments>
            <wfw:commentRss>http://codebucket.org/comments/commentRss/133175.aspx</wfw:commentRss>
            <trackback:ping>http://codebucket.org/services/trackbacks/133175.aspx</trackback:ping>
        </item>
        <item>
            <title>Revelation About Lean Software and Estimation</title>
            <link>http://codebucket.org/archive/2009/06/04/revelation-about-lean-software-and-estimation.aspx</link>
            <description>&lt;h3&gt;&lt;/h3&gt;  &lt;p&gt;Tell me if this sounds familiar:  &lt;/p&gt;  &lt;p&gt;Boss: "Hey man! So, it's time for our status meeting, huh? Okay. Let's get started." &lt;/p&gt;  &lt;p&gt;You: "Well, we're working on the [deliverable] piece of [project]. We estimated it would take about 12 man-days." &lt;/p&gt;  &lt;p&gt;Boss: "Uh-huh. How long have we been working on it?" &lt;/p&gt;  &lt;p&gt;You: "About 8 man-days." &lt;/p&gt;  &lt;p&gt;Boss: "And how much is left to do, do you think?" &lt;/p&gt;  &lt;p&gt;You: "Probably 8 more man-days." &lt;/p&gt;  &lt;p&gt;Boss: "What's the problem? Was there a hold-up, or a maintenance issue?" &lt;/p&gt;  &lt;p&gt;You: "No. Once we got into [feature a], we saw some problems with the way it was implemented and we had to fix it to get the new stuff built. Also, when we estimated [feature b] we assumed the data was there, but it wasn't. [customer] also changed the requirements a bit regarding [feature c]." &lt;/p&gt;  &lt;p&gt;Boss: "Okay, so you think we've got all the kinks worked out then?" &lt;/p&gt;  &lt;p&gt;You: "As far as I can tell." &lt;/p&gt;  &lt;p&gt;Boss: "So we're about 1/3 over budget. Can we safely say we'll be ready to test [deliverable] by [date 8 man-days from now]?" &lt;/p&gt;  &lt;p&gt;You: "Barring anything huge, yeah." &lt;/p&gt;  &lt;p&gt;If you've had that conversation more than twice, you've probably started adding 30% to your estimates, right? T&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/RevelationAboutLeanSoftwareandEstimation_112A1/wizard_2.png"&gt;&lt;img style="border-right-width: 0px; margin: 10px 0px 0px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="wizard" border="0" alt="wizard" align="right" src="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/RevelationAboutLeanSoftwareandEstimation_112A1/wizard_thumb.png" width="184" height="176" /&gt;&lt;/a&gt;hat’s what getting better at software estimation is about, right? You estimate, and you track your estimates and the actual time it took and you begin to learn how long it takes you (and your team) to build software. After years of this, you can start to gauge the skill level of the team and the complexity of the project compared to other projects and teams you’ve worked on and you become adept at answering the “estimate” question.&lt;/p&gt;  &lt;p&gt;We then rail on about &lt;a href="http://www.notsotrivial.net/blog/post/2008/08/Have-you-been-burned-by-your-own-'Estiquote'.aspx" target="_blank"&gt;“esti-quotes”&lt;/a&gt;. How a customer takes an estimate, that’s just a gut feeling based on your experience, and starts planning delivery dates and budgets around it as if it were a quote. When we miss estimate, we try and adjust for it next time, but with each new project, team and technology comes new variables added to our esti-quoting ability, and anxiety around software estimation continues. But, what’re you gonna do?&lt;/p&gt;  &lt;h3&gt;Stop Getting Better at Estimating&lt;/h3&gt;  &lt;h5&gt;&lt;/h5&gt;  &lt;p&gt;“Quoi?”, you might say, “What’s wrong with that?” I know I’ve spent a good portion of my career trying to get better at estimating. But what if I DO get better? How will that help the business? They’ll be able to better plan delivery dates and budgets. That’s a good thing. What else? Anything? That’s all I can think of. &lt;/p&gt;  &lt;p&gt;Now what if I used my actual times to get better at building software? What if I took all the features (even the ones where I was over estimate) and tried to find ways to build each one faster without sacrificing quality? What if I focused on building higher quality software without sacrificing speed? How might THAT benefit the business?&lt;/p&gt;  &lt;h3&gt;Is It Good for the Company?&lt;/h3&gt;  &lt;p&gt;If I build higher quality software (loosely coupled and highly cohesive with all the “&lt;a href="http://blogs.msdn.com/larryosterman/archive/2006/09/29/777022.aspx" target="_blank"&gt;bilities&lt;/a&gt;”), how does that affect the company? First, it will probably better solve the business problem for which it was intended. There will likely be less bugs to fix (lower maintenance cost). It will take less time to implement new functionality (lower maintenance cost). When there are bugs, they will be easier to find and fix (lower maintenance cost). Adding or replacing team members is less costly, because the code is easier to understand (lower maintenance cost). It will take less staff to maintain it than more poorly written software (lower maintenance cost). Are you seeing a pattern here? Lower Total Cost of Ownership. Is that better than being able to plan delivery dates and budget better?&lt;/p&gt;  &lt;h3&gt;Get Better At Writing Software&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/RevelationAboutLeanSoftwareandEstimation_112A1/kaizen_2.jpg"&gt;&lt;img style="border-right-width: 0px; margin: 0px 10px 10px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="kaizen" border="0" alt="kaizen" align="left" src="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/RevelationAboutLeanSoftwareandEstimation_112A1/kaizen_thumb.jpg" width="79" height="139" /&gt;&lt;/a&gt; This was the epiphany I had yesterday after talking with &lt;a href="http://blog.troytuttle.com/" target="_blank"&gt;a friend of mine&lt;/a&gt; about our approach to &lt;a href="http://www.kanban.com/" target="_blank"&gt;Kanban&lt;/a&gt; at work. We were talking about “getting better at it”, but I was talking about getting better at estimating and he was talking about getting better at building software. We talked past each other for about 15 minutes before a light went on in my head when he said, “So you may get better at “guessing” when software will be done, but so what? I’d rather get better at building software.”&lt;/p&gt;  &lt;p&gt;I almost broke my face smiling. “You’re right.” I said, “I don’t want to work at the fair guessing peoples’ weight.”&lt;/p&gt;  &lt;p&gt;I felt a burden lift off of me. I HATED trying to get better at estimating. I always felt like there was no structure to it. There isn’t. I can have 90 years of software experience and still “guess” wrong when someone asks me how long it will take to build [feature/deliverable/project].&lt;/p&gt;  &lt;p&gt;If I get better at writing software (something I LOVE to do), then I will get better at delivering higher quality code faster. Who cares if I’m 1/3 over my estimate if I’m cranking out high quality code in half the time I was six months ago? And if I can prove I’m getting better, I’m “guessing” that’ll be okay with my customer. :0)&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=132635"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=132635" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://codebucket.org/aggbug/132635.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lee Brandt</dc:creator>
            <guid>http://codebucket.org/archive/2009/06/04/revelation-about-lean-software-and-estimation.aspx</guid>
            <pubDate>Fri, 05 Jun 2009 00:32:19 GMT</pubDate>
            <wfw:comment>http://codebucket.org/comments/132635.aspx</wfw:comment>
            <comments>http://codebucket.org/archive/2009/06/04/revelation-about-lean-software-and-estimation.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://codebucket.org/comments/commentRss/132635.aspx</wfw:commentRss>
            <trackback:ping>http://codebucket.org/services/trackbacks/132635.aspx</trackback:ping>
        </item>
        <item>
            <title>Permanent Marker on the White Board</title>
            <link>http://codebucket.org/archive/2009/05/22/permanent-marker-on-the-white-board.aspx</link>
            <description>&lt;p&gt;A friend of mine, Troy, showed me this a while ago, and I thought this is probably one of the best office tips EVAR.&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/PermanentMarkerontheWhiteBoard_122E9/scribble1_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="scribble1" border="0" alt="scribble1" align="right" src="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/PermanentMarkerontheWhiteBoard_122E9/scribble1_thumb.jpg" width="158" height="175" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Have you ever been designing at the white board and accidentally wrote on it with a permanent marker? We use sharpies all the time for User Stories and it happened to me and I thought I was forced to live with the blue blemish on my whiteboard forever. Not true.&lt;/p&gt;  &lt;p&gt;Take a regular white board marker (preferably the same color as the permanent marker) and write right over the top of the permanent mark. Let it dry and then erase as normal. The white board marker’s marks lift off the permanent marks!&lt;/p&gt;  &lt;p&gt;This is especially useful for Kanban Boards.&lt;/p&gt;  &lt;p&gt;Hope this helps someone as much as it has helped me.&lt;/p&gt;  &lt;p&gt;~Lee&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=132380"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=132380" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://codebucket.org/aggbug/132380.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lee Brandt</dc:creator>
            <guid>http://codebucket.org/archive/2009/05/22/permanent-marker-on-the-white-board.aspx</guid>
            <pubDate>Sat, 23 May 2009 01:41:20 GMT</pubDate>
            <wfw:comment>http://codebucket.org/comments/132380.aspx</wfw:comment>
            <comments>http://codebucket.org/archive/2009/05/22/permanent-marker-on-the-white-board.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://codebucket.org/comments/commentRss/132380.aspx</wfw:commentRss>
            <trackback:ping>http://codebucket.org/services/trackbacks/132380.aspx</trackback:ping>
        </item>
        <item>
            <title>Resharper Tip: Navigating to a type</title>
            <link>http://codebucket.org/archive/2009/05/18/resharper-tip-navigating-to-a-type.aspx</link>
            <description>&lt;p&gt;Obviously, my Tip of the Day is not meant to be a DAILY thing, so I thought I’d just rename to R# Tip. This is a pretty&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/ResharperTipNavigatingtoatype_5EAA/rsharp_navigate_to_type_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px 10px 10px; display: inline; border-top: 0px; border-right: 0px" title="rsharp_navigate_to_type" border="0" alt="rsharp_navigate_to_type" align="right" src="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/ResharperTipNavigatingtoatype_5EAA/rsharp_navigate_to_type_thumb.jpg" width="244" height="95" /&gt;&lt;/a&gt; common one, but it’s possible some people aren’t aware of it.&lt;/p&gt;  &lt;p&gt;For simple navigation, using ctrl+t or ctrl+shift+t can be invaluable. If you need to navigate to the file containing the Floogle type ctrl+t can get you there in a hurry. Hit ctrl+t and then type the name of the type you want to navigate to. You can also use capitalizxation to get you there faster. For instance, if you wanted the FloogleDTO to show up at the top, you could type the capitals and get there (e.g. type FDTO and the FloogleDTO type will be the only one matching). &lt;/p&gt;  &lt;p&gt;But, if you need to get to a FILE and not a type name, use ctrl+shift+t and type the name of the file, same as you typed the name of the type before.&lt;/p&gt;  &lt;p&gt;Try it out!&lt;/p&gt;  &lt;p&gt;~Lee&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=132193"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=132193" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://codebucket.org/aggbug/132193.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lee Brandt</dc:creator>
            <guid>http://codebucket.org/archive/2009/05/18/resharper-tip-navigating-to-a-type.aspx</guid>
            <pubDate>Mon, 18 May 2009 11:43:54 GMT</pubDate>
            <wfw:comment>http://codebucket.org/comments/132193.aspx</wfw:comment>
            <comments>http://codebucket.org/archive/2009/05/18/resharper-tip-navigating-to-a-type.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://codebucket.org/comments/commentRss/132193.aspx</wfw:commentRss>
            <trackback:ping>http://codebucket.org/services/trackbacks/132193.aspx</trackback:ping>
        </item>
        <item>
            <title>Conversation Starter: To Sproc or NOT to Sproc</title>
            <category>Conversation Starters</category>
            <link>http://codebucket.org/archive/2009/05/07/conversation-starter-to-sproc-or-not-to-sproc.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/ConversationStarterToSprocorNOTtoSproc_10BFF/bc_shout_thumb_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 10px 10px 10px 0px; display: inline; border-top: 0px; border-right: 0px" title="bc_shout_thumb" border="0" alt="bc_shout_thumb" align="left" src="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/ConversationStarterToSprocorNOTtoSproc_10BFF/bc_shout_thumb_thumb.jpg" width="136" height="153" /&gt;&lt;/a&gt; With the flat response from &lt;a href="http://www.codebucket.org/category/10047.aspx" target="_blank"&gt;the series so far&lt;/a&gt;, I thought I’d stir the pot a little. Again, I am not trying to start a flame war, I just want to share my opinion and start a conversation about it.&lt;/p&gt;  &lt;p&gt;I’ll start by saying that I am VERY comfortable using SQL. PL/SQL, T-SQL and even a bit of MySQL (ack). But after using NHibernate for the last year or so, I can honestly say that if I never write another sproc, I’ll be totally OK with that. I don’t think sprocs are evil, or ruin your application, for me it’s about testability. I like the fact that &lt;a href="http://www.codebucket.org/archive/2009/05/07/using-nhibernate-to-test-your-query-logic-without-touching-the.aspx" target="_blank"&gt;I can write a test that can check my query logic and never have to touch the database&lt;/a&gt;. I like the fact that I can &lt;a href="http://www.codebucket.org/archive/2009/05/07/use-nhibernate-with-fluent-nhibernate-to-test-your-crud-in.aspx" target="_blank"&gt;test all four basic CRUD operations with one line of code&lt;/a&gt;! Most of all, I like doing it in C#.&lt;/p&gt;  &lt;p&gt;There are times when there is no good substitute for a good sproc. But for most applications, I don’t see the point. SPECIALLY for CRUD operations.&lt;/p&gt;  &lt;p&gt;What do YOU think?&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=131892"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=131892" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://codebucket.org/aggbug/131892.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lee Brandt</dc:creator>
            <guid>http://codebucket.org/archive/2009/05/07/conversation-starter-to-sproc-or-not-to-sproc.aspx</guid>
            <pubDate>Fri, 08 May 2009 00:44:47 GMT</pubDate>
            <wfw:comment>http://codebucket.org/comments/131892.aspx</wfw:comment>
            <comments>http://codebucket.org/archive/2009/05/07/conversation-starter-to-sproc-or-not-to-sproc.aspx#feedback</comments>
            <slash:comments>8</slash:comments>
            <wfw:commentRss>http://codebucket.org/comments/commentRss/131892.aspx</wfw:commentRss>
            <trackback:ping>http://codebucket.org/services/trackbacks/131892.aspx</trackback:ping>
        </item>
        <item>
            <title>Use NHibernate (With Fluent NHibernate) To Test Your CRUD In One Line Of Code</title>
            <link>http://codebucket.org/archive/2009/05/07/use-nhibernate-with-fluent-nhibernate-to-test-your-crud-in.aspx</link>
            <description>&lt;p&gt;It’s true, I swear. It’s very simple to test if you can (C)reate, (R)ead, (U)pdate and (D)elete objects using NHibernate, and Fluent NHibernate makes it one (fluent) line of code!&lt;/p&gt;  &lt;p&gt;Suppose we have an Employee object and we want to check that we can CRUD it AND reference to the Company (object) they work for in the mapping. It might look like this:&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;new&lt;/span&gt; PersistenceSpecification&amp;lt;Employee&amp;gt;(Session)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;    .CheckProperty(x =&amp;gt; x.FirstName, &lt;span class="str"&gt;"Dave"&lt;/span&gt;)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    .CheckProperty(x =&amp;gt; x.LastName, &lt;span class="str"&gt;"Jones"&lt;/span&gt;)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    .CheckProperty(x =&amp;gt; x.MiddleInitial, &lt;span class="str"&gt;"L"&lt;/span&gt;)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;    .CheckProperty(x =&amp;gt; x.DateOfBirth, &lt;span class="kwrd"&gt;new&lt;/span&gt; DateTime(2008, 11, 1))&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;    .CheckProperty(x =&amp;gt; x.Sex, _sex)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;    .CheckReference(x =&amp;gt; x.Company, &lt;span class="kwrd"&gt;new&lt;/span&gt; Company{ CompanyID = 999, Name = &lt;span class="str"&gt;"Wonder Wheels"&lt;/span&gt; })&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;    .VerifyTheMappings(); &lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt;Okay, it may not LOOK like one line of code, but I swear it is. One, long, fluent line of code.&lt;/p&gt;

&lt;p&gt;Super sweet. If you’ve found better ways, post a comment, I LOVE to learn better ways.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;~L&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=131891"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=131891" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://codebucket.org/aggbug/131891.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lee Brandt</dc:creator>
            <guid>http://codebucket.org/archive/2009/05/07/use-nhibernate-with-fluent-nhibernate-to-test-your-crud-in.aspx</guid>
            <pubDate>Fri, 08 May 2009 00:41:16 GMT</pubDate>
            <wfw:comment>http://codebucket.org/comments/131891.aspx</wfw:comment>
            <comments>http://codebucket.org/archive/2009/05/07/use-nhibernate-with-fluent-nhibernate-to-test-your-crud-in.aspx#feedback</comments>
            <wfw:commentRss>http://codebucket.org/comments/commentRss/131891.aspx</wfw:commentRss>
            <trackback:ping>http://codebucket.org/services/trackbacks/131891.aspx</trackback:ping>
        </item>
        <item>
            <title>Using NHibernate to Test Your Query Logic Without Touching The Database</title>
            <link>http://codebucket.org/archive/2009/05/07/using-nhibernate-to-test-your-query-logic-without-touching-the.aspx</link>
            <description>&lt;p&gt;That’s right, I said it, I’ve been doing it, and I abso-effin-lutely love it.&lt;/p&gt;  &lt;p&gt;A few months ago my co-worker, &lt;a href="http://blog.troytuttle.com/" target="_blank"&gt;Troy&lt;/a&gt;, posted a question on &lt;a href="http://stackoverflow.com/" target="_blank"&gt;Stack Overflow&lt;/a&gt;. We were doing integration testing on a project we were working on, and as the object graph grew larger, the code required to test query logic became painful. Since I am a sissy and don’t like pain, &lt;a href="http://stackoverflow.com/users/15971/pragmatic-agilist" target="_blank"&gt;Troy&lt;/a&gt; asked the question on &lt;a href="http://stackoverflow.com/" target="_blank"&gt;SO&lt;/a&gt; about how we might do it less painfully, and we got this answer, and it totally changed our TDD/BDD lives.&lt;/p&gt;  &lt;p&gt;The answer came from &lt;a href="http://blog.robustsoftware.co.uk/" target="_blank"&gt;Garry Shutler&lt;/a&gt;, &lt;a href="http://stackoverflow.com/questions/448405/nhibernate-testing-mocking-isession" target="_blank"&gt;here&lt;/a&gt; and I’ll just sort of re-iterate it.&lt;/p&gt;  &lt;p&gt;We created a base Interface for our repositories IRepository&amp;lt;T&amp;gt;, with a method IQueryable&amp;lt;T&amp;gt; All(). like so:&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;interface&lt;/span&gt; IRepository&amp;lt;T&amp;gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    IQueryable&amp;lt;T&amp;gt; All();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    &lt;span class="rem"&gt;// whatever else you want&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;Then we implement it like so:

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; IQueryable&amp;lt;T&amp;gt; All()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; session.Linq&amp;lt;T&amp;gt;();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt;We can then mock the IRepository&amp;lt;T&amp;gt;:&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;_repository = MockRepository.GenerateMock&amp;lt;IRepository&amp;lt;Customer&amp;gt;&amp;gt;();&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;Then Stub it to return a predefined list of objects that we are searching

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;_repository.Stub(repo =&amp;gt; repo.All()).Return(TestCustomers.All().AsQueryable());&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;Then we can test the login of a Customer search by:

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;[Test]&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; should_return_customers_matching_first_name_last_name_and_dob()&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;{&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    Assert.That(_returnedMatches.Contains(_firstNameLastNameDOBMatch));&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&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;Many thanks to Garry for all the time he saved us, I immediately subscribed to &lt;a href="http://blog.robustsoftware.co.uk/" target="_blank"&gt;his blog&lt;/a&gt; and have not been disappointed. I hope this helps someone as much as it has helped us.&lt;/p&gt;

&lt;p&gt;~L&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=131890"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=131890" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://codebucket.org/aggbug/131890.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lee Brandt</dc:creator>
            <guid>http://codebucket.org/archive/2009/05/07/using-nhibernate-to-test-your-query-logic-without-touching-the.aspx</guid>
            <pubDate>Fri, 08 May 2009 00:28:20 GMT</pubDate>
            <wfw:comment>http://codebucket.org/comments/131890.aspx</wfw:comment>
            <comments>http://codebucket.org/archive/2009/05/07/using-nhibernate-to-test-your-query-logic-without-touching-the.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://codebucket.org/comments/commentRss/131890.aspx</wfw:commentRss>
            <trackback:ping>http://codebucket.org/services/trackbacks/131890.aspx</trackback:ping>
        </item>
        <item>
            <title>Updates, Updates, Updates</title>
            <link>http://codebucket.org/archive/2009/05/04/updates-updates-updates.aspx</link>
            <description>&lt;p&gt;1) OK, so Coders4Charities went well. The .NET User Group Meeting went well. Now it’s time to take a (small) break. &lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/UpdatesUpdatesUpdates_152C/teletype_2.jpg"&gt;&lt;img style="border-right-width: 0px; margin: 10px 0px 0px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="teletype" border="0" alt="teletype" align="right" src="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/UpdatesUpdatesUpdates_152C/teletype_thumb.jpg" width="240" height="275" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;2) Most who know me probably already know, but I’ve been assigned as regional mentor for &lt;a href="http://ineta.org/"&gt;INETA&lt;/a&gt; membership for Missouri and Kansas. That will be consuming some of my time to get my head around who my UG leaders are and what they need from me, as well as helping fledgling UGs get started.&lt;/p&gt;  &lt;p&gt;3) I won Fourth Place in &lt;a href="http://www.community-credit.com/"&gt;Community Credit&lt;/a&gt; for the month of April! I get a sweet pin clock.&lt;/p&gt;  &lt;p&gt;4) I will be speaking at the Twin Cities Developer's Guild on May 12th (Yikes next Tuesday) about BDD and I will be helping deliver some Mix 09 content at the Jefferson City .Net User Group on June 9th.&lt;/p&gt;  &lt;p&gt;5) Today was my dog, Frieda’s 5th birthday, so we went to the park, got her a hamburger and Stacey made her a carrot cake. I know, we spoil her, don’t look at me like that.&lt;/p&gt;  &lt;p&gt;6) I started my foray into Ruby programming tonight. I am mostly interested, because I am a freak for anything BDD, and RSpec is the gold standard to me of Context-Specification style BDD. Haven’t dived into Cucumber yet, but that’s coming soon. I am really liking the syntax of Ruby. It is easy to learn the basics and I am already creating classes and small programs. Now I just need a small project to sink my teeth into and drive the design out with behaviors using RSpec.&lt;/p&gt;  &lt;p&gt;That’s about all for now. More information to come an all the new happenings. Stay tuned, dear readers!&lt;/p&gt;  &lt;p&gt;~Lee&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=131704"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=131704" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://codebucket.org/aggbug/131704.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lee Brandt</dc:creator>
            <guid>http://codebucket.org/archive/2009/05/04/updates-updates-updates.aspx</guid>
            <pubDate>Mon, 04 May 2009 06:30:35 GMT</pubDate>
            <wfw:comment>http://codebucket.org/comments/131704.aspx</wfw:comment>
            <comments>http://codebucket.org/archive/2009/05/04/updates-updates-updates.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://codebucket.org/comments/commentRss/131704.aspx</wfw:commentRss>
            <trackback:ping>http://codebucket.org/services/trackbacks/131704.aspx</trackback:ping>
        </item>
        <item>
            <title>Waterfall Is The Perfect Methodology</title>
            <link>http://codebucket.org/archive/2009/04/18/waterfall-is-the-perfect-methodology.aspx</link>
            <description>&lt;p&gt;Got your attention? Good. I’ll say it again: &lt;a href="http://en.wikipedia.org/wiki/Waterfall_model" target="_blank"&gt;Waterfall&lt;/a&gt; is the perfect methodology.&lt;a href="http://images.google.com/images?q=spring+hat+source:life"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px; display: inline; border-top: 0px; border-right: 0px" title="spring_hat_perfection" border="0" alt="spring_hat_perfection" align="right" src="http://geekswithblogs.net/images/geekswithblogs_net/leesblog/WindowsLiveWriter/WaterfallIsThePerfectMethodology_60DD/spring_hat_perfection_6.jpg" width="244" height="233" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;It attempts perfection from the outset. Perfect requirements, perfect design, perfect development and perfect delivery in a perfect world. If you live in that world where requirements don’t ever change, then you should probably use a waterfall type methodology for developing your software; and you should drop me a line (although they probably won’t let you have anything sharp like a pencil to write with &lt;a href="http://www.danversstateinsaneasylum.com/home.html" target="_blank"&gt;there&lt;/a&gt;). &lt;/p&gt;  &lt;p&gt;For most of us, life is imperfect. Our development consists of false-starts, unsure or uninvolved customers, unskilled development teams and even less skilled project managers. Sometimes it’s amazing we’re able to pull it off. Our lives are a constant magic show; hoping to pull the rabbit out of the hat just one more time, while the audience sits in amazement secretly hoping (on some sadistic level) we fail. For most of us, that’s our lives. Perhaps not all of those things all of the time, but at least one of those things in play at all times. So how can any waterfall-ish-type methodology hope to help us deal with all that strife? Easy, it can’t. The very purpose of agile-type software methodologies is to help us deal with that imperfection. &lt;/p&gt;  &lt;p&gt;Now I cut my teeth on waterfall-style development. Every time a deadline would pass or a budget would be blown we blamed ourselves. We thought, “We failed to follow the methodology correctly. We should have done more (insert methodology step here).” Boom. Process inflation. Pretty soon, we were writing more paper documents than actual code, and we were convinced this was a good thing. Fifteen pages of documentation for a fifteen-line program, and two-weeks to deliver. Sounds horrible, right? But that’s where we lived.&lt;/p&gt;  &lt;p&gt;This week I started my first (small) project where we are attempting a &lt;a href="http://en.wikipedia.org/wiki/Kanban" target="_blank"&gt;Kanban&lt;/a&gt;/&lt;a href="http://en.wikipedia.org/wiki/Lean_software_development" target="_blank"&gt;lean&lt;/a&gt; approach. It was absolutely liberating. Although we had less-than-stellar customer interaction, we had a point of contact we could bug whenever we needed to. We had only two developers, but we were both committed to the lean ideology. We set our sites on as little process as possible, and whenever we were unsure about something, we took a 15 minutes to hash it out and make a first-stab decision. It was phenomenal. We put up our first MMF (Minimum Marketable Feature) and broke it out into simple tasks. We didn’t spend a lot of time on the tasks, because we left ourselves open to being able to add or scrap a task when we needed to. At any time, you could come by the project board and see what we were working on, what was next and what was left to do to get this MMF delivered. We also allowed ourselves to say, “Hey, this process sucks, let’s try something else.” We stepped on each other’s toes a little and we fixed it as soon as it happened, quickly and without dwelling on the problem. &lt;/p&gt;  &lt;p&gt;I also let myself deliver less than optimal code for some things. They were things that I knew we’d need to touch again, but it didn’t violate the &lt;a href="http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod" target="_blank"&gt;SOLID&lt;/a&gt; principles, and as we got more information, we could rework that section to include new information with minimal effort. &lt;/p&gt;  &lt;p&gt;And the work just flowed. We coded like monkeys with our asses on fire, and it felt &lt;em&gt;good&lt;/em&gt;. We will get feedback on Monday from the users and see what changes need to be made and deliver that MMF. Then, we’ll pull the next MMF from the list, and start working it. I look forward to sharing more as we learn more, but this last week has been one of the most enjoyable in a long time. Thanks &lt;a href="http://blog.troytuttle.com/" target="_blank"&gt;Troy&lt;/a&gt;!&lt;/p&gt;  &lt;p&gt;~Lee&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=131284"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=131284" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://codebucket.org/aggbug/131284.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lee Brandt</dc:creator>
            <guid>http://codebucket.org/archive/2009/04/18/waterfall-is-the-perfect-methodology.aspx</guid>
            <pubDate>Sat, 18 Apr 2009 11:53:24 GMT</pubDate>
            <wfw:comment>http://codebucket.org/comments/131284.aspx</wfw:comment>
            <comments>http://codebucket.org/archive/2009/04/18/waterfall-is-the-perfect-methodology.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://codebucket.org/comments/commentRss/131284.aspx</wfw:commentRss>
            <trackback:ping>http://codebucket.org/services/trackbacks/131284.aspx</trackback:ping>
        </item>
    </channel>
</rss>
