Skip to main content
Best practices
0 votes
2 replies
34 views

I’m designing an API for order batching and would like opinions on one specific design choice. Context: An API request gives me only a tenant_id From tenant_id, I load warehouse_layout From ...
Pepa Zdepa's user avatar
1 vote
1 answer
46 views

I'd like to write a function that can access an arbitrary field on an object, given the object and the name of the field: #lang racket (define (get-field* field-name obj) (eval `(get-field ,field-...
kasdeya's user avatar
  • 21
Best practices
0 votes
8 replies
123 views

I'm using an external library which builds an internal representation of an abstract syntax tree (AST) for a toy programming language given an XML file representation of the AST. The method I'm using, ...
Timo's user avatar
  • 27
1 vote
3 answers
200 views

I'm trying to create an array of class student that I initialize later: #include <iostream> #include <string> using namespace std; class student{ private: string name; ...
codequeen's user avatar
Advice
1 vote
6 replies
214 views

I’m working on a small turn-based 1v1 console fighting game in C# and I’d really appreciate a general code review focused on code quality and best practices. The idea is simple: Each character has ...
Kuba's user avatar
  • 1
1 vote
1 answer
107 views

For various reasons, I am currently refactoring some code to a more OOP approach. I am immediately having the following problem: When the Create method of the class module creates the new Word ...
Anna Burlingsby's user avatar
Best practices
0 votes
1 replies
40 views

I am trying to understand how Low-Level Design (LLD) should be approached in interviews. My confusion is that the design changes depending on the perspective I start with. For example, if I design ...
imssuthar's user avatar
Advice
1 vote
12 replies
165 views

I am a begineer and i want to learn c++ by doing projects please suggest me any project that i can do to increase my experience of c++ my old projects are: hang man game bank management system has ...
hassan ali's user avatar
0 votes
3 answers
203 views

The Problem: I am building a simple data processing tool. Depending on the file format (JSON, XML, or CSV), I need to apply different parsing logic. Currently, I’m using a long chain of if-elif ...
Yevhen Ivashchenko's user avatar
4 votes
2 answers
167 views

I am working on a Tic_Tac_Toe project. I have an object (gameBoard) that contains an array, then I have another object that i want to create a player from to play on the board, then I have a function ...
Blazing Jas's user avatar
Advice
2 votes
8 replies
153 views

When writing C# applications, it often feels like we’re encouraged to make methods instance-based even when they would naturally be static. Of course C# is an OOP-first language and patterns like ...
Alessandro Rizzi's user avatar
Advice
0 votes
10 replies
208 views

Given a class Child which is derived from class Parent. When creating an object from class Parent, select the correct type for the variable dan which will be assigned the reference to the Parent ...
HARSHA VARDHAN PAMPANA's user avatar
Best practices
0 votes
3 replies
55 views

Suppose we have two classes A_class and B_class. We want to connect them in a way that allows to access methods and data of B_class from A_class . We can do it through inheritance: class A_class : ...
Drake Vimes's user avatar
Best practices
0 votes
6 replies
117 views

I lately learned about the toString method and its uses. From what I've been taught, the toString method is used as a concise representation of an object as a string of characters, usually used as a ...
CS Student's user avatar
0 votes
1 answer
116 views

I am getting this error while implementing a stack by myself. Here is my code interface IStack<T> where T : class { void Push(T item); T Pop(); T Peek(); bool IsEmpty { get; } ...
Md. Maruf Sarker's user avatar

15 30 50 per page
1
2 3 4 5
4151