Time Management (Computer Metaphors) Part 1 – Streams
Good time management is a bit like computer programming, in some ways at least … How do you handle large tasks, without being overwhelmed by their size?
Streams Computer programs generally read data from some location, process it, then output it somehow. For example, a video player will read data from the disk, decode it, then draw frames on the screen. Now, what is the best policy for this? How much data should be read from the disk, before it’s processed and flung out at the screen? In reality, it’s best to read a bite-sized chunk of data into a small buffer area, process it, output the result, clear the buffer, then proceed with the next chunk. If instead an entire video file was read in one go, on-board memory would be quickly exhausted or at least severely compromised. Streams provide this kind of functionality. When you read from a stream, you just get the next chunk, without concern to how much input is yet to come. We often stream things from the net. You can play an infinitely long audio stream (e.g. net radio), even with a relatively small amount of memory. The audio player periodically engages in a buffering process - reading the next chunk of data from the network. Therefore, an infinite audio stream should be just as “challenging” to process as a tiny sound file. It scales nicely.