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
2
votes
2answers
115 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 ...
0
votes
3answers
185 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 ...
0
votes
0answers
20 views

Designing a Js lib, dependencies and peerDependencies

I create a new lib that I want to use in all of my projects. It will contain wrappers on famous libraries such as VueJS and Axios. How should I reference these libraries, from the specs I see that I ...
2
votes
4answers
234 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 ...
3
votes
4answers
227 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 ...
1
vote
0answers
58 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 ...
-2
votes
1answer
86 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 ...
1
vote
1answer
31 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 ...
2
votes
2answers
722 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 ...
-2
votes
1answer
55 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 ...
1
vote
2answers
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 ...
-4
votes
1answer
48 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 ...
1
vote
1answer
118 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 (...
0
votes
1answer
80 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 ...
43
votes
4answers
9k 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 ...
1
vote
2answers
125 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 ...
2
votes
1answer
121 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 ...
0
votes
1answer
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 ...
1
vote
0answers
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 (...
2
votes
1answer
117 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 ...
0
votes
0answers
74 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. ...
2
votes
1answer
334 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, ...
2
votes
2answers
117 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 ...
-1
votes
1answer
99 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 #...
-1
votes
1answer
81 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 ...
-1
votes
2answers
308 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 ...
1
vote
1answer
135 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 ...
-1
votes
1answer
129 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 ...
2
votes
1answer
115 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 ...
7
votes
5answers
389 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 ...
2
votes
1answer
40 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 ...
1
vote
1answer
230 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; }; ...
4
votes
1answer
399 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 ...
1
vote
2answers
526 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....
0
votes
0answers
40 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 ...
0
votes
1answer
101 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 ...
2
votes
1answer
315 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 ...
3
votes
2answers
3k views

What is the difference between a static library and an archive library?

In the comments of a recent answer, I equated a static library with an archive of compiled object files. The response was that they are not the same, so what is the difference? To clarify - gcc ...
1
vote
2answers
165 views

Should you “rebrand” the exception of the library you're using?

Say your making a library Foo that depends on a 3rd-party library Bar. Bar throws a custom exception \OtherVendor\Bar\CustomException. Is it recommended to just throw that exact exception to your ...
0
votes
1answer
51 views

Name for a library that provides an API for other libraries

I've been working on a library at work which provides a simplified API for a few underlying libraries (face recognition, text to speech, etc.). My boss asked me the best way to describe this concept ...
0
votes
4answers
165 views

Is there a mismatch between XSL and OOP? [closed]

context and background: I prefer OOP for the most part and find it, largely, more intuitive -- this is my bias. When I read that functional language x is better than OOP language y I think to myself:...
5
votes
3answers
326 views

Should a high-performance API expose low-performance utility functions?

Context: I'm working on an open source project to solve a problem that comes up in ad-tech and social media data mining: indexing boolean expression trees, and matching them against incoming documents....
0
votes
1answer
608 views

Distributing C# Dlls to Customers on Application Install

I am currently working on a software library that will be used to develop Class Libraries. These class libraries can be run by our application running on the user's machine The application uses the ...
-1
votes
1answer
109 views

Is it a good idea to make common Electron libraries available globally on Windows? [closed]

I build and run many Electron apps on Windows. I noticed that all of them have the same common api files / libraries to run. They all take about 30mb of space. I'm thinking of installing these files ...
34
votes
7answers
6k views

Should you use a library when you can do the task without it? [closed]

I am in a situation where I can use an open source JavaScript plugin to fulfill a task. But when I tried to use it,I found myself I have to redesign lot of things of what I already have done,and it ...
1
vote
2answers
488 views

Is it good design to provide interfaces in a library that would only be used for unit testing?

Contrapositive-ish question: What is the design reason a library class would not implement an interface as a convenience to the developer? (e.g. the .Net library class FileInfo) The FileInfo class ...
4
votes
0answers
95 views

Dynamically load user code from a common library

My project aims to provide a common interface between multiple different HDL simulators, so users can write test benches that will work no matter the simulator used. In this situation, it is the ...
-4
votes
1answer
51 views

Writing an application that calls another application for some tasks: how it works?

I have written a C++ code that calls a solver called CPLEX to solve an integer linear optimization problem (under Ubuntu 18.04). I have three sets of data and I use make command to create 3 ...
0
votes
2answers
245 views

What makes PHP a language and jQuery a library?

PHP is written in C, but is considered a language. What makes it different from something like jQuery which is considered to be a library of Javascript? Why is PHP not a library of C or jQuery a ...
1
vote
2answers
411 views

C++ - Is it a good idea to make separate headers as API?

Let's say I have a library code main.cpp, where are 3 classes implemented: Inner1, Inner2 and Outer. Inner1 and Inner2 are only being used in main.cpp and they're not going to be used anywhere else. ...

1
2 3 4 5
8