Questions tagged [code-organization]
The code-organization tag has no summary.
112 questions
0 votes
2 answers
208 views
How might encapsulated source be broken into into multiple files?
I have a project where there is a primary, high-level, opaque struct with many functions that operate on it. Maybe I am simulating a CPU. How might the corresponding source code be organized? One way ...
3 votes
3 answers
2k views
C++ Is it okay to use nested classes as a way to namespace derived classes?
I have many abstract classes that describe many abstract ideas and objects. These classes have many complex relationships with each other, and I realize that while writing code with some of the ...
-3 votes
1 answer
127 views
What are some best practices for team structure around Mobile and Desktop apps? [closed]
We're currently developing a product which will have a Web version and a Mobile version. At the moment, the plan is to have identical features on both of these. From a tech perspective, there is an ...
1 vote
3 answers
6k views
"Hard coded" vs. configuration files for values in libraries? (code organization question)
I'm trying to get a good understanding as to whether there is a best practice or standard regarding keeping values within your code libraries or referencing them from another config file. I don't ...
3 votes
3 answers
592 views
What are some methods of storing personal notes alongside code?
When exploring a new codebase, what would be some methods of storing personal notes or annotations alongside the code? If I were the only maintainer, I might consider added an actual code comment into ...
1 vote
2 answers
1k views
In C#, is it reasonable to use a #region when I need several members to implement a common interface?
I know that lots of people hate #regions in C#. IMO there is at least one legitimate use of them: Sometimes I have a class which, in addition to its core functionality, needs to implement a commonly ...
-4 votes
1 answer
1k views
Best practice for organizing build products of dependencies and project code in your repo source tree?
I've checked quite a few related questions on source tree organization, but couldn't find the answer for my exact need: How should I organize my source tree? What's the best structure for a ...
0 votes
2 answers
216 views
DRY Violation for Logical Code Organization and Readability
I have a block of code that branches into 2 pathways, let's call them the "simple" and "complex" branch, based on user input. Either the simple or complex logic has 4 steps, let's call them A, B, C ...