Code Review Weekly Newsletter

Code Review newsletter

Top new questions this week:

Who's using what where - turning code into symbols

The Rubberduck project is coming along pretty nicely, and for the next version the parsing strategy is getting yet another revision, and this time around it really feels like it's done right. Or is ...

c# parsing antlr  
asked by Mat's Mug 15 votes
answered by Jeroen Vannevel 10 votes

Streaming Collatz

Challenge The recent question The 3n + 1 algorithm for a range inspired me to investigate a Java-8 dependent streaming mechanism for solving the programming challenge: For any two numbers i and j ...

java functional-programming stream rags-to-riches collatz-sequence  
asked by rolfl 15 votes
answered by 200_success 2 votes

Asteroids game clone

I have recently been teaching a JavaScript module on a games programming undergraduate course and I made this game as a learning exercise and as an example for my students to study. I have made games ...

javascript game canvas  
asked by Graeme Stuart 13 votes
answered by 200_success 8 votes

Printing removed items using lambdas and streams

I'm struggling to make my lambdas readable. I've seen various approaches. Below are three different examples that all do the same thing. Forgive the example: I suspect there are better actual ...

java functional-programming comparative-review stream lambda  
asked by Mr Spoon 11 votes
answered by rolfl 6 votes

Object-oriented design for Wheel of Fortune

I'm trying to design the classes for the Wheel of Fortune game in Java. The below diagram represents the classes and the interaction between them. . Below is the partial implementation of it. I ...

java oop game  
asked by FourOfAKind 11 votes
answered by Gerold Broser 8 votes

Checking if a number is divisible by 9

I tried to develop a new way to check if a number is divisible by 9. I have written my code and it is working fine. I'm not allowed to use *,/ and %. int isDivby9(int x) { int status = 0; ...

beginner algorithm c mathematics  
asked by kapil.thakar 9 votes
answered by Edward 12 votes

Converting imperative style user input menu to functional programming style

I am currently trying to teach myself scala by rewriting projects from my intro CS class, which was taught in C++. In addition to just learning the syntax I am trying to gain understanding of how ...

functional-programming scala console  
asked by Jacob Mortensen 9 votes
answered by Donald.McLean 5 votes

Greatest hits from previous weeks:

Reading a line from a text file and splitting its contents

I have this kind of file structure MALE:FooBar:32 FEMALE:BarFoo:23 Where I would want to identify the gender and age of person, <Gender>:<Name>:<age> try{ BufferedReader in ...

java file file-structure  
asked by KyelJmD 4 votes
answered by palacsint 7 votes

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 8 votes
answered by 200_success 10 votes

Can you answer these?

Ajax file uploader jQuery plugin

I tried to write my first jQuery plugin. It's a very simple Ajax file uploader. I would appreciate a review of this code. HTML <input type="file" id="upload" multiple="multiple" /> Plugin ...

javascript jquery ajax plugin network-file-transfer  
asked by Paolo Rossi 3 votes

Timeout watchdog using a standby thread

The simple but generic timeout class to be used watching for network connections, user input, filesystem events, and is intended to have a very simple interface specific to only our use cases (i.e. no ...

c++ c++11 multithreading thread-safety  
asked by Vlad Didenko 3 votes

Program for compacting other given code

I've just finished a small function that will reduce the size of code as much as possible without breaking anything. Obviously it makes everything a bit unreadable so it's not really for cleaning the ...

python parsing compression  
asked by Peter 2 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