Questions tagged [libraries]
A library is a collection of resources providing data and/or services for developing independent software.
385
questions
223
votes
14
answers
326k
views
Why aren't more desktop apps written with Qt? [closed]
As far as I know and have understood in my experience with Qt, it's a very good and easy to learn library. It has a very well designed API and is cross-platform, and these are just two of the many ...
143
votes
2
answers
81k
views
What is a "shaded" Java dependency?
JVM developer here. Lately I've seen banter on IRC chat rooms and even in my own office about so-called "shaded" Java libraries. The context of the use will be something like:
"Such and so provides ...
111
votes
13
answers
11k
views
Exception vs empty result set when the inputs are technically valid, but unsatisfiable
I'm developing a library intended for public release. It contains various methods for operating on sets of objects - generating, inspecting, partitioning and projecting the sets into new forms. In ...
81
votes
9
answers
19k
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.
...
63
votes
3
answers
48k
views
Are header-only libraries more efficient?
Assumptions
One of the advantages of header-only libraries for C++ is that they do not need to be compiled separately.
In C and C++ inline makes sense only if the function is defined in a header ...
61
votes
3
answers
7k
views
Why do JavaScript frameworks/libraries have functions which already exist in pure JavaScript?
I wonder why frameworks/libraries have their own helpers although they exist natively already.
Let's take jQuery and AngularJS. They have their own each iterator functions:
jQuery.each()
angular....
46
votes
16
answers
14k
views
Are there concrete reasons not to use libraries and code snippets heavily? [closed]
Overall I'm in programming for about 8 years now and it seems to me that I'm relying more and more on open source libraries and snippets (damn you GitHub!) to "get the job done". I know that in time I ...
45
votes
5
answers
17k
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 ...
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 ...
40
votes
5
answers
5k
views
Is it considered an anti-pattern to read from STDIN from within a library?
While writing a library for a large project I'm working on at work, an issue came up which required a token to be sent to an email address, and then passed back into the code where it can then be used ...
34
votes
14
answers
14k
views
What benefits are there to native JavaScript development? [closed]
Given how much simpler jQuery development is, when compared to native JavaScript, what makes people forgo libraries like jQuery altogether?
Is this because jQuery has limitations or it is slow? I ...
34
votes
7
answers
7k
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 ...
34
votes
3
answers
13k
views
Did C++11 address concerns passing std lib objects between dynamic/shared library boundaries? (ie dlls and so)?
One of my major complaints about C++ is how hard in practice it is to pass std library objects outside of dynamic library (ie dll/so) boundaries.
The std library is often header-only. Which is great ...
32
votes
16
answers
4k
views
Do you have your own 'misc utils' library? What part are you most proud of? [closed]
I know that many of us maintain our own little personal library with tools and utilities that we use often.
I've had mine since I was 16 years old so it has grown to quite a considerable size. Some ...
28
votes
6
answers
14k
views
Why use an opaque "handle" that requires casting in a public API rather than a typesafe struct pointer?
I'm evaluating a library whose public API currently looks like this:
libengine.h
/* Handle, used for all APIs */
typedef size_t enh;
/* Create new engine instance; result returned in handle */
int ...
25
votes
1
answer
15k
views
Is vanilla JS still considered a library?
I very recently found out that VanillaJS (document?) is a library that's just bundled with 99% browsers and isn't exactly native JavaScript (shock of my life). While writing a lib of my own I normally ...
25
votes
1
answer
21k
views
What to keep in mind when releasing an app which uses libraries licensed under the Apache 2.0 License? [closed]
I'm creating an Android app which is soon ready for release.
I'm just going to implement a tab system using this library. I read that it is licensed under the Apache 2.0 License. I've never used any ...
21
votes
5
answers
8k
views
Why don't modern libraries use OOP
I'm a beginner-level C++ programmer, but I understand the concepts of the language fairly well. When I began to learn external C++ libraries, like SDL, OpenGL (maybe something else too), to my great ...
21
votes
1
answer
3k
views
Noda Time vs Joda Time?
In the Noda Time User's Guide, the rationale section states:
the public API has been largely rewritten, both to provide an API which is more idiomatic for .NET, and also to rectify some of the Joda ...
17
votes
12
answers
1k
views
Is it OK to live without knowing how the program you created works?
I mean, there are really useful libs that can solve problems when you are stuck and do not know how to solve this or that with your knowledge of programming language you use... For example, Boost for ...
17
votes
7
answers
1k
views
How do you structure your shared code so that it is "re-findable" for new developers? [duplicate]
I started working at my current job about 8 months ago, and its been one of the best experiences I've had as a young programmer. It's a small company, and both my co-developers are brilliant guys.
...
17
votes
4
answers
865
views
Does "don't reinvent the wheel" ignore the limits of human memory?
One thing working in Haskell and F# has taught me is that someone in a university smarter than me has probably already found an abstraction for what I'm doing. Likewise in C# and object-oriented ...
15
votes
2
answers
13k
views
C++ Library API Design
I'm looking for a good resource for learning about good API design for C++ libraries, looking at shared objects/dlls etc. There are many resources on writing nice APIs, nice classes, templates and so ...
14
votes
4
answers
1k
views
Why do people rewrite some libraries to many programming languages?
There are some libraries, which are available in their versions written in many different programming languages, like for example Lucene, which is written in Java (as they say, 100% pure Java), but ...
14
votes
2
answers
4k
views
Why is using C++ libraries so complicated?
First of all, I want to note I love C++ and I'm one of those people who thinks it is easier to code in C++ than Java. Except for one tiny thing: libraries.
In Java you can simply add some jar to the ...
14
votes
3
answers
2k
views
How independent is Clojure from Java?
I am quite new to the Clojure world. I appreciate the fact that one has easy access to all Java libraries via Clojure interop features, but I was wondering how much Clojure stands on its own legs.
Of ...
13
votes
8
answers
3k
views
Do you tend to write your own name or your company name in your code?
I've been working on various projects at home and at work, and over the years I've developed two main APIs that I use in almost all AJAX based websites. I've compiled both of these into DLLs and ...
13
votes
4
answers
4k
views
Member functions vs. Non-member functions for math operators
I'm writing a linear algebra library (long story short, it's a school assignment) that involves matrices, vectors, etc. In the process of creating this library, I'm going to be creating functions ...
13
votes
2
answers
873
views
Should my small software library avoid using other libraries?
I've just released a small Java library that offers only a few classes and methods. Since I built the project with Maven, I immediately used several third-party libraries to achieve my goals, ...
13
votes
2
answers
9k
views
Proper way of handling EINTR in libraries
What is the recommended etiquette when it comes to EINTR in libraries?
I'm currently writing a function that does some file system tasks with the POSIX API, but a lot of the calls I use can ...
12
votes
14
answers
1k
views
Which library/framework did you ditch as being too complex for the problem it is solving? [closed]
... and coded the functionality "manually"?
As a rather metaphorical example, you'd hardly need a library for solving quadratic equations, although such libraries do exist and someone takes them ...
12
votes
3
answers
8k
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?
12
votes
2
answers
2k
views
Designing a Python string validation library
My employer has a significant number of company-internal strings which require format validation. For instance, order number AAA-BBB-CCC, stock number AB-123456 or factory ABC1 - Regex with extras (...
12
votes
9
answers
833
views
Should developers be expected to compile an internal library before the actual program?
Recently a senior developer that I work with made a case for requiring that developers get the latest version and compile as part of their project a major internal library. This stands in contrast the ...
12
votes
3
answers
8k
views
How to create and publish a useful Java library
I've recently worked on a Java class that generates permutations per list of objects. In any case, I would like to have this library offered to the public, so I have several questions:
Most libraries ...
12
votes
2
answers
4k
views
What guidelines should I follow while designing a library?
I am working on a Arduino project using the Uno. The project contains a significant amount of code. I would like to create a library and I may even share it later on. What guidelines should I follow ...
12
votes
2
answers
215
views
Do classes in a JRE library support observable and/or asynchronous reads from external/non-JRE assemblies?
How can I implement my cross-platform library (e.g. on JRE) to operate in a thread-safe manner on object references, so that native front-ends on other platforms can observe the object and take ...
11
votes
4
answers
3k
views
Few big libraries or many small libraries?
Over the course of some months I've created a little framework for game development that I currently include in all of my projects.
The framework depends on SFML, LUA, JSONcpp, and other libraries. ...
11
votes
2
answers
2k
views
Haskell GUI: how much can be done with Haskell?
I've been wanting to try out graphics in Haskell. From what I've seen, the available libraries are either front-ends to C/C++ libraries, or an abstraction of them with minimal features. The high-level ...
11
votes
3
answers
4k
views
Are there open-source JavaScript libraries addressing multiple browser tabs and client state for newer browsers? [closed]
There are a few new HTML5 features that have made it into recent browsers that allow sharing state among tabs, browser windows, same domain windows, etc. So it's probably gotten a little easier to ...
11
votes
2
answers
5k
views
How to encapsulate internal classes in an API written in Java?
We have to write a library. Naturally, it should only have a very small API (as broad as needed as small as possible). The internals of the library are somewhat complex. Therefore, they need ...
10
votes
7
answers
2k
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 ...
10
votes
8
answers
3k
views
When is a 'core' library a bad idea?
When developing software, I often have a centralised 'core' library containing handy code that can be shared and referenced by different projects.
Examples:
a set of functions to manipulate strings
...
10
votes
1
answer
13k
views
Can one edit a built-in Python module?
I'm currently learning Python and I'm at the point in the book about using the Math library. I looked on the Python website and noticed the library was a bit scarce and am writing some more useful ...
10
votes
3
answers
896
views
Boundaries of unit testing between my code and a library or sub-component
Background: I am new to testing in general, and have been studying it in context of JavaScript, specifically React.js, front-end development (actually new to this as well). For the question, I have ...
9
votes
4
answers
3k
views
What are the dangerous corners of Qt? [closed]
There's nothing perfect under the sun. Qt is no exception, and it does have limitations: we can't use pixmaps in a thread other than GUI, we can't use QImage with 16-bit-per-channel image format, etc.....
9
votes
1
answer
11k
views
When creating a library, is there a way to make certain classes entirely internal to the library, and not exposed to the user of the library? [duplicate]
Suppose you were designing a Java library for other people to use. You compile the library into a JAR that they can import into their projects and use.
Needless to say, you intend for the library to ...
9
votes
2
answers
4k
views
Designing exception classes
I'm coding a small library and I'm having some trouble with designing the exception handling. I must say that I am (still) confused by this feature of the C++ language and I tried to read as much as ...
9
votes
2
answers
3k
views
Questions about linking libraries in C
I am learning C (still very much a beginner) on Linux using the GCC compiler. I have noticed that some libraries, such as the library used with the math.h header, need to be linked in manually when ...
9
votes
3
answers
1k
views
Distributing Libraries
How are libraries typically distributed? Because they have to be compiled with the same compiler under the same settings as the project using it, distributing the .dll, .lib, etc. seems impractical. ...