Sometimes it is done as an easier way of sending a message. For example, when people on two different boats want to send a message, they may be too far away to shout, but they can send messages with a flag code. Another code that people use is called Morse code, which changes letters to dots and dashes, like this: