Did this originate in "stranger in a strange land"? I assumed it did, but so many references to grokking don't mention the book (which goes into great detail about what it means)
Where else would it come from? It’s just using the normal meaning of “to grok” [0] (or its present participle), which is a well-known term of hacker jargon [1]. [0] https://en.wiktionary.org/wiki/grok [1] https://foldoc.org/grok
grok: /grok/, /grohk/, vt.
[common; from the novel Stranger in a Strange Land, by Robert A. Heinlein, where it is a Martian word meaning literally ‘to drink’ and metaphorically ‘to be one with’] The emphatic form is grok in fullness.
1. To understand. Connotes intimate and exhaustive knowledge. When you claim to ‘grok’ some knowledge or technique, you are asserting that you have not merely learned it in a detached instrumental way but that it has become part of you, part of your identity. For example, to say that you “know” LISP is simply to assert that you can code in it if necessary — but to say you “grok” LISP is to claim that you have deeply entered the world-view and spirit of the language, with the implication that it has transformed your view of programming. Contrast zen, which is similar supernal understanding experienced as a single brief flash. See also glark.
2. Used of programs, may connote merely sufficient understanding. “Almost all C compilers grok the void type these days.”
[0]: http://catb.org/jargon/html/G/grok.html