Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

Mandelbrot image generator and viewer

This is a C++ program which outputs a Mandelbrot fractal image in a graphics window and lets the user zoom and pan around the image, generating a new image each time the user does so. I'm using SFML ...

c++ performance sfml fractals  
asked by monopole 14 votes
answered by Edward 11 votes

Simple worker class program

I Have written this program to add workers into a list and print them. I'd like a review of this. I'm especially concerned if the method Addworker should be inside the class or in the main program. ...

c# beginner oop  
asked by Yorke York 13 votes
answered by Alien Herb Nite 16 votes

Comparing two strings to see if string 2 is inside string 1

Here is what I have to do: Write a function scramble(str1,str2) that returns true if a portion of str1 characters can be rearranged to match str2, otherwise returns false. For example: ...

java performance strings  
asked by Simon Augustus 8 votes
answered by Tunaki 16 votes

Finding all contiguous sublists such that each member appears an even number of times

The program needs to find all contiguous sublists of numbers where the number of occurrences of every member in the contiguous sublist is divisible by 2. The first line of input is N (the number of ...

python algorithm programming-challenge combinatorics time-limit-exceeded  
asked by Marko Mackic 8 votes
answered by DarthGizka 2 votes

Prime factor game cheating aid

This code outputs the smallest number with more divisors than the input: from operator import mul from math import sqrt, ceil def next_prime_factor(n): if n % 2 == 0: return 2 for x ...

python primes  
asked by Easterly Irk 6 votes
answered by Quill 3 votes

From new Q to compiler in 30 seconds

Reviewing code doesn't necessarily require actually building it, but it's often helpful to do so in order to evaluate fully. I usually create a CMake project and build from there. Since we're all ...

c++ file-system cmake c++17  
asked by Edward 6 votes

User registration and login program

I've recently stared learning C++ so I'm new to all of it. I've got my fourth "software" under development. Could someone have a look through and give me some constructive criticism on what should I ...

c++ beginner authentication  
asked by Alan os 6 votes
answered by ncalmbeblpaicr0011 7 votes

Greatest hits from previous weeks:

Snake game in C++

This is my version of the Snake game, written in C++. How could it be improved, and what general advice would be useful for future projects? #include <iostream> #include <conio.h> void ...

c++ beginner game snake-game  
asked by TheKittyKat 22 votes
answered by Yann 21 votes

Count number of each char in a String

I know there is a simpler way of doing this, but I just really can't think of it right now. Can you please help me out? String sample = "hello world"; char arraysample[] = sample.toCharArray(); int ...

java strings  
asked by statius 14 votes
answered by Marco Acierno 22 votes

Can you answer these?

Shape inheritance hierarchy

I have managed to build an inheritance hierarchy for shape class object and I am wondering if there is a better solution to combine the following 2 hierarchies. To begin, I have a 4 shapes classes ...

java design-patterns inheritance  
asked by vsarunov 3 votes

Batch script to make folders hidden

I just wrote a simple script cmd to hide private folders by combining several scripts from the Internet. Can anyone give me suggestions for improvement? This batch file uses a password hidden by ...

security file-system powershell batch  
asked by Muthiullah 5 votes

ICMP ping program in Go

I've just written a ping application in Go. I'm proud of the logic, but I want some help to refactor it. The program has too much code in main, and pulling functions out of it requires a lot of ...

networking go  
asked by EMBLEM 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