Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [implementations]

The tag has no usage guidance.

-4
votes
3answers
62 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
1answer
113 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
2answers
129 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 ...
0
votes
3answers
260 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
1answer
86 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
6answers
3k 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 = ...
8
votes
2answers
3k 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 ...
15
votes
6answers
5k 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
2answers
180 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
2answers
2k 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
1answer
82 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
1answer
58 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 ....
4
votes
2answers
200 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 ...
4
votes
1answer
366 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....
1
vote
3answers
121 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 ...
1
vote
3answers
300 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 ...
0
votes
3answers
1k 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 ...
1
vote
1answer
479 views

Handle cron jobs for multiple timezone

How to handle cron jobs for multiple timezone? I am working on the PHP project that supports users from multiple timezones. I have used multiple cron jobs for multiple database operations. I am ...
1
vote
1answer
268 views

Are the benefits of using an incremental implementation approach acknowledged in the choice of roll out strategy?

Today we have vendors selling cloud based enterprise systems which an organization can lease and also configure and customize to fit the organisations needs. Even if there is work in performing ...
4
votes
5answers
589 views

Should quickselect modify the input array or not?

I have recently implemented quickselect, an algorithm for computing the k-th smallest element of an array, which, roughly speaking, works by repeatedly partitioning the array around a pivot and ...
0
votes
1answer
248 views

Comparison of modern browsers' javascript engine JITs

I understands that most of the recent browsers use JIT compilation to execute javascript. What I do not understand is: which part of javascript is JIT'ed - the script, or the bytecode? Let me explain....
-2
votes
1answer
82 views

Do .pyc files in Python contain mnemonics

I'm interested for some time in CPython implementation of Python. I understand that .pyc files contain serialized bytecode, including opcodes. However do these files contain mnemonics? I think that ...
0
votes
3answers
137 views

Compiling methods in interpreted programming language as standalone c++ app

I'm writing an interpreted implementation of a new programming language (just for fun). In this implementation language is first being compiled to an intermediate language, which is then interpreted ...
1
vote
1answer
495 views

Should I use this very short Python Quicksort implementation?

