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
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [libraries]

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

-1
votes
0answers
89 views

OS libraries and compiling for dynamic libraries [on hold]

I'm looking to make my own compiler / translator between languages, and can probably manage reading code etc... but I do not understand how dynamic libraries (.dlls) are handled by the compiler. To ...
0
votes
4answers
101 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:...
-2
votes
0answers
13 views

Design Patterns & Strategies for a code library with many combinations of settings? [duplicate]

I'm not exactly an engineer. Just a recent graduate of a software development program. However, I am aware of software design patterns, such as the singleton, factory,dependency injection, etc. I am ...
6
votes
3answers
294 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
39 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
75 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 ...
33
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
116 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 ...
2
votes
0answers
72 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
35 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
216 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
95 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. ...
4
votes
3answers
247 views

Decoupled design using static interfaces

Now first I want to mention that I am not quite sure what is the term describing the issue at hand but I hope that I can illustrate it with some code. Problem: A shared class library defines an ...
-2
votes
1answer
191 views

Shared classes between namespaces, how to distribute them?

Some time ago I read from this book that namespaces inside libraries should be distributed in a way that inner namespaces have more concrete classes than their parent namespaces. We can find an ...
0
votes
3answers
67 views

Error Handling Best Practice for External Library

My development environment specifically is .NET and I'm writing a DLL to be compiled and referenced in other .NET programs we'll be writing going forward. My question is: In that DLL, what is the ...
78
votes
9answers
17k views

How do huge open source libraries get maintained while having code far from “clean code” practices?

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. ...
1
vote
2answers
66 views

Microservice Architecture: Localizing core logic in a separate code base

I stepped away from a project for a few weeks. Before leaving the organization was discussing an architectural pattern for our microservices. An instance typically serves two roles in our organization....
2
votes
2answers
596 views

Technical documentation vs Software design documentation

I am trying to start a documentation about a class library that is already finished/developed. The purpose of the documentation is to be used by other developers in order to understand what kind of ...
4
votes
2answers
136 views

Testing framework upgrades

