Skip to main content

Questions tagged [implementations]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
346 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 ...
Matheus Moreira's user avatar
1 vote
3 answers
211 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 ...
DannyNiu's user avatar
  • 229
-1 votes
1 answer
54 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. ...
AdrianIT's user avatar
3 votes
1 answer
300 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? ...
SRNissen's user avatar
  • 161
0 votes
1 answer
221 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 ...
silverfox's user avatar
  • 103
1 vote
1 answer
242 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,...
Hidde's user avatar
  • 170
0 votes
3 answers
275 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 ...
Gooday2die's user avatar
1 vote
2 answers
4k 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 ...
user avatar
1 vote
3 answers
962 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 ...
Jesse's user avatar
  • 193
-4 votes
2 answers
62 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 ...
the_endian's user avatar
  • 1,152
-1 votes
2 answers
257 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 ...
StandingPad Animations's user avatar
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 ...
user3717741's user avatar
2 votes
1 answer
213 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 ...
Christian H's user avatar
0 votes
1 answer
132 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 ...
BMBM's user avatar
  • 337
12 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: &...
Al Berger's user avatar
  • 269
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 ...
Veverke's user avatar
  • 461
0 votes
0 answers
70 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 ...
Kodiak's user avatar
  • 105
2 votes
2 answers
251 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 ...
Drathier's user avatar
  • 2,863
-2 votes
2 answers
83 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 ...
Fabio Freitas's user avatar
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 ...
Guo's user avatar
  • 177
-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 ...
Andrei's user avatar
  • 55
-2 votes
3 answers
97 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) ...
LeonTheProfessional's user avatar
0 votes
2 answers
92 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 ...
Yogev's user avatar
  • 23
0 votes
1 answer
210 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,...
LarsH's user avatar
  • 153
-4 votes
2 answers
64 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 ...
Luly's user avatar
  • 1
0 votes
0 answers
125 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 ...
qqqqqqq's user avatar
  • 109
-3 votes
1 answer
63 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'...
Aviv Cohn's user avatar
  • 21.4k
0 votes
1 answer
239 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% ...
Ícaro Lima's user avatar
-4 votes
1 answer
113 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 ...
basic-ph's user avatar
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?...
aCarella's user avatar
  • 329
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 ...
Derek Plautz's user avatar
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 ...
Akshay Narwadkar's user avatar
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 ...
Aviv Cohn's user avatar
  • 21.4k
-3 votes
3 answers
149 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 ...
James P.'s user avatar
  • 1,223
1 vote
1 answer
138 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 ...
Hans's user avatar
  • 416
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 ...
Surya Bhusal's user avatar
1 vote
3 answers
1k 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 ...
BeginningMath's user avatar
0 votes
1 answer
455 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) ...
Lance's user avatar
  • 2,615
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 = ...
Panzercrisis's user avatar
  • 3,173
38 votes
3 answers
29k 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 ...
LittlePilgrim's user avatar
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 ...
Marshall's user avatar
  • 289
0 votes
2 answers
353 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): ...
garci560's user avatar
  • 267
-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?
Abhyuday Singh's user avatar
-2 votes
1 answer
97 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 ...
97WaterPolo's user avatar
1 vote
1 answer
113 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 ....
einpoklum's user avatar
  • 2,572
5 votes
2 answers
959 views

Is it acceptable to make changes to an interface during implementation?

When writing a library/API for the first time I'll usually start by sketching some ideas on a white-board or loose-leaf while thinking about how different parts of the system interact. This usually ...
Snoop's user avatar
  • 2,738
4 votes
1 answer
796 views

Help trying to implement a request object factory

Heres my issue. I have different types of methods which make HTTP requests to a REST api. To keep things clean, I have methods that take different types of request objects as parameters. Example below....
tjugg's user avatar
  • 338
1 vote
3 answers
133 views

Method requires concrete implementation of collection. Should I change all upstream methods to return concrete implementations?

I have a method processDataAssumingLinkedHashMapInput() that processes a Map. The Map must be a LinkedHashMap ordered by values. Data comes from getStrIntMap(query). This method gets resultSet from ...
Stepan's user avatar
  • 103
1 vote
3 answers
318 views

How do you usually implement right triangles in programming

When I want to implement axis aligned 2d rectangles I always go with {x, y, w, h}, because that is the natural approach to it. With 3d axis aligned rectangles you need {x, y, z, w, h, d(depth)}. For a ...
hgiesel's user avatar
  • 811
8 votes
3 answers
7k views

Forth: How do CREATE and DOES> work exactly?

I am in the process of creating my own concatenative language, heavily based on Forth. I am having a little trouble understanding how the compiling words CREATE and DOES> work, and how they are ...
Qqwy's user avatar
  • 4,817