Questions tagged [file-structure]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
44 views

Why not using .hpp files containing forward declaration AND implementation over separating to .h and .cpp [duplicate]

I am not very experienced as a c++ programmer so I may not have understood all the subtlties of what i'm doing : yet, for a few months now, I always write my modules with .h files that are only #...
user avatar
  • 109
1 vote
1 answer
1k views

What is the idiomatic way to split code between separate files in Rust?

Coming from the world of C#, where, despite sharing namespaces, it's quite common for every class to have its own file, I find that Rust codebases seem to have a complete different sort of philosophy (...
user avatar
-1 votes
2 answers
142 views

How do I break down my components and files in C

I've been designing an event processor for state machines in C and I'm trying to figure out what's the best way to break down my components in simpler and smaller *.h and *.c files. Specifically I'm ...
user avatar
  • 203
1 vote
2 answers
124 views

Where should I put the .scss files in the scaffold?

I have developed an open-source vue.js scaffold which is based on my exprience and study on various vuejs projects. Currently it has a good structure(i think), but i'm nervous about is it good ...
user avatar
2 votes
1 answer
932 views

Why does the Django Rest Framework encourage separating Model, Serializer and Views for the same object across multiple files?

Summary: Why shouldn't I put model, serializer and view classes for the same object in the same file in my Django Rest Framework application? I'm building an application using the Django Rest ...
user avatar
0 votes
1 answer
67 views

database implementation, how to organize files

I try to build a very small object database, not for production only to learn a bit in my spare time. I've got a data structure that saves my data in blocks of a specific size und combine them when ...
user avatar
  • 129
0 votes
1 answer
75 views

How do database storage engines handle new columns?

I really don't know which StackExchange site this belongs on. It didn't seem to match the "on-topic" list of DBA.SE or SO.SE ... so please let me know if I should move it. I also couldn't find a ...
user avatar
-2 votes
1 answer
241 views

Packages with only __init__.py - Possible issues?

Considering a Python Project structure such as the following, where there are "empty" packages with __init__ files simply pulling code from the lib folder: . ├── foo │   ├── fred │   │   └── __init__....
user avatar
  • 335
0 votes
1 answer
59 views

Domain services structuring

Currently i am handling placing my services by their action type like App Services Storage Payments Providers Gateways IpnHandler But i felt like whenever our payment providers are growing i ...
user avatar
6 votes
2 answers
4k views

What's the best way to handle a large multi-file class in Javascript?

I have a very large class of 59 methods and about 3000 lines of code. I know that's far larger than most people would want, but the class represents a virtual machine, and most of the methods are run ...
user avatar
0 votes
1 answer
1k views

Fast storage format for huge point clouds (fast read/write)

I am working with huge point clouds (1 billion points). I need to process and display them but because of the size of the data, I can't have it all in memory at the same time. First of all, I am not ...
user avatar
  • 101
1 vote
0 answers
45 views

Installation directory for internal scripts

In GNU/Linux the recommended installation directory for internal binaries of a given package is /usr/lib or /usr/libexec. However, I can't find any recommendation for internal (non-binary) executable ...
user avatar
-1 votes
1 answer
677 views

Structure of complex file formats [closed]

Suppose I want design and implement a a large and complex file format, like pdf or docx; how do I have to structure it? How can they contain so many different data types like images, macros or ...
user avatar
2 votes
1 answer
399 views

Is it appropriate to use Semantic Versioning for the specification for a key/value file format?

I'm writing a Python tool to convert/store the data from a commonly used plaintext file format for volumetric data generated by computational chemistry calculations into the binary HDF5 format using ...
user avatar
  • 131
1 vote
4 answers
395 views

How do you explain the importance of writing classes over writing procedural functions to a programmer? [closed]

I have an intern and he writes code fast. However, I have difficulty making him understand the importance of writing classes and follow the OOP paradigm. We recently had a discussion that went like ...
user avatar
15 votes
5 answers
648 views

Small functions vs. keeping dependent functionality in same function

I have a class that sets up an array of nodes and connects them to each other in a graph-like structure. Is it best to: Keep the functionality to initialize and connect the nodes in one function ...
user avatar
  • 259
3 votes
4 answers
852 views

Would you use Byte Arrays or XML if size was not an issue?

