<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alex McConnell</title>
    <description>The latest articles on DEV Community by Alex McConnell (@alexmcconnell).</description>
    <link>https://dev.to/alexmcconnell</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F119651%2F16166cfc-9594-4082-a73d-2740c1e3529d.jpeg</url>
      <title>DEV Community: Alex McConnell</title>
      <link>https://dev.to/alexmcconnell</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alexmcconnell"/>
    <language>en</language>
    <item>
      <title>Uncle Bob's Bowling Kata - Concerns about TDD and OOD</title>
      <dc:creator>Alex McConnell</dc:creator>
      <pubDate>Wed, 05 Dec 2018 19:34:40 +0000</pubDate>
      <link>https://dev.to/alexmcconnell/uncle-bobs-bowling-kata---concerns-about-tdd-and-ood-4fle</link>
      <guid>https://dev.to/alexmcconnell/uncle-bobs-bowling-kata---concerns-about-tdd-and-ood-4fle</guid>
      <description>&lt;p&gt;Recently, I've gone through Uncle Bob's bowling scoring kata a couple times (&lt;a href="http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata"&gt;http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata&lt;/a&gt;), and... I'm extremely disappointed with his solution. There are two big issues I have with his solution that I would like some feedback on.&lt;/p&gt;

&lt;p&gt;Problem 1 (TDD): The third and fourth tests are garbage.&lt;/p&gt;

&lt;p&gt;The way I understand it, and the way I've practiced it, when you're doing TDD, you make your test pass with the simplest possible code, and if the simplest code to make a test pass is some very stupid code, then you need to either write a better test or write more tests. For his third test to test spares (and he does the same thing for strikes), he is testing the scoring of spares by making a game where the first two frames are [5,5][3,0] with the remaining frames being all zeroes. He proceeds to take this and go on to write the code for scoring spares, but... the simplest code to solve this is "if roll == 3 then score += 3." Now, that's some dumb code, and you don't want to actually put that in, but that doesn't mean you just ignore it and go on to write the code you're trying to get to. It means you stop and write a better test, whether that means making a more complex game with multiple spares or whatever other thing you might have. Am I missing something here?&lt;/p&gt;

&lt;p&gt;Problem 2 (OOD): How is it that he never breaks out a Frame class?&lt;/p&gt;

&lt;p&gt;When I look at the Game class, and I see that all 5 of its private methods are passed in the exact same thing, a reference to every other roll (the start of a frame), it seems very straightforward to me that a Frame class needs to be broken out. The Frame just needs to be given its rolls and told about the next Frame, then it can return a score, which the Game class can then sum.&lt;/p&gt;

&lt;p&gt;So... what am I missing here that makes these things actually make sense?&lt;/p&gt;

</description>
      <category>tdd</category>
      <category>ood</category>
      <category>kata</category>
    </item>
  </channel>
</rss>
