Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

Project Euler #7 10001st prime

I decided to start working on the Euler project exercises. I'm doing fine for now but the seventh problem is running quite slow and I can't think of anything to make it work faster. It takes around ...

c# performance beginner programming-challenge primes  
asked by denis 19 votes
answered by nhgrif 65 votes

Java hex dumper

Can somebody please try and help me speed up my code? The file is ~12MB (you can download it here). It takes around 500-600 milliseconds to run on my i7 4790k. import java.io.FileInputStream; import ...

java performance file  
asked by Jonathan Beaudoin 9 votes
answered by janos 6 votes

Extracting Country Names from Cell Values

This fairly clunky looking VBA script successfully pulls names of countries from an Array, but could it be made shorter? Mass of text from Column C onward in each row may contain the names of ...

vba excel  
asked by user1996971 9 votes
answered by Kaz 10 votes

Top 10 editors partitioned by year

I wanted to get some stats on who has done the most edits on Code Review, so I wrote the following query on SE Data Explorer. All improvement suggestions are welcome. Note that I used a cursor to ...

sql stackexchange t-sql  
asked by Phrancis 8 votes

Error-testing be with cucumber/capybaraweb

I'm working on writing tests for a rails application using cucumber and capybara. I have a scenario for a user editing a post, and making it invalid. The scenario looks like this: Scenario: I edit ...

unit-testing ruby-on-rails comparative-review webdriver cucumber  
asked by user2367593 8 votes
answered by sled 5 votes

Turn logged data into fancy plot

I'm logging data from an embedded platform over UART. This gets saved to a log file and I want to process the saved log with Excel. I have no idea whether what I did was even remotely a good ...

beginner vba excel data-visualization  
asked by Mast 7 votes
answered by Mincong Huang 3 votes

Checking for surrounding mines

Am trying to create a minesweeper game, I have the following code which has to many nested ifs, I want to change the code to take out the nested ifs and make it better to read. But I am stuck on how ...

java minesweeper  
asked by Novice 7 votes
answered by mafagafogigante 1 vote

Greatest hits from previous weeks:

Converting seconds to hours, minutes and seconds

The following question was taken from Absolute Java 5th ed. by Walter Savitch: Write a program that outputs the number of hours, minutes, and seconds that corresponds to 50,391 total seconds. The ...

java beginner datetime  
asked by Oompa Loompa 7 votes
answered by Martin R 12 votes

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 22 votes
answered by shuniar 11 votes

Can you answer these?

Generating days in a specific range

I have a query in MSSQL, where I get a summary by days from a range in a table, and this is in union with other queries. This query is used to generate days in a specific range, then add the registry ...

sql datetime sql-server  
asked by Miguel Avendaño 2 votes

Union-find implementation

Here are a few questions on my mind: What improvements to the above code can you think of? I want to say new UnionFind(x) where x is a Set[T] (I emphatically don't want to say new ...

algorithm data-structures scala  
asked by Jonas Kölker 2 votes

Generic and accurate floating point "equality"

Like those who have come before me, I foolishly have sought to implement a generic, efficient, idiomatic, and most importantly correct method of comparing floating point numbers for equality. Like ...

c++ c++11 reinventing-the-wheel floating-point template-meta-programming  
asked by Dannnno 3 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