The Software Domain: Libraries

After pulling stuff into Unit 2 Lab 4 Page 2: Making a Mathematical Library for the standards, I commented out that redundant content here. --MF, 8/28/19

Tim points out that we are missing an "In this lab" on this first page of the lab. --MF, 5/23/20
On this page, you'll learn that a library is a package of procedures written by other programmers that helps solve a problem.

Suppose a programmer wants a picture to move around on a screen that also has other pictures on it. In Snap!, that's built in: import a picture as a sprite costume, and then move it by moving the sprite. The sprite abstraction lets a programmer move a picture over other pictures without thinking about what happens where the images overlap or how to get back parts of the image after they are covered up. Not all languages have the sprite abstraction.

Other common tasks (such as knowing where the mouse pointer is, doing arithmetic on huge numbers, or managing sound) also have complex parts. If programmers had to deal with all of these details in every program, no software would ever get developed. And because many applications need the same abilities, programmers write libraries for other programmers to use.

: Software Libraries
AAP-3.D.1, AAP-3.D.2, AAP-3.D.3

Languages vs. Libraries

Often when people compare what different programming languages can do, they are really comparing libraries. For example, people may think they like JavaScript because they can use it to program web pages, but that's not a property of JavaScript. It's actually a web page library built into the browser that lets you program web pages.

Libraries in Snap!

Do we need all this commented out text? --MF, 6/12/20

You've used libraries in Snap!. For example, you used the "Bar Charts" library in Unit 5 Lab 3 Page 4: Analyzing Data.

AAP-3.D
  1. Read through the libraries listed in Snap! (as shown above), and choose one block that interests you and that you have never used. Build a small project that uses that block, and use your project to teach that block to some of your classmates.