Code Review Weekly Newsletter

Code Review newsletter

Top new questions this week:

Code-Q2A - Copy code blocks from Questions to Answers

I came up with an idea for a userscript to simplify writing answers on Stack Exchange while writing a previous answer This userscript adds "Review"-links on the top of each code segment. When ...

javascript stackexchange userscript  
asked by Simon André Forsberg 14 votes
answered by rolfl 9 votes

API for looking up Japanese postal code

Most of my experience is in Python, Java and embedded C, and I need to learn Scala and Play for a new job. As an exercise, I decided to create a very simple API for looking up area by postal code, ...

scala json csv redis  
asked by bsa 14 votes

Rubberduck VBA Parser, Episode IV: A New Hope

My home-made wannabe-a-parser was wet behind the ears, so I started seriously looking into more mature alternatives, and ended up adding a dependency to the ANTLR lexer/parser generator tool, and ...

c# parsing antlr  
asked by Mat's Mug 12 votes
answered by Bruno Costa 3 votes

Simple LibGDX Pong game

I created my first java game in LibGDX and it's working fine but I'm 100% sure a lot of my code can be written shorter than now. Does anyone have tips how I can make this code better? Like the ...

java game android ios libgdx  
asked by Stefan 11 votes
answered by Heslacher 8 votes

Add JPanel to JFrame

I just finished a fairly easy homework assignment. Basically all I had to do was add six JPanels that were just text boxes with color names as the text. However, the color of the font had to match ...

java swing  
asked by user3530547 11 votes
answered by Hovercraft Full Of Eels 10 votes

Simple “secret message” decoder program

Since I am new to Java, I wanted to see if there were better ways of answering the same question. Are parts of my code redundant or maybe there's an easier way to get the same result? Problem J4: Big ...

java beginner caesar-cipher  
asked by quidproquo 10 votes
answered by Manny Meng 5 votes

Knowledge is power

Resurrecting my C++ saga, I was given this project for my CS2 class: This problem considers several ways to compute \$ x^n \$ for some \$ n \ge 0 \$. Write an iterative function power1 to ...

c++ c++11 homework cmake  
asked by syb0rg 10 votes
answered by Paul Senzee 4 votes

Greatest hits from previous weeks:

Implementation of Heap Sort

Is this the correct implementation of Heap Sort using Java? How can it be improved further? import java.util.Arrays; public class HeapSort { public static int heapSize; public static int ...

java sorting heap  
asked by n1234 7 votes
answered by 200_success 8 votes

Efficiently checking if a number is divisible by 3

I'm looking for code review, best practices and optimizations. public final class DivThreeEfficiently { private DivThreeEfficiently() {} /** * Returns true if the input number is ...

java bitwise  
asked by JavaDeveloper 26 votes
answered by 200_success 65 votes

Can you answer these?

PHP login script security check

I made an admin login script for my own CMS website that I'm making in Code Igniter 2.2.1 and I'd like to know what are the potential threats or some holes that I might have left open. This is how it ...

php security codeigniter  
asked by Kris 3 votes

Creating chat box with comet

I'm writing chat application. I would like to know if there are problems in this code. This function sends message: function sendMessage() { var text = $('#messageBox').val(); ...

javascript php jquery performance ajax  
asked by Garme 2 votes

Golang async but sequential enqueue with buffered channel

The objective of this program is to call enqueue sequentially with multiple URLs, and never block, fetching the URLs asynchronously, but on the order they were entered. In other words: keep calling ...

beginner asynchronous go  
asked by Rafael Barros 2 votes
Subscribe to more Stack Exchange newsletters

Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3