Skip to main content

Questions tagged [code-reuse]

The use of existing code for creating new software.

Filter by
Sorted by
Tagged with
-1 votes
2 answers
235 views

Suppose I have a personal private code project. What should the developer do with the code in case of impending death or plans to cease development on their personal private project. Suppose, they do ...
Joselin Jocklingson's user avatar
0 votes
4 answers
355 views

Let's say that I've been iterating over my feature A with TDD. After several red-green-refactor cycles, I ended up with a nicely polished implementation with a part of the SUT encapsulated into some ...
Maciek Czarnik's user avatar
0 votes
2 answers
167 views

I'm working on a component, let's call it MyComponent, which is intended to be used by various applications. These applications will get MyComponent as a NuGet package for instance. Assume that ...
Akira's user avatar
  • 257
2 votes
1 answer
153 views

I will get to the question in a minute.... We have 2 in house services that either have an API contract between the 2 that involves an enum or the enum value is stored in a shared database. I don't ...
jdtommy's user avatar
  • 129
0 votes
1 answer
291 views

I recently changed my job to a big MNC and the code I am exposed to is highly complicated, difficult to read and understand. Although it is divided in microservices and runs on local I have to keep ...
Surya Saini's user avatar
1 vote
1 answer
121 views

My question is focused on CMake C++ projects and separating out code into multiple repositories for re-usability, and somewhat mimicking a naive package management system. For now I would like to ...
nick2225's user avatar
  • 157
19 votes
9 answers
7k views

So this is a basic question that was asked by a junior developer (not in these exact words). He had worked on a feature which was used in multiple projects. The main feature can be easily isolated and ...
nakiya's user avatar
  • 387
3 votes
5 answers
275 views

At first I had the following logic of user creation: class UserService { constructor(userRepository, postRepository) {} createUser({user}) { this.userRepository.create(user); } } Then I ...
eugenedrvnk's user avatar
5 votes
1 answer
2k views

This is a clarification of a closed question. I've limited the scope as requested. First, a few definitions, following e.g. A modular module system. Consider any programming language with a selected ...
Corbin's user avatar
  • 146
0 votes
1 answer
94 views

There is a software (once monolith) that makes use of a long list of mappers. You can think of them as Choices field, where each item translates into different conventions. For ex, say that they are ...
aws1785's user avatar
0 votes
0 answers
273 views

I am working on a small suite of enterprise applications, and I am trying to determine the best way to make them more consistent and maintainable across the board. The applications are .Net Blazer ...
aterbo's user avatar
  • 111
3 votes
2 answers
262 views

I strongly believe that good user stories should articulate the problem to solve and for whom (typically stated as "As a role, in order to solve a problem, we want a suggested solution"), ...
Arnon Axelrod's user avatar
1 vote
1 answer
263 views

I'm working on a c++ data analysis project. My workflow goes like this Analyze the data and build models Optimize the code for latency, to deploy for production goto 1 Step 1 has lots of machine ...
darthvader124's user avatar
3 votes
1 answer
2k views

Our situation At first, our company had 1 product. Custom hardware with firmware we wrote ourselves. Now more projects are starting to be added. Many can reuse most of the components of our first ...
Kodiak's user avatar
  • 105
0 votes
1 answer
102 views

I have a number of libraries that I have developed for various projects, e.g. a web server, some computation tools, some logging tools, etc. These reside in different parts of my drive. When I have a ...
CaptainCodeman's user avatar
-2 votes
3 answers
593 views

One of the major issues that I am facing as a Website and App developer, is that certain components / features have to be redeveloped over and over again with a new project. For instance login, signup,...
Adhisha Gammanpila's user avatar
1 vote
2 answers
363 views

A little history - skip to the TL;DR if you so wish to. So I have an UWP application written in C++ that utilizes V8 and have synthetic module which allows calling native methods from the embedded JS ...
FISOCPP's user avatar
  • 147
2 votes
0 answers
139 views

My company has about 200 repos for microservices and libraries that we share. It's largely been great, but it's hard to keep DRY at the organizational level. We'll often have a large amount of package....
Nick Sweet's user avatar
1 vote
3 answers
200 views

I am watching this talk by Sean Parent. He notes that: Choosing the same syntax for the same semantics enables code reuse and avoids combinatoric interfaces What does "combinatoric interface" mean? ...
pooya13's user avatar
  • 187
1 vote
0 answers
36 views

