Understanding Code

 

Slide 7

next »

To help reduce complexity, programmers often create abstractions. For example, a particular piece of code may need to read characters and do something with them, but doesn't care whether they come from a person, a file, or the network. Unfortunately, when something goes wrong, this abstraction breaks down (leaks). Have the characters stopped arriving because the person left the computer? Or did the file end? Or the network die? Suddenly, the program and programmer need to know the details behind the abstraction.