Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

Linked List in C#

I was searching for a implementation of a Linked List with the same power as a native List. I wanted functionality closer to a List. The System.Collections.Generic.LinkedList misses some methods I'm ...

c# linked-list reinventing-the-wheel  
asked by fubo 15 votes
answered by Pieter Witvoet 20 votes

Optimizing an A* algorithm

I am currently using an implementation of the A* algorithm described here. Currently, when I run my algorithm, my IDE lags horribly and the .exe generated also lags terribly. Using the CPU analyzer, ...

c# performance xna a-star  
asked by Charsmud 14 votes
answered by BlueRaja - Danny Pflughoeft 29 votes

A LISP version of the Schwartzian Transform

Randal Schwartz stole LISP's decorate-sort-undecorate idiom when he came up with what we'd later call the Schwartzian Transform. With all of my LISP knowledge disappeared through nine half lives, but ...

sorting lisp common-lisp  
asked by brian d foy 12 votes
answered by Renzo 11 votes

Classifying the user into an age bracket

In this program, I have to check the range of a given age and then print a message as per the age. I want to optimize the if else logic. /* Sample code to read in test cases:*/ import java.io.*; ...

java  
asked by Prabhat Yadav 11 votes
answered by Pimgd 19 votes

Program to find the largest odd number among three variables

def greatest(a,b): if a>b: return a return b def odd_check(a): return not(a%2 == 0) def go(x,y,z): a = odd_check(x) b = odd_check(y) c = odd_check(z) if a and b ...

python python-2.7  
asked by piepi 10 votes
answered by enedil 26 votes

Lexer for a language I'm working on

I've recently started working on making my own programming language and I just wrapped up its lexer. I'm too young to take any official training in C, compiler construction, or computer science so I'm ...

c lexical-analysis  
asked by Hedron 10 votes
answered by vnp 4 votes

Dijkstra's algorithm in C99

I just implement Dijkstra's algorithm in C99. Can you review my code please? I'm looking for any mistake, performance improvement or coding style errors. main.c #include "src/map.h" #include ...

c graph pathfinding c99  
asked by V.Collette 10 votes
answered by pacmaninbw 6 votes

Greatest hits from previous weeks:

Generate random numbers without repetitions

I want to generate a list of N different random numbers: public static List<int> GetRandomNumbers(int count) { List<int> randomNumbers = new List<int>(); for (int i=0; ...

c# random  
asked by Kao 63 votes
answered by rolfl 63 votes

Design a chess game using object-oriented principles

I would like to know if my approach is correct and how could it could be improved? Also, is there a way to get rid of the relation between the Piece and the Board? At the moment, I am storing the ...

java oop design-patterns game chess  
asked by SummerCode 26 votes
answered by Kyle Hale 14 votes

Can you answer these?

Automation of application utilities on Linux

I am working on a project to automate utilities of our application on Linux. The utilities are basically chunks of programs with specific options for specific tasks. They are run like UNIX commands. ...

linux perl  
asked by Mohima Chaudhuri 1 vote

Validate User By Comparing against SQL Data

I'm currently building a Windows Form Application using Visual Studio 2015 and the Visual Basic.NET programming language. On the main form there is a Tab Control and an ActiveX PDf viewer control. ...

sql .net vb.net  
asked by Steven Williams 2 votes

Specification pattern in EF part 2

This is a follow on to Part 1 In order to use my new Specifications within expression trees so I can use them in projections/navigation collections I had to write an ExpressionVisitor to find ...

c# entity-framework expression-trees  
asked by RobH 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