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.

28 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
154 views

Implementing new project to communicate with old ones. The correct way

I'm not sure if this is the right place to post this (I'm fairly new, but Stackoverflow and Superuser suggested this site for my question), but here goes. I currently have the following: A frontend -...
4
votes
0answers
356 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?...
3
votes
0answers
220 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
0answers
687 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 ...
2
votes
0answers
47 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 ...
2
votes
0answers
65 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 ...
2
votes
0answers
53 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 ...
1
vote
2answers
249 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, ...
1
vote
0answers
101 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
0answers
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
0answers
76 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
0answers
42 views

Structure to store resources in SCM repository

I have 3 artifacts for my application as below. One Jar file sql scripts Templates I need to bundle all 3 as part of a snapshot bamboo build that uploads them into a repository. Is there any known ...
1
vote
0answers
80 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
0answers
117 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
0answers
126 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
0answers
183 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
1answer
41 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 ...
0
votes
0answers
45 views

Synchronization data between API (server) and local database : C#

I hit an API which gives a list of chairs with their location. I save this data in my local database. Whenever I received updated data like add a new chair, update location of the chairs and delete a ...
0
votes
0answers
53 views

Getting into situations that requires mixin while building classes. How should I correct my class design?

I have the following classes for to solve a particular problem related to HTTP responses. Problem is for class ServerSentEventStreamResponseService I am in a situation where I need mixin because I ...
0
votes
0answers
27 views

Is there a best practices for roles with a Spring MVC web application on a host sytem?

Please be gentle on me as I am struggling to find a place to start. This question comes to mind when deploying a Spring MVC web app running on Linux. Everything I've read on deploying a Spring MVC ...
0
votes
0answers
251 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
0answers
238 views

Java MVC: multiple use of the same event for different actions

I am working on a large Java project which employs the model-view-controller pattern. Should I use a different event for each action (to let the views communicate with their respective controllers)? ...
0
votes
0answers
47 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
1answer
278 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
1answer
364 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
1answer
97 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
1answer
199 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 ...
-3
votes
1answer
66 views

Trying to find a quote — when you find a bug, fix all occurrences of it

I vaguely remember a quote from, IIRC Kernighan. Something along the lines of: when you find a bug, fix all occurrences of it I think it was either in the "Practice of Programming" or "The C ...