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.
32 questions with no upvoted or accepted answers
4
votes
0
answers
581
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?...
4
votes
0
answers
852
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 ...
3
votes
0
answers
243
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 ...
3
votes
0
answers
64
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 ...
3
votes
0
answers
96
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
80
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
285
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
0
answers
276
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
137
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
95
views
What is the best way to implement the following type of paradigm?
I have the following piece of code. Line 1 is a container (for simplicity, one can think of it as a list of elements e1, e2, ..., en). Now there is a function function_fun which takes as input an ...
1
vote
0
answers
69
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 ...
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();
// ...
1
vote
0
answers
100
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 T ...
1
vote
0
answers
130
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
142
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 ...
1
vote
0
answers
142
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
190
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
64
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 that ...
1
vote
1
answer
349
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 ...
0
votes
0
answers
74
views
Web application having database with OPC client
I'm designing a browser-based application that will display real-time data collected from OPC server. I have decided to use Angular framework for the browser application development. The browser ...
0
votes
0
answers
78
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
313
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
67
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 ...
0
votes
1
answer
3k
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
137
views
Is there any benefit/viability to sharing models across API versions that have differing schemas
I have been asked to get involved with a Team that is currently having delivery issues for various reasons. During my review I came across an acceptance criteria on a user story;
If you call v1 of ...
-1
votes
1
answer
111
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 ...
-1
votes
2
answers
488
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
844
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
150
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
275
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 ...
-2
votes
1
answer
298
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
2k
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 ...