Questions tagged [file-structure]
The file-structure tag has no usage guidance.
77 questions
0
votes
1
answer
159
views
Selecting the endianness of data in files generated by an embedded system
I have an embedded system running on a little-endian Cortex-M3. This system is able to accept packets from the network and reply to them. Now, I would like the system to start generating files. These ...
0
votes
1
answer
2k
views
Folder and Project Structure in MVVM for WPF Solution
I know there are already questions about file structure in MVVM but I haven't found the pros and cons for the following two structures. What would be better for a large-scale project, and why choose ...
2
votes
1
answer
3k
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 (...
-1
votes
2
answers
181
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 ...
1
vote
2
answers
175
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 ...
4
votes
1
answer
2k
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 ...
0
votes
1
answer
93
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 ...
1
vote
1
answer
163
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 ...
-2
votes
1
answer
327
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__....
0
votes
1
answer
67
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 ...
7
votes
2
answers
7k
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 ...
1
vote
1
answer
2k
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 ...
1
vote
0
answers
49
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 ...
-1
votes
1
answer
839
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 ...
4
votes
1
answer
468
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 ...
1
vote
4
answers
403
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 ...
14
votes
5
answers
715
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
...
3
votes
4
answers
1k
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 ...
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 ...
5
votes
1
answer
5k
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 "...
3
votes
1
answer
227
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 ...
2
votes
1
answer
94
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 ...
2
votes
1
answer
1k
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 ...
0
votes
2
answers
77
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/...
0
votes
1
answer
3k
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 ...
1
vote
1
answer
134
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 ...
5
votes
1
answer
633
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 ...
1
vote
1
answer
3k
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 ...
8
votes
4
answers
6k
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 ...
1
vote
1
answer
908
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 ...
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 ...
0
votes
1
answer
730
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 ...
38
votes
8
answers
50k
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 ...
-2
votes
2
answers
149
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:
...
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 ...
0
votes
4
answers
182
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 ...
1
vote
0
answers
82
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 ...
21
votes
5
answers
6k
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/...
0
votes
2
answers
385
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 ...
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 ...
3
votes
1
answer
397
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 ...
1
vote
1
answer
140
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 ...
2
votes
1
answer
423
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 ...
1
vote
1
answer
655
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
...
5
votes
5
answers
606
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 ...
0
votes
1
answer
720
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 (...
-1
votes
1
answer
563
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?
6
votes
1
answer
474
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 ...
15
votes
5
answers
11k
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 ...
2
votes
2
answers
878
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, ...