There are limits to our ability to enhance intelligence, and the intellectual virtues, through social reform and lifestyle changes. For thousands of years we have used stimulants like caffeine, coca, qat and nicotine to boost attention. Now we have increasingly targeted drugs that improve attention, memory and learning, with fewer side effects.
In this series:
The potential for intelligence enhancement globally through poverty reduction and improved pedagogies are still enormous, and in the developed countries most of us can substantially improve our cognitive faculties with lifestyle changes. But our capacity to improve intelligence simply through environmental enrichment and behavioral change may be reaching its limits. We see for instance that among affluent families in industrialized countries inherited genetic differences in brain structure and neurochemistry is a much stronger predictor of intelligence than among the poor.
In other words, the enrichment differences among poor families are holding many kids back from developing their full potentials as adults, while most affluent kids are nurtured and stimulated to achieve much most of their full, innate intellectual potentials, whatever those may be. If this is the case, further improvement in intellectual capacities for those in enriched environments will largely depend on the use of drugs and technology to tweak neurology.
Caffeine, Coca and Qat Stimulants of various sorts have been in use for thousands of years, and specifically have been used to enhance intellectual activity and moral self-control. The drinking of tea has a long tradition in Chinese culture, which celebrated its reputed beneficial effects for scholarly work and meditation. Confucius edicts say "Tea tempers the spirits and harmonizes the mind, dispels lassitude and relieves fatigue, awakens thought and prevents drowsiness, lightens or refreshes the body, and clears the perceptive faculties.” Buddhist monks were forbidden intoxicants, but drank a lot of tea to keep awake for meditation and rituals. The Japanese Zen tradition developed a tea ceremony which makes the making and drinking of tea itself into a meditation.
Evidence points to the widespread chewing of coca leaves (the source of cocaine) in the Andes as far back as 8000 years ago, where it was believed to be of divine origin. Similarly Egyptians, Ethiopians and Yemenis have been chewing the stimulant qat plant for thousands of years, and in ancient Egypt it was believed to be an ingredient in a ritual to make the user into a god.
Coffee and coffeehouses have a long tradition in Arab and Turkish culture where they were hubs for entertainment and conversation, and were referred to as "schools of the wise." Sufis drank coffee to stay awake during their dervish devotions, and Pope John Paul II beatified the 17th century Franciscan friar that invented cappuccino.
Before the introduction of coffee, tea and chocolate into Europe the average European drank alcohol from morning until night. In the 17th and 18th centuries the coffeehouses became exciting hotbeds of learning, debate and reading, so that they were called "penny universities," since a cup of coffee cost a penny. In sharp contrast to the pacifying debauchery of the alehouses, coffeehouses were the key vector for the spread of Enlightenment ideas of reason, democracy and human rights, so much so that they came under political attack from monarchists.
Clinical research supports the cognitive benefits from caffeine. Caffeine improves attention, executive control, working memory and learning.   Taking caffeine right before a fifteen to twenty minute nap provides even more alertness than either the nap or the caffeine by themselves. The trick is to fall asleep quickly since the caffeine kicks in after about twenty minutes.
Coffee and tea also appear to have a long term benefit of protecting the brain from age-related cognitive decline. Consumption of caffeine, especially coffee, is associated with lower risks of developing Alzheimers disease  and Parkinson’s disease. Drinking tea is associated with a lower risk of stroke.
Some critics assert that the only benefit we get from caffeine once we acclimate to it is to prevent caffeine withdrawal. This turns out not to be the case; even after the brain adapts we still get cognitive benefits that aren’t withdrawal related.  The problem with caffeine and other stimulants is that their benefits for cognition are U shaped, and wear off for the habitual user. Caffeine in moderation has a temporary benefit for attention and speed, but too much degrades performance.
Nicotine Of course smoking tobacco does not enhance cognition long-term, and is a risk factor for cognitive decline. But nicotine by itself has long been known to have stimulant effects, and to boost memory, learning and attention. Now nicotine, and drugs that effect nicotine receptors in the brain (α4 and α7 agonists), are being investigated as cognitive enhancement therapies for people with schizophrenia, Alzheimers disease and ADHD. 
Methylphenidate and Modafinil The drugs methylphenidate and modafinil improve attention, learning and memory primarily by boosting dopamine. Methylphenidate has been shown to encourage brain maturation and the differentiation of neural stem cells, and to enhance synaptic plasticity.   Methylphenidate also boosts norepinephrine levels which helps to focus attention, while suppressing nerve transmissions in sensory pathways so that it is easier to block out extraneous stimuli.
Modafanil was originally developed as a treatment for narcolepsy, but is now prescribed for night-shift workers. It has been shown to be an effective treatment for some adults with ADD, and is displacing the use of amphetamines by the military. Modafanil has far fewer side effects than methylphenidate or Adderall, and an even lower addiction profile, but has many of the same benefits, such as reducing fatigue, and improving focus and working memory.
As with caffeine the benefits of methylphenidate (and other amphetamines) or modafinil for learning and memory are greater for those on the low end of those abilities than for those who are already perform in the top range cognitively. 
Ampakines Ampakines are another class of non-stimulant drugs that have cognitive enhancement benefits by boosting neural transmission, neural growth factor (BDNF) and neural differentiation. Intriguingly some of the cognitive enhancement effect from ampakines appear to be the result of its allowing the brain to recruit parts of itself for thinking and problem-solving that it does not usually use.
Treatments for Downs and Dementia The development of therapies to treat Downs syndrome and dementia are one of the avenues for cognitive enhancement, both for those with those disorders and for the rest of us. Dramatic improvements in memory have been found in mice models of Downs treated with drugs that boosts the brain chemical GABA, and there are trials proceeding on drugs to boost nerve growth and modulate half a dozen other neurological systems that may improve cognition. So far two types of drugs have been developed that slow memory loss in dementia, cholinesterase inhibitors and NMDA receptor antagonists, and these are also a potential target for cognitive enhancement in healthy people, although a recent meta-analysis found little evidence that they improve health people’s memory.
Of course, these drugs are effective for some people and not others. If you are already on the lucky end of the bell curve of neurochemistry boosting your dopamine or norepinephrine actually impairs your attention, memory and learning. Once the brain has been neurochemically optimized, achieving further cognitive enhancement may require more radical modifications with machines and genetic engineering.
 Nisbett RE, et al. Intelligence: New Findings and Theoretical Developments. American Psychologist. 2012; 67(2): 130-159.
 Einöther SJL, Giesbrecht T. Caffeine as an attention enhancer: reviewing existing assumptions. Psychopharmacology. 2013; 225:251-274.
 Borota D, et al. Post-study caffeine administration enhances memory consolidation in humans. Nat. Neuro. 2014; 17, 201–203
 Nehlig A. Is Caffeine a Cognitive Enhancer? Journal of Alzheimer’s Disease. 2010; 20: S85–S94.
 Reynar LA, Horne JA. Suppression of sleepiness in drivers: combination of caffeine with a short nap. Psychophysiology. 1997 Nov;34(6):721-5.
 Eskelinen MH, Kivipelto M. Caffeine as a Protective Factor in Dementia and Alzheimer's Disease. Journal of Alzheimer's Disease. 2010; 20(1): 167-174.
 Cantos C, et al. Caffeine Intake and Dementia: Systematic Review and Meta-Analysis. Journal of Alzheimer’s Disease. 2010; 20(1): 1387-2877.
 Carman AJ, et al. Current evidence for the use of coffee and caffeine to prevent age-related cognitive decline and Alzheimer's disease. Journal of Nutrition, Health & Aging. 2014; 18(4): 383-392.
 Costa J, et al. Caffeine Exposure and the Risk of Parkinson's Disease: A Systematic Review and Meta-Analysis of Observational Studies. Journal of Alzheimer's Disease. 2010; 20(1)221-238.
 Arab L, Liu W, Elashoff D. Green and Black Tea Consumption and Risk of Stroke: A Meta-Analysis. Stroke. 2009; 40: 1786-1792.
 Dresler M, et al. 2013; ibid
 Smith AP, Christopher G, Sutherland D. Acute effects of caffeine on attention: a comparison of non-consumers and withdrawn consumers. J Psychopharmacology. 2013 vol. 27 no. 1 77-83
 Einöther SJL, Giesbrecht T. 2013; ibid
 Wood S, et al. Psychostimulants and Cognition: A Continuum of Behavioral and Cognitive Activation. Pharmacological Reviews. 2014; 66(1): 193-221.
 Freedman R. α7-nicotinic acetylcholine receptor agonists for cognitive enhancement in schizophrenia. Annual Review Med. 2014;65:245-61. doi: 10.1146/annurev-med-092112-142937.
 Potter AS, et al. AZD3480, a Novel Nicotinic Receptor Agonist, for the Treatment of Attention-Deficit/Hyperactivity Disorder in Adults. Biological Psychiatry. 2014; 75(3): 207–214.
 Tye KM, et al. Methylphenidate facilitates learning-induced amygdala plasticity. Nature Neuroscience. 2010; 13: 475-481.
 Bartl et al. Methylphenidate enhances neural stem cell differentiation. Journal of Molecular Psychiatry. 2013, 1:5. http://www.jmolecularpsychiatry.com/content/1/1/5
 Amiri A, et al. Changes in plasma Brain-derived neurotrophic factor (BDNF) levels induced by methylphenidate in children with Attention deficit–hyperactivity disorder (ADHD). Progress in Neuro-Psychopharmacology and Biological Psychiatry. 2013; 47(2): 20–24.
 Smith ME, Farah MJ. Are Prescription Stimulants “Smart Pills”? The Epidemiology and Cognitive Neuroscience of Prescription Stimulant Use by Normal Healthy Individuals. Psychol Bulletin. 2011; 137(5): 717–741. doi: 10.1037/a0023825
 Agay N, Yechiam E, Carmel Z, Levkovitz Y. Methylphenidate Enhances Cognitive Performance in Adults With Poor Baseline Capacities Regardless of Attention-Deficit/Hyperactivity Disorder Diagnosis. Journal of Clinical Psychopharmacology. 2014; 34(2): 261-265. doi: 10.1097/JCP.0000000000000076
 Pieramico V, et al. Effects of non-pharmacological or pharmacological interventions to promote cognition and brain plasticity in aging individuals. Frontiers in Systems Neuroscience. 2014; 8: 153. doi:10.3389/fnsys.2014.00153
 Lynch G, Palmer LC, Gall CM. The likelihood of cognitive enhancement. Pharmacology, Biochemistry and Behavior. 2011; 99: 116–129.
 Potier MC, Braudeau J, Dauphinot L, Delatour B. Reducing GABAergic inhibition restores cognitive functions in a mouse model of Down syndrome. CNS & Neurological Disorders Drug Targets. 2014; 13(1):8-15.
 Costa ACS, Scott-McKean JJ. Prospects for Improving Brain Function in Individuals with Down Syndrome. CNS Drugs. 2013; 27(9): 679-702.
 Tan CC, et al. Efficacy and Safety of Donepezil, Galantamine, Rivastigmine, and Memantine for the Treatment of Alzheimer's Disease: A Systematic Review and Meta-Analysis. Journal of Alzheimer's Disease. 2014; 41(2): 1387-2877.
 Furey ML. The prominent role of stimulus processing: cholinergic function and dysfunction in cognition. Curr Opin Neurol. 2011, 24:364–370.
 Repantis D, Laisney O, Heuser I. Acetylcholinesterase inhibitors and memantine for neuroenhancement in healthy individuals: a systematic review. Pharmacol Res. 2010; 61:473–481.