2022 Developer Survey is open! Take survey.

Questions tagged [libraries]

A library is a collection of resources providing data and/or services for developing independent software.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
33 views

How to handle config/env vars in a library project

I am building a new Python library project to be consumed by several of my application projects. The existing code consumes environment variables for various configuration settings. Should my ...
user avatar
  • 153
2 votes
2 answers
137 views

How to document external libraries that have been adopted into an existing codebase?

I have been using an external library for a while now. Unfortunately, it stopped receiving updates, and has since been adopted into my codebase. The issue is the library was poorly documented in the ...
user avatar
-3 votes
1 answer
52 views

Best way make a complex libraries as a plugin with dependency inversion principle [closed]

For instance, if we have a complex library with many functionalities, how can we make this lib a plugin such that it can be replaced with another lib more easily. The answer obviously is the ...
user avatar
3 votes
4 answers
195 views

How to get an ILogger instance from extension methods?

Let's say I have this service abstraction exposed from a library. public interface INavigator { ImmutableList<IPageViewModel> Entries { get; } void NavigateForward(IPageViewModel page); ...
user avatar
  • 204
2 votes
2 answers
91 views

Design pattern to create a shared lib architecture

I am making a renderer as a hobby, one thing I thought to try is making the low levelAPI be dynamically swappable, i.e. you could have an opengl or vulkan backend and switch between the two without ...
user avatar
  • 241
2 votes
2 answers
132 views

Strategy for offering a library both a single-header and as a header + compiled implementation

I am maintaining a FOSS library which, for the sake of discussion, consists of a small .h file and a larger .c file (plus build-related files, see below) I've been requested to offer this library as a ...
user avatar
  • 2,363
5 votes
1 answer
423 views

Is changing the exception a method throws a breaking change for a library?

I have a library that I am distributing on maven in the new version I will be changing the exceptions some methods are throwing. Is this considered a breaking change? If this is the only change in the ...
user avatar
2 votes
3 answers
157 views

Should I ensure my libfoo library's include file can be included as foo/foo.h?

I'm maintaining a small C library; let's call it libfoo. It has quite a few users (actually it's complicated - it's the main fork of a highly popular library which has been abandoned); and it sports a ...
user avatar
  • 2,363
1 vote
1 answer
67 views

Re-export (certain) library components from barrel file

Situation At the project I'm currently working on we're using Chakra UI to create our UI. But I guess this question applies to whatever (UI) library you're using. There are certain components that ...
user avatar
  • 111
40 votes
7 answers
10k views

Why do library developers deliberately break existing code?

Today, I updated ZBateson\MailMimeParser the PHP e-mail parser library from 1.x to 2.x. Soon enough, my PHP error log started filling up with errors. Noting where it happened, I found out that it had ...
user avatar
0 votes
0 answers
66 views

Should we use a separate artifact repository for Maven snapshots?

Background We are currently using Maven for build and dependency automation. Our source code is in CodeCommit/Git. We are investigating CodeArtifact as our Maven artifact repository. We are using ...
user avatar
6 votes
3 answers
354 views

How to simplify exception handling for library users?

