Tramadol by a landslide. Sure, codeine is metabolized into morphine, but at a very low percentage. The high is very short-lived and accompanied with heavy itches.
A tramadol high lasts you the whole day, is more mood-lifting and euphoric, and is initially stimulating but eventually sedating. I also find it to be the better analgesic.
EDIT: Oh, and doses. For analgesia (the kind not requiring me to go to the hospital), I would take 90-120mg codeine or about 100-150mg of tramadol.
For proper recreational effects, I would take 300-390mg of codeine (without tolerance), but wouldn't dose any higher because of nasty itches and nausea without pronounced increase in euphoria. As for tramadol, I consider 400-700mg a recreational dose, though 700mg starts to get a bit... zappy. Also, doses above 400mg are NOT RECOMMENDED, and even 300-400mg doses have been known to produce seizures in people. Taking a low dose of an anticonvulsant benzo is a good way to combat this, but at the risk of increased CNS depression.
For dosing tramadol, it's best to space them out - say, take 100mg at once, and take more in 50mg increments at half-hour intervals - this both prolongs the high and improves the bioavailability, leading to more O-desmethyltramadol, the potent metabolite. It also reduces nausea, 400mg of tramadol at once is not so yummy on the tummy.