Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

Tic Tac Toe C++

I made this Tic Tac Toe game and I would like to know your opinion and what can be improved. I also want advice about making it check if someone wins. I'm 10th grader, so I still need to learn a lot. ...

c++ tic-tac-toe  
asked by Dovyd 25 votes
answered by Nobody 54 votes

C++ Vector The basics

Following on from my two previous posts. An alternative vector An Alternative Vector (Copy Assignment Operator) I have written a detailed blog about how to write a minimal vector like class. This ...

c++ c++11 vectors raii sfinae  
asked by Loki Astari 10 votes
answered by Jerry Coffin 6 votes

Corrupting Java arithmetic through reflection

Inspired by a PPCG answer, I wrote this code, which shuffles the autoboxing caches of Number subclasses. This leads to, among other things, outputting 2 + 2 = -72 after invocation of ...

java integer reflection shuffle  
asked by Tamoghna Chowdhury 8 votes
answered by Solomonoff's Secret 4 votes

Lock-free multi-producer multi-consumer queue

I'm looking for some feedback on my lock-free queue, based on Disruptor, mainly for any potential concurrency issues, such as where I need additional fences. It looks correct to me, and I can't seem ...

c++ c++11 multithreading lock-free producer-consumer  
asked by Joe 7 votes
answered by JS1 2 votes

JavaScript canvas sphere

I made a small demo in JavaScript using HTML5 canvas, which renders a rotating sphere. The sphere is generated by first creating a set amount of points (currently 50, represented by vectors) randomly, ...

javascript html animation canvas  
asked by Bálint 7 votes
answered by Joseph the Dreamer 2 votes

Pizza Hut math problem #1 in Haskell

I'm currently attempting to learn Haskell after a fair history of imperative programming. When I saw the Pizza Hut Pi Day math problems, I thought the first one would be a good candidate for my ...

programming-challenge haskell combinatorics time-limit-exceeded  
asked by A. Bottorff 7 votes
answered by Daniel Díaz Carrete 6 votes

Exporting a UserForm from the VBE... and working around API bugs

Rubberduck has been using an extension method to export code files, notably for source control purposes. While testing source control, I ran into a weird bug in the VBIDE API, which caused UserForm ...

c# file-system rubberduck  
asked by Mat's Mug 7 votes
answered by ThunderFrame 6 votes

Greatest hits from previous weeks:

Swing calculator - first GUI program

I've recently made a calculator using Java and Swing. I'm okay with the results but I'm curious what are the major flaws I've made (assuming there are, because it is my first program making GUI). I ...

java swing calculator  
asked by Karkoon 13 votes
answered by Simon Forsberg 11 votes

Different way of writing multiple click functions

I have the following .click() functions: $('.tab').click(function(){ $('.tab').removeClass('activeTab'); $(this).addClass('activeTab'); }); $('.edit').click(function(){ $(this).hide(); ...

javascript jquery html  
asked by Kris Hollenbeck 7 votes
answered by Flambino 18 votes

Can you answer these?

Preventing SQL injection without using prepared statements

I'm learning OOP and totally new to this way of coding. I've always scripted PHP the procedurial way. Now I've written a working class, which creates a database connection and has the method to create ...

php oop mysqli  
asked by Ramon Bakker 3 votes

Modularised Document Construction

The goal: A set of configurable options, combined with a standardised data source, to produce a standardised Report. This question: One module of said document, with accompanying code. Input: ...

vba excel modules  
asked by Kaz 2 votes

2-body gravitation simulator

I've written a very simple 2-body gravitation simulator in MATLAB, but I think I've done something wrong with the physics, particularly where I define velocity as each frame is drawn. %% 2-body ...

matlab physics  
asked by topherleighto 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