Code Review Weekly Newsletter

Code Review newsletter

Top new questions this week:

The FizzBuzz challenge in Java 8 written in a short, readable and interesting way

I decided to take on the FizzBuzz challenge with as twist that I would use Java 8 concepts to make it a bit modular, yet still let it be a short, readable and understandable program. This in contrary …

java programming-challenge fizzbuzz java-8  
asked by skiwi 16 votes
answered by Jeroen Vannevel 7 votes

FizzBuzz implementation using the ternary operator

This is my first time writing JAVA, and I'm trying to start off on the right track. Using my C++ knowledge, I was able to understand the syntax for the ternary operator, but I'm not sure how it …

java beginner fizzbuzz  
asked by Jamal 14 votes
answered by Simon André Forsberg 6 votes

Tool to calculate profitability of certain items in a game

I have created a tool that lets me calculate the profitability of doing certain actions in an MMORPG game which I play, it's more edging towards a quick-and-dirty solution than towards a neat solution …

java game  
asked by skiwi 14 votes
answered by Ben Aaronson 6 votes

Classes for sentence-like readability

If we have a set of classes or structs such as: struct Point { float x; float y; }; struct Square { Point topLeft; float width; }; struct Circle { float radius; Point …

c++ oop c++11  
asked by PeterSW 13 votes
answered by Keith 7 votes

Is this FizzBuzz Swift-y?

for (var i = 1; i <= 100; ++i) { var fizzBuzz = "" if i % 3 == 0 { fizzBuzz += "Fizz" } if i % 5 == 0 { fizzBuzz += "Buzz" } if fizzBuzz == "" { …

fizzbuzz swift  
asked by nhgrif 11 votes
answered by syb0rg 15 votes

16-bit FizzBuzz in x86 NASM assembly

Since this problem involves small numbers (particularly with a small loop count of 100), it's possible to ease the modulo operation setup by simply working with 16-bit and 8-bit registers: [AX] …

assembly fizzbuzz  
asked by Jamal 11 votes
answered by Edward 6 votes

Is it still necessary to check for a front camera?

I'm trying to clean up redundant old code, so I'm asking this general question. Since all iOS 7 devices have a front camera, would it be safe to remove the code to check if the device has a front …

objective-c ios  
asked by troop231 11 votes
answered by 200_success 17 votes

Greatest hits from previous weeks:

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 6 votes
answered by Andyz Smith 5 votes

Why is my C# program slower than my Python program?

I made a program in Python and wanted it to be faster, so I wrote it on C# because it's compiled. To my surprise, the Python program is much faster. I guess there is something wrong with my C# code, …

c# python optimization performance  
asked by bobpal 17 votes
answered by Mat's Mug 17 votes

Can you answer these?

Formattable Fraction

I have written this small little program, to test how my Fraction type behaves when used with and without a custom FractionFormatter - I've implemented two custom formatters: FractionFormatter, …

c# data-structures formatting rational-numbers  
asked by Mat's Mug 6 votes

Generating prime numbers using Sieve of Eratosthenes with CUDA

I'm learning CUDA and wrote a little program which generates prime numbers using the Sieve of Eratosthenes. (I know the limitations of CUDA, specially with memory sizes and limits, but this program is …

beginner c primes sieve-of-eratosthenes gpgpu  
asked by Unglued 3 votes

FizzBuzz in Forth

There are quite a large number of existing implementatons of FizzBuzz but I awoke this morning in a cold sweat with the terrible revelation that Code Review had no FizzBuzz implementation in Forth! …

fizzbuzz forth  
asked by Edward 10 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