Recent experimental observations of spike-timing-dependent synaptic plasticity (STDP) have revitalized the study of synaptic learning rules. The most surprising aspect of these experiments lies in the observation that synapses activated shortly after the occurrence of a postsynaptic spike are weakened. Thus, synaptic plasticity is sensitive to the temporal ordering of pre- and postsynaptic activation. This temporal asymmetry has been suggested to underlie a range of learning tasks. In the first part of this review we highlight some of the common themes from a range of findings in the framework of predictive coding. As an example of how this principle can be used in a learning task, we discuss a recent model of cortical map formation. In the second part of the review, we point out some of the differences in STDP models and their functional consequences. We discuss how differences in the weight-dependence, the time-constants and the non-linear properties of learning rules give rise to distinct computational functions. In light of these computational issues raised, we review current experimental findings and suggest further experiments to resolve some controversies.