Code Review Weekly Newsletter

Code Review newsletter

Top new questions this week:

Regularity in the "Rusty Towel of Mutual understanding"

I have the following Java class: import java.util.Random; public class RandomNameGenerator { private Random rand; private static String[] prefixes = { "Ultimate", "Bloody", "Crooked", …

java game  
asked by Nit 26 votes
answered by rolfl 22 votes

Proof that I was wrong about Random Number Generators

I wrote this code to show how wrong I was about Random Number Generators. Context: From Comments to this answer to Regularity in the "Rusty Towel of Mutual understanding" that isn't …

c# random  
asked by Malachi 19 votes
answered by rolfl 9 votes

The Term-inator: Pi edition

The fourth project, continuing my C++ saga with terrible post names. :P An approximate value of pi can be calculated using the series given below: $$ \pi \approx 4 \left[ 1 - \dfrac{1}{3} + …

c++ beginner c++11 homework floating-point  
asked by syb0rg 17 votes
answered by Morwenn 10 votes

Beastly if statement, adding a course to one of 8 periods

I have this rather ghastly if statement and I'm sure there is a way to condense it, but I don't really know how. I was told a case statement would work but I've never used a case statement and I'm …

java beginner conditions  
asked by RexPRGMER 15 votes
answered by Mat's Mug 20 votes

Multiplayer bowling in Ruby, with variable skill

This is a multiplayer bowling simulator in Ruby. It allows for variable skill levels, and produces weighted random results for each roll based on those skill settings. The methods are grouped in four …

beginner ruby game conditions  
asked by a2bfay 11 votes
answered by Flambino 8 votes

Hangman game in Java - second try

Please look over my new object-oriented version of my Hangman game I posted here about two weeks ago. I know I should work more on commenting and be clearer and more descriptive of the methods and …

java beginner game console  
asked by Piwoot 11 votes
answered by maaartinus 12 votes

Improving the readability and efficiency of parser code

Recently, I had a test and I wrote this code, but they didn't like my code because it was "deplete and nested". In order to improve my skills, what would be good ways to make this more readable and …

php parsing  
asked by Emilio Gort 11 votes
answered by mjolka 6 votes

Greatest hits from previous weeks:

Finding repeating numbers in an array

I want to search through an array of n numbers and find the numbers that are repeated. So far I have this code, which does the job, but I find it to be a rather cumbersome method, but I can't seem to …

java homework interview-questions sorting search  
asked by Hatori Sanso 14 votes
answered by Phil K 11 votes

Implementation of Heap Sort

Is this the correct implementation of Heap Sort using Java? How can it be improved further? import java.util.Arrays; public class HeapSort { public static int heapSize; public static int …

java sorting heap  
asked by n1234 5 votes
answered by 200_success 6 votes

Can you answer these?

Finding the Cox regression coefficients in a mixed model for microarray data

I have written a code for a project which aims at finding the Cox regression coefficients in a mixed model for microarray data. The study was carried out on the Affymetrix Hgu133a platform. In the …

performance beginner r bioinformatics  
asked by Nilotpal 3 votes

Unity Dependency Injection

This is my first time using Unity so bear with me for a moment. I have a sample Visual Studio 2012 solution with 4 projects (but only two of these projects will be used with Unity). This is the …

c# dependency-injection  
asked by burritowarrior 1 vote

Zf2 and doctrine model implementation

I've implemented for the first time Doctrine-ORM on my SOAP server application; can you tell me if I could optimize some of the written ORM-related code? More specifically, is it a good practice to …

php5 zend-framework doctrine  
asked by kitensei 3 votes
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3