Well I'm sure it's already pretty obvious, but I prefer Code Geass. Death Note is an excellent story no doubt, but there are a number of reasons why I'd say CG is easily the superior in my eyes.
Storywise the two are both excellent, in terms of plot both CG and DN kept me interested throughout and were very entertaining. Death Note caught me more quickly than Geass, though in the later stages Geass was a good deal more impressive than Death Note. Regardless, the two are both great with story and since they're both pretty different, it's not really all that fair to compare in this aspect. I will say that Geass's ending was much more satisfying and glorious though.
Both Death Note and Code Geass have the clash of ideals as a theme, though I was much more attached to Geass's. With Geass, there was no good or evil in it, just different people with different views and different beliefs, fighting for what they felt was right. Though Lelouch was gifted with awesomeness and main character development, pretty much all the sides had justifiable reasons for what they did and it was hard to hate any given group after learning their motives, with a few exceptions. Death Note did a great job with this as well, although after the early stages of Death Note this faded away a tad, as it became clear that Light was more a villain than a hero as the story continued on. With Geass you never really could say anyone was a villain, even though many characters went to extremes to satisfy their goals.
What did it for me though was the characters. Both CG and DN do a great job with developing their main character. Light and Lelouch go through insane development as the story progresses and it's truly something to see. However, this is where things get tricky. Lelouch goes through moral dilemmas multiple times throughout the story, questioning if what he's doing is right, crossing the line between the noble effort of fighting for who he cares about and chaotically taking away lives. Though Lelouch can be ruthless in his methods, it is clear throughout the entire story that he genuinely cares about those close to him and they always serve as a motivator for him, making him a much more sympathetic character. Light's moral dilemma lasts for the first episode, maybe a tad bit longer, and then after that it's pretty much done. Light didn't go from hero to murderer in one episode, but it's clear that as he goes on, he loses the lawful innocence he once had, and comparing Light after a good chunk of time with the Death Note to how he was upon losing his memories makes this very clear. By the end, Light is a detestable, selfish character who only serves his own goals and has completely lost sight of why he began using the Death Note in the first place. It's a fascinating progression of development, but the fact remains that Light is very disagreeable by the end. Lelouch on the other hand never loses sight of his aims and remains respectable throughout. The contrast between the two is proven with the endings of the series, which I shall not spoil but it is obvious for those who have watched.
But that's not all. Aside from Lelouch, Code Geass has a wide range of characters with different personalities, beliefs, and takes on the world around them. Seeing the contrasts between them as well as how they interact is great. A good majority of the characters who matter in Code Geass receive utterly fantastic development and become sympathetic by the end. This is where my key problem with Death Note lies. I shall concede that L is by far my favorite character in Death Note, but even I must admit that his development was very minimal. To be frank, anyone in DN who was not Light Yagami had either minimal or nonexistent character development. Most of them were static for a vast majority of their screen time and/or didn't leave much of an impression on me. Death Note's side cast was very weak in comparison to Geass's side cast and this is the crucial factor that determines why I will always deem Geass to be superior to Death Note.
I could probably discuss more but I'm tired of ranting. Contrary to what many anime fans say, the two are actually very different stories and aside from the male lead getting a special power to revolutionize the world in his own way, they have very little in common in terms of genre and story progression. But when it comes to story elements, I just can't say Death Note>Code Geass.