179 points · by drewg123 · 10y ago · 28 comments
I think the basic idea is: say you have some code like this.
function a() { // 6 ms b(); // 3 ms c(); // 3 ms } Then you might have a flame chart that looks like this:
[-b-][-c]
[---a---]
Essentially you're decomposing the time we spend in a() into its constituent pieces b() and c().
flame graphs: x-axis is sample population (or event time), alphabetical sort on function names to maximize merging
flame charts: x-axis is the passage of time
The very bottom layer is the function you are analyzing, ever layer above is a function called by the one directly below it.
That's not correct from what I'm reading.
I'll be damned if C doesn't look like arcane magic to me, I can grok some/most of it but fitting it all in my head would take a herculean effort.
Maybe it's system's programming but either way it makes my brain melt.
The complications comes from all the variables and functions that come and go, and may have different meaning within different programs.
Then again you see the same with natural languages, and the existence of dictionaries.
Its proponents claim it implies a /complete/ understanding, so is more specific. Yet "I understand" does not imply an incomplete understanding. Furthermore the implication of completeness is a weak one, this is proven by how quickly and easily even that small value is neutralized when, for example, the parent said, "I can grok some/most of it." If we should take this to mean, "I can completely and comprehensively understand some or most of it," is that meaningful or truly the parent's intent? Even if it were, does it add to, "I can understand some or most of it"?
I would speculate that the reason a word for "completely understand" hasn't already made its way into the English lexicon after hundreds of years is because it's unnecessary, and further that its use within the IT community is motivated not so much by the desire for precision in communication as by a desire to be perceived as a savvy member of the community.
To grok a program, or a programming language, basically refers to having a graph of its elements and their interactions as a model in your head. "Grokking some of X" doesn't mean that you have a patchy or "blurry" graph of the whole thing; it means you have a complete graph of some subcomponents, but not all.
To put it another way: "understanding" doesn't usually imply being able to recreate the thing yourself. "Grokking" usually does. It's not an understanding you can put into words; it's an intuitive ability to "feel" the rules of the system because you've effectively mirrored the structure of the system with the structure of your synapses.
The only other things you can "grok", I think, are spoken languages (though there, we refer to "fluency"—another specialized kind of "understanding"), and the rules of games and game-like things like the tax system.
Or: to grok is to experience the original designer's intent, such that you could take over from the designer without the code changing in tone/style/quality very much. One might say, for example, that Brandon Sanderson has grokked the Wheel of Time series, while Kevin J. Anderson merely understands the Dune series. It's the difference between "seeing what they did" and "seeing what they were going for."
I would say that's the difference between "I understand some of it" and "I somewhat understand it."
Ability to recreate and grasping intent appear to be proprietary connotations.
I would argue that all understanding is, to use your term, "graphical" due to the nature of thought and the structure of our synapses.
When you have the programming language "groked" you do not see a loose pile of bricks, but what you can create from whats in the pile.
When I think of the word "grok" I think of the following (from Stranger in a Strange Land):
Mike: "You told me, 'God made the World.'"
Jubal: "No, no! I told you that, while all these many religions said many things, most of them said, 'God made the World.' I told you that I did not grok the fullness, but that 'God' was the word that was used."
Mike: "Yes, Jubal," Mike agreed. "Word is 'God'" He added. "You grok."
Jubal: "No, I must admit I don't grok."
Mike: "You grok," Smith repeated firmly. "I am explain. I did not have the word. You grok. Anne groks. I grok. The grass under my feet groks in happy beauty. But I needed the word. The word is God."
Jubal shook his head to clear it. "Go ahead."
Mike pointed triumphantly at Jubal.
Mike: "Thou art God!"
Jubal:"Oh, Jesus H. — What have I done? Look, Mike, take it easy! Simmer down! You didn't understand me. I'm sorry. I'm very sorry! Just forget what I've been saying and we'll start over again on another day. But — "*
Mike: "Thou art God, That which groks. Anne is God. I am God. The happy grass are God, Jill groks in beauty always. Jill is God. All shaping and making and creating together — ." He croaked something in Martian and smiled.
As an aside, I loved that book so much I went on to read every Robert Heinlein book. Some were disappointing, but I enjoyed most of them.
Although, Time Enough for Love is probably my favorite sci-fi book, slightly ahead of with Stranger in a Strange Land.