The previous post described the natural melody style that imitates the pitch of ordinary speech. The opposite style of melody involves carefully crafted shapes and patterns of notes. I sometimes call this style geometric melody, because on music paper the notes form neat geometric patterns that you can pick out by eye. The patterns are even clearer if you chart the succession of notes on graph paper.
At its best, geometric melody is catchy and engaging. It delights the parts of our brains that solve puzzles and recognize patterns. (Rhyme schemes provide a similar kind of appeal.)
At its worst, geometric melody can seem inane and childish, and it can wear out its welcome after a while. There are a limited set of pleasing patterns that can be formed with the seven scale notes, and all of them have been used before, so you might have to tinker with the notes until you come up with something that sounds fresh and original enough.
Many conventional songs use natural melody for the verses and geometric melody for the catchier choruses.
Take a look at your own songs. If you never use geometric-style melody, you should try your hand it. And if you never use natural, speech-style melody, that is equally worth exploring. If your melodies are always in the vague area between those two styles, then you have double the chance to improve your melodies by practicing both styles.
If your melody style seems too limited, try switching up the method you use to compose your melodies. Stereotypically, natural melody is composed by singing out loud, while geometric melody is composed while sitting at a keyboard.