Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Digital Literacy

What exactly is a library in programming?

I have been hearing about libraries when it comes to programming where ever I go but no one has ever given me a definition of what they really are.

1 Answer

Steven Parker
Steven Parker
218,596 Points

A "library" is a collection of program parts that do common and/or specialized things that save the programmer from needing to "reinvent the wheel" when writing software. It usually consists of functions to call and object classes you can instantiate. A common example might be functions that deal with dates and times, and a specialized one could be software for manipulating an smart thermostat (such specialized libraries are typically provided with a device purchase).

By using libraries, the programmer can concentrate on the unique aspects of the application being developed.