Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

Lines, intersections and terrible unit tests

I needed Line and LineF for the next stage of a project I'm working on, so I developed them. I also needed to determine if two lines intersected, preferably as cheaply as possible. (Lots of physics ...

c# .net computational-geometry physics  
asked by EBrown 11 votes
answered by Nikita B 5 votes

Object-oriented dungeon crawler game

I am creating a simple dungeon crawler game. My program runs and does what I want it to do so far, but I am starting to run into difficulty with adding new functionality, and I think one of the main ...

c# oop role-playing-game  
asked by Iceape 11 votes
answered by Eric Lippert 23 votes

Showing links to Contributor Breakdown on Stackoverflow Docs

So Stackoverflow Documentation has added "Contributor Breakdown". For any given topic (and example) people can display who contributed in which way. That page is only available if you know the link ...

javascript stackexchange userscript  
asked by Vogel612 10 votes
answered by Mast 6 votes

Return the next power of two

Given an unsigned integer N, I want to return P with P being a power of two such that P >= N. Examples: 1 -> 1 2 -> 2 3 -> 4 5 -> 8 The goal is to provide a very fast implementation. This code is ...

c++ performance bitwise  
asked by Mr_Pouet 9 votes
answered by Adriano Repetti 10 votes

Reading a repetitive file with repetitive code

I made this code for take some data from a .txt file. The text file is a large list of data from temperature with a format that is repetitive and have some lines at the beginning with the station ...

python python-3.x parsing csv file-structure  
asked by Manuel Alejandro 8 votes
answered by 200_success 14 votes

You can't sink me

Here is a Battlehips game in F#. Now, before you start jumping up and down on my code, please understand that, for all its awesomeness, F# has a serious limitation: Its compilation is linear, and the ...

game functional-programming f# community-challenge  
asked by Hosch250 8 votes
answered by AlexFoxGill 5 votes

Ask the user random questions from a multiple-choice test

I'm quite new to programming and was hoping you wouldn't mind taking a look at my code and giving some points as to how I could clean it up. Assignment guidelines: Create a program that reads ...

c++ beginner quiz  
asked by Zardoz 8 votes
answered by R Sahu 7 votes

Greatest hits from previous weeks:

Different way of writing multiple click functions

I have the following .click() functions: $('.tab').click(function(){ $('.tab').removeClass('activeTab'); $(this).addClass('activeTab'); }); $('.edit').click(function(){ $(this).hide(); ...

javascript jquery html  
asked by Kris Hollenbeck 9 votes
answered by Flambino 20 votes

Convert object array to hash map using lodash

The use case is to convert an array of objects into a hash map where one property is the key and the other property is the value. Common case of using this is converting a "link" object in a ...

javascript beginner lodash.js  
asked by Pete 26 votes
answered by Jon Anderson 45 votes

Can you answer these?

Using monads and monad transformers (simple matching engine)

Like most of the folks here, I'm learning Haskell, so I figured an interesting exercise would be to build a matching engine that I could use to build a financial exchange. I'm wondering primarily if I ...

haskell monads  
asked by Sameer Parekh Brenn 2 votes

Java interface to C library - Refactoring to singleton usage

I am currently writing a Java interface to a C library. It mostly just delegates calls and adds a object oriented layer on top of it to make integration into a regular Java program more natural. The ...

java api singleton  
asked by Luca Fülbier 2 votes

VBA multiple sumifs and countifs groupings in large range using loop

I am looking for assistance with the code at the last section referenced as "Logic to calculate allocation". I'm looking to conduct various SumIfs divided by CountIfs for a range cells that span about ...

vba excel  
asked by fonzy16 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