Skip to main content
20 votes
Accepted

COBOL Database Program

ZOMG, that is frightening along so many dimensions. Disclaimer: Within the last decade I wrote lots of python code to parse production COBOL database record formats. And as an undergraduate I had ...
J_H's user avatar
  • 32.7k
18 votes
Accepted

Console Library System in C++

Make variables and functions const where appropriate You used const references in a few places, but you missed a lot of ...
G. Sliepen's user avatar
  • 60.1k
13 votes
Accepted

Generalization of any() function with switchable default parameter for empty iterables

I really think this is a bad idea. A function called any returning True if there not only isn't anything true but even not ...
superb rain's user avatar
  • 3,991
11 votes

Inserting a DBNull value into a database

The most terse and declarative way to write this is to use C#'s ?? operator. Your line becomes: ...
Mr Cochese's user avatar
11 votes
Accepted

Header-only log-structured database

nit, typo: lenght ... lenght Also, "it is rebuilT from the data", and "reported as not writed" --> "written". motivation App developers who need logging features would ...
J_H's user avatar
  • 32.7k
10 votes
Accepted

Inserting a DBNull value into a database

All you have to do is to use the ?: (ternary operator): ...
t3chb0t's user avatar
  • 44.3k
10 votes
Accepted

Reducing the amount of duplicated code (python) - cricket matches

Disclaimer: I know nothing whatsoever about the rules of cricket. Useless check Because either info['toss_decision'] equals ...
SylvainD's user avatar
  • 29.2k
10 votes

Simple Key Value Database using C

Enable more compiler warnings: Adding: ...
Harith's user avatar
  • 9,687
10 votes

Simple Key Value Database using C

mutex serves no purpose. It is not shared between processes, and your program is not multithreaded. If you want an exclusion between unrelated instances of the ...
vnp's user avatar
  • 57k
9 votes
Accepted

LinDB: A dictionary type database

Both impressive and ambitious! Passwords the absolute requirement of a 32 character long password ensures it will take a considerable amount of time to break the encryption It will also ensure that ...
Reinderien's user avatar
  • 63.1k
9 votes

Generalization of any() function with switchable default parameter for empty iterables

Any and All If you are going to override any(...) to return a custom result when given an empty iterable, you should also override ...
AJNeufeld's user avatar
  • 33.9k
9 votes
Accepted

Embedded IoT: local data storage when no network coverage

We're missing an include of <stdint.h> in the header, and <stdbool.h> in the implementation. Some parts of the code ...
Toby Speight's user avatar
  • 79.3k
9 votes

JSON data format for MCQ data bank

You have at least three factors to judge the formats by: Readability/intuitiveness (how easy are the formats to understand), Extensibility (how readily do the formats adapt to unforeseen needs), and ...
Seacow1427's user avatar
8 votes
Accepted

Non-Entity framework database interaction model

Application Architecture The architecture of the application is divided into models and views to separate the data and business model from the user interface. Within the models there is an ...
dfhwze's user avatar
  • 13.9k
7 votes
Accepted

Creates an employee record in a time and attendance database and returns the employee object

It is common practice to use static methods-creators instead of constructors. But this approach is used in cases where you need to convert some objects to the object of desired type. It is the main ...
Maxim's user avatar
  • 2,542
7 votes
Accepted

Improvement in file management system based on the file names

It would be better to design the system so that each collection of signals has a canonical filename, regardless of the order of the signals in the collection. This is most easily done by sorting the ...
Gareth Rees's user avatar
  • 49.7k
7 votes

Generalization of any() function with switchable default parameter for empty iterables

Benchmarks and a faster solution Code including the solutions at the end. And note I also have an image further down that might be worth checking out before/while reading. Empty iterable First an ...
Stefan Pochmann's user avatar
7 votes

A Hit Counter For AWS Python Lambda powered with DynamoDB

[Edited following discussion in the comments] A few brief notes on your code: Your type hints could be more complete/descriptive. You don't have any return annotations; the ...
Alex Waygood's user avatar
  • 1,029
7 votes

Console Library System in C++

The review by G. Sliepen has already covered most of what I would have said, so this is intended to be a complementary review addressing points not mentioned there. Eliminate unused variables The ...
Edward's user avatar
  • 66.5k
7 votes
Accepted

High traffic website that shows users subscription status

Architecture Regarding this concern: Table where user's subscription status is supposed to contain is not complete. It has rows for very few users and the intent behind this whole exercise is to fill ...
Grajdeanu Alex's user avatar
7 votes

Header-only log-structured database

I see nothing C11-specific in your code, and it compiled just fine with gnu99 instead of gnu11. Though, I am going to suggest ...
Harith's user avatar
  • 9,687
6 votes
Accepted

Civil status database with Django

Few things here: 1. Parent1 and Parent2 It's not really clear why would you need to have parents in the separate tables while they both represent a person. There is no difference between parent1 and ...
Alex's user avatar
  • 1,622
6 votes
Accepted

Joining WorkTypes to WorkGroups via Channels and Users to check authorization

I am understanding that your goal is to return a set of data that a user is authorized to see. I further understand that ChannelUsers and ...
this's user avatar
  • 2,029
6 votes

Backup document root and MySQL in Linux

Since you are repeatedly using $(date +\%F-\%T), you can store that as a variable (unless you want to also know how long it took the script to jump between ...
hjpotter92's user avatar
  • 8,726
6 votes

Non-Entity framework database interaction model

I won't read this code beginning to end. Some basic advice: Namespaces ExperimentSimpleBkLibInvTool.ModelInMVC.DictionaryTabelBaseModel doesn't follow naming ...
abuzittin gillifirca's user avatar
6 votes

Embedded IoT: local data storage when no network coverage

Here are some things that may help you improve your code. Use the required #includes The code uses uint8_t and ...
Edward's user avatar
  • 66.5k
6 votes
Accepted

Summing categories of financial records per month in a query

Mixing Portuguese and English makes this code messy. Please pick one or the other. I recommend coding consistently in English, because Python, its library, and its code ecosystem are in English, so ...
200_success's user avatar
6 votes

High traffic website that shows users subscription status

You may have heard the adage about separation of concerns, and that each function should do only one thing, and do it well. Consider the function ...
Kate's user avatar
  • 7,338
6 votes
Accepted

Optimal Algorithm to Append and Access Tree Data

A few suggestions: There is a typo in Tree.append where we move to cur.right when cur.left ...
Justin Chang's user avatar
  • 1,519
6 votes
Accepted

A schema for awallet system that allows transfers between users

redundant wallets CREATE TABLE wallets ( id UUID PRIMARY KEY ..., user_id UUID REFERENCES users(id), ... currency VARCHAR(3) ... This isn't ...
J_H's user avatar
  • 32.7k

Only top scored, non community-wiki answers of a minimum length are eligible