Questions tagged [implementations]
The implementations tag has no summary.
110 questions
14
votes
10
answers
4k
views
Is Dependency Injection useful when implementations are never expected to change?
Dependecy Injection makes mostly sense when using interfaces, since one of DI's strengths is to switch out implementations. It also decouples classes, since the consumer of the dependency does not ...
0
votes
2
answers
431
views
How to implement a server application that can reload configuration without restart
I have a game server implemented in Python to which clients can connect and play against each other.
I'd like to be able to reload configuration from a config file without restarting the server (as ...
-2
votes
1
answer
221
views
Vanilla interface implementations. What should I call it? [closed]
Some may think I'm kidding, but I'm really stuck on this
Suppose you have some UserDao interface that you want to implement
What should you call it?
Here are a few points I'd like to make
I firmly ...
1
vote
5
answers
390
views
Anti-pattern? Double header and exposed implementation detail
Consider that I've implemented SHA-256 hashing in C as incrementally updated IUF (init-update-finalize) working context and 3 subroutines. To use it in free-standing environment, or to efficiently use ...
22
votes
11
answers
9k
views
How is Agile model more flexible than the Waterfall model?
I know one of the differences between Agile and Waterfall is to do with more customer and user feedback, but I'm trying to wrap my head around what makes the Agile/XP model more adaptable to change.
...
1
vote
1
answer
723
views
Tagged pointers vs. fat pointers
I'm writing my own dynamic programming language. So far I've been using a tagged union for all values. Since this boxes primitive types needlessly, I've begun researching tagged pointers which seem to ...
1
vote
3
answers
250
views
How robust should an interface/implementation be?
In a spare-time project of mine, I implemented RSA public-key cryptosystem.
Because the official PKCS#1 standard specify key formats in terms of ASN.1 syntax and DER/BER coding, which is a coding with ...
-1
votes
1
answer
67
views
Implementing a selectable requirements with level of advancement in a web app [closed]
I'm doing a project to teach myself more about MongoDB and ASP.NET development and I am stuck. The project is a mockup of a JobBoard website, where Companies would post offers for potential Employees.
...
3
votes
1
answer
395
views
How are interfaces implemented behind the scenes in the Go language?
I have read this article which indicates a double tuple structure, but it is unfortunately light on implementation details, which is what I am looking for.
So... how are interfaces implemented in Go?
...
0
votes
1
answer
280
views
Best way to implement traffic light/intersection in 2D tile-based traffic simulation
I've been building a traffic simulation with C++ following the Intelligent Driver Model from this article: https://towardsdatascience.com/simulating-traffic-flow-in-python-ee1eab4dd20f
To sum up my ...
1
vote
1
answer
372
views
Gradle/Maven project splitting: interfaces and implementation
Assume we have a single large JVM project (the example is in Kotlin), containing code. As part of a refactoring effort, we are decoupling pieces of the code by splitting the code into multiple modules,...
0
votes
3
answers
314
views
Use aggregation like LSP in C++
I was reading about LSP (Liskov Substitution Principle) in a book called Clean Architecture: A Craftsman's Guide to Software Structure and Design. I have a question regarding how this would be ...
1
vote
2
answers
5k
views
Recommended way of hiding implementation details?
I have a single *.h file. This file contains a single (more to come) function declaration.
Now the implementation of that file is very complex.
the corresponding *.cpp contains several function ...
1
vote
3
answers
1k
views
Benefits of internal API over direct implementation in UI
What we often see is that software companies create an internal API which is then consumed by their own user interface. And we were trying to find the benefits of those, other than it's easy/easier to ...
-4
votes
2
answers
86
views
What are some workflows that one engineer may use to implement a software specification?
I've never implemented an entire specification before and wanted to know what a workflow may look like to do so. I have worked on code that was backed by such a specification, but only in maintenance ...
-1
votes
2
answers
296
views
Why do most AST trees use classes instead of vectors
I've noticed that most AST tree implementations use classes for nodes instead of something like a vector. I want to ask, why do most people use classes? Are there issues to using vectors to make AST ...
2
votes
4
answers
2k
views
Confused about inheritance and correct usage. Should I avoid using members in base class?
I am using C++ , but as far as I understand most OO principles are cross language.
In most of the articles that I have read and liked about inheritance the advice are about :
not to use it for the ...
2
votes
1
answer
256
views
How to implement Gang of Four's Lexi's Compositor-Composition?
I'm studying Design Patterns book and I was trying to understand the Composition principle in Lexi's Compositor-Composition as explained in figure 2.5, as well as how to implement it.
Where the ...
0
votes
1
answer
165
views
Understand implementation of exponential moving average (in case of unix load average)
The UNIX load average gives 3 numbers over 1/5/15 minute time intervals. It's supposed to be an indicator of how busy a UNIX machine is. The global load average is an exponentially decaying average of ...
13
votes
4
answers
6k
views
Can Just-In-Time compilation be considered a secure feature?
The commonly endorsed, and considered the most reliable, way of evaluating the security of a program is through examining its source code. That is, this method is based on the fundamental assumption: &...
3
votes
1
answer
4k
views
What is the currently best C# implementation for a Producer/Consumer scenario?
I have a relatively simple task where I need some 10 consumers to consume work to be produced into a queue, continuously.
This is my first time implementing this design pattern, so I have been ...
0
votes
0
answers
92
views
How to best design this communication module/library?
Introduction
A customer of ours has embedded products with sensors and actuators. Now they would like to connect this device to the cloud so they can remotely monitor and configure it. It should ...
2
votes
2
answers
291
views
How do modern JS engines terminate unresponsive scripts?
I'm trying to implement a safety feature that puts a timeout around a huge function call. Pretty simple, I thought, but it turned out much harder than expected; there's no built-ins for this in any of ...
-2
votes
2
answers
104
views
How to aid (do the testing for) a developer who doesn't own a touchpad to implement Precision bindings?
First of all, I consider myself to be a power user, but wouldn't dare to call myself a software designer.
I opened a feature request to add support for Windows' Precision Touchpad binding in the ...
3
votes
3
answers
1k
views
Java interface design: where should I put a lot of duplicate code that will be used by all subclasses?
Java interface design: where should I put a lot of duplicate code that will be used by all subclasses?
interface Tuple {
void method1();
}
class Tuple1 implements Tuple {
@Override
public ...
-2
votes
2
answers
2k
views
How to pass data between multiple project modules
I'm working on a Gradle project that has several modules. The project is implemented in Kotlin. One of these modules is the main entry point to the project, which is the main module. Another module ...
-2
votes
3
answers
115
views
Behaviour that depends on two sides
I would like to have the following interface:
Resource {
public:
void copyInto(Resource* src) = 0;
}
But in order to implement this, the implementation would need to know (or make assumptions about) ...
0
votes
2
answers
104
views
How to implement an app with an actions toolbar?
Say I am creating an app which contains selectable components and a toolbar/action bar. Some tools work on selected components only, some work on all components together. Pretty standard stuff.
I can ...
0
votes
1
answer
285
views
How to implement FNV-1(a) in SQLite?
Moved
I originally posted this on SoftwareEngineering because that's where this related question was; but having looked into the Help in detail, I think my question is more on-topic for stackoverflow,...
-4
votes
2
answers
78
views
TDD Implementation
How do you successfully adopt TDD in an organization? Training alone is not enough in my opinion as I feel it requires a change in process and mindset. If TDD has been implemented in your organization ...
0
votes
0
answers
140
views
Why in C# it is not important to know when the generation 1 was collected by GC while implementing the GCNotification?
Why in C# it is not important to know when the generation 1 was collected by GC while implementing the GCNotification?
While reading the CLR via C# book I met the following excerpt:
The ...
-3
votes
1
answer
76
views
What are the existing solutions for creating object graphs in an interpreter?
Please let me know if this isn't the right SE site (or otherwise) for this kind of question, it's the best match I could find.
I'm working on a humble interpreter written in C for a simple language I'...
0
votes
1
answer
279
views
How does Packet Loss affect Ping (RTT) calculation?
I am storing my Ping records in a limited queue, and I also have a cumulative sum to get the average. I'm doing it like a window.
My problem is this: Does it make sense that I have 5ms Ping with 98% ...
-4
votes
1
answer
142
views
Multi-level random selection implementation [closed]
Structure
I have a structure like this:
level 1 items represented by a capital letter (A, B, C, D,...)
level 2 items represented by lower case letter (a, b, c, d,...)
level 3 items repredented ...
0
votes
1
answer
2k
views
Class structure: How should a binary tree and it's node class be implemented in Java in terms of class files?
In implementing a binary tree in Java, should the node class be a separate class file independent of the BinaryTreeclass, or should it be a default class in the same class file as the BinaryTree class?...
0
votes
2
answers
2k
views
Scala Option apply method when passed a None
Not sure if this is an appropriate question for here, please let me know!
In Scala, the ever so useful Option class has an apply method in its companion object that allows us to quickly wrap any ...
2
votes
3
answers
5k
views
What is the definition of implementation in programing languages? What is CPython?
I came across this word "implementation". CPython is one of the most common implementations of Python. What exactly is an implementation?
I researched a bit on how a Python code runs. First, it is ...
5
votes
2
answers
3k
views
How are "registers" implemented in VMs?
Process VMs (such as the Oracle JVM, CPython, .NET CLR etc.) are usually stack-based or register-based.
Are the "registers" in a register-based VM actually the registers of the underlying physical ...
-3
votes
3
answers
169
views
Does the implementation of GDPR compliance per site make sense in terms of good practises?
Although I understand privacy concerns, the measure has been imposed by politcians and I want to know what the proper way to put this into place would have been.
Right now, each site has to implement ...
1
vote
1
answer
150
views
Can a class represent two implementations?
I'm unsure about several things:
I have a class that implements a NotificationDispatcher interface. This class I named WhatsappNotificationDispatcher, another implementation goes by ...
0
votes
2
answers
2k
views
Use case for interface
While going through some lecture video on interface. I noticed
If we don't know about implementation, just requirement specification then go for interface.
What can be the scenario? Though I've ...
1
vote
3
answers
2k
views
how can i return the median of a threaded binary search tree in constant time?
I'm having a trouble with understanding how to implement and find the median of a threaded binary search tree in constant time.
The tree consists of a worker's id and name.
The given details are ...
0
votes
1
answer
521
views
How to write a for loop using Automata
I am interested to see how a for loop / while loop would be implemented as an automaton. I am having difficulty imagining how that would work. Say the while-loop did this:
var i = 0
while (i < 10) ...
20
votes
6
answers
4k
views
What advantage was gained by implementing LINQ in a way that does not cache the results?
This is a known pitfall for people who are getting their feet wet using LINQ:
public class Program
{
public static void Main()
{
IEnumerable<Record> originalCollection = ...
39
votes
3
answers
33k
views
Implementing DDD: users and permissions
I am working on a small application trying to grasp the principles of domain-driven design. If successful, this might be a pilot for a larger project. I'm trying to follow the book "Implementing ...
17
votes
6
answers
9k
views
What does the author mean by casting the interface reference to any implementation?
I am currently in the process of trying to master C#, so I am reading Adaptive Code via C# by Gary McLean Hall.
He writes about patterns and anti-patterns. In the implementations versus interfaces ...
0
votes
2
answers
380
views
Is implementations not being interchangeable and having to cast often a code smell?
I'm building a small game similar to chess. I'd like to be able to reuse the structure for another version of checkers too. I'm modeling the games with interfaces (showing only relevant ones):
...
-2
votes
2
answers
6k
views
Separate interface from implementation
What is the meaning of separating interface from implementation in C++? And also what is implied by interface and implementation?
-2
votes
1
answer
120
views
Design implementation for a project
I have a question in regards to the implementation of a program that I am trying to do. I have a MySQL database with numerous users, and each have a task executed at a certain time.
For each user ...
1
vote
1
answer
125
views
Should I doxygenate implementation files in a library of mine, in addition to the headers?
I'm in the process of writing Doxygen comments for this library of mine; it's a header-mostly C++ library, but it does have some code which gets linked rather than included.
For that code, which has ....