Code Review Weekly Newsletter

Code Review newsletter

Top new questions this week:

Split string in half and change case accordingly

I found the following challenge online: Create a function that takes a string and returns that string with the first half lowercased and the last half uppercased. eg: foobar == fooBAR ...

python strings programming-challenge  
asked by Seth 12 votes
answered by rolfl 16 votes

Greatest Common Factor

I wrote this program to determine the Greatest Common Factor of any 2 given numbers, and would like to know of any improvements that can be made. I have tested it using a loop and 2 randomly generated ...

java performance  
asked by user3189142 10 votes
answered by Legato 13 votes

Printing a pyramid

Can you please review this code to determine if it's good or can be improved? #include "stdafx.h" #include <iostream> #include <string> using namespace std; int _tmain(int argc, _TCHAR* ...

c++ beginner formatting  
asked by user70827 9 votes
answered by Hosch250 8 votes

Brute Force N Body Implementation in C++

I have wrote the following code in C++ for the n-body problem. This code is sequential as later on I am planning to parallelize it using OpenMP. I want to know whether I have wrote the correct ...

c++ simulation physics  
asked by Jamal Hussain 8 votes
answered by Edward 13 votes

Simple comparison of sorting algorithms in C++

I know this has been done a million times before, but this is my implementation of bubble-sort, insertion-sort, merge-sort, heap-sort, and quicksort. Any feedback on how to make it better would be ...

c++ algorithm c++11 sorting  
asked by Jason B 8 votes
answered by Loki Astari 13 votes

JPaint (Java painting app)

I have this painting app called JPaint in Java and I'm wondering if it could be improved. The variable declaration seems repetitive and long, and I think it might be able to be improved. public class ...

java swing event-handling graphics  
asked by thecoder16 7 votes
answered by maaartinus 10 votes

The effect of typing a sentence out

The following code is complete and works perfectly. What I want to do to is make it more modular in a way where I can use the code again - similar to an api. I also hardly ever code in javascript, ...

javascript jquery api animation  
asked by Menelik Tucker 7 votes

Greatest hits from previous weeks:

Reversing words in a string

I have to reverse the string "He is the one" to "one the is He". I have written some programs in Java but am looking for other best solutions. Suggest any possible ways to minimize the current ...

java algorithm strings  
asked by Sumeet 6 votes
answered by 200_success 3 votes

Better Approach to Using the C# SerialPort Class

I've been working a lot recently with SerialPort in C# and I've come up with the following class as part of a class library I'm working on for another program. My question is, are there any more ...

c# serial-port  
asked by DanteTheEgregore 8 votes
answered by Andyz Smith 7 votes

Can you answer these?

Metadata Management

Purpose: I've on occasion required a method for changing a (or a set of) Display names (formats, order, etc.). The problem was I'd have to push to production just to change something as simple as ...

c# interface  
asked by Shelby115 3 votes

Off-line minimum using disjoint sets - C

The off-line minimum problem asks us to maintain a dynamic set T of elements from the domain (1..n) under the operation INSERT and EXTRACT-MIN. We are give a sequence S of n INSERT and m ...

algorithm c set  
asked by Dang Manh Truong 2 votes

Backbone/requireJs and circular dependencies

I'm trying to have a main App view with references of all my views to manage and call transitions between theses views. But, I have circular dependencies. app.js define([ 'jquery', ...

javascript backbone.js require.js  
asked by Laurent 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