Skip to main content

Questions tagged [code-organization]

0votes
2answers
186views

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 ...
Ana Nimbus's user avatar
2votes
2answers
259views

Where to put interface files for mocking aka what are best practices for organizing interfaces in a C#/.NET Core project with NSubstitute, Moq etc.?

Question I'm working on a C#/.NET Core project, and I'm looking for guidance on organizing interfaces, especially when it comes to using NSubstitute, Moq or other libraries for mocking, because there ...
rklec's user avatar
3votes
3answers
2kviews

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 ...
nreh's user avatar
  • 161
0votes
2answers
159views

Where to put the code that searches objects in a complex hierarchy?

Given the following hierarchy of objects: a keyed collection of ClassA objects, where each ClassA object contains a keyed collection of ClassB objects and each ClassB object contains a keyed ...
PieterV's user avatar
-3votes
1answer
114views

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 ...
pvukovic's user avatar
0votes
2answers
111views

Where are all the small functions supposed to go in XP? [closed]

I like the concept of Extreme Programming (as I understand it), that there should be many smaller functions with descriptive names, instead of fewer, longer ones, even if those functions are only ...
Minix's user avatar
1vote
3answers
6kviews

"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 ...
Kyle's user avatar
3votes
1answer
431views

Which is a good way of separating and organizing layers and subdomains code, one that highlights and facilitates a clean architecture?

As I understand, when following the Low Coupling High Cohesion Principle, I should keep together the code that is related to same theme, splitting the code into modules/submodules by its "domain&...
whyer's user avatar
3votes
3answers
524views

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 ...
dotancohen's user avatar
0votes
1answer
628views

How to organize top level scripts in Python projects, especially for interactively developing

I have a Python project that looks something like this. project/ tests/ __init__.py tests.py main_module/ __init__.py sub_modules/ ... task1.py ...
RJTK's user avatar
  • 117
1vote
2answers
989views

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 ...
Claus Appel's user avatar
0votes
0answers
57views

What best practices/principles could help me improve my routine call placement?

I'm trying to change my module's outline since I feel I'm blocking some reuse possibilities, but I don't know how to justify it under the lens of good practices/design principles. Keep in mind this is ...
Fernando Silva's user avatar
-4votes
1answer
1kviews

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 ...
kakyo's user avatar
-3votes
2answers
319views

How do I organize my REST API codes along with the codes for generating the website?

Using github as an example, www.github.com is the website people visit and api.github.com is the REST api server programs will visit. But they probably share some codebase and in my case they share a ...
Qiulang 邱朗's user avatar
0votes
2answers
203views

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 ...
Dragonsheep's user avatar

153050per page
close