I found an unusual use of "castor oil" in this sentence, which seems to be a common maxim:

Documentation is the castor oil of programming.

What is the role of castor oil in this sentence? Is there a story behind using "castor oil" or the usage of any type of oil is possible in this sentence?

  • It's actually made clearer by including the next line of the maxim - Managers think it is good for programmers and programmers love to hate it! – KillingTime Nov 11 at 12:48
  • 2
    Because it's so hard to swallow. (BTW, I never heard the phrase in about 45 years of programming.) – Hot Licks Nov 11 at 12:49
  • It's a metaphor. And @rajah9 has described it very nicely. If you want more, consider that marketing is the snake oil, and user interface design is the lubricating oil. – John Lawler Nov 11 at 15:38
  • So nothing to do with both triggering an instant gag reflex? – Phil Sweet Nov 11 at 23:13

Health benefits

Both castor oil and documentation have many salubrious benefits.

See this Castor Oil Wikipedia entry; it is used:

  • to help skin and hair
  • as an additive
  • as a laxative

With computers, documentation is used:

  • to help users understand the program or application
  • to clarify the workings of the program in the programmer's mind
  • to explain the workings of the program in the understanding of newer team members
  • to communicate to support staff the proper operation of the program or application


Although it has health benefits, it is distasteful to many.

I was surprised to see that castor oil has been used as a punishment, especially by Mussolini's regime (op. cit.). It has been used by parents to punish children, at least according to the Looney Tunes that I watched as a child. The Wikipedia article confirms:

"Some parents punished children with a dose of castor oil."

"A heavy dose of castor oil could be used as a humiliating punishment for adults, especially political dissenters."

These lyrics from "The Perfect Nanny" describe an agreeable nanny:

Never be cross or cruel

Never give us castor oil or gruel

Source: genius.com

In that spirit, perhaps documentation could be seen as a punishment for programmers. Documentation may seen as a punishment because:

  • It can be difficult for technical folk to express ideas in cogent, grammatical English.
  • Documentation can be anathema to technical folk, for whom expressing concepts for a naive reader can be problematic. (In contrast, some live to express algorithms to a machine.)
  • It requires the use of word processors (such as MS Word, which does not understand the subjunctive mood (one of its venial sins (don't get me started))).
  • It requires editors, reviews, approvals, and often posting to a Version Control System.
  • It has deadlines.


While castor oil and documentation are good for you, they will leave a bad taste in your mouth.

  • 1
    I Thank everyone, so "castor oil" has the meaning of "a necessary evil" – M. Abdelhafid Nov 11 at 17:40
  • 1
    @M.Abdelhafid, I wouldn't say "necessary" or "evil". Just something that's good for you but unpleasant. – The Photon Nov 11 at 19:26
  • @ThePhoton - But that's pretty much what a "necessary evil" is. According to Longman, it's something bad or unpleasant that you have to accept in order to achieve what you want. Also, to M.A.: Yes, the phrase is being used in that way (roughly), however, it's a bit of a dated phrase, as the product is nowhere near as ubiquitous as it was, say, a half a century ago. See this Ngram. – J.R. Nov 11 at 19:59
  • @J.R., "necessary" is stronger than good for you, and "evil" is stronger than unpleasant. – The Photon Nov 11 at 21:07
  • 1
    @ThePhoton - Yup, and I think Documentation is a necessary evil in programming isn't a bad paraphrase of the "castor oil" version. These bloggers seem to agree. – J.R. Nov 11 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.