Programming, though not itself a humanity, can serve as one in the same practical role that Latin did. Latin's role as the introduction to liberal learning was, for most students, less to enable them to read the classical authors in the original with comfort—that attainment always belonged to relatively few—than by its exacting grammar, and its subtle and exact vocabulary, to form the mind to a tolerance for nuance and habit of precision instrumental to all kinds of intellectual progress.
Programming, which begins with the abstracted essence of grammar and involves and iterates it to eddied depths and spiraling heights which language cannot sustain, enforces a power of expression as exact and as subtle as the expectation of literal interpretation can make it.
Any kind of work which approaches perfection by a cycle of degrees intermitted by trial, feedback, and return to the beginning—draft and revision, model and prototype, mock-up and construction—similarly strengthens the faculties at each return; but programming does it fastest, and most bracingly. Any programmer knows how the pain and boredom of protracted debugging leaves a hollow feeling in the brain like a sore muscle, which becomes, after a rest, the certainty of having become a little smarter.
For the education of a mind (rather than of a jobholder, which has other priorities) I would have the basics of programming taught before any math beside arithmetic, and before even English grammar. For this end proficiency is not required; to instill a respect for whitespace and documentation, and a physical disgust for unclosed quotation marks or parentheses, would be just enough.
Programming is the ultimate mimesis. Its reach is the reproduction, not only of the world and everything in it, but of all possible worlds. In this way—because to address anything well, a programmer must do so in a way which potentially addresses everything—programming is the only great centripetal intellectual force of our time; and programming is the only profession left where it pays to have a universal mind.
Kenneth Clark, in his essay "The Concept of Universal Man," usefully defines a universal mind, on the model of the Renaissance and the Enlightenment, as one which, seeing a natural phenomenon, wishes to understand it; which, seeing a human design, wishes to improve it; and to do all this for humanity's benefit.
Programming does not, by itself, yield those values; but it gives that power. The willingness to see designs and procedures as expedient and perishable contrivances—not the unanswerable inheritance of wisdom or tradition—is predicated on the ability to extract them from the inertia of their contexts by translating them into a precise and neutral language.
In this way, programming drives toward philosophy. Ada Byron, the first person to understand programming, called herself "a metaphysician and an analyst"; and programmers have never been able to escape philosophy. In object-orientation they have created the first experimental metaphysics; and throughout their work, they run into old problems as they work toward the old goal: clear and distinct ideas.
This kind of philosophy is unlike what is taught in schools, or practiced by those who professionally call themselves philosophers. The essayist and hacker—master programmer, in his sense—Paul Graham, in his "How to Do Philosophy," has called it a new kind of philosophy. But "there is nothing new but what has been forgotten."
The Stoics required philosophy to show and to resolve definite choices in life; they required the philosopher to be visibly and measurably changed by the practice of philosophy. This should not be confused with a positivist dismissal of word-chopping (though some of the same arguments recur), or a pragmatist tolerance for vagueness as long as it yields results. Programmers are willing to make and adhere to subtle distinctions, even without obvious applicability, as long as they are part of an useful perspective; and they are the more unwilling to leave an idea vague as it proves useful, believing that its refinement can only make it more potent, and more widely useful.
It is suggestive that programmers' favored literary mode (as Graham evidences) is the essay—which Montaigne created on the model of Stoic discourses.
This resemblance to Stoicism is not accidental; it is so strong that it is two-way. Chrysippus, the father or forerunner of Stoicism, was also the inventor of a formalized logic (perhaps even partially symbolic). Had the Romans invented computers, he would have stood in the same relation to their computer languages that Boole does to ours.
Such an affinity between a discipline and a school of philosophy is familiar from mathematics. Mathematicians are either Platonists, or not; and if not, that is what matters. What they are instead is incidental. Mathematicians, even naming themselves Platonists, do not support the scheme of the Republic; programmers do not teach eternal return or pantheism.
But show me a committed programmer who does not believe in the possibility and necessity of a radical and unconditional independence; who does not at once value loyalty as both the best thing that can be offered, and the least that is to be expected; who does not think happiness only as valuable as it is won through courage, not received as a gift or stroke of luck—or, conversely, who does not find unhappiness or querulousness contemptible in the intelligent, as if they should know better; and you have found an exception to the rule.