Article - noun agreement?
Why is it "el poeta" and "el melodia"? These don't follow the pattern that I thought I was learning! Shouldn't they both be "la"??
A lot of spanish words with Greek origin are masculine, even though they end with an 'a'. El problema, el planeta, el poeta, are good examples. Just keep practicing and soon enough it will sound unnatural to hear "la poeta".
Spanish, like English, has exceptions for almost every "rule". Spanish words that end with the letter "A" are typically, but certainly not always masculine words. The same is true of the converse, meaning words that end in "O" are not always masculine when it comes to articles and adjective conjugation. Here is an article that will give you some good examples if you're just getting started: http://spanish.about.com/cs/grammar/a/genderreversal.htm
It seems strange at first, but the more Spanish you expose yourself to, the more such words will be second nature to you.
The above explanations are good, but please note that specifically the noun "melodía" is feminine. So it's actually "la melodía" in all cases. If you saw anything to the contrary, it's wrong.