On understanding the "code" of recommendation letters This question deals with letters of recommendation written for students in the humanities, and in particular for those on the job market or those submitting to dissertation grants and fellowships. The question may also apply to letters of recommendation in the sciences.

On this site and in conversations with current faculty members, I have surmised that letters of recommendation are usually written in a kind of "code" (one post here described these letters as a "second language" you have to learn). Since most letters are invariably positive, I suppose that the code is just a subtle way of signaling the true value of a candidate's work or the true extent of their potential. Those who know the code are able to see through any hyperbolic language and decode a letter-writer's real estimation of their candidate.

A common warning about asking for letters of recommendation is: make sure you ask someone who already knows how to write them, or they could end up doing more harm than good. It makes sense that, if someone doesn't know the code, that person won't be able to communicate whatever it is that committees want to see in the letter.

This is all just my ignorant explanation of what I've observed, however, and I would like to ask for more information. I am especially interested in knowing:

-Is it true that letters of recommendation are written in such a clandestine way?

-If there is a code, what is it like? What kind of signals does it have? How do you know when you are reading about a candidate who really is great, versus a candidate who is just fine, when their letters may contain similar language?

If it turns out I am off base on this, I'd appreciate hearing about that too.
I am writing from the perspective of mathematics in the United States.  

To the best of my knowledge there is not really any "code" for recommendation letters.  However, there is a quite large amount of inflation, enough so that writing without an awareness of the current levels is a bit like Dr. Evil holding the world ransom for one million dollars.  

The process abets this inflation in many ways.  Many grad school recommendations have a bunch of questions asking for the candidate to be numerically rated on a bunch of different metrics -- including things like "honesty", "integrity" and "leadership" -- and you can say things like "The best I have ever seen," "In the top 2%," "In the top 5%", and so forth.  It's more than a bit silly, but having both written the letters and read them I can say that most successful candidates are getting top or nearly top marks in every category...no matter the fact that in most interactions with students, things like honesty and integrity are more conspicuous in their absence than their presence.

To get a sense of the inflationary regime it is very helpful to compare letters written by (many) Europeans to letters written by (most) Americans.  Recently someone whom I have a substantial professional relationship with applied for a postdoc at my institution, and afterwards (he didn't get it, but he got a good one elsewhere) he asked for feedback.  I told him that one of his letters was essentially only one paragraph long (and I told him which one!).  That paragraph was uniformly positive, and I can't point to any specific, factual thing that was missing from it.  However, at the current state of inflation, most letters are two to four pages long.  A one paragraph letter just won't do.  It is not necessarily code for "the candidate sucks".  It might also mean: "I am too busy/selfish to write the letter that I know the candidate needs", "I am not familiar enough with the current state of inflation to write an appropriate letter" or even "In my part of the academic world no one natters on for pages at a time; is it different in yours? What's wrong with you people?!?" In this case, I would suspect the latter.

Added: Inspired by some remarks in @David's answer, let me mention that there are certainly things that will be read in ways that may not be what a naive writer would intend.  I wouldn't call this "code," but others might.  Some examples:


A good letter must explicitly mention that the candidate is both intelligent and talented.  In the absence of this, any other praise may be read as a nice way of saying that the candidate is not intelligent and talented.  Saying that someone is a hard worker without saying they are bright will be read be many as meaning that they are only a hard worker.
Praising someone's teaching must be done carefully, lest it sound like you mean to say that the candidate does not take their research seriously or even does not intend to further pursue their research at all.  
Female candidates are often praised for being team players while male candidates are often praised for being brilliant, individualistic and perhaps even iconoclastic.  You should keep this in mind when writing and reading letters for female candidates.  When describing a strong female candidate I make a conscious effort to use the "good male words" like brilliant, gifted and so forth...and also to back them up, of course.