Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do. (Donald Knuth)
There are only two things wrong with C++: The initial concept and the implementation. (Bertrand Meyer)
Both of these have to do with your terminal. Either can be informational (telling you something about
your terminal settings) or active (changing something). For example, "tput" can control the position of
the screen cursor:
On the other hand, stty controls things like "echo". Let's say that you wanted
to turn off character echo while reading a password. You could do this:
Why save the old stty settings? It's so you can put them back to what they were. If you just
said "stty echo". you are assuming that's how it was previously set. It might not be: if the script
was called from an emacs session, echo would have been off and you would have turned it back on!
Flow control is also controlled by stty. That's often needed for serial sevices, but even on virtual terminals you can pause output with Cntrl-S and (if stty ixany is set), restart it with any keystroke.
Should you happen to be using a serial terminal for some reason, Linux Serial How-To may be helpful. Real serail terminal or not, "stty -a" will display its settings: