All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
74 views

Better stdbool.h

How about instead of #define bool _Bool #define true 1 #define false 0 #define __bool_true_false_are_defined 1 We should have this: #define bool _Bool #define true (bool)1 #define false (bool)0 #...
7
votes
3answers
340 views

code generation - would C be a good compiler backend?

In this and this stack overflow questions, the answers state that C as a compiler backend is a bad idea. But why? C has many compilers that can heavily optimize it. Every platform has a compiler ...
1
vote
1answer
111 views

Use Case Diagram for video renting

I have the following use case about a video rental store which has the following actors: Member (Gold, Ordinal) Assistant Supplier Clerk The system is a desktop application for renting and reserving ...
1
vote
4answers
98 views

Large organization, different teams, unique tech stack or different ones?

This is a difficult question that can involve many people, it is a real scenario and can have real consequences. A big organization with about 100 developers, working on different teams. The teams ...
3
votes
2answers
96 views

Is Excel data model as good as or better than Microsoft Access?

I'm working with several Excel worksheets and workbooks that need to consolidated or linked to each other. These workbooks will track client interactions for different team members. I did the initial ...
-2
votes
0answers
18 views

In Spring Boot, why (or why not) use separate “data” and “form” classes for the same entity?

I'm working on a Spring Boot application which uses a Repository-Service-Controller-View architecture, and am about to implement my first validated web form, namely one to create or modify a user's ...
63
votes
15answers
16k views

How to avoid comments about one line of code for cleanliness

I'm trying to clean up some of my code using some best practices, and read that comments are almost always a bad idea for future maintainability. I've managed to get rid of most of them by refactoring ...
0
votes
1answer
68 views

Refactoring and simplify this infrastructure building code [closed]

