<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-1664217632350055880.post8086161173571722818..comments</id><updated>2009-11-13T11:00:31.829-07:00</updated><category term='SOLID'/><category term='Personal'/><category term='Rx Framework'/><category term='Vista'/><category term='Visual Studio'/><category term='ASP.NET Providers Series'/><category term='Microsoft'/><category term='Mocking'/><category term='SQL'/><category term='MSP'/><category term='Virtual Store'/><category term='GUID'/><category term='Samba'/><category term='Dependency Injection'/><category term='Nothin But .NET'/><category term='BizTalk'/><category term='Prerequisites'/><category term='UI'/><category term='Build'/><category term='Encryption'/><category term='Windows'/><category term='Security'/><category term='MSI'/><category term='ISAPI'/><category term='Webinar/Screencast'/><category term='ASP.NET'/><category term='Web'/><category term='Testing'/><category term='Quote'/><category term='Anagram Code Kata Series'/><category term='Deployment and Installers'/><category term='Winbind'/><category term='Orca'/><category term='Community'/><category term='PowerShell'/><category term='BDD'/><category term='Patching/Updating'/><category term='Macro'/><category term='Isolated Storage'/><category term='Humor'/><category term='Error'/><category term='Bootstrapper'/><category term='Events'/><category term='Virtual Machine'/><category term='Threading'/><category term='LINQ'/><category term='Windows Forms'/><category term='Apprenticeships'/><category term='jQuery'/><category term='VMWare'/><category term='MSpec'/><category term='Office'/><category term='MVC Pattern'/><category term='Monads'/><category term='C/C++'/><category term='XML'/><category term='Recursion'/><category term='PAM'/><category term='F#'/><category term='FubuMVC'/><category term='Kerberos'/><category term='MSBuild'/><category term='VB'/><category term='Java'/><category term='Algorithms'/><category term='Registry'/><category term='IIS'/><category term='Add/Remove Programs'/><category term='Develop With Passion'/><category term='Delegates'/><category term='C#'/><category term='New Technology'/><category term='Conferences'/><category term='Behavior Chains'/><category term='News and Politics'/><category term='Functional Programming'/><category term='Active Directory'/><category term='Database'/><category term='Launch Condition'/><category term='Linux'/><category term='Code Organization'/><category term='Maybe Monad'/><category term='Server 2008'/><category term='JavaScript'/><category term='Entity Framework'/><category term='.NET'/><category term='Silverlight'/><title type='text'>Comments on Murray on .NET: Anagram Code Kata Part 1 – Getting Started</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://murrayon.net/feeds/8086161173571722818/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1664217632350055880/8086161173571722818/comments/default'/><link rel='alternate' type='text/html' href='http://murrayon.net/2009/11/anagram-code-kata-part-1-getting.html'/><author><name>Michael Murray</name><uri>https://profiles.google.com/109073345657761090655</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Xf7Ccmz4FCQ/AAAAAAAAAAI/AAAAAAAAAGU/jOfxxMc1Lxo/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1664217632350055880.post-2481719092008032101</id><published>2009-11-13T11:00:31.829-07:00</published><updated>2009-11-13T11:00:31.829-07:00</updated><title type='text'>Yes, thank you.  You&amp;#39;ve given me some clairty ...</title><content type='html'>Yes, thank you.  You&amp;#39;ve given me some clairty now and some great ideas that I&amp;#39;ll try implementing over the weekend.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1664217632350055880/8086161173571722818/comments/default/2481719092008032101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1664217632350055880/8086161173571722818/comments/default/2481719092008032101'/><link rel='alternate' type='text/html' href='http://murrayon.net/2009/11/anagram-code-kata-part-1-getting.html?showComment=1258135231829#c2481719092008032101' title=''/><author><name>Mike Murray</name><uri>http://www.blogger.com/profile/01990150469958605173</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_rps657FzHZ0/SFqveocwKfI/AAAAAAAAACA/Lg-4qg-Di48/S220/profilepic.PNG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://murrayon.net/2009/11/anagram-code-kata-part-1-getting.html' ref='tag:blogger.com,1999:blog-1664217632350055880.post-8086161173571722818' source='http://www.blogger.com/feeds/1664217632350055880/posts/default/8086161173571722818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-976757725'/></entry><entry><id>tag:blogger.com,1999:blog-1664217632350055880.post-1244522307663008273</id><published>2009-11-13T04:25:46.700-07:00</published><updated>2009-11-13T04:25:46.700-07:00</updated><title type='text'>Hi Mike,

Like you, I&amp;#39;m a bit wary of that fir...</title><content type='html'>Hi Mike,&lt;br /&gt;&lt;br /&gt;Like you, I&amp;#39;m a bit wary of that first spec you&amp;#39;ve written (that doesn&amp;#39;t mean it&amp;#39;s wrong obviously -- I&amp;#39;m new to this too :)). &lt;br /&gt;&lt;br /&gt;You&amp;#39;re right that you are testing data -- loading the wordslist.txt file and checking for the right number of anagram combinations. By the way, this is probably a good example of an integration test for when you are done! :)&lt;br /&gt;&lt;br /&gt;Whenever I have a hard problem like this that I am having trouble solving, I try and cheat. If you keep this class simple, but push the tricky bits lower down the heirarchy then that may help you start.&lt;br /&gt;&lt;br /&gt;Here&amp;#39;s how I would update the current spec to help implement your test (this won&amp;#39;t be a spoiler because I&amp;#39;d change the test. I&amp;#39;ll go into that later). &lt;br /&gt;&lt;br /&gt;In this case I can think of two responsibilities: getting the words from our file, and then counting the number of anagrams found in those words. So maybe your spec&amp;#39;s context could stub out a IFileReader or similar which will return an IEnumerable&amp;lt;string&amp;gt; (filled with some fake data) when asked to get the lines in wordslist.txt. You could then give these words to an IAnagramCounter, which will return 2530.&lt;br /&gt;&lt;br /&gt;Your test and because can remain the same -- only the context will change (which is what I love about this style of writing specs).&lt;br /&gt;&lt;br /&gt;Of course this isn&amp;#39;t specifying what your AnagramFinder should actually do... the kata aim is to print all the anagram combinations to the screen. So you may be better off trying this approach of pushing down logic but rewrite the spec to match the exact problem you are trying to solve.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m not sure if this will help or lead you down a dead end, but it is the approach I would take.&lt;br /&gt;&lt;br /&gt;Hope it helps!&lt;br /&gt;David</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1664217632350055880/8086161173571722818/comments/default/1244522307663008273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1664217632350055880/8086161173571722818/comments/default/1244522307663008273'/><link rel='alternate' type='text/html' href='http://murrayon.net/2009/11/anagram-code-kata-part-1-getting.html?showComment=1258111546700#c1244522307663008273' title=''/><author><name>David</name><uri>http://www.blogger.com/profile/05155410712205848106</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_wEsHWMWy090/SmMWL7hvCvI/AAAAAAAABRU/9sEncB940D0/S220/SimpsonsDave3.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://murrayon.net/2009/11/anagram-code-kata-part-1-getting.html' ref='tag:blogger.com,1999:blog-1664217632350055880.post-8086161173571722818' source='http://www.blogger.com/feeds/1664217632350055880/posts/default/8086161173571722818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-995875330'/></entry></feed>
