14,551,068 members

# C#

 Re: problem to make a second recording ago248619-Mar-20 2:06 ago2486 19-Mar-20 2:06
 Re: problem to make a second recording OriginalGriff19-Mar-20 2:26 OriginalGriff 19-Mar-20 2:26
 Re: problem to make a second recording ago248619-Mar-20 3:04 ago2486 19-Mar-20 3:04
 Re: problem to make a second recording OriginalGriff19-Mar-20 3:22 OriginalGriff 19-Mar-20 3:22
 Re: problem to make a second recording ago248619-Mar-20 3:27 ago2486 19-Mar-20 3:27
 Re: problem to make a second recording ZurdoDev19-Mar-20 3:51 ZurdoDev 19-Mar-20 3:51
 How to solve 100 Doors Kata using TDD in C# User-862169518-Mar-20 5:30 User-8621695 18-Mar-20 5:30
 Re: How to solve 100 Doors Kata using TDD in C# Bohdan Stupak19-Mar-20 5:12 Bohdan Stupak 19-Mar-20 5:12
 IMO it's a bit impractical to use TDD here since you should have a test case for every door, which means having 100 cases. What you can do to reduce number of test cases is to use test oracle technique. You implement the simplest algorithm possible and compare your solution to output it renders. For example ```public static void OracleImplementation(bool[] doors) { for (int p = 0; p < 100; p++) { for (int d = 0; d < 100; d++) { if ((d + 1) % (p + 1) == 0) { doors[d] = !doors[d]; } } } } [Fact] public void Test() { var a = new bool[100]; OracleImplementation(a); var b = new bool[100]; YourCleverImplementation(b); b.Should().Equal(a); }``` Note that I've used here a rough sketch of what FluentAssertions do. It may be incomplete tho. Now in `YourCleverImplementation` you can come up with more witty solution i.e. select all perfect squares from 1 to 100 and just set your array items to true at indices that are perfect square - 1. Alternatively, you can use this approach as a test oracle and come up with one more implementation. I'll leave the rest up to you
 problem retrieving info from one table to insert it into another ago248618-Mar-20 3:13 ago2486 18-Mar-20 3:13
 Re: problem retrieving info from one table to insert it into another OriginalGriff18-Mar-20 3:50 OriginalGriff 18-Mar-20 3:50
 Re: problem retrieving info from one table to insert it into another ago248618-Mar-20 4:11 ago2486 18-Mar-20 4:11
 Re: problem retrieving info from one table to insert it into another OriginalGriff18-Mar-20 4:17 OriginalGriff 18-Mar-20 4:17
 Re: problem retrieving info from one table to insert it into another ago248618-Mar-20 4:24 ago2486 18-Mar-20 4:24
 Re: problem retrieving info from one table to insert it into another OriginalGriff18-Mar-20 5:01 OriginalGriff 18-Mar-20 5:01
 Re: problem retrieving info from one table to insert it into another ago248618-Mar-20 5:12 ago2486 18-Mar-20 5:12
 Re: problem retrieving info from one table to insert it into another OriginalGriff18-Mar-20 5:13 OriginalGriff 18-Mar-20 5:13
 Re: problem retrieving info from one table to insert it into another OriginalGriff18-Mar-20 5:16 OriginalGriff 18-Mar-20 5:16
 Re: problem retrieving info from one table to insert it into another ago248618-Mar-20 5:30 ago2486 18-Mar-20 5:30
 Re: problem retrieving info from one table to insert it into another ago248618-Mar-20 5:33 ago2486 18-Mar-20 5:33
 Re: problem retrieving info from one table to insert it into another OriginalGriff18-Mar-20 5:39 OriginalGriff 18-Mar-20 5:39
 Re: problem retrieving info from one table to insert it into another ago248618-Mar-20 5:42 ago2486 18-Mar-20 5:42
 Re: problem retrieving info from one table to insert it into another OriginalGriff18-Mar-20 5:52 OriginalGriff 18-Mar-20 5:52
 Re: problem retrieving info from one table to insert it into another ago248618-Mar-20 5:56 ago2486 18-Mar-20 5:56
 Re: problem retrieving info from one table to insert it into another OriginalGriff18-Mar-20 6:01 OriginalGriff 18-Mar-20 6:01
 Re: problem retrieving info from one table to insert it into another Luc Pattyn18-Mar-20 6:04 Luc Pattyn 18-Mar-20 6:04
 Last Visit: 6-Jun-20 14:21     Last Update: 6-Jun-20 14:21 Refresh � Prev1...20212223242526272829 Next �