In my basic understanding of ByteArrays the benefit is that it is smaller in file size. The down size of a ByteArray is that for any given format you have to know the about the file format to get ...
user avatar
7 votes
3 answers
1k views

Are checksums in file formats obsolete?

In the context of a modern filesystem such as btrfs or ZFS, both of which checksum every piece of data written, is there any additional value in a file format storing internal checksums? I also note ...
user avatar
  • 413
4 votes
1 answer
3k views

Where do you put the "main function" of a Python app?

Suppose you are developing a Python standalone application (not a library). Would you make it a Python package? Or just files next to each other? If you would make it a package, what would be the "...
user avatar
  • 20.7k
3 votes
1 answer
199 views

Best way to structure NoDB (flat-file) website with multiple categories and subcategories for performance and maintainability

I'm building a boutique website using Kirby (a flat-file CMS) and I'm looking for a way to structure the site for best performance and maintainability. The website will have multiple categories and ...
user avatar
  • 33
2 votes
1 answer
90 views

Detecting massive classes that are good candidates for refactoring

Does anyone know of any tool that would help find classes that are taking on too much responsibility? E.g. By visualizing a file's size compared to the other files in the code base, it can be easy to ...
user avatar
  • 129
2 votes
1 answer
781 views

Strategy for Binary File Format Description to C++ Implementation

I am dealing with a lot of legacy, reverse engineered binary file formats, often with lost source code and reading/writing these files needs to be recoded in C++. I am wondering if there are good ...
user avatar
0 votes
2 answers
76 views

Is an approach to store classes that belong to a single feature in a single folder, superior to classifying them in several "community" folders?

in my project I am finding that I mix and match the following two patterns, when it comes to organizing classes in folders/namespaces: Modularized MVC Blocks module/Album/Feature/Controller/...
user avatar
  • 8,021
0 votes
1 answer
2k views

Data structure for storing sorted data

What's a good way to store loads of sorted string on a file so that inserts and reads are fast? I could store it up in a tree, and read/modify/store it as needed, but that seems wasteful for ...
user avatar
1 vote
1 answer
80 views

File structure for storing pixels that changed from one image to another

Have two images with the same dimensions. I want to create a file that contains information on what pixels are different between the two images. The file should also tell me the value of the new ...
user avatar
  • 3,831
5 votes
1 answer
443 views

When designing a directory structure should filenames include folder names?

Suppose I have two directories: house-1 and house-2. Each house directory needs to have files describing its windows and doors. I am trying to understand how to name the files and directories. My ...
user avatar
  • 181
0 votes
1 answer
2k views

Naming conventions for hierarchical roles in an application [closed]

I'm creating an application that internally will have have three totally different separated areas of interfaces. - One where users create content and interact with each other - One where one person ...
user avatar
8 votes
4 answers
5k views

C++ Header files design : just like defining an API?

I'm kind of new to large scale software development in C++, and I was wondering on the design side of things. I was reading this question, and I thought that, overall, once we get past constant ...
user avatar
  • 199
1 vote
1 answer
809 views

Analysis project structure in Python

I am about to embark on a large analysis/data extraction project, which I intend to do with Python. My data to analyse consists of tier 1 files that include some details. and each file points to ...
user avatar
  • 111
0 votes
1 answer
1k views

Setting up folders and importing modules in Python

I'm building an app to automate some processes that are annoying to do by hand (looking in a file, taking certain information out of a file, building another file with that information). My project ...
user avatar
  • 1
0 votes
1 answer
678 views

Uploading Processing Sketch with library to github

I have a sketch I wrote in the language Processing that I want to put up on GitHub. It uses a library released under LGPL so from what I understand, I'm able to (and should) upload the library ...
user avatar
  • 155
38 votes
8 answers
43k views

Is there a conventional way to combine file path strings?

In an example: var assets = "images/" var sounds = assets+"sounds/" Is it more conventional to put the slash on the back of a file path? var assets = "/images" var sounds = assets+"/sounds" Is ...
user avatar
-2 votes
2 answers
142 views

file quantity limit in a directory on a linux file server and why?

What is a good limit to use on the quantity of files in a directory, and why? EDIT: Why shouldn't someone create a system that puts hundreds of thousands of files in the same directory? Why I ask: ...
user avatar
  • 189
