Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

Project Euler #7 10001st prime

I decided to start working on the Euler project exercises. I'm doing fine for now but the seventh problem is running quite slow and I can't think of anything to make it work faster. It takes around ...

c# performance beginner programming-challenge primes  
asked by denis 20 votes
answered by nhgrif 66 votes

Top 10 editors partitioned by year

I wanted to get some stats on who has done the most edits on Code Review, so I wrote the following query on SE Data Explorer. All improvement suggestions are welcome. Note that I used a cursor to ...

sql stackexchange t-sql  
asked by Phrancis 8 votes
answered by dnoeth 4 votes

Error-testing be with cucumber/capybaraweb

I'm working on writing tests for a rails application using cucumber and capybara. I have a scenario for a user editing a post, and making it invalid. The scenario looks like this: Scenario: I edit ...

unit-testing ruby-on-rails comparative-review webdriver cucumber  
asked by user2367593 8 votes
answered by sled 5 votes

Bucket sort in Haskell

As a first step in learning Haskell I am solving this problem, which involves finding the Rith-ranked numbers, given some input list and many Ri. In an imperative language I would make a zeroed array ...

performance haskell sorting  
asked by stewbasic 7 votes
answered by Gurkenglas 0 votes

Checking for surrounding mines

Am trying to create a minesweeper game, I have the following code which has to many nested ifs, I want to change the code to take out the nested ifs and make it better to read. But I am stuck on how ...

java minesweeper  
asked by Novice 7 votes
answered by mafagafogigante 1 vote

Pong-like game in C++ and Allegro5

I've been working on this pong game for the last 10 days, and I'd like to know of your opinions about it, what could I change to make my code better? #include <stdio.h> #include ...

c++ game  
asked by Luna 7 votes
answered by Edward 11 votes

Eraser tool for GIF editor

I am making a GIF editor in C#, and I am currently working on the eraser tool. I am not sure what I can do to make it more efficient, because when I make the thickness (diameter) more than 30 (pixels) ...

c# performance image wpf  
asked by Jason Heddle 6 votes
answered by almaz 1 vote

Greatest hits from previous weeks:

Queue Implementation using a Linked List

For understanding the concepts, I've implemented the Queue data structures using a linked list. Is there anything to improve? LinkList.java public class LinkList { private static class ...

java beginner data-structures linked-list queue  
asked by Arun Prakash 7 votes
answered by Pimgd 14 votes

Generate random numbers without repetitions

I want to generate a list of N different random numbers: public static List<int> GetRandomNumbers(int count) { List<int> randomNumbers = new List<int>(); for (int i=0; ...

c# random  
asked by Kao 56 votes
answered by rolfl 58 votes

Can you answer these?

Set the direction a Sprite faces based on its velocity

I'm learning Phaser, and decided to make a Mario-type clone. I'm writing a function that ensures the sign of the Sprites horizontal scale matches the sign of it's velocity. For a Sprite that's ...

javascript game typescript  
asked by Carcigenicate 1 vote

Union-find implementation

Here are a few questions on my mind: What improvements to the above code can you think of? I want to say new UnionFind(x) where x is a Set[T] (I emphatically don't want to say new ...

algorithm data-structures scala  
asked by Jonas Kölker 2 votes

UDP server for a multiplayer game using socketserver

I am making a multiplayer platforming game, and currently there are server performance issues once I have about 7+ clients connected. I was told earlier last week that I should investigate ...

python performance server udp  
asked by Dysprosium Dysprosium 2 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