Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

Print the N longest lines in a file

I have implemented the "Find the N longest lines in a file" problem from CodeEval quoted below. I got a full 100 score and 182ms execution time of their data set on the site so I consider the code ...

java performance programming-challenge  
asked by Emily L. 15 votes
answered by Simon Forsberg 14 votes

Body Mass Index Calculator

I created a quick calculator in Javascript and I was wondering if there was a way to make the code look prettier or make it simpler. To me, it looks really cramped and messy and I'm not sure how ...

javascript calculator  
asked by Phoenix1355 13 votes
answered by Madara Uchiha 19 votes

Extension method to list enum values

I have the following enum extension method: public static IList<SelectListItem> SelectListFor<T>() { Type enumType = typeof(T); if (enumType.IsEnum) { return ...

c# generics reflection enum extension-methods  
asked by Pete 12 votes
answered by Gentian Kasa 5 votes

Rubik's cube timer & scrambler

This uses a linked list to store the data. I used a linked list as it's the only type of data structure that I know currently. Using chrono, I can get microseconds into my timer and <random> for ...

c++ c++11 game random timer  
asked by Swluo 12 votes
answered by Barry 12 votes

Lotto simulator

With the recent craziness of the Powerball in the US, I got interested in building a little lotto simulator to see how frequently I could win with purchasing large amounts of tickets. For those not ...

mathematics simulation statistics rust  
asked by electrometro 11 votes
answered by Shepmaster 2 votes

Generate set of random numbers and remove lowest

I'm learning some Python with my kids, and we're making a program to generate D & D characters from user input. One portion of the code is to generate stats, which are a set of six numbers where ...

python beginner python-2.7 random dice  
asked by Stidgeon 10 votes
answered by Joe Wallis 8 votes

Ford-Johnson merge-insertion sort

The Ford-Johnson algorithm, also known as merge-insertion sort (the name was probably given by Knuth) is an in-place sorting algorithm designed to perform as few comparisons as possible to sort a ...

c++ algorithm sorting c++14  
asked by Morwenn 10 votes

Greatest hits from previous weeks:

Dynamic filtering and sorting with Entity Framework

I'm developing an application using ASP.NET MVC 3 and Entity Framework 4.1. In that application I have a lot of paged lists. Users can filter and sort these lists. This results in code like the one ...

c# asp.net-mvc-3 entity-framework  
asked by Kristof Claes 20 votes
answered by shuniar 11 votes

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 12 votes
answered by Simon Forsberg 10 votes

Can you answer these?

PHP class for reading DTD

Very long time ago I started development of code generator for HTML. And some time ago I rewrote it and published it under LGPL v3.0 on Sourceforge.net. It is very universal because one of its ...

php performance oop  
asked by Václav 2 votes

Simple Snake Game - Follow-up 2

Based on the previous question, I have implemented all suggestions. Also, I worked a bit in this project to improve it. Summary of improvements: split the code into multiple files as .hpp and .cpp ...

c++ c++11 sfml snake-game  
asked by MORTAL 3 votes

Maintaining neat JavaFX Controller files

I am developing an ERP system, called 'TeleMart' as a practice at Campus. I have noticed that one of my JavaFX Controller's have become quite complex and large, and most importantly, quite confusing. ...

java javafx  
asked by Hassan Althaf 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