Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Code Reviews

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Requests for reviews of existing code (must already work).

Filters (None)
66%
+2 −0
Serial copying from disk images to folder in Bash

(Brought over from SE.) This is a Bash script that copies files stored inside disk images to a directory, using a defined structure provided via a JSON file. I've included the external programs ...

2 answers  ·  posted 2mo ago by aura-lsprog-86‭  ·  edited 2mo ago by aura-lsprog-86‭

json linux bash jq file-structure
66%
+2 −0
A simple implementation of a mutable String in C

(Brought over from SE.) The following code implements a simple interface to operate on mutable* Strings in C. It is composed of two files: one for the structure definition and the available oper...

3 answers  ·  posted 2mo ago by aura-lsprog-86‭  ·  last activity 2mo ago by Olin Lathrop‭

c string
77%
+5 −0
Parsing numbers from a text file

This is my solution to the first task of the Advent of Code 2023. The task description is: On each line, the calibration value can be found by combining the first digit and the last digit (in t...

2 answers  ·  posted 9mo ago by GeraldS‭  ·  last activity 6mo ago by Feefladder‭

rust
60%
+1 −0
Feedback for a Nix-Darwin configuration

Hello, im looking for some feedback on my nix-dawrin setup. This is the setup im currently using, its works, but the structure is cobbled together from multiple sources, and im not experienced eno...

0 answers  ·  posted 7mo ago by hest‭

dotfiles nixpkgs nix-darwin
66%
+4 −1
New elementsof() operator

Original problem: https://stackoverflow.com/questions/37538/how-do-i-determine-the-size-of-my-array-in-c/57537491#57537491 Arrays in C are problematic. They are transformed into pointers too easi...

1 answer  ·  posted 8mo ago by alx‭  ·  edited 8mo ago by alx‭

c array operators
60%
+1 −0
PHP for simple HTML-PHP-CSS contact form --- aimed solely for RTL websites

As a non PHP programmer I have tried to program some basic PHP mail() function code to send Right To Left (RTL) contact form messages to my local email client (i.e. an email client which is affilia...

1 answer  ·  posted 4y ago by deleted user  ·  last activity 8mo ago by GeraldS‭

php html css right-to-left
77%
+5 −0
Github workflow for a C application

This is my first try at automating building and testing some C code for these platforms: Linux Windows MacOS OpenBSD (arm64 and x86-64) FreeBSD (arm64 and x86-64) NetBSD Oracle Solaris Om...

1 answer  ·  posted 12mo ago by Melkor-1‭  ·  last activity 9mo ago by zmzaps‭

yaml github ci/cd
75%
+4 −0
A class to access dicts using attribute syntax

I've written a class that allows to access dictionary entries of arbitrary dicts with appropriate string keys through attribute access syntax on an instance of the class. My questions are: Is...

3 answers  ·  posted 3y ago by celtschk‭  ·  last activity 11mo ago by mudskipper‭

python hashmap
60%
+1 −0
Message consumption with priorities and consumer error handling using EasyNetQ library

Context I was tasked with developing a way to consume RabbitMQ messages that have various priorities (actually different levels of QoS). My restrictions are: high priority messages should have ...

0 answers  ·  posted 1y ago by Alexei‭  ·  edited 1y ago by Alexei‭

async-await multithreading .net-core RabbitMQ EasyNetQ
71%
+3 −0
GnuTLS config for my own root CA, for use on internal server

I am trying to generate my own root CA certificate. Context My goal is to sign an intermediate CA with this certificate, and then install the intermediate CA on my own client machines. The interm...

2 answers  ·  posted 1y ago by matthewsnyder‭  ·  last activity 1y ago by matthewsnyder‭

configuration tls gnutls
66%
+2 −0
Pattern / architecture for interfacing with components in C

I'm working on the architecture, where the assumption is to easily extend the options in the system and also to provide some kind of encapsulation (from the main we could only access the type1 / ty...

1 answer  ·  posted 1y ago by patriko8520‭  ·  last activity 1y ago by Lundin‭

c architecture
50%
+0 −0
Time measurement in an ASP.NET Core application

My team introduces lots of time measurements for various code sections that might take longer than expected in a real-life flow. These rely on initializing a StopWatch, getting the elapsed time an...

0 answers  ·  posted 1y ago by Alexei‭

asp.net-core performance dependency-injection
66%
+2 −0
A small header-only input output library

The library (inspired by stb libraries) attempts to provide some commonly used functions (reading a file into memory, determining the size of a file) that are missing from the C standard library po...

0 answers  ·  posted 1y ago by Melkor-1‭  ·  edited 1y ago by Melkor-1‭

c string input output
66%
+2 −0
Trie Implementation, Graph Visualization and Auto-Completion in C

Given a list of strings (say a text file containing some C symbols: c-symbols.txt), the program can: Generate a graph of the underlying trie (-p/--prefix can be specified to inspect a specific ...

1 answer  ·  posted 1y ago by Melkor-1‭  ·  last activity 1y ago by Lundin‭

c Trie graph-visualization autocomplete
50%
+0 −0
Azure Service Bus queue message consumption in an ASP.Net Core 6 application

My team is introducing Azure Service Bus consumption into the solution and we have developed an implementation that we want to act as a model for other services in the future. It is split in two p...

0 answers  ·  posted 1y ago by Alexei‭  ·  edited 1y ago by Alexei‭

azureservicebus event-driven
81%
+7 −0
Detecting balanced parentheses in Python

The problem Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets are closed by ...

5 answers  ·  posted 4y ago by justanotherpilgrim‭  ·  last activity 1y ago by Dirk Herrmann‭

python
80%
+6 −0
JSON log formatter

Here's a JSON log formatter for Python. I want to be able to log details of exceptions (and have some capability to debug-by-logs). I want to be able to log extra data in JSON format (in addition...

2 answers  ·  posted 2y ago by misk94555‭  ·  last activity 1y ago by Karl Knechtel‭

python logging
75%
+4 −0
How to programmatically click through a list of elements if one has to wait for a click to load a set of predefined new elements?

I would like to download the old-time radio show I Love a Mystery from the OTRR website. I figured out how to construct the list of right URLs, const urlStub = "https://otrr.org/OTRRLibrary/jukebo...

1 answer  ·  posted 1y ago by toraritte‭  ·  edited 1y ago by toraritte‭

javascript
75%
+4 −0
Writing a testable console program

I have a class Foo that prints something to stdout and I want to be able to write tests for it. So I created a trait to abstract println!, and gave it a prod implementation and a test implementati...

2 answers  ·  posted 2y ago by KevinG‭  ·  last activity 2y ago by LAFK‭

rust
75%
+4 −0
Vanilla JS Functions Review

I wanted to create a simple static website that would use JS to randomly rotate through a quotes.json file I maintain. My JavaScript experience is more limited as it's not what I do at work, so wha...

1 answer  ·  posted 2y ago by fausty‭  ·  last activity 2y ago by fausty‭

javascript
75%
+4 −0
CSS grid with expanding cells

Goal Our goal is to create a kind of table, using HTML/CSS/JS, with cells that expand when you click on them. If you click on a header, the whole row or column will expand. This in itself is not ...

0 answers  ·  posted 2y ago by berrie‭  ·  edited 2y ago by berrie‭

javascript html css-animations css-grid
71%
+3 −0
Health checks with caching in ASP.NET Core

Context I noticed that an application was flooding the database with simple SELECTs. The investigation revealed some bugs in the health check which theoretically implemented caching (to avoid quer...

1 answer  ·  posted 2y ago by Alexei‭  ·  edited 2y ago by Alexei‭

asp.net-core caching health-check
70%
+5 −1
stpecpy(): Design a better string copy function that truncates

I was directed a few days ago to a post about a string copy function, which IMO improves the commonly known string copy functions, including strlcpy(3BSD), strlcat(3BSD), and strscpy(9). It define...

2 answers  ·  posted 3y ago by alx‭  ·  last activity 2y ago by alx‭

c string string-concatenation strcpy
71%
+3 −0
Implement translatable UI in a Single Page Application when working with ngRx

I am currently working on an Angular SPA that supports multiple languages and relies on ngRx for state management. Although the application state is handled by ngRx, the current language is stored...

0 answers  ·  posted 2y ago by Alexei‭

angular ngrx state-management i18n
66%
+2 −0
Setting the authentication token in an Angular application for generated API clients

This is a post of mine from Code Review Stack Exchange which did not get an answer yet. I am developing an Angular application that consumes an external REST API. I am using OpenAPI generator (Typ...

1 answer  ·  posted 4y ago by Alexei‭  ·  last activity 3y ago by Alexei‭

javascript angular authentication reactive-programming
75%
+4 −0
A state machine in Python

I've written the following code implementing a state machine in Python, and I'd like some feedback on it. The basic idea is that each state has a set of corresponding actions that trigger a state ...

2 answers  ·  posted 3y ago by celtschk‭  ·  last activity 3y ago by Nick Alexeev‭

python-3 state-machine
80%
+6 −0
Measuring the impact of using exceptions instead of return values in an ASP.NET Core application

Context This Q&A from SO suggests that throwing exceptions is incredibly expensive when compared to returning values (return codes): that with return codes instead of exceptions the same pr...

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Dirk Herrmann‭

asp.net-core exception benchmarking
83%
+8 −0
Solving logical puzzle with negation and undefined aspects in Prolog

Assume this trivial logic puzzle which I have made up: There are three boys, Fred, John and Max. No two of the boys have the same age. Max is older than John. Fred is not the oldest one. Quest...

0 answers  ·  posted 3y ago by Dirk Herrmann‭  ·  edited 3y ago by Dirk Herrmann‭

prolog
75%
+4 −0
Measuring arithmetic overflow checking overhead in C#

Overflow checking for integral-type arithmetic operations is disabled by default and it can be explicitly enabled by using using checked function or the -checked compiler switch. Since I mainly de...

2 answers  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Derek Elkins‭

c# benchmarking
77%
+5 −0
Counting Sundays without Python datetime module

The problem You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. Thirty days has September, April, June and November. All t...

1 answer  ·  posted 4y ago by justanotherpilgrim‭  ·  edited 3y ago by hkotsubo‭

python date
81%
+7 −0
A simple game with pygame

I've just started playing around with pygame and have written a small game in it, of which I'd like a review. Note that I'm not only a complete beginner in pygame, but I also have very little exper...

1 answer  ·  posted 3y ago by celtschk‭  ·  last activity 3y ago by Peter Taylor‭

python game-development
75%
+4 −0
Counting number of assignments that a `fscanf` format strings implies

I'm writing a function that counts the number of assignments for a fscanf format string. I studied the documentation in C standard 7.21.6.2 It looks like it works. It passes all test cases I have w...

3 answers  ·  posted 4y ago by klutt‭  ·  last activity 3y ago by klutt‭

c fscanf scanf format-string
81%
+7 −0
Is this HTML sanitizer safe?

I wrote this HTML sanitizer for use in web scraping. The idea is to safely copy content from a site but apply my own style-sheet and remove any unsafe elements. This whitelist approach seems very d...

1 answer  ·  posted 4y ago by mousetail‭  ·  edited 4y ago by Peter Taylor‭

javascript web-scraping
66%
+4 −1
BMPL: The language I'll bring to life

Last year, I started working on a language I named SuperCode but then decided BMPL (Builder's Multi-Purpose Language) as the final name. The language would be written using C and up until now, the ...

1 answer  ·  posted 4y ago by General Sebast1an‭  ·  last activity 4y ago by Lundin‭

c function language-design
66%
+2 −0
Shared hosting Apache PCRE .htaccess file for personal MediaWiki websites

A shared hosting based Apache PCRE public_html/.htaccess file for a website with the common features: MediaWiki based (most of the website interaction is backendish --- there barely are any fron...

0 answers  ·  posted 4y ago by deleted user  ·  edited 4y ago by deleted user

mediawiki apache .htaccess pcre webserver
66%
+2 −0
C# WPF MVVM View & Get new record values

Just looking to hear some reviews on my current MVVM Implementation, If I am heading towards the right direction. :) Code BaseViewModel public class BaseViewModel : INotifyPropertyChanged { ...

1 answer  ·  posted 4y ago by gzi98‭  ·  last activity 4y ago by FoggyFinder‭

c# mvvm wpf
80%
+6 −0
C# MVVM Login Project

I was wondering if somebody can review my code? I am creating a simple login desktop application, just to get used to the MVVM pattern using WPF. View <Window x:Class="Login_App.MainWindow" ...

2 answers  ·  posted 4y ago by gzi98‭  ·  last activity 4y ago by Peter Taylor‭

c# mvvm wpf
60%
+1 −0
Are any downsides of hiding the actual Entity Framework Core DbSets and exposing only some generic methods?

I have recently started a project based on the clean architecture principle and noticed that it did not rely on generic repositories since Entity Framework's DbSets are doing the job just fine. In ...

0 answers  ·  posted 4y ago by Alexei‭

asp.net-core asp.net-core-3.1 entity-framework-core generic-repository
80%
+6 −0
PHP script to create a KML square centred on a point.

The objective here is to create a set of square kml coordinates centered on a point. I use this to create a square map centered on a mountain peak and then turn that into a STL that I can 3D print....

2 answers  ·  posted 4y ago by Charlie Brumbaugh‭  ·  edited 4y ago by Moshi‭

php stl-format
77%
+5 −0
Improved Atkin-Bernstein sieve for generating primes

This is a class from my personal code library, and from a package which deals with integer sequences. It implements an interface package org.cheddarmonk.math.sequence; public interface IntegerSequ...

0 answers  ·  posted 4y ago by Peter Taylor‭

java prime-numbers
60%
+1 −0
Cache data using Redis Cache in an ASP.NET Core 3.1 project

This is an unanswered code review request of mine from Code Review Stack Exchange. Overview I have developed a small ASP.NET Core 3.1 Web API that provides information that is rarely changed (sever...

0 answers  ·  posted 4y ago by Alexei‭

c# asp.net-core asp.net-core-3.1 caching redis
66%
+2 −0
Measure ASP.NET Core 3.1 Web API action execution times

This is basically an unanswered code review request of mine from CodeReview Stack Exchange. I want to be able to log as accurately as possible, the time spent by a certain Web API action in an ASP....

0 answers  ·  posted 4y ago by Alexei‭

c# asp.net-core-3.1 performance