Code Review Stack Exchange Community Digest

Top new questions this week:

Compare version numbers

I am wondering if there is any way to meaningfully shorten the chain of conditionals used here to compare two versions. struct VERSIONCODE represents a version number of the form major.minor.revision ...

asked by Govind Parmar 15 votes
answered by user7761803 11 votes

BigInt class in C++

I made a BigInt class that supports almost all functions an int would. The code seems too bulky and there might be a few bugs lurking here and there. I would like to simplify my code as much as ...

c++ c++11 c++17 bigint  
asked by Srivaths 11 votes
answered by Toby Speight 19 votes

Simple Python turn based battle game

As I mentioned in my bio, I do not code for a living and too old to switch careers but I do enjoy it as a hobby and I am trying to get better. Also trying to get my teenage son more interested. ...

python beginner python-3.x game  
asked by CelestialMark 11 votes
answered by AJNeufeld 21 votes

Generating PNG barcodes from a CSV

I wrote the following code to generate a series of barcodes given a CSV with a list of ISBNs in the first column and titles in the second, using the python-barcode library (which itself requires ...

python python-3.x image  
asked by CoedRhyfelwr 9 votes
answered by AlexV 6 votes

Building string with max length

I need to run a evaluation for large (1 Million) number of components and build a string with error which has comma separated error codes. As the final string is to be persisted in RDBMS TABLE.COLUMN ...

java strings unit-testing  
asked by dRv 8 votes
answered by TorbenPutkonen 6 votes

Data entry of Information

Couple of items to make note of first: Some of the code is inherited the other has been refactored by me. The procedures that have an underscore in them I am still working on refactoring. ...

vba excel  
asked by Zack E 8 votes
answered by IvenBach 13 votes

Generic linked list implemented in pure C

Recently i added such generic list in github and i would like to get some feedback. Here is a link to the code in github: GenericList.c ...

c linked-list generics  
asked by Martin Chekurov 7 votes
answered by pacmaninbw 8 votes

Greatest hits from previous weeks:

Converting DataTable to List of class

I am using ExcelDataReader to import an Excel file to a dataset. Example Excel table: //ID Name Display Order Active //1 John 1 1 ID, DisplayOrder and Active ...

c# performance linq converting .net-datatable  
asked by devspider 43 votes
answered by Gaui 39 votes

Match blood types in C

I have written a solution to the blood-type matching problem, as described at The problem is to determine whether a given recipient (in this case, ...

asked by oleskiewicz 31 votes
answered by AJNeufeld 55 votes

Student information system

I have made a small project and I am just wondering if I could add more functionality to the project e.g more classed etc. Is a better way of displaying my results and what error handling I could do? ...

asked by David Needham 8 votes

Simple Example of an Iterable and an Iterator in Java

I was a TA for a first-year Java programming course this year. As a very simple example of iterables/iterators, I wrote the following code for the students. I am curious if any styling or other ...

java iterator interval  
asked by Sahand 45 votes
answered by rolfl 36 votes

Tiny text adventure

I made a small text adventure. I'm not trying to make it appealing to anyone, but rather just to practice my Python skills. I am fairly new to Python and this was my next step after making a console ...

python optimization beginner adventure-game  
asked by Elliott Rhys 13 votes
answered by rreillo 14 votes

Program to insert, search for and delete an element from an array

I'd like this code to be improved. package com.array.demo; import java.util.Arrays; public class ArraysDemo { public static void main(String[] args) { // TODO Auto-generated method stub ...

java beginner array  
asked by Arun Prakash 8 votes

Get the value of the name attribute of each element with class="class"

I need a function to get the value of the name attribute of each element with class="class". I was wondering what is the best way to do this, performance-wise. Currently I'm using jQuery and doing it ...

javascript jquery html dom  
asked by Alex 8 votes
answered by Daniel Imms 9 votes

Can you answer these questions?

Design pattern for logger implementation

I have two classes ExceptionLog and DebugLog public class ExceptionLog { public static String StackTrace {get; set;} public static String ClassName {get; set;} public static String ...

object-oriented design-patterns salesforce-apex  
asked by Noor A Shuvo 1 vote

Simple Unity program for a research experiment

I'm developing a small C# Unity application to display stereoscopic images as part of a wider research study. Since the experiment consists of unique stages (Start, during a trial, between trials, ...

c# design-patterns gui unity3d state-machine  
asked by Richard Robinson 1 vote

Any tips to refactor the following Pandas code?

I am doing a Pandas project on alcohol consumption. For your information, the dataset has the following columns: | Continent | Country | Beer | Spirit | Wine | The following is my code: # ...

python-3.x pandas  
asked by PenguinSnow 1 vote
answered by Lewistrick 0 votes
You're receiving this message because you subscribed to the Code Review community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 110 William Street, 28th floor, New York, NY 10038