Skip to main content
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

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,814
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

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.3k
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

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
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

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

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
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

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

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

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.7k
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,814
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

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

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
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
4 votes

Complex tokenizer in C#

...
t3chb0t's user avatar
  • 44.3k
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

'*' present in the print statement-PYTHON

** this means power , for example : 5 ** 2 which mean : 5 squared --> 25. ...
AEM's user avatar
  • 167
3 votes

When it rains, it pours - August 2016 Community Challenge

Here are some things that may help you improve your code: Use a better algorithm Since it hasn't been pointed out yet, the algorithm is faulty. The problem can easily be seen with simple input in ...
Edward's user avatar
  • 66.5k
3 votes

When it rains, it pours - August 2016 Community Challenge

Minor automatic bookkeeping note: You do basins[new_basin_coords].size = len( basins[new_basin_coords].cells) but since that relationship (A ...
pjz's user avatar
  • 2,296
3 votes
Accepted

Rusted Mandelbrot

The code was very easy to read and it seems like you took your time to follow the normal coding style; kudos! Some small nits: There's no need for an explicit ...
Shepmaster's user avatar
  • 8,658
3 votes
Accepted

Swiftly turning wheels – The May 2017 Community Challenge

Perhaps the fact that this has gone unanswered for quite some time is a testament to the quality of the code. It appears the code is separated well into individual files and indentation is consistent. ...
Sᴀᴍ Onᴇᴌᴀ's user avatar

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