Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

All RGB colors in one image

This is a program to solve: Images with all Colors from Code Golf: Make images where each pixel is a unique color (no color is used twice and no color is missing). Create the image ...

beginner scala  
asked by Utku Demir 12 votes

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 11 votes
answered by EBrown 13 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 10 votes
answered by Gareth Rees 4 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

A Binary Editor with Live Text Preview

This is a tool I needed for some other things (it's incomplete, but almost done) which is essentially just a text-editor that has two text-boxes: the left being the binary view / raw bytes, the right ...

c# converting wpf xaml text-editor  
asked by EBrown 7 votes
answered by t3chb0t 2 votes

Quickselect algorithm in Swift

I recently answered a question on Stack Overflow about finding the k-largest element in an array, and present my implementation of the Quickselect algorithm in Swift for review. This is essentially ...

algorithm swift  
asked by Martin R 7 votes
answered by Fluidity 0 votes

Greatest hits from previous weeks:

Implementing Student Record Java program

Is there a better way to implement my code in Java? I used to code this in C++ and pretty much worked right off the bat. But in Java, it is different, as it won't let me input data on the string ...

java beginner  
asked by CinnamonRii 2 votes
answered by trooper 0 votes

Grouping elements in array by multiple properties

During work, I was given this task: to group elements with similar properties in the array. In general, the problem is as follows: var list = [ {name: "1", lastname: "foo1", age: "16"}, ...

javascript sorting properties  
asked by Saike 24 votes
answered by konijn 28 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

Extending Array to make a stack that bubbles unused objects up and active object down

Array.prototype.fastStack To combat GC and its impact on animation I created Array.fastStack that adds to the array prototype. It's a sort of stack that bubbles unused objects up and active object ...

javascript array memory-management extension-methods  
asked by Blindman67 3 votes

Achieving thread safety in a payment service library

I wrote this code a while ago, which is an excerpt of a payment service library: # recover a transaction details from the Wirecard API module Wirecard module Elastic class Request class ...

ruby multithreading  
asked by Laurent 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