Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

Converting the weight of a potato into a letter grade

I've just started learning C# using Rob Miles' C# Programming Yellow Book and some related lab exercises from his website. I did one of them and produced a solution that works. In Miles' book, he says ...

c# beginner  
asked by S. Elliot Perez 18 votes
answered by EBrown 24 votes

How many days to Go?

Here's my first serious attempt at writing Go code. This program counts the number of days until a certain date and displays that in the system tray. To do that, it first reads the target date from ...

beginner datetime image io go  
asked by vvye 11 votes

Boggle board game solver in Python

I have written a Boggle board solver in Python 3. I would like comments on readability and structure. Thank you! Boggle Boggle is a board game with a 4x4 board of squares, each of which has a ...

python game python-3.x  
asked by David Kretch 11 votes
answered by Gareth Rees 6 votes

Counting the number of "on" bits in an int

Here is some code I wrote as a solution to Programming Exercise 15.3 in Stephen Prata's C Primer Plus, 6th Edition. It is probably worth pointing out that the title of the chapter is Bit Fiddling. The ...

c integer bitwise  
asked by David Bowling 9 votes
answered by JS1 11 votes

Cat fight (with rockets)

My code is attempting to implement FP in an efficient / readable manner into some of my video games. I realize this may be a bit subjective, but I feel there is enough merit / objectivity to be of ...

performance functional-programming swift immutable battle-simulation  
asked by Fluidity 8 votes

Color substitution in a BufferedImage

The setPixelColor function below changes the color of pixels. I need some suggestions to optimize this function. Example: public static void main(String[] args) throws IOException { ...

java performance image  
asked by J.D 7 votes
answered by 200_success 4 votes

Picking 10 distinct words 'randomly' from List of unique words

My goal is to pick 10 unique words randomly from a List containing 20 unique words. I would remove the duplicate word from the List whenever a duplicate word is added and decrement the for loop ...

java random  
asked by Zero 7 votes
answered by bowmore 10 votes

Greatest hits from previous weeks:

Simple Java animation with Swing

I am learning to use Java Swing and have made a simple animation that makes a small shape bounce around the predetermined borders of a panel. The program works well, but I am looking for feedback in ...

java swing animation  
asked by Jeremy Johnson 20 votes
answered by syb0rg 25 votes

Update only modified fields in Entity Framework

I'm working on a website on ASP.NET MVC4 and EF5. I want to ensure that only modified values are updated in the database. I'm using a unit of work pattern and repositories for data work. Here's the ...

c# entity-framework asp.net-mvc-4  
asked by Narayana 14 votes
answered by Max 13 votes

Can you answer these?

Sorting upcoming events listed in JSON

I've written my first program in GO, a command line tool that parses JSON containing events from a file or from STDIN and outputs the upcoming events in sorted order. Please critique it! package ...

beginner parsing sorting json go  
asked by Rohan Shah 3 votes

JavaScript Colour Converter

I've made a little colour conversion app, and below is my JavaScript. The app converts HEX values to RGB values and vice versa, as well as using a simple colour picker to get colours and convert them ...

javascript  
asked by luka 4 votes

Angular directive to fetch resources to fill a table

I created a directive that solves my immediate problem, but I'm trying to find ways to make it more reusable. My immediate problem was, I have a table and needed to fill in one of the columns with ...

javascript json angular.js  
asked by mdegges 4 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