Suppose of having a library exposing the following piece of functionality: public static class AwesomeHelpers { public static async Task<int> ComputeSomethingImportAsync(CalculationInputs ...
user avatar
2 votes
1 answer
115 views

Shared library and modules with versioning

I have different versions of modules and they should all work together with the same shared library which could also have different versions like displayed in the image below: From a daily use ...
user avatar
0 votes
1 answer
317 views

How to expose C++ static library interface, extending Pimpl to an abstract interface

Until today I had a static C++ library with no separation between the public interface and internal headers. My other apps just linked to it, included the required headers, and used whatever they ...
user avatar
2 votes
2 answers
117 views

What's a good solution for prioritising tasks for a company code library?

I work at a game company that has a Core Library with a bunch of ultities, extensions and systems that we typically import large chunks of into projects. Recently we have been trying to improve our ...
user avatar
0 votes
3 answers
811 views

"Hard coded" vs. configuration files for values in libraries? (code organization question)

I'm trying to get a good understanding as to whether there is a best practice or standard regarding keeping values within your code libraries or referencing them from another config file. I don't ...
user avatar
  • 3
2 votes
4 answers
282 views

Is it common practice to declare exceptions in a library that won't be thrown or caught anywhere within that library?

I have a very basic library that serves the purpose of collecting some useful but simple pieces of code. Like for example a Percent struct or functions like ToDegrees() and ToRadians(), just to give ...
user avatar
3 votes
4 answers
276 views

Should functions depend on other functions?

Suppose I have a function to log error messages printError(). Suppose I have another function which might throw an error, doSomething(). Should doSomething() implement its own error logging or depend ...
user avatar
2 votes
0 answers
96 views

Drawing the boundary between high level API and low level API

Assume that were developing a cross platform graphics engine. Now we have quite a lot of low level APIs to choose from (OpenGL, Vulkan, DirectX 11, DirectX 12, ...). Now because of this, we are gonna ...
user avatar
  • 129
-2 votes
1 answer
90 views

How to start developing a well architected Javascript Library?

I want to start developing an. open-source javascript library. I can see other open-source libraries are well structured. They have src, dist, test kind of folders, etc. Which is making me very ...
user avatar
1 vote
1 answer
36 views

CLI and Lib package, where to put module loading code

My Software contains a lib package, a cli package and an arbitrary number of plugin packages. The plugin packages do the algorithmic work. The lib package basically just executes the plugins and ...
user avatar
3 votes
2 answers
1k views

Programming a library in multiple languages

I am planning to implement a cryptographic library for several languages and looking for best practices. I have looked at several threads, especially this, this, and this one, which answer my ...
user avatar
-2 votes
1 answer
70 views

In C++, does it make sens to have library project be composed of other libraries?

I'm working on a C++ project which is currently divided into "sub modules" / "components". Each of these are compiled into a separate library (components are usually 10-20 files). The libraries are ...
user avatar
1 vote
2 answers
52 views

Suitable way to round results returned by any function of a class

Assume there is a class Shape. The class has two functions area() and perimeter(). Let's say Circle and Square inherit from Shape and override these methods. Obviously the results are going to be ...
user avatar
-4 votes
1 answer
51 views

Development paradigms of ML libraries

I know that Tensorflow use symbolic model-building APIs where the developers can use them to build static computational graphs. Whereas Pytorch offer imperative programming paradigm where it performs ...
user avatar
  • 1
1 vote
1 answer
173 views

Backward compatibility testing

As a creator of a software library, how can I verify backward compatibility with earlier versions? When using a dependency management (here: Maven), multiple versions of my dependency could be (...
user avatar
  • 135
0 votes
1 answer
94 views

When does it make sense to update eslint/prettier?

I have the following setup: different teams shared eslint config (that imports airbnb rules as a basis). Whenever a developer decides to update libraries, if eslint/prettier have updates, it's a ...
user avatar
44 votes
5 answers
12k views

What is the difference between a library and a dependency?

In this docker beginner video its explained, that different stacks may depend on different libraries and dependencies and that this can be handled with Docker. However, I don't get what the ...
user avatar
  • 567
2 votes
2 answers
215 views

Is it a best practice or anti-pattern to export mock versions of functions for a library?

Context We are creating a library that makes an API (HTTP) request to a 3rd party. During testing we have written mock versions of the functions that make external requests so that we can test the ...
user avatar
  • 137
2 votes
1 answer
175 views

What is the name of the throw-an-exception on invalid inputs pattern?

In some .NET libraries, there's a pattern of two alternative ways to call a function. int i = x.GetValue(k); /* Might throw. */ if (x.TryGetValue(k, out int i) { /*...*/ } else { /* ... */ } I ...
user avatar
  • 601
0 votes
1 answer
108 views

How should I provide generic typing and allocation for a collection library in C?

I am in the process of implementing a persistent collection in C, specifically, an immutable hash trie. In order to increase acceptance and reusability, I have identified the following key areas that ...
user avatar
  • 159
1 vote
0 answers
42 views

how to handle external shared libraries, which we do not want to expose

We have 800-900 services we expose via an ESB. Each service is a web app hosted on Tomcat servers. We have 4 tomcat servers per group of services. Our services are split into 4 groups. Each service (...
user avatar
1 vote
1 answer
123 views

Is it common to include a specific build of a library/ tool for production level project?

I am working with C++ in a Linux/ Unix environment. I am trying to learn the physical design of large scale projects. In one of my projects, I am using an SDK from a camera manufacturer. They released ...
user avatar
  • 123
0 votes
0 answers
111 views

Ensure that library has been initialized

I am using a 3rd party library that must be initialized with Lib::init() before any of its other functions may be called and that must be uninitialized with Lib::destroy() before the application ends. ...
user avatar
  • 1,632
2 votes
1 answer
478 views

Are symbolic links a good way to 'import' a project into another?

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, ...
user avatar
  • 727
2 votes
2 answers
144 views

Organization of C++ source code for reusable components

I'm implementing a custom templated container as part of a learning project in C++. The container makes use of different components like serialization, memory management, iterators. I am wondering ...
user avatar
  • 31
-1 votes
1 answer
107 views

Better stdbool.h

How about instead of #define bool _Bool #define true 1 #define false 0 #define __bool_true_false_are_defined 1 We should have this: #define bool _Bool #define true (bool)1 #define false (bool)0 #...
user avatar
-1 votes
1 answer
84 views

Use two parallel instances of the same .NET assembly

I've have an n-tier .NET 4.6 internal business application. It has a business logic layer class library project that references a data access layer class library project. It's designed to decouple the ...
user avatar
  • 189
-1 votes
2 answers
481 views

Can a service be split into two microservices using common libraries?

I am thinking of splitting a service serving multiple endpoints into microservices that can serve a set of endpoints but the problem is that the two services have certain logic in common. can the two ...
user avatar
1 vote
1 answer
142 views

Create a common interface to use N libraries and define specific behaviours

I am creating a browser automation library that is capable of using Puppeteer(automates chromium) and Selenium(automates all major browsers), but the goal is to also be able to add more libraries in ...
user avatar
-1 votes
1 answer
142 views

How to figure out if a certain technology/library is used in development of a proprietary application [closed]

Not sure if the question is relevant here, but basically it is expressed on the title. I'm curious to know if a certain library/technology is used in a proprietary software. How can I satisfy my ...
user avatar
2 votes
1 answer
198 views

Managing compatibility and dependencies in code library

I manage a library that is made of multiple components, there is some dependencies between some of these components, for example I have a core library for common code base that is referenced by other ...
user avatar
  • 349
7 votes
5 answers
477 views

How to keep developers informed about a code library in large organizations?

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 ...
user avatar
  • 475
2 votes
1 answer
44 views

Should I update the major version of a consumer package if one of its critical dependencies has a major update?

This is a scenario I have seen: I have a shared library with code that fetches data from an api. Let's call this ApiProvider. Currently this ApiProvider is in version 1.1.1 and is currently pointing ...
user avatar
1 vote
1 answer
310 views

Public class members in PIMPL

I'm attempting to use the PIMPL idiom. This is my public header file in include/foo.h: class FooPrivate; class Foo { public: Foo(); ~Foo(); private: FooPrivate* p_impl; }; ...
user avatar
  • 89
4 votes
1 answer
450 views

Benefits of Java's InputStream and OutputStream over .NET's Stream

Java has a notion of separate InputStreams and OutputStreams. Your code reads from an InputStream and writes to an OutputStream. .NET does not have this distinction, instead it has a single Stream ...
user avatar
1 vote
2 answers
700 views

Refactor namespaces in a library while keeping backwards-compatibility

We developed a generic .NET library for our line-of business applications. This is what our namespace/class structure looked like 5 years ago: ... AcmeCorp.Tools.ExcelWriter AcmeCorp.Tools....
user avatar
  • 9,220
0 votes
0 answers
47 views

Do I need provide translation for an UI library

I have a library for a lockscreen in Android, that includes diferent dilogs for fingerprints, texts and all that stuff. My question is: What the best practice to provide localization. Should I have ...
user avatar
0 votes
1 answer
121 views

Replacing a shared library with a shared microservice

I understand that generally shared libraries are a microservice antipattern, and the disadvantages of shared libraries in a microservice world are well documented. However, I have not been able to ...
user avatar
2 votes
1 answer
348 views

Is there such a thing as linking to too many dynamic libraries in Linux?

I'm currently considering breaking down one of my libraries in some 20 Debian sub-projects. Each part is already pretty much a standalone bit in the existing large library. What I'm wondering is the ...
user avatar

1
2 3 4 5
8