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 plpgsql  
asked by Phrancis 18 votes
answered by 200_success 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 16 votes
answered by Pimgd 14 votes

Simple random number generator

I have been wanting to learn programming for some time now and decided to really give it a shot today. I have edited and read lots of things in Java to fix small issues but never written from scratch. …

python beginner python-2.7 random  
asked by Dzzs 13 votes
answered by paritosh 11 votes

How is my CMS design? Any security, design, or other issues?

I am trying to learn PHP in depth by creating this personal CMS. I try to utilize OOP concepts and do best I can... The way I am trying to design this CMS is to keep including 'modules' within a page …

php oop design-patterns security  
asked by HelpNeeder 13 votes
answered by shudder 8 votes

Python - Minesweeper

I'm new to Python (and generally to programming), and I have recently written this Minesweeper game: import random import string import os class Square(object): """Represent a square in the cell. …

python beginner game python-2.7  
asked by ThatBoredPenguin 13 votes
answered by mleyfman 1 vote

Brainfuck interpreter in JavaScript

Just what it says on the tin: a brainfuck interpreter in JavaScript. function brainfuck(source) { var code = source.replace(/[^-+<>.,[\]]/g, '').split(''); // program code var loop = …

javascript brainfuck interpreter  
asked by Dagg 12 votes
answered by Flambino 5 votes

XML format for game data

I want to create an XML format in which I will define data objects for a game I am currently working on. The base idea is that I will have Elements which can be combined in other Elements, Items or …

game xml  
asked by SebastianSG 12 votes
answered by rolfl 9 votes

Greatest hits from previous weeks:

Merge Sort in C++

I've written this code for a merge sort, which is meant to implement the pseudo-code from Cormen's Introduction to Algorithms: #include <iostream> #include <cstdlib> using namespace std; …

c++ sorting mergesort  
asked by Chiffa 3 votes
answered by Loki Astari 6 votes

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

Can you answer these?

Object pool implementation

Below is my implementation of a pool. It is based on a hash table and supports using strong, soft or weak references to store objects. At the start there is a builder class to configure and create …

java data-structures hash-table  
asked by Alex 2 votes

Discount curve from instant rate

This my first foray in F#, and I cannot think (yet) functional. I have implemented an interface for a discount curve and the implementation for a piecewise constant instant rate implementation. I …

beginner f#  
asked by BlueTrin 3 votes

Getting all likes from a specific user on a news wall with fewer graph API calls

Right now, my solution counting likes of a specific user is Starting a recursive call on the "/{user-id}/posts" edge Iterate through all posts On each post iterate through each like on the likes …

javascript api graph facebook  
asked by Cornelius Bütikofer 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