Investigating libraries
We have touched on libraries a bit in the introduction. However, there is a lot to libraries, and an in-depth knowledge of how they work is needed before we can proceed.
A library is a prebuilt code that can augment your code by allowing you to easily talk to hardware, perform networking, and so on, without having to write code. In many cases, especially when it comes to proprietary systems such as hardware components, it would be difficult or impossible to effectively write code to interface with it. Many hardware manufacturers will simply provide a library to interface with the device.
Why do we need libraries?
With that in mind, what is the purpose of a library? Libraries exist for multiple reasons, including the following:
- To avoid developing the same functionality multiple times
- To interface with custom or proprietary components
- To augment existing code with third-party libraries
- To distribute code to other developers