21
votes
Accepted
SudokuSharp Solver with advanced features
This is amazing. Especially for person who is not using C# every day for years.
My main concerns are
too many thing that are public that should be ...
17
votes
Accepted
Messed up Elevator Management System
There's also a generalization problem.
I agree! Whenever you start writing things like:
...
10
votes
Accepted
Arduino Snakes and Ladders
Arduino specifics
Disclaimer: I've got very little experience with Arduino programming. That said, my understanding is that the code you write essentially sits inside a function like this:
...
10
votes
Accepted
Rainfall - August 2016 Community Challenge (Hooray for graphs!)
NetworkX is nice, but you really aren't using a lot of its features, and the features you are using end up not being that pivotal; your implementation won't be changed (much) if you remove NetworkX ...
10
votes
Accepted
Complex tokenizer in C#
This looks well structured, with responsibilities nicely separated, but as they say: 'the devil is in the details'. Let's have a look:
CharStream
This class contains some surprising behavior:
...
8
votes
Accepted
Resistance is futile, Resistors have been dispatched to model your Resistance
Guards
Using so many if then and else is really weird in Haskell, I suggest using the ...
8
votes
Accepted
8
votes
Accepted
You can't sink me
You are correct in your statement that this is a pretty standard OOP implementation. The key signs are lots of mutable state and explicit loops. It's hard to give a line-by-line critique because a ...
8
votes
Complex tokenizer in C#
Looks pretty tidy, a few things:
Consider reversing the check for an empty source in CharStream:
...
7
votes
Rainfall challenge: how big are the basins?
This code snippet appears several times in your code:
...
6
votes
Simon Says: "Make me a pretty game"
The naming is inconsistent with the rest of the code in the borrowed extension method:
...
6
votes
Accepted
Rainfall Challenge (August 2016 Community Challenge)
The most obvious changes are to put most of those static methods into the Cell class.
If you thought little bit more carefully you could Tell that ...
6
votes
Accepted
Rainfall challenge: how big are the basins?
Tests - Focus and naming
Since you had provided them, the first bit of your code I looked at were your tests. As has been pointed out by @Roman Vottner, their names are not very descriptive. ...
6
votes
You can't sink me
Imperative Programming vs. Functional Programming
AlexFoxGill brought up the point that your code is structured a lot like something you'd write in an imperative language, however, the major ...
6
votes
Rock, Paper, Whatever - A small commandline game
First things first:
1.PEP8
Please run any linter, since your code violates PEP8.
Tripple double quotes should be used in doctrings
Linebreaks(backslashes) are not recommended, preferred way is ...
6
votes
Accepted
Simple language tokenizer in C#
Much has already been said, but I think I've still got something to add:
Whitespace
Returning a separate token for each whitespace character is probably not very useful. If whitespace isn't ...
6
votes
Accepted
Elevator simulator
There are three types of elevator control systems that I am aware of: rheostat, push-button, and destination-control. Your simulator does not simulate any one of those three types.
I suggest you try ...
6
votes
Accepted
Finding the position in a triangle for the given challenge
Your current algorithm is very inefficient. I would use the following algorithmic approach:
...
5
votes
Accepted
When it rains, it pours - August 2016 Community Challenge
The classes feel empty because you are basically just using fancy dictionaries and a bunch of functions. Don't get me wrong - that's basically all a class is, but if you're going to commit to using ...
5
votes
Accepted
Wandering water ways
I've been looking at this code for a good long while now, and I must admit I don't have much in terms of a review. It's all nicely done!
What few quibbles I have are minor:
...
5
votes
Chutes & Ladders Board Generator (June 2016 Community Challenge)
Your algorithm for getting a collection of random deltas could be improved. It checks for collisions each number it adds, which is O(n) each time, and it keeps creating a new random number until ...
5
votes
Accepted
Sketch of Chutes and Ladders game
I'm a little bothered by the piecemeal conversion from rectangular to polar coordinates. I think I'd rather wrap them up into a little neater package:
...
5
votes
Accepted
Parameterized Chutes & Ladders simulator using SQL stored procedure
This is a simple review, but I figure I had to start some where.
there are a few comments that I don't think are necessary to understand the code.
...
5
votes
Recursive and flexible approach to Tic-Tac-Toe
More than four years later... I discovered a bug in the code below:
...
5
votes
Rock, Paper, Whatever - A small commandline game
i think a win/lose/draw statistics would be really nice. It is quite easy to add:
...
5
votes
Simple language tokenizer in C#
These are just some quick thoughts off the top of my head.
Is there any particular functional reason for TokenType to be ushort?...
5
votes
Simple language tokenizer in C#
I have some notes in addition to answer of Jesse C. Slicer.
In IsKeyword method the first line is
...
5
votes
Finding the position in a triangle for the given challenge
| 7
| 4 8
| 2 5 9
| 1 3 6 10
We can see patterns in the columns. We'll take \$x\$ as the input to the function. \$x\$ starts at 1, which will map to the bottom row of the triangle.
The first column, ...
4
votes
Resistance is futile, Resistors have been dispatched to model your Resistance
Instead of guards, I would use
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
community-challenge × 127game × 43
java × 32
c# × 25
python × 19
rock-paper-scissors × 16
javascript × 12
calculator × 12
simon-says × 10
beginner × 9
python-3.x × 9
sudoku × 9
c++ × 8
object-oriented × 8
tic-tac-toe × 7
performance × 6
playing-cards × 6
ruby × 5
c++11 × 4
python-2.x × 4
recursion × 4
haskell × 4
css × 4
swing × 4
algorithm × 3