Questions tagged [programming-practices]

Programming Practices are the commonly or not so commonly used practices in development of software. These can include things like Agile Development, Kanban, Coding shortcuts, etc.

31 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
516 views

Test-first iterative development in Common Lisp environment

Given: I want to practice proper test-first, continuous delivery-style software development in Common Lisp environment. Problem: How each red-green-refactor iteration of the process should look like?...
  • 159
4 votes
0 answers
773 views

Preferred method for handling Failed CRUD operations in Entity Framework (6)?

I am using EF 6 as my ORM. I am trying to decide how to handle CRUD failures. Option 1: Use exceptions (custom or built-in) to inform the web layer that an item didn't correctly save. Handle the ...
  • 163
3 votes
0 answers
232 views

Understanding Typescript's views on inheritance

I have been struggling to understand the reasons why typescript developers choose the way they implemented inheritance. What I would expect from any language supporting inheritance is these order of ...
  • 141
3 votes
0 answers
58 views

Should I use includes or functions/methods for design elements

I have a website that was originally created as a one page application that is now morphing into a full (multi-page) site. I am trying to refactor the various design elements for reuse on the other ...
  • 131
3 votes
0 answers
74 views

Should my application call statsd directly or should I call statsd based off logs?

I'm planning on incrementing counters in statsd based of various events within my application. I have logging in place for these events. So, from my viewpoint I have two options: Update the ...
3 votes
0 answers
61 views

how to combine logs coming from multiple virtual machines for processing?

Scenario: Two virtual machines produce logs. I want these logs to be sent to a central server for processing (as soon as a line of these logs is generated-->streaming ). The condition here is that I ...
2 votes
2 answers
263 views

Auto Transaction Failsafe's, Third Party API's, Coldfusion Schedule Files

I have an automated invoicing web app and I'm trying to build in some failsafes and a structure that will, under no circumstance, allow an invoice to be double charged. All things working perfectly, ...
2 votes
2 answers
410 views

Design of a modular application

I'm developing an application (Java) in a modular architecture. I have two approaches in mind and I'm not sure which one will be "better code" in case of maintenance and conventions. I have ...
2 votes
0 answers
169 views

Managing application versions using Conan and RPM

I have a shared object that I developed. This shared object is packaged in two forms, a Conan package, and an RPM. It is a Qt project, so it has a .pro file associated with it. Up until now, we ...
2 votes
0 answers
121 views

Circular dependence and many references to the same object

I have tried to design a class diagram for my first game. But then I realized that there are some ugly parts. First, there is reference from StateSystem to State and from State to StateSystem. The ...
1 vote
0 answers
47 views

How to implement timing-mechanism for fantasy draft process utilizing ASP.NET Core 3.1 SignalR

I have developed a Fantasy Draft system utilizing ASP.NET Core SignalR, along with Azure's SignalR service (for backplane/scaling stuff). Last year I utilized a poor-mans' javascript version that just ...
  • 411
1 vote
0 answers
1k views

What are the best practices for picking selectors for web scrappers?

The following is an example using https://github.com/GoogleChrome/puppeteer 'use strict'; const puppeteer = require('puppeteer'); (async() => { // const browser = await puppeteer.launch(); // ...
  • 373
1 vote
0 answers
82 views

Capturing keyboard events for a limited time

I'm trying to code a kind of simple video game where there are two kind of players: Human Players: They enter an keyboard input CPU Players: A random input is calculated For Human Players there is a ...
1 vote
0 answers
94 views

Updating class property inside the method vs. returning a value from the method

In a large code base, what is a good practice between: Updating class properties inside the method vs. returning a value from the method and updating the property in the place where the call to the ...
1 vote
0 answers
130 views

Sending large amount of messages async

The scenario is this: I have web based service that does regular request processing and it's doing persistence into db etc.. Fast response to the client is crucial. So now the average request is about ...
  • 79
1 vote
0 answers
127 views

Single page application automatically download dependent HTML

I'm currently developing an application using ASP.NET MVC5 and Knockout. For now, the typical architecture is this: FooController.cs: public ActionResult GetFoos(){ //... var model = // ...
1 vote
0 answers
186 views

What's a good approach for updating millions of rows independently?

I have a MongoDB database with millions of users in collection. An aggregation function returns millions of results with the following format: Array ( [_id] => Array ( [user] => MongoId ...
1 vote
1 answer
45 views

Preparing multiple serial ports with multiple TCP in my project that I can enable or disable if I want

I have intermediate level of understanding on how TCP and serial works, I've also been able to develop system that uses 1 TCP client and 1 Serial 2 Serials 1 TCP Server 1 TCP client My problem is ...
1 vote
1 answer
307 views

Creating Set Subclasses or Allowing Outside Configuration

I have a TriggerCaller and a TriggerAction class. The Caller "calls" the do() method on the action, which is set with the TriggerCallers setAction() method. The rest of the program should deal with ...
  • 1,311
0 votes
0 answers
55 views

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 ...
0 votes
0 answers
308 views

Invent custom filename extension for derived format

Say I use a predefined serialization format X for certain data. Should I indicate the application in a custom filename extension or not? It is quite common pk3 is a zip archive XSL, SVG and many ...
0 votes
0 answers
57 views

Manual repetitive conversion between file types

Let's say i have an interest in file conversions, but everything should be made by hand and i have multiple output formats (say: csv and excel). Once i get contacted by a client, i have to link ...
  • 228
0 votes
1 answer
2k views

Instantiate a class from a config file. Where should the parse function go?

I have a class in python that is instantiated from the values of a (json) config file. I was wondering what is the best practise to do that (if there is a best practise and is not just a matter of ...
-1 votes
1 answer
70 views

Verifiable Credentials Wallet

I'm working on a project that requires the use of verifiable credentials, and I'm looking to build a wallet that can store and manage these credentials according to the W3C standard. However, I'm ...
  • 99
-1 votes
0 answers
51 views

How to improve the Mediator algorithm when new widgets are added?

i want improve mediator algorithm when the new widgets are added.How do I make changes in this form? plas help me and the code:
-1 votes
2 answers
233 views

How to tell if a group of items is stacked horizontally or vertically based only on their positions?

How do you tell if a group of items is stacked horizontally or vertically given only the items x and y positions? Vertical Group: item 1 item 2 item 3 Horizontal Group: • item 1 • item 2 • item 3 ...
-1 votes
2 answers
248 views

How to decide if a global variable is used inside or outside a function in Python?

In Python variables that are created outside of a function are known as global variables. However to create a global variable inside a function (a local variable), you can use the global keyword. My ...
-1 votes
1 answer
104 views

What is the best way to have 2 inherited class they share same base class but different interface?

I couldn't come up with better title. I will try to explain what the problem is. Currently I am trying to build dynamically created report structure. I define needed report in config file. When user ...
-1 votes
1 answer
250 views

how to implement cross-platform / cross-technology system in common practice

Reading and observing some of the startups and well-known services, almost every time I found that people there are using cross-technology system in their architecture. For example like Twitter, used ...
  • 101
-2 votes
1 answer
174 views

Property file, annotations or database tables for storing configurations

Which one is better property file, annotations or database tables for storing configurations related to a program? What are the advantages/disadvantages and what use cases are best suited for each ...
-3 votes
1 answer
932 views

What naming convention should I use for a JSON RPC client API designed for multiple languages?

This is the documentation with the original RPC client API specification. The naming convention in the specification is camel case. Naming conventions might differ in subtle ways for different ...
  • 103