def quicksort(N): if len(N) < 2: return N else: less = quicksort([number for number in N[1:] if number < N[0]]) more = quicksort([number for number in N[1:] if ...
96
votes
13answers
12k views

How to warn other programmers of class implementation

I'm writing classes that "must be used in a specific way" (I guess all classes must...). For example, I create the fooManager class, which requires a call to, say, Initialize(string,string). And, to ...
7
votes
3answers
2k views

Can I implement a payment feature in my own software?

Note: I spent some time thinking about this question before choosing which StackExchance site to post it on. I have decided on this domain because of the description: "For professional programmers ...
2
votes
1answer
139 views

Lower class count vs explicitness

To help with an application that manipulates and works from an XML structure to produce other information, I've created a class structure that closely follows the XML structure. So, the XML is: <...
27
votes
5answers
10k views

Implementing an interface when you don't need one of the properties

Pretty straight-forward. I'm implementing an interface, but there's one property that is unnecessary for this class and, in fact, shouldn't be used. My initial idea was to just do something like: int ...
2
votes
2answers
202 views

Implementing a pay-per-user business model

Introduction I'm working on an application where organisations pay for each user they add to their 'environment'. Organisations have a credit/balance, and as long as the user is not removed, the ...
0
votes
2answers
651 views

What data structure can I use to implement a double ended priority queue with log(n) insertion and find?

How can I implement a double ended priority queue with O(log(n)) complexity of insertion, find min and find max operations? I was thinking of using a red black tree, but it is a little bit ...
3
votes
1answer
191 views

Should I consider uncertain future requirement while development? [duplicate]

I have one text box across multiple pages which is used to enter multiple customerids (as comma separated) . But in current page due to some subsequent implementation difficulties we make it as ...
-1
votes
1answer
95 views

Are there any problems with implementing deleted usernames this way? [closed]

I have a requirement to implement usernames for an application for login purposes. The requirement specifies that the registry associated with the user/username in the database must not be deleted. ...
3
votes
3answers
19k views

What do design and implementation mean?

The words "design" and "implementation" have been used widely. But I am not sure that I understand them. What do design and implementation of a computer-related system (e.g. a computer system, an OS, ...
1
vote
1answer
66 views

Expectations on input / output of array dimensions and approaches to implement support for variable dimensions input arrays

Preamble As we are vectorising our colour API, we are changing the accepted input types for most of our functions. We would be keen on keeping backward compatibility with the existing code. Let's ...
72
votes
5answers
20k views

Why are there so few C compilers?

C is one of the most widely-used languages in the world. It accounts for a huge proportion of existing code and continues to be used for a vast amount of new code. It's beloved by its users, it's so ...
13
votes
3answers
1k views

What is the difference between ref and out in runtime?

C# provides the ref and the out keyword to make arguments to be passed by reference. The semantic of the two is very similar. The only difference is in the initialization of the flaged variable: ref ...
1
vote
2answers
571 views

Define Interface Simplicity vs Implementation Simplicity

In Richard Gabriel's The Rise of "Worse is Better", he talks about the simplicity of interface vs the simplicity of implementation in a design. I've never been able to quite grasp what he means and ...
8
votes
2answers
1k views

How much logic can be put into a command? Or differently: What kind of logic is command pattern for?

I have been using the command pattern for quite some time but I'm never really sure how much logic I can actually put in the Execute method. My current implementation of the command pattern looks ...
-1
votes
1answer
110 views

What differences are between “play-by-play”, design and implementation of an OS? [closed]

From two books' review Daniel Bovet and Marco Cesati. Understanding the Linux Kernel (2nd Edition or newer): Note: this book has some tendency to function as a play-by-play of what happens ...
3
votes
1answer
2k views

Handling Slow External API's in Web Application

So I have got an application that during various steps during a user's process will transmit and receive data from external API's. Currently the way this is handled is fairly rudimentary. There ...
1
vote
1answer
181 views

Is it OK for an interface to only communicate half of how something should work?

I have a service where certain other services can report their status to. By status I don't mean whether they are running or not, but whether they have received data. The point is that other services ...
13
votes
4answers
3k views

Is it permissible to use explicit interface implementation to hide members in C#?

I understand how to work with interfaces and explicit interface implementation in C#, but I was wondering if it's considered bad form to hide away certain members that would not be used frequently. ...
1
vote
0answers
280 views

Is one of these the more “Angular” way of communicating with a directive?

I am working on a project where I would like to encapsulate a directive library and distribute it to other developers to use. I would like to keep the changes to the model within this encapsulated ...
3
votes
1answer
1k views

Does Java's Object.wait() really achieve nanosecond accuracy?

I was checking out the Java 8 standard library source code just out of curiosity, and found this in java/lang/Object.java. There are three methods named wait: public final native void wait(long ...
56
votes
6answers
23k views

Why was C# made with “new” and “virtual+override” keywords unlike Java?

In Java there are no virtual, new, override keywords for method definition. So the working of a method is easy to understand. Cause if DerivedClass extends BaseClass and has a method with same name ...
3
votes
2answers
224 views

Design for an interface implementation that provides additional functionality

There is a design problem that I came upon while implementing an interface: Let's say there is a Device interface that promises to provide functionalities PerformA() and GetB(). This interface will ...
0
votes
1answer
76 views

Would it make sense to add parameters of an inferred type to inheritance?

I'll write this in PHP (where this thought originated), but this is generic to any object-orientated language. Basically, this is an addition to abstract classes that defines the implementation of its ...
2
votes
1answer
192 views

Using partially implemented interfaces

Consider the following hierarchy in C++ notation: class A { public: virtual void doStuff()=0; virtual void doOtherStuff()=0; }; class B:public A { public: ...
-1
votes
1answer
834 views

What is meant by a step-by-step refactoring plan describing implementation of design [closed]

What is meant by a step-by-step refactoring plan describing how to implement a certain design? As little as I know about refactoring it regards improving a (UML) design model and has nothing to do ...
5
votes
2answers
3k views

How to represent a geometric line programmatically?

I have been trying to design a library to do some simple geometric computations in an Euclidean space regardless of its dimension. While it is easy to represent points, vectors, hyperspheres and ...