0 votes
1 answer
2k views

What metadata do files contain? [closed]

I know when a file is created date information such as date created, last modified, last opened, is automatically updated as meta data on that file. Is there other meta data though? Specifically, is ...
user avatar
0 votes
4 answers
174 views

Is it possible to make a printable 'template' document?

I'm writing a piece of software to generate and print nametags. The issue I'm having is that nametags need to be formatted the same, but have different values (ie. different names, titles), and can be ...
user avatar
1 vote
0 answers
81 views

Dealing with proj files in multi-platform apps

So I've been doing some cross-platform mobile applications using cocos2d-x. Basically it uses common c++ code, that can easily be compiled to the popular mobile platforms with some small wrapper code ...
user avatar
20 votes
5 answers
5k views

Is it a bad practice to give two very different files with the same general purpose the same name?

Is it a bad practice to give two very different files with the same general purpose the same name, separating them into different directories? <script src="client_scripts/app/player_stats/...
user avatar
0 votes
2 answers
377 views

Whats a good structure to save and retrieve locations of images?

I got a java-ee application, where I collect informations about movies. Im my backend I provide data like the name, description, genre and a random uuid. I also got lots of related files, which are ...
user avatar
  • 521
6 votes
4 answers
5k views

Front-end structure of large scale Django project [closed]

Few days ago, I started to work in new company. Before me, all front-end and backend code was written by one man. As you know, Django app contains two main directories for front-end: /static - for ...
user avatar
  • 161
3 votes
1 answer
329 views

Best way to rename existing unique field names in database?

I have a database table that contains id, filename, userId id is unique identifier filename should also be unique table may contain >10000 records When a user uploads a file it should be entered ...
user avatar
1 vote
1 answer
119 views

How to set up variable installation directory?

I have a couple projects that depend on additional files, like images or config files. When compiling and installing a programs like Okular with cmake, I can specify an installation directory and let ...
user avatar
2 votes
1 answer
388 views

Best practices for refactoring parameter file structure in multiple environments

Background info and what I've tried Within each of two mostly distinct environments, say 'Research' and 'Production', there is a need for a structured parameter file. The file contains things like ...
user avatar
  • 194
1 vote
1 answer
493 views

In Python, what is the proper testing structure for packages containing packages? [closed]

Which is the preferred test package structure for packages containing subpackages: Tests in Subpackages? a/ __init__.py b.py c/ __init__.py cc.py test/ __init__.py ...
user avatar
5 votes
5 answers
561 views

How are new file formats constructed?

I've used a software suite that is installed in offices and on remote vessels. The installations communicate back and forth, and they do that by using a simple proprietary file format that looks ...
user avatar
0 votes
1 answer
600 views

Version-control friendly, append-only file format: "binary" or "text"?

I'm designing an append-only ("journaled") file format, and I'd like it to be friendly towards being stored in VCS (git/Mercurial/...). On one hand, I'd like if after each change, only delta (...
user avatar
  • 351
-1 votes
1 answer
482 views

Does Jar file shrinker affect performance [closed]

I've heard ProGuard's Jar shrinker affects the performance of you application. Is this true? And if so just how much slower does the Jar go shrinked compared to unshrinked?
user avatar
6 votes
1 answer
351 views

How to explain to your colleages to stop creating packages and classes named "Utils"?

In most of the projects at work it will eventually show up a package, a class (or multiple packages and classes) named "Utils", where every kind of function is dumped into. It becomes excruciating ...
user avatar
  • 207
14 votes
4 answers
10k views

Is there a proper way to create a file format?

I'm building a proprietary file format for an application I wrote in C# .NET to store save information and perhaps down the line project assets. Is there a standard on how to do this in any way? I was ...
user avatar
  • 261
2 votes
2 answers
748 views

organising classes / folder structure for TDD-based development

Due to test-driven development, one ends up with many classes doing just one thing. It is quite a headache just to see where such classes would be placed inside the folder structure. First of all, ...
user avatar
1 vote
1 answer
78 views

Grouping classes by subject or dependencies?

Our project consists of user application and server application. The server application prepares data files that the user application consumes. Because the data is huge, it is stored in custom format. ...
user avatar
  • 18.2k