Due to many vulnerabilities disclosures, we had to upgrade our core framework, on which large parts of our system depend. (In our case, it was Spring framework version from 4.3.16., but that is just ...
5
votes
3answers
292 views

Best practices on sharing code between open source libraries

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 ...
-1
votes
1answer
121 views

Should a game engine be outputted as a dynamic or a static library?

I wanted to ask a probably very simple question should a game engine be a dynamic link library (.dll) or a static library(.lib)? Currently, I am doing the dynamic link route, this is influenced by ...
1
vote
1answer
116 views

Large executable size due to libraries/frameworks

My question sounds a bit dumb. Usually we are suggested to use existing libraries or frameworks, to avoid reinventing the wheel, or to achieve some "good practices" (e.g. during software distribution)...
0
votes
1answer
576 views

Using a macro for a libraries namespace?

In some code bases (such as hydra, and thrust's tuple implementation) I see namespaces defined entirely with macros. It appears the reason for this is so that you can configure the namespace to your ...
5
votes
4answers
590 views

How to minimize a Java library's exposed interface surface while breaking down the library into subpackages?

I'm making a library or two for and Android app and I want to keep the library's exposed interfaces to a minimum to avoid the abstraction leaking everywhere by avoiding making all of the classes '...
0
votes
2answers
50 views

Throwing custom exceptions in library: do I throw concrete ones or their superclass?

I am designing a library that abstracts a typical CRUD http service named FooService. In this library I am throwing different exceptions like FooServiceClientException for network related errors or ...
2
votes
1answer
340 views

Cross-platform library: how to organize project?

Our company develops and sells a cross-platform C++ library. We distribute binary only versions for Windows, Mac OS X, Linux, iOS, Android, etc. The only source code the customers get is the header ...
3
votes
3answers
154 views

Should I use a physical units library for modelling domain properties if I don't need to perform computations on them?

I'm working on the data model of a service describing houses and flats. This involves storing quantitative physical properties of certain features of the premises, for example: Speed of the Internet ...
0
votes
0answers
62 views

A DLL as an IO module in C++

I created a set of classes that represent the structure of a game save file which structure I do not control. Each of those classes has a read() and write() methods that are invoked by the parent in ...
-2
votes
1answer
279 views

Why are developers still using proprietary third-party libraries? [closed]

As the open source world is fairly advanced now and you can find an open source implementation of pretty much everything, why are people/developers still using the obscure/proprietary libraries? In ...
1
vote
1answer
138 views

How should end-users install dependencies for software [closed]

Suppose I have an application written in C++, which uses WxWidgets (or some other library) for gui. When an end-user installs my application, how do I make sure they also install the necessary ...
1
vote
1answer
585 views

How to control optional dependencies of a header-only library in `CMake`?

I am developing my own header-only library that I want to use as a framework in other software. I am using CMake for setting up demo targets, tests, and so on. However, I am unsure how to deal with ...
1
vote
3answers
274 views

Should a file reader library API throw exceptions?

I am developing a (Java) library providing an API to read a file in a specific format into an object. The format is basically a map, and specifies valid values for some of the keys, and valid types ...
1
vote
1answer
2k views

How do I use an Apache 2.0 licensed library in my commercial Android app? [duplicate]

I am using a library which is licensed under Apache 2.0 in my commercial Android app. I took a look on the Apache license FAQ on the official Apache homepage (https://apache.org/foundation/license-faq....
2
votes
1answer
214 views

Read Only Generic data access layer Best practice

I am trying to write some art of "generic" data access library to access the data of my company's ERP Software, which is our main/core application where all our related data is managed. I am a ...
2
votes
0answers
112 views

Should I use value objects creating them via factory method and have only getters or just write DTO's with constructor and getters/setters?

I've been using the APIs of a ticketing service which returns arrays of data more or less complex based on the entrypoint called. In order to simplify my life when consuming such API I wrote some ...
0
votes
3answers
1k views

What is the differnce between an API and a library? [closed]

I have a created a Java project. My project is a collection of classes that allow a programmer to manage local networks (create network, delete network-access to device, get information of SSID) and ...
3
votes
2answers
82 views

(System) Hooks for embedded libraries

With the inability to go into to much detail, imagine the following situation: You are developing a library that needs to run on various embedded platforms (AVR, ARM, etc..). Some functionality of ...
1
vote
1answer
450 views

Understanding application licenses when using third party libraries in an android project

I'm developing an app for the 2nd time but it's the first time i'm using third party libraries in my application. One of the libraries seems to have an MIT license and the other is the android ...
1
vote
1answer
167 views

Limiting Code in Debug Code Delivered to Customer

I am designing some software that will be delivered to a customer with some limited areas that they can customize using the same platform and compiler (Windows 10, Visual Studio 2017). My goal is to ...
2
votes
0answers
724 views

How has Windows maintained binary compatibility for over 20 years? [closed]

Modern Windows 10 can run binaries that were compiled on 20 years ago for Windows 95 or NT4, however I imagine that the libraries that the code is calling would have changed massively since then. I ...
4
votes
1answer
195 views

Should code be written to stay consistent with the unidiomatic API style of a library?

I'm currently using the wxPython library to construct a GUI. One interesting aspect of the library I've noticed is that it uses CamelCase notation to write method names, as opposed to the snake_case ...
0
votes
3answers
925 views

What is actually the difference between the GNU C Library and the C standard Library?

I sometimes see these two terms be used interchangeably. What is the actual difference between these two terms? How are they used differently? Are there any other alternatives to these two libraries?
1
vote
1answer
478 views

How to choose between a library and shared project?

I am working on a set of .NET Core 2.0 Microservices together with some other developers. I wrote some code to add my own custom logging as described here. My logger sends the logging messages to an ...
2
votes
3answers
1k views

Is it possible to create a C header file from a dynamic library?

Suppose I have a compiled dynamic library: .dll, .lib, .so etc. Is it (theoretically) possible to automatically create C header file for such a library? Is there an existing tool that does that? ...
1
vote
0answers
640 views

Why does clock() function in C from <time.h> header only returns clock ticks in increments of 10's of thousands?

I am curious to know why does the function clock() only returns values in increments of 10,000 and is not able to return values in between. I have the following code: #include<iostream> #...
-3
votes
1answer
153 views

Why do many “popular” C++ libraries have a small number of stars on Github? [closed]

For example a CSV parsing library looks to be the most popular CSV parsing library, yet it only has 301 stars. C++ is one of the most popular languages yet C++ libraries on github do not look to be ...
3
votes
4answers
529 views

Should a REST API wrapper validate inputs before making a request?

Suppose that the server restricts a JSON field to an enumerated set of values. e.g. a POST request to /user expects an object with a field called gender that should only be "male", "female" or "n/a". ...
2
votes
2answers
2k views

Why do we have to include multiple header files for a single library (the C standard library)?

I am not sure why there are so many header file for the C standard library (stdio.h, stdlib.h, math.h). How do these header files point to the same library? I guess I am a little bit confused about ...
4
votes
1answer
171 views

Proper way of throwing errors in a JavaScript library?

Let's say I am writing a simple library in JavaScript, with only a few functions: Calculate the factorial of a positive natural number Find the least common multiple from an array of integers And so ...
0
votes
1answer
153 views

Is it possible to ship libraries with code?

Is there any way to safely include libraries (either internal or external) in the directory of a project (say in a lib/ folder) when you ship or release code? As far as I can see it would be a lot ...