Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 140016

Add this tag to your question to indicate that you are new to the language of your code. This will often be taken into consideration by reviewers when assessing your code.

2 votes

Python program for healthy schedule

Variable naming Your variables should be named something more telling than breakcount , breakcount1 and breakcount2. I suggest breakcount_water (and _eyes , _physical) instead. Simpler logic Instead o …
user985366's user avatar
  • 1,735
2 votes

Ruby Mastermind game project with AI

Code 1 while i <4 if @guess[i] == @code[i] @updated_comp_guess[i] = @guess[i] i+=1 else i +=1 end end In both the if and else you are incrementing i by 1. That can be …
user985366's user avatar
  • 1,735
15 votes
Accepted

Chaos with Newton’s method

Formatting Run your code through a style checker / formatter to make it more readable and follow a standardized code style. For example this one https://codebeautify.org/javaviewer Don't repeat yourse …
user985366's user avatar
  • 1,735
12 votes

Simulating Brownian motion for N particles

Naming The names are not wrong, but I find them very verbose, which makes the code longer and harder to read and write. private double xPosition; private double yPosition; private final double particl …
user985366's user avatar
  • 1,735
4 votes

Python Blackjack

Logic 1 def shuffle(self): '''shuffle the card deck''' if len(self.cards) > 1: random.shuffle(self.cards) The len check is unnecessary. shuffle will not crash on a list with 0 or 1 el …
user985366's user avatar
  • 1,735
3 votes

Interactive Mandelbrot set pictures

Comment 1 You are not using the r variable in createRandomColors , so there is nothing random in it. Comment 2 if (nextRecurrence.abs() >= 2) return i; You should use brackets after if, don't try to …
user985366's user avatar
  • 1,735
5 votes
Accepted

Python 3 Curses Terminal Tetris

In general it looks structured, using good names, split up into functions etc. Those are good things. I have some comments but remember these are my opinions, I can't say that it's right or wrong and …
user985366's user avatar
  • 1,735
11 votes

Simple text-based RPG in Java

Some of your switch cases are unnecessarily long, repetitive and include lots of code. You could easily replace them with indexed arrays, making it easier to read, shorter, and easier to expand with …
user985366's user avatar
  • 1,735