Dead code

Dead code are parts of programs that never are executed. How can it form? For example, when you have a program that isn't start with a hat block, or when there is a program that is waiting for a message that never is sent.

                forever //Blocks that do not start with a hat block.
                if < key [left arrow v] pressed ? > then
                change x by (10)
            
                when I receive [startcc v] //Blocks that start with a hat block.
                switch costume to [costume2 v]
                say [Let's start] for (2) secs
            

These situations usually causes that projects doesn't work as expected of them,so,try to avoid dead code in your programs!