Code Review Weekly Newsletter

Code Review newsletter

Top new questions this week:

Tired of FizzBuzz yet?

There have been many FizzBuzz questions lately, and here is one more! Granted, it is pretty straightforward to do FizzBuzz with SQL using calculations. So instead, I'm going to do a FizzBuzz which …

sql fizzbuzz postgresql stored-procedure  
asked by Phrancis 17 votes
answered by 200_success 14 votes

FizzBuzz in Brainfuck

Inspired a bit by a previous Brainfuck question and the recent fizzbuzz invasion, I decided to make FizzBuzz in Brainfuck. The code is entirely my own, except for the inclusion of the Printing a …

fizzbuzz brainfuck  
asked by Simon André Forsberg 16 votes

Blackjack Strategy

I am creating a Blackjack simulator in Java in order to better understand the language. I have written the basic strategy section for a player and it is terribly long. Is there a better way to do …

java beginner game playing-cards  
asked by user2926358 13 votes
answered by Pimgd 11 votes

Reusability vs Simplicity

I have a small game I'm working on with a set of interfaces: IHavePosition: public interface IHavePosition<T> { T Position { get; set; } } ICanMove: public interface ICanMove<T> : …

c# generics inheritance interface  
asked by Nick Udell 13 votes
answered by Simon André Forsberg 20 votes

How can I better name my tests?

I am relatively new to TDD and am trying to adopt better names for my tests. I wrote the following tests abruptly and have since refactored them to the best of my ability, but despite my best …

c# unit-testing naming  
asked by ByteBlast 12 votes
answered by unholysampler 8 votes

Checking conditions before allowing a play button to become visible

I have this code to check a couple conditions before allowing a play button to become visible. Is there anything to do to consolidate this code, possibly shrink it down some? var isNodeWebkit = …

javascript jquery  
asked by user2867494 11 votes
answered by janos 13 votes

Categorising a number in JavaScript

I've written a function that takes a number and returns a value depending on where that number lies on a pre-defined scale. That's probably a little confusing so I've put the code below and added a …

asked by Sam Beckham 11 votes
answered by Greg Burghardt 12 votes

Greatest hits from previous weeks:

Set of jQuery .onclick functions

I am hiding and fading in different content on the same page using jQuery to hide() and fadeIn() the content depending on which link is clicked. It works how I want it to, but the way I've written …

javascript jquery  
asked by crm 15 votes
answered by Topener 27 votes

ASP.NET MVC using Repository pattern

I am just trying to use ASP.NET MVC using repository pattern. Am I doing something wrong here? Model - Contains the model public class Contact { public int Id { get; set; } public string …

asked by Ashish Gupta 5 votes
answered by tugberk 3 votes

Can you answer these?

Open AL/LWJGL quesitons

Sorry if this is kind of 'Full' of information, I am new to the Open AL API, I have used Open GL and have a good understanding of how the rendering pipeline works and just want to make sure I don't …

java audio  
asked by Rob Nicholas 4 votes

Custom iterator implementation returning OpenCV Mat

I have written an adapter class that allows iteration over the rows of a Mat object from OpenCV. For those interested, here is the Mat documentation, but the salient points are as follows: Mat is a …

c++ iterator opencv  
asked by Aurelius 7 votes

Multi-user server connection handling

I'm writing a program and I have a server that needs to be able to handle multiple client connections at once doing many different things. I'm using the Qt library, so I handle new connections like …

c++ qt  
asked by Lighthat 3 votes
Subscribe to more Stack Exchange newsletters

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

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

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