Would be know who thought of it first. I do know that neither Farscape or Lexx were first with that little gem. I'm going to guess it came out of the Sci-Fi novels from the 1960s. Since most of the intelligent ships in the really old stuff had "electronic brains" and that sort of thing. But it's hard to make sweeping generalizations on many thousands of novels I have not ready.
off-topic: I wish there were TV series of stuff by E.E. "Doc" Smith (Lensman, Skylark) or Murray Leinster (First Contact, Exploration Team, Med Ship).