4,007
edits
Line 45: | Line 45: | ||
When the program reads the instructions, it places time intervals on the Timeline one by one, in order of their appearance in the list of instructions. It happens very quickly so it seems as though all the time intervals appear on the Timeline at the same moment. But in reality there is a process that looks like upside down Tetris, where each time interval tries to end up as high as possible. | When the program reads the instructions, it places time intervals on the Timeline one by one, in order of their appearance in the list of instructions. It happens very quickly so it seems as though all the time intervals appear on the Timeline at the same moment. But in reality there is a process that looks like upside down Tetris, where each time interval tries to end up as high as possible. | ||
So what happened in our example, is that Time interval 1 was placed first as high as possible. Then Time interval 2 was placed as high as possible. Then when it was time to place Time interval 3 on the timeline, the place in the highest level was occupied by | So what happened in our example, is that ''Time interval 1'' was placed first as high as possible. Then ''Time interval 2'' was placed as high as possible. Then when it was time to place ''Time interval 3'' on the timeline, the place in the highest level was occupied by ''Time interval 2'', so the third interval had to go lower. | ||
To fix it, you simply change the order of time intervals in the instructions, placing Time interval 3 before Time interval 2. | To fix it, you simply change the order of time intervals in the instructions, placing ''Time interval 3'' before ''Time interval 2''. | ||
<blockquote><poem> | <blockquote><poem> | ||
Line 61: | Line 61: | ||
Looks much better. | Looks much better. | ||
==Sources== | ==Sources== |