I have a piece of code (a Facade) that creates every single infrastructure component on aws. private void synthesizeStack() { Deployer<Vpc> vpcDeployer = new VpcDeployer(this); Deployer&...
0
votes
2answers
73 views

Why should I use containers instead of deploying build artifacts directly to Azure App Services or AWS Elastic Beanstalk?

Recently, I have been told by others to look into containerization of my stateless web applications (in this case .NET Core 2.x and 3.1). All of my dependencies are retrieved from public and private ...
2
votes
1answer
46 views

What's the prefer way when validate a “set” semantic input JSON array parameter in a blog website, silently ignore it or report an error?

I am developing a blog website, for each post, it has a list of tags, just like stackoverflow. There is no doubt that in the server side, i will expose a api like blog/edit to the client side, and ...
-1
votes
1answer
42 views

Syncing data from a monolith to a micro-service

we have a monolith that basically reaches close to a 100k IoT devices/routers and tries to gather some information about them. As you can imagine, this can take close up to 40 hours for the process ...
2
votes
3answers
156 views

How to keep everyone on team in sync with repo?

This is probably a very basic question, but I have never worked on a team before and I'm not sure if there is an obvious answer or if I'm too bad at googling. Regardless, I can't find a clear answer ...
-3
votes
1answer
91 views

Does it make sense to build api and web in one app?

My employer recently learned of Laravel, and has asked us to migrate much of our development to it. None of us have issues with this, as we’ve all played around with it. We have two main in-house ...
0
votes
3answers
86 views

ASP.NET MVC - Using Session Variables or Caching to prevent unnecessary calls. Is it a good practice in general?

I have an application that consists of multiple sections of which each section will need to load data from various API calls. Now I'm thinking of taking advantage of Session variables(or caching) to ...
0
votes
1answer
24 views

How do I solve the portability of WP_Error?

I wrote a lot of code with the intention of it being usable not only in the WordPress space, but everywhere and because of that, I've been very, very against returning WP_Errors and resorted to only ...
2
votes
1answer
83 views

Many small files vs fewer larger files: impact on bundle size and build time

I've been a relentless proponent of small files. I prefer one function export per file, functions with everything-in-one-view, and breaking up UI components as much as sensible (which is why I love ...
1
vote
2answers
230 views

Common interface to handle different data type

I have a design question about data. I have a class "T" that has a single interface handling two data types as described below. The class T is constructed to handle one of the two data types. Users of ...
2
votes
1answer
103 views

Good/clean practice for building the auth part of an application

I'm starting on a greenfield project and haven't done or architected the sign-up/sign-in and auth part of the backend in a very long time, so my knowledge on the nowadays' good practices is very ...
1
vote
1answer
123 views

Where to execute domain validation which is not part of domain object?

I'm not sure where to place the following checks I have now in the material domain class. The issue is, that I need to validate that material exists and is valid in external database. Only after that ...
1
vote
1answer
118 views

What is the difference between simple factory and factory method?

I am a little bit confused about simple factory and factory method. My main difficult is the abrut difference between the examples code on the internet, even on wikipedia, where have lots of them, ...
2
votes
2answers
91 views

Alternating between Java streams and parallel streams at runtime

This is a question I constantly ask myself when designing a data intensive application: When is it appropriate to use stream() over parallelStream()? Would it make sense to use both? How do I quantify ...
-2
votes
1answer
58 views

Is there any type of development platforms for systems which have both electronic and mechanical components together with software components?

I am starting to work in a company. In this company, we have a set of products. These products are inherently related and have many shared functionalities and parts. Each of our products consists of a ...
1
vote
1answer
25 views

E2E testing with third party services

I'm actually building an application that relies on multiple third parties (like 10-12) and I'm wondering if I should test my application with its third parties integrations. I had a discussion with ...
-3
votes
1answer
103 views

How to identify encoding of a text string? [closed]

I guess most of you already met them. You get them from your data sources, see them in your logs, or in the output from your legacy systems. Some strings you can't really read. To derive any useful ...
0
votes
0answers
35 views

CK Metrics - Lower Complexity by Refactoring

I'm suppose to identify 3 CK metrics and the most appropriate class to refactor so as to increase encapsulation, modularity and reduce the complexity of the following project According to my ...
1
vote
1answer
185 views

Program Structure

I'm looking for general advice regarding the structure of applications. In applications I've been building recently, I've started to use a class (I'll refer to it as DataManager for the rest of the ...
1
vote
2answers
95 views

Save average review score or calculate at every request?

I have a city review app and will let people review the cities where they have been. Forget about users for a while. So in the db will look like this CITIES: REVIEWS: | id | name | ...
2
votes
1answer
78 views

Using Enum constructors, Overridable Getters, or both in combination?

Currently an enum in our project takes properties in the constructor. They are practically guaranteed to be entirely different across every different enum. Now I'd like to add an property which is a ...
1
vote
0answers
22 views

How to increase scalability the method that output each file while switching multiple many conditions?

I have a common style (common.scss) and a text direction (RTL, LTR) option file (option-document-direction-rtl.scss, option-document-direction-ltr.scss). And by switching the reading of these files, ...
2
votes
1answer
78 views

What are the correct storage locations (folders) for an application within a Windows-based (Windows 7 - 10) environment?

I confess, the question title suggest a "too broad" question, but here me out first... I am only interested in verifying my findings in that regard. All the following situations have the following in ...
2
votes
2answers
68 views

Requirements engineering model for picking between various software applications?

I'm working for a large company that's currently overhauling its network infrastructure, and several departments within the company have expressed interest in APM, desiring a tool for performance ...
21
votes
4answers
4k views

Constructing an object: should I expose or hide parameters passed to the constructor?

I've a habit I just mechanically do without even thinking too much about it. Whenever a constructor is waiting for some parameters, I consider this a public information that should be available by ...
1
vote
1answer
58 views

Difference between PID and HTTP-based health checks

I was reading the Cloud Foundry docs on Pushing Apps with Sidecar Processes. Under Limitations, there was a point stating health-checks: Sidecars only support PID-based health checks. HTTP ...
2
votes
0answers
29 views

How do I make my Browser Extension send a Selection it captured to a Database/Web App so it can be stored in the user's account?

I am building a Browser Extension that captures a Selection made by the user in any web page, and stores it in his account. I don't quite know how to proceed with this, however. My initial thought ...
3
votes
2answers
157 views

When to use third-person verb? (PlayOnAwake or PlaysOnAwake)

First a couple of examples: var val = obj.GetValue(); var can = obj.CanPlay; var has = obj.HasValue; var val = obj.RequiresConstantRepaint(); // From Unity var val = obj.PlayOnAwake; // From Unity ...
1
vote
1answer
25 views

Synchronizing video playback in LAN over UDP (no master, same HW & SW)

I have devices thay play video files from their local disk basing on a pre-defined playlist (every device plays exactly the same movie in the same order, every device knows in advance what videos will ...
3
votes
3answers
224 views

Struct or class for wrapping an int when 0 isn't a valid value

I have a business object which is basically a wrapper around a value of type int. There are some constraints for the value/object: Not every value in int's range is valid1 The valid values are not a ...
1
vote
1answer
176 views

Using “magic” strings for single-use error reasons?

I'm writing a fairly large piece of logic, during which there are 6 points where things could go wrong and execution should stop after logging the error. The error is also stored in an object. ...
3
votes
4answers
362 views

How can I detect autogenerated code in a project?

I am working at a medium-size semi-govermental organization managing subcontractors for software projects. One of our contractors recently turned in the "source code" for the project they had ...
4
votes
1answer
104 views

Solving file system dependency with database storage

I have a software project A which makes API calls to a third-party software B that is heavily based on data stored on the file system. Also, those software and file systems are distributed on servers ...
23
votes
3answers
5k views

Why are module-specific prefixes widely used for function names in C modules?

In some C projects, function names start with a common prefix indicative of the module name, for example: mymodule_do_this_stuff(); mymodule_do_that_stuff(); Is there a justification for doing so ...
1
vote
2answers
192 views

How to declare and share a lot of variables to provide best performance

My question is not about dilemma between clean code vs performance, but I want to understand exact issue with declaring variables and sharing them between functions. I read in many threads, that from ...
3
votes
1answer
96 views

Algorithm for fulfilling an order using pre-packaged goods

A manufacturer sells different flavour chocolates. Customers can place an order for any number of each flavour chocolate, from zero upwards. Some combinations of chocolates are frequently ordered, ...
1
vote
0answers
29 views

Standard way to bulk crud image with caption in an API?

I am trying to build a API for doing CRUD on images with their caption. So far I can think of option1: sending the images in form-data as list of images and their corresponding captions in another ...
1
vote
2answers
81 views

JSON:API - I don't think I have an `id` or `type` to return

I'm building a Restful API and trying to use JSON:API format for my response. Looking at https://jsonapi.org/format/, it states: A resource object MUST contain at least the following top-level ...
-3
votes
0answers
41 views

Example projects for structuring & coding in large scale projects

TLDR Im asking for reference projects to look at to see where I can learn how to code + structure large scale projects (in python would be ideal). A detailed guide would be perfect, but I think those ...
0
votes
2answers
90 views

What is the best practice for incorporating asynchronous code in this case?

Context: I'm building a popup widget. The html and css files are stored in S3. I need to get those files asynchronously and then continue with the rest of the logic. In the code below, I'm getting ...
5
votes
3answers
200 views

How to catch “continuous ongoing tasks” into a scrum system?

Well in working with scrum it's always seen as important to make clearly defined stop and start points of small tasks. However how do you capture "ongoing" tasks into a scrum system? Like on friday ...
1
vote
1answer
81 views

Are there still reasons to use DNS for load balancing?

I wanted to learn more about DNS, and I happened to have a copy of Computer Networking: A Top-Down Approach 4th Edition lying around. Section 2.5.1 (page 132) suggests using DNS as a load balancer: ...
-5
votes
0answers
25 views

How to load initial data, except SQL

Could someone please tell about ways to load initial data? Most obvious way is to use SQL script. But in case if ORM used in project, is it will be better to use Dao to write to database(or initial ...

15 30 50 per page
1 3 4 5 6 7 1112