Skip to content

Instantly share code, notes, and snippets.

@hzhou
Last active December 10, 2015 15:59
Show Gist options
  • Save hzhou/be07d7385b2339e688e0 to your computer and use it in GitHub Desktop.
Save hzhou/be07d7385b2339e688e0 to your computer and use it in GitHub Desktop.
library vs. knowledge

Let's say we want to do interpolation of an array. Two persons claim they know how to do it. One knows to use an interp function from a familiar library, e.g. numpy in Python. The other uses a source code routine.

The former knows the action by name while its details are opaque. Even he understands what interpolation is he does not know or can't be sure what the library routine actually does.

The latter know the action also by name but within sight, he knows exactly what is going on.

With an analogy to real life, let's say, go to school. The former gets on a bus. The bus has a name and he knows which bus to get on. And on the bus there are descriptions (documentations) that explain what the bus supposed to do (get the person to school and maybe what the school is). However, the bus does not have windows, and the riders have little idea how the bus gets them to school.

The latter walks to school. He also refers to the action by name -- go to school -- but he has clear idea what that phrase means in gory details, even sometime he is not conscious about it. Later, he upgraded from walking to biking and to driving, and he is always clear on what is happening.

For the former, if the bus broke down or the bus drivers go on strike, the rider gets stuck.

For the latter, if the car broke down, the worst case, he resort back to walking.

The current practice of making libraries in programming is similar to making buses with no window, and the programmers are accustomed to learn and recognize the names of all kinds of buses. How about a different way, for example, making libraries has pseudo code repository or source code routines with prime functions. And to use those libraries, the programmers actually have to "walk" the path -- they have to at least go through the code even they did copy and pasting. In a sense, the library of code become a library of knowledge points and the individual programmers will acquire those knowledge points and customize into their own library, with potentially with upgrades -- such as use a car instead of walking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment