Skip to main content
Share Your Experience: Take the 2024 Developer Survey
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 ...
Vadim Ovchinnikov's user avatar
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: ...
forsvarir's user avatar
  • 11.7k
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 ...
Dan Oberlam's user avatar
  • 7,804
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: ...
Pieter Witvoet's user avatar
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 ...
Alex's user avatar
  • 339
8 votes
Accepted

Chutes & Ladders Board Generator (June 2016 Community Challenge)

class Generator ...
Heslacher's user avatar
  • 50.4k
8 votes

Complex tokenizer in C#

Looks pretty tidy, a few things: Consider reversing the check for an empty source in CharStream: ...
ChrisWue's user avatar
  • 20.3k
8 votes

another Tic-Tac-Toe Game

Game-Loops You ask "Maybe also Ideas for the "game loop" (or explanation if you are using it or not)" Game-Loops are used for animated games (Space Invaders, Pacman, Doom, etc...). ...
Blindman67's user avatar
  • 22.1k
7 votes

Rainfall challenge: how big are the basins?

This code snippet appears several times in your code: ...
I'll add comments tomorrow's user avatar
7 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: ...
Graham's user avatar
  • 1,379
7 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, ...
hackvoip's user avatar
7 votes

another Tic-Tac-Toe Game

You don't really need a game loop in this situation because tic-tac-toe is not an animated game. If you ever wanted to use it, you should use requestAnimationFrame()...
Ridham Sharma's user avatar
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 ...
Bruno Costa's user avatar
  • 5,566
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. ...
forsvarir's user avatar
  • 11.7k
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 ...
Ethan Bierlein's user avatar
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 ...
Alex's user avatar
  • 1,622
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 ...
Pieter Witvoet's user avatar
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 ...
aghast's user avatar
  • 12.4k
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: ...
Graipher's user avatar
  • 41k
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: ...
Flambino's user avatar
  • 33k
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 ...
Risky Martin's user avatar
  • 1,611
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 ...
Dan Oberlam's user avatar
  • 7,804
5 votes

Recursive and flexible approach to Tic-Tac-Toe

More than four years later... I discovered a bug in the code below: ...
Simon Forsberg's user avatar
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: ...
Jerry Coffin's user avatar
  • 33.6k
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. ...
Malachi's user avatar
  • 28.6k
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?...
Jesse C. Slicer's user avatar
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 ...
Maxim's user avatar
  • 2,542
4 votes

Random Chutes and Ladders Board Generator (June 2016 Community Challenge)

After looking through this code with fresh eyes, I identified a way to improve the construction of the constraint matrix; following the guidance from the meta site, I'm posting this as a self-answer ...
josliber's user avatar
  • 1,181
4 votes

Water flowing swiftly over farmland – The August 2016 Community Challenge

I think this code is great. Using weak references to refer to a Basin is a great way to prevent retain cycles with automatic reference counting. One suggestion I ...
Eric Xue's user avatar
  • 173
4 votes

Complex tokenizer in C#

...
t3chb0t's user avatar
  • 44.3k

Only top scored, non community-wiki answers of a minimum length are eligible