Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

Tokenizer for my programming language

Here's my attempt at porting the Lua codebase for my programming language to C++(11). This is just the first step, the tokenizer, and I wanted to remove all the bad performance / practices / code ...

c++ c++11 language-design lexical-analysis  
asked by user6245072 11 votes
answered by Loki Astari 4 votes

Lines, intersections and terrible unit tests

I needed Line and LineF for the next stage of a project I'm working on, so I developed them. I also needed to determine if two lines intersected, preferably as cheaply as possible. (Lots of physics ...

c# .net computational-geometry physics  
asked by EBrown 11 votes
answered by Nikita B 5 votes

Showing links to Contributor Breakdown on Stackoverflow Docs

So Stackoverflow Documentation has added "Contributor Breakdown". For any given topic (and example) people can display who contributed in which way. That page is only available if you know the link ...

javascript stackexchange userscript  
asked by Vogel612 10 votes
answered by Mast 6 votes

All the knight moves in all the right places

Challenge Find all possible moves for a knight on an empty chessboard. Specifications The first argument is a path to a file. The file contains multiple lines. Each line is a test case ...

beginner c programming-challenge  
asked by Legato 9 votes
answered by I'll add comments tomorrow 12 votes

Return the next power of two

Given an unsigned integer \$N\$, I want to return \$P\$ with \$P\$ being a power of two such that \$P \ge N\$. Examples: 1 -> 1 2 -> 2 3 -> 4 5 -> 8 The goal is to provide a very fast ...

c++ performance bitwise  
asked by Mr_Pouet 9 votes
answered by Adriano Repetti 10 votes

Monty Hall Optimization in Python 3.5

This is for homework but the deadline is over and I know the implementation is correct because it concurs with the math. At this point I just want to check my implementation for potential ...

python python-3.x random numpy simulation  
asked by jeremy radcliff 8 votes
answered by Graipher 3 votes

Reading a repetitive file with repetitive code

I made this code for take some data from a .txt file. The text file is a large list of data from temperature with a format that is repetitive and have some lines at the beginning with the station ...

python python-3.x parsing csv file-structure  
asked by Manuel Alejandro 8 votes
answered by 200_success 14 votes

Greatest hits from previous weeks:

Very basic calculator using methods

I have made a basic calculator using methods. This is my first attempt at using methods and would like to see if I can improve on this as there is a lot of repeated code. import java.util.Scanner; ...

java beginner calculator  
asked by Niall Szalkai 15 votes
answered by asteri 13 votes

Update only modified fields in Entity Framework

I'm working on a website on ASP.NET MVC4 and EF5. I want to ensure that only modified values are updated in the database. I'm using a unit of work pattern and repositories for data work. Here's the ...

c# entity-framework asp.net-mvc-4  
asked by Narayana 11 votes
answered by Max 11 votes

Can you answer these?

2-tier c# cache

I have slightly altered Marc Gravells 2-tier cache code which can be seen here. I changed it to use Stackexchange.Redis instead of Booksleeve and also added some retry logic and serialization. ...

c# cache redis  
asked by Peuge 3 votes

Checking for automating water topoff

The purpose of this code to is check the 3 float switches in the laminator chamber for water. The float switches vote with the majority winning. A momentary switch must be pressed for the section of ...

arduino  
asked by Sean 3 votes

PyQt GUI to add and remove dots

Initially I got this code: import sys import os import random from PyQt5 import QtWidgets from PyQt5 import QtGui from PyQt5 import QtCore random.seed(1) class Model(QtCore.QObject): ...

python oop python-3.x mvc pyqt  
asked by BPL 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