Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

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

"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

Chrome extension that marks Reddit entries with clickbait sources

So, I've created my first Chrome extension! What this does is it highlights every post on Reddit that comes from a source of dubious quality. It provides a few sources by default and allows the user ...

javascript html css google-chrome reddit  
asked by Jeroen Vannevel 8 votes
answered by Joseph the Dreamer 3 votes

Setting up a development environment

I'm looking for feedback on improving the structure of this code. Also, I could not find the command line executable for Chrome. General feedback is also requested. # # # # Divider - configures ...

bash  
asked by cade galt 0 8 votes
answered by janos 12 votes

Program to index a book

Indexing a book. Write a program that reads in a text file from standard input and compiles an alphabetical index of which words appear on which lines, as in the following input. Ignore case ...

java beginner hash-map  
asked by In78 7 votes
answered by Tunaki 9 votes

Greatest hits from previous weeks:

Snake game using PyGame

I wrote a simple Python snake game which is about 250 lines of code. Can someone give me some advice on how I can refactor/make it better? game.py # game.py - 3/22/2013 import pygame, sys, os from ...

python array pygame snake-game  
asked by Ryan 11 votes
answered by Gareth Rees 18 votes

jQuery dynamic elements like TR and TD, add to HTML table

Is it possible to create dynamic TR and TD elements in an HTML table? Something similar but better than this: jQuery(document).ready(function() { $('button[name="new-title"]').on('click', ...

javascript jquery html  
asked by sebob 4 votes
answered by George 5 votes

Can you answer these?

Reporting the status of the actions of a group of SKSpriteNodes

Working on a little Sprite Kit game, I had the problem that I wanted a couple of things to wait until a group of sprite nodes had stopped their animation. I decided to use a GCD dispatch group to ...

objective-c concurrency grand-central-dispatch  
asked by Josh Caswell 4 votes

Game of Life using unordered set of coordinates

Previously I had been using an array of bool(dead/live) to represent cells. I looked on code review to see how other people have implemented Conway's Game of Life. Someone in the comments of a post ...

c++ game-of-life set  
asked by dylan 2 votes

Fuzzy grep for fuzzy bears in pure Python

I am aware of the Python modules galore to do this, but this was partially a learning experience and partially all the functionality I need and no more. I'm writing a simple interpreter for a ...

python file search  
asked by tac 7 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