Skip to main content

All Questions

2 votes
3 answers
951 views

Is breaking encapsulation a necessary compromise for serialization?

I've been considering the way to solve this problem for a while, and I'm currently stuck between two options I both feel are suboptimal. Here's an abstract example of what I'm dealing with: I have a ...
pulpicated's user avatar
3 votes
4 answers
1k views

Representing vectors as arrays of points vs. as data structures

I'm writing a program in Java where I need to represent the position, scale, and other 3-dimensional properties of objects in a world using vectors. I can use either of these two approaches: ...
Bunabyte's user avatar
  • 643
0 votes
2 answers
685 views

How to create an interface in C that can work on two identical structs with differently named fields

Question Background Consider a scenario in which I have two structs. Both consist of three fields for doubles. The only difference is the names used to refer to these fields. The first struct is for ...
Shadow43375's user avatar
1 vote
0 answers
484 views

Design MySQL database to store user workout data for Workout App

I am building a fitness app and I'm trying to figure out the optimal way to store the data is a MySQL database. I would like to have specific programs (for example, 'get jacked'), I would like a users ...
adherb's user avatar
  • 121
0 votes
0 answers
43 views

Query for each doucment or include IDs in document itself and query for all documents with ID?

I am working on a project where there will be different kinds of accounts that use Auth0 for auth and authz. I want to have it so that an account will query my backend to get back documents that ...
joshk132's user avatar
  • 161
-1 votes
3 answers
293 views

Design pattern for creating and scheduling tests/exams

I have an Exam class that represents an examination/test: public class Exam { public int Id { get; set; } [Required] [StringLength(maximumLength: 30, MinimumLength = 1] public string ...
Amal K's user avatar
  • 111
0 votes
2 answers
132 views

How can I associate algorithm-specific data to the objects it works with, efficiently yet cleanly?

I'm writing in C++, but this problem applies to most non-high-level languages, and possibly some high-level ones as well. I have a graph of heterogeneous nodes. The graph can be instantiated by ...
Helloer's user avatar
  • 293
0 votes
0 answers
71 views

Organizing Complicated Matrix Traversal?

The following are some examples that you may see in an intro to programming course: Print the elements of an nxn array... Spiraling in from the outside Spiraling out from the center Zig zagging from ...
Kyle's user avatar
  • 37
1 vote
0 answers
148 views

What is a good design for accumulating temporary data stemming from several processing runs?

I would like to compute cycle times for some manipulator movements. These movements consist of different phases. I have a class that models these phases and this is its constructor to give an idea: /**...
Benjamin Bihler's user avatar
0 votes
0 answers
93 views

Is it idiomatic to use protobufs as containers within a service?

I love gRPC, but I find every step of the protobuf process rather frustrating (particularly in Python). Even though they are structurally similar to data structures composed of lists and dicts, you ...
DeusXMachina's user avatar
2 votes
2 answers
70 views

How to model files which contain values that depend on and change with other values?

I want to parse a binary file and track the values and positions of certain properties within it. Reading them is not that much of a problem, since I know the rules they follow in terms of where they ...
Minix's user avatar
  • 149
2 votes
3 answers
294 views

What is the name of this concept/design pattern for blocking another component from running?

Description of Desired Behaviour I have the following scenario: Component A can run freely as long as it is not blocked. Any other component can block the component A from running at any time. After ...
ianmandarini's user avatar
  • 2,818
0 votes
0 answers
81 views

What is the correct way of setting and then differentiating between paid and free user in Firebase / Firestore?

I am developing a mobile application that will have both free and paid versions. The way I see how I could differentiate between what is a paid and free user is to set a property isPaid on their ...
Edvinas's user avatar
3 votes
1 answer
180 views

How to model workflows

I'm building a helpdesk-type system, where there are: Customer - can submit/resubmit tickets; Manager - can review submitted tickets, assign to developers (one ticket to multiple developers), review ...
Deniss Kozlovs's user avatar
4 votes
3 answers
385 views

Working with "external" object identifiers

Note: I wrote this question in a way that made it seem I'm mainly concerned with the memory usage and ways to optimise this. Rather, my original intention (and my current intention, upon revisiting ...
Anakhand's user avatar
  • 149

15 30 50 per page