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 [libraries]

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

-1
votes
0answers
15 views

how to install enchant library via os package manager?

I installed pyenchant.Installed successfully but it says that " enchant library is not found,install it via os package manager". How can I install it via os package manager.
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
115 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
67 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
32 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
212 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
91 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
223 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
101 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
61 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
16k 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
59 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
395 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
131 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
284 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
78 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
104 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)...
-1
votes
1answer
417 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
433 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
47 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
290 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
152 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
274 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
135 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
499 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
235 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 ...
0
votes
1answer
1k 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
181 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
102 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 ...
-2
votes
3answers
577 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
79 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 ...
0
votes
1answer
379 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
625 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
190 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
814 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
349 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
814 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
547 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
150 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 ...
2
votes
4answers
502 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
169 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
141 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 ...
10
votes
7answers
919 views

Why develop internal libraries for internal applications?

I'm having difficulty understanding why you should develop internal libraries to be used exclusively for developing internal applications. I appreciate that if I want to use software that someone ...
1
vote
2answers
381 views

Is there an interface definition language for software libraries?

Suppose I am writing a C++ library that I intend to distribute in binary form, with interfaces from other languages (e.g. Python). The 'easy' approach of just compiling the library and distributing ...
2
votes
1answer
265 views

Pros and cons of different ways to create objects in Javascript [closed]

Context I am writing a JavaScript library, and I am finding that I don't know what the best way to support object creation. I came up with a list things that I am considering: var obj = Library....
2
votes
3answers
144 views

Common libraries in build chain

Like many (most ?) people, we have multiple "common" libraries managing various things (business objects, utilities, external libraries...) for multiple projects (web service, admin/users site, ...
0
votes
1answer
1k views

Best way to design a class interface passed to library/plugin

I have an application comprising a bootstrapper executable, a core library and several plugins (shared libraries). The core library is implicitely linked to all components, the plugins get linked/...