I built a funny little program to watch. See inside to see how I wrote the Cat's code and use MyBlocks abstractions to make the second version more efficient and quicker/easier to edit.
You can check out my video tutorial on My Blocks on the official Scratch YouTube channel (ScratchTeam; look for the "Scratch My Blocks" video series) and find a link to written resources related to this topic in the video description.