Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

Python backend interview: task management system for workers

I've recently applied to a backend position and I was asked to complete a take-home interview question. I thought the question was rather simple and I completed in about an hour although I was told it ...

python interview-questions  
asked by DGDD 12 votes
answered by alexwlchan 11 votes

Implement rate limiting by cookie ID

I want to develop a simple in-memory web request rate limiting module, I am allowed to have 50 requests from each unique cookie ID every 60 seconds. I am wondering if the following code is an optimal ...

java  
asked by jcm 11 votes
answered by Mat's Mug 8 votes

n-queens puzzle in Python

I want to increase the efficiency and reduce the time complexity for the n-queen problem in n*n matrix chess. I am able to run only still (11*11) in normal time otherwise for the big number it is ...

python performance algorithm python-3.x n-queens  
asked by Pooshan Vyas 9 votes
answered by vnp 0 votes

Pokemon stats calculator

I have a simple working (so it's not a hypothetical stub) framework for calculating Pokemon stats that will later be incorporated in a game. It uses the LCRNG from the first game in order to be as ...

c++ beginner c++11 design-patterns data-structures  
asked by user100191 9 votes
answered by David 6 votes

If ComparisonIsTrue(thisPost, ComparisonOperator.NotEqualTo, goodCode) Then Me.Answer

This is a follow-on to a global enum for comparison operators. I wanted to pass a logical expression E.G. >= someValue as a parameter to a function, so I made an Enum and an accompanying function ...

vba excel math-expression-eval  
asked by Kaz 8 votes
answered by Pimgd 7 votes

"Magic Squares" assignment

The assignment is to take a "Magic Square" .txt file (where the horizontal lines, vertical lines and diagonal line all add up to the same number), read it and prove that they are in fact magic ...

java beginner  
asked by Cormack 8 votes
answered by coderodde 6 votes

ToyVM - a small and simple virtual machine in C - follow-up

(See the previous and initial iteration) Now I have refactored the code in order to conform to the suggestions made in the answers to the first iteration. I have this: toyvm.h: #ifndef TOYVM_H ...

c assembly virtual-machine  
asked by coderodde 8 votes
answered by Edward 7 votes

Greatest hits from previous weeks:

Dynamic filtering and sorting with Entity Framework

I'm developing an application using ASP.NET MVC 3 and Entity Framework 4.1. In that application I have a lot of paged lists. Users can filter and sort these lists. This results in code like the one ...

c# asp.net-mvc-3 entity-framework  
asked by Kristof Claes 21 votes
answered by shuniar 11 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 15 votes
answered by konijn 17 votes

Can you answer these?

Josephus permutation - follow up

Follow up of this question Changes: The pop_min function now panics if the tree is empty. Moved the size attribute to the Tree struct. Applied most of the suggestions given by the answers. Added ...

performance tree rust  
asked by MAG 3 votes

Terminal Chat Room

Summary I have written a pair of Perl scripts that form a UDP chat room allowing users to send messages over the internet with RSA encryption, making the messages imune to MITM attacks. The scripts ...

multithreading regex networking perl chat  
asked by psychedelic_alex 3 votes

Determining the HTTP status code to return for a request

I have a piece of code that I would like to refactor but can't figure how to do it. This is a method from a Play controller where I have to verify many precondition and respond different status for ...

scala comparative-review conditions http  
asked by Anonymous 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