Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

Drawing an Archimedean spiral using Pillow

From Rosetta Code: The Archimedean spiral is a spiral named after the Greek mathematician Archimedes. It can be described by the equation: $$r=a+b\theta$$ with real numbers \$a\$ and \$b\$. ...

python graphics  
asked by Dair 9 votes
answered by Gareth Rees 6 votes

Using generators to print the tree-like structure of a project

The goal of this code is to print the entity tree of a VHDL project. There are a readme and very minimal tests on the github repo. I am trying to refactor the code to use generators in order to ...

python dictionary iterator generator  
asked by nathdwek 8 votes
answered by alexwlchan 1 vote

Find Top 10 IP out of more than 5GB data

I have a few of files, and total size of them is more than 5 GB. Each line of the files is a IP address, looks like: 127.0.0.1 reset success ... 127.0.0.2 reset success how can i find ...

java mapreduce  
asked by Cherlex 8 votes
answered by rolfl 10 votes

List of all possible monetary totals from a set of cash

This code prints out a list of all the possible sums that can be made from a set of cash. For example, say you have 2 fives and 2 tens in your wallet. With these, you can make exact change for $0, ...

python beginner python-3.x  
asked by Vermillion 8 votes
answered by Gareth Rees 8 votes

Conway's Game of Life python

It's my implementation. Can I get some opinions on it? import random import os import time class Game: def __init__(self, turns, w, h): self.board = [] for x in range(0, h): ...

python game-of-life  
asked by Stepan Vanzuriak 7 votes
answered by Graipher 3 votes

Program to count vowels

After reading a certain question on the Stack Overflow website, I tried to write a solution to the problem just for fun. I'm, however, left with the nagging feeling there is a beautiful one-liner that ...

python python-3.x  
asked by Pythonic 7 votes
answered by Phrancis 11 votes

Search in a JSON structure after a key

This code is supposed to search for a specific key in a object or an array or a mix between both. Is there anything I can improve? function getAllObjectsIn(key, data, casesensitive){ var ...

javascript oop array search  
asked by Kastel 7 votes
answered by Mike Brant 7 votes

Greatest hits from previous weeks:

Interview coding test: Fizz Buzz

I was recently given a coding test to complete for a potential client. It was a FizzBuzz-type of thing with a two-hour time limit. I had a request to write basic FizzBuzz, then add a special case, ...

java interview-questions fizzbuzz  
asked by Engineer Dollery 35 votes
answered by Mat's Mug 58 votes

Snake game in C++

This is my version of the Snake game, written in C++. How could it be improved, and what general advice would be useful for future projects? #include <iostream> #include <conio.h> void ...

c++ beginner game snake-game  
asked by TheKittyKat 26 votes
answered by Yann 24 votes

Can you answer these?

Combining fragments of data in a generator pipeline

I tried to follow the generator pipeline style (see David Beazley's famous presentation) for finding duplicate files (similar to answers here). It seems pretty straightforward with MapReduce, so I ...

python generator  
asked by max 3 votes

HTML and jQuery audio player

I had a task to create simple audio player. So far I managed to do functionalities and all that is needed. Other part of same task was to make it semantic and modular. I read some blog posts and ...

jquery html5  
asked by wired 3 votes

Atomas clone in Python

Here is my crappy clone of Atomas, a puzzle game where you combine small atoms into more valuable ones. # Pytomas (an Atomas build for Python) # Author: Qwerp-Derp from random import randint # ...

python game python-2.7  
asked by Qwerp-Derp 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