The main source of D3js solutions is observableHq.com, but seems impossible (?) to reuse algorithms by copy/paste... Is it? Even checking tutorials like this, there are no simple way (with less ...
Peter Krauss's user avatar
2 votes
1 answer
1k views

I've been thinking on how to import a project B into a project A, which both are GitHub repositories. Project B is a library I reuse over many projects, I do add stuff in it, directly from project X, ...
aybe's user avatar
  • 955
2 votes
2 answers
674 views

At my company, we are developing pretty simple React Native and sometimes mobile-only React apps. Most of them have some similar logic, such as 'sign-in by phone' flow, some payments stuff, etc., and ...
kuzkokov's user avatar
1 vote
3 answers
472 views

I am wondering about how to make lower-level code reusable when the Dependency Inversion Principle (DIP) is used. In the book Clean Architecture by Robert C. Martin, the DIP is described such that ...
tgpfeiffer's user avatar
2 votes
1 answer
234 views

I recently switched jobs to a new company which develops a .NET framework based product which has been on the market for like 15 years already. Some of the engineers are in this project almost from ...
Urs Meili's user avatar
  • 129
7 votes
5 answers
981 views

Although our products often have the same requirements, the solutions are always developed anew. From different people, with different good results and different quality. A code library especially for ...
Holli's user avatar
  • 475
13 votes
5 answers
5k views

I'm facing problems with what I feel is too much abstraction in the code base (or at least dealing with it). Most methods in the code base have been abstracted to take in the highest parent A in the ...
YamizGers's user avatar
  • 147
1 vote
3 answers
1k views

I am working on a microservice architecture using CQS and with domain objects built using DDD aggregates. I am just beginning to learn about CQS, CQRS, Domain Driven Design, so excuse me if what I ...
Mike's user avatar
  • 149
0 votes
3 answers
1k views

I have several areas in a program where I am doing the following check on the same two booleans, but each spot has different text being written to a file via Stream Writer based on the value of the ...
Godwin's user avatar
  • 11
2 votes
3 answers
2k views

In JavaScript (ES6), I can have optional function parameter with default value. So to add a new behavior to the existing code base, I could either introduce new method(s) or extend the existing method ...
nhle's user avatar
  • 65
0 votes
2 answers
158 views

I am working on multiple projects as a developer and second line support, It happens that I fix a bug on one project, test and deploy the change then leave the project for months and return back for ...
osama yaccoub's user avatar
0 votes
1 answer
294 views

I am practicing professional C++ by building a differential drive robot that applies a Go-To-Goal Behavior. What is I have written so far is an Agent that consumes the following interfaces: Actuators ...
Sam Hammamy's user avatar
0 votes
2 answers
382 views

Usually the domain logic should be contained in the domain entity, rather than being put in specialised external classes called from the entity. This is good to prevent that somebody comes later, ...
Kamafeather's user avatar
2 votes
2 answers
1k views

We have a website with a lot of functionality, and we now start another one, which should have a lot of common code with the first one. What would be the best approach to avoid code duplication? ...
Oleg's user avatar
  • 123
0 votes
1 answer
2k views

I'm working with ASP.NET core web API project, where I have 8 controllers, multiple DTOs being used for request and response and mappers to map models(also used in the web app) with DTOs. Recently, ...
Div's user avatar
  • 167
-2 votes
2 answers
273 views

I'm a software engineer in a company. However, I'm planning to start a self project very soon. I wonder if I am allowed to re-use the code I have written in my company product in my project. It is ...
Ziko's user avatar
  • 123
0 votes
3 answers
481 views

Within an organization, suppose you have an internal tool used by different teams and for different use cases. This package offers APIs in different languages. One could say that having multiple APIs ...
filaton's user avatar
  • 329
0 votes
1 answer
45 views

Suppose that: you invent a new coordinates system and you create a class to represent it you have two products which need to deal with this coordinates system but which, apart from that, are ...
filaton's user avatar
  • 329
7 votes
2 answers
465 views

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 - ...
Stephan Fuhlendorff's user avatar
0 votes
1 answer
211 views

I hope the question title already answers the subject here. Lets say I have a number of ids that needs to be validated in a request. Example: request uri: [POST] /album/{album_id}/song Request ...
TheManish's user avatar
  • 147
-1 votes
1 answer
176 views

I need to remove a framework(vertx, to be specific) from a project(lib) which is the base for other projects as well. What would be the best approach to remove all dependencies on the framework from ...
KumarAnkit's user avatar
82 votes
9 answers
19k views

I'm still inexperienced to write high quality code, so I read books addressing the issue such as Clean Code by Robert C. Martin, and keep checking code of well-known libraries to improve my skills. ...
Islam Salah's user avatar
2 votes
1 answer
513 views

For example, for oauth, I may need to copy and paste oauth and oauth callback code like it (assume Client is the framework I use, I don't use real framework like google because I want to simplify the ...
ocomfd's user avatar
  • 5,760
1 vote
2 answers
331 views

I am trying to create a reusable component / Cocoa Touch Framework in Swift that would display the current weather based on the user’s location. Right now I cannot decide which approach should I take....
SleepNot's user avatar
  • 121
5 votes
3 answers
583 views

I have an Android library used by a decent amount of people, let's call it library A. I am building a second library, library B. The two libraries are conceptually related, they solve different ...
Pierfrancesco Soffritti's user avatar
1 vote
0 answers
62 views

I have a software project which grows rapidly in an unexpected way, many customers request similar tasks but with slightly different needs and parameters. I start to dislike my current code structure ...
snowflake's user avatar
  • 153
3 votes
2 answers
760 views

In a video about software architecture that I'm watching, it's stated that the main program/subroutine architectural style promotes modularity and function reuse Code reuse is one of the main ...
antonro's user avatar
  • 249
2 votes
1 answer
68 views

I have a lot of code that is needed for several projects - units, include files, resources and more. These files are writen by myself, downloaded or cloned with git and have their own place in the ...
Kitana's user avatar
  • 169
0 votes
3 answers
165 views

I am currently creating Excel import modules for some complex data. I didn't plan it well and I have met code reuse issues. I have made first modules and I realized that next modules will need some ...
helvy91's user avatar
  • 29
12 votes
2 answers
1k views

As an example, say you are writing an app in Java. Your app communicates with an API server written in Python. The Python server communicates with an SQL database. You also have a website for your ...
Benjamin Gorman's user avatar
2 votes
1 answer
556 views

For example, let's assume we have a class that is imported three times from other classes. This would lead to a reusability of three. However, as there might be functions that are called only once, it ...
Rene B.'s user avatar
  • 170