• ###### jamescurrancommented on "Remove First and Last Character" csharp solution

This comment is hidden because it contains spoiler information about the solution

• ###### jamescurrancommented on "Statistics for an Athletic Association" csharp solution

This comment is hidden because it contains spoiler information about the solution

• ###### jamescurrancommented on "Descending Order" csharp solution

This comment is hidden because it contains spoiler information about the solution

• ###### jamescurrancommented on "Mumbling" csharp solution

Nice to preallocate the StringBuilder, but why are you dragging floating point into the calculation? The result has to be an integer, so you might as well, do everything in integer math.

• ###### jamescurrancommented on "Grasshopper - Grade book" csharp solution

This comment is hidden because it contains spoiler information about the solution

• ###### jamescurrancommented on "Difference of Volumes of Cuboids" csharp solution

Tsk,Tsk. You always do the entire calculation twice. sloppy & wasteful.

• ###### jamescurrancommented on "Maximum Length Difference" csharp solution

This comment is hidden because it contains spoiler information about the solution

• ###### jamescurrancommented on "Beginner Series #2 Clock" csharp solution

This comment is hidden because it contains spoiler information about the solution

• ###### jamescurrancommented on "Beginner Series #2 Clock" csharp solution

The kata specification assures us that the parameters are in range, so there's no point in checking.
Further, checking you are doing is insufficent and misleading. You check for too low, but not too high. And it's wrong. Given Past(-1, 1,0) will return 60000, but it's an invalid time. There is no correct answer. If you needed to check the range, it should be:

``````if (h <0 || h > 23)
throw new ArgumentOutOfRangeException("h", "Hour must be in range (0...23)");
``````
• ###### jamescurrancommented on "Is he gonna survive?" csharp solution

He has defeated all challengers. He has not lost to anyone. That's a victory.

• ###### jamescurrancommented on "Is he gonna survive?" csharp solution

Division is the slowest of the basic arithmetic operations, and you do the same division TWICE? What's wrong one division with a simple ">=" ?

• ###### jamescurrancommented on "Is he gonna survive?" csharp solution

Why are we dragging floating point math into a simple integer calculation?

• ###### jamescurrancommented on "Is he gonna survive?" csharp solution

If there are zero dragons, he's still a hero, even if he has no bullets, which makes the first clause in the if() both unnecessary and conterproductive.

• ###### jamescurrancommented on "Is he gonna survive?" csharp solution

If there are zero dragons, he's still a hero, even if he has no bullets, which makes the second clause in the if() both unnecessary and conterproductive.

• ###### jamescurrancommented on "Is he gonna survive?" csharp solution

Why should he fail if the number of dragons is zero? That should be an easy win for him.