Yeah… Yeah, so that’s one of the things that sort of was a barrier to my learning. People may debunk this or not, but we have a great capacity for visual learning, and I’ve read books about this… If you think about all the things that we use in terms of language surrounding computer abstraction, it’s languages that are tangible things: trees, graphs, what have you… So I just love the idea of asking people this wonderful German word call Kopfkino – “your head cinema”, so what goes in your mental cinema when you’re talking about an abstracting thing.

[00:40:13.19] At the last GopherCon I asked a bunch of people this, and I found some lovely, curious answers that helped me dig and want to go and learn and find out more… But the one that really stuck with me is Rick Hudson — for the Go community, they probably already knew this, but I will introduce him… Rick Hudson is one of the primary and architects of the garbage collector in Golang, and especially was the one that kind of completely redid and improved the 1.5 garbage collector.

So I asked Rick – not expecting this answer at all, but I asked Rick, “Rick, what do you see in your Kopfkino (mind cinema) when you think of the garbage collector?” When I asked other people, they would take some to think, and sometimes they would say something like “I don’t know, whatever…”, but Rick was ready with an answer, and he said “A chessboard.” And I went, “Tell me more!” and he basically went on to say “When I was a young kid, I learned chess as different, discrete pieces that had limitations in movement on a grid.” And when you think about a garbage collector, that really could help you, because different operations in different phases in the garbage collector move along the heap up and down differently, right? So you kind of can look at the heap as maybe a single-column chess piece, if you will, or maybe multiple columns, depending on how many actors you have, right? But you have multiple actors and multiple things moving down a data structure of the heap.

I’m telling you all this not knowing what I knew then — oh, sorry, what I know now. I’m telling you all of this because just hearing that from Rick, hearing that it was a chessboard, made me want to go learn more about the garbage collector, learn about its implementation, and learn just about garbage collection in general. It was like unlocking a beautiful thing for me. If I see Rick at this year’s GopherCon, I’m just gonna hang out and speak with him all day, because I think he’s just — you know, he’s got such a history prior to joining Google, at running workload [unintelligible 00:42:15.01] but Rick is in his fifth decade of work, and just the wisdom that he can give us… So anyway, that was one of the things that really surprised me.

The other thing in terms of like visual abstraction – I was speaking with Alan Donovan. Alan Donovan works at the Go team in New York City, and I was kind of asked to give a talk at KubeCon about the Why of Go, and I was asked rather last-minute, so I was kind of like worrying a little bit, and I was like “What should I talk about?” He said, “Oh, you should talk about memory locality, it’s so important.” I was like “Tell me more”, because I just had a fuzzy idea of what memory locality was… But he went on to talk about how memory locality is way better than when Java invented it like 20-25 years ago.

You think about memory locality, and he would talk about it in geospatial terms, in geography. So it used to be just a field, a small, relatively flat Kansas filed; but now you look at memory locality and it’s like a Swiss mountain, with a village down at the bottom, and then a summit at the top and all these levels. And when you have to make calls to different parts of memory, it’s like having to travel on foot, either all the way down to the village, depending on how you’ve coded it, or being better about memory locality and just going 100 feet down the mountain on foot or 100 feet up.

So just hearing about that helped me really [unintelligible 00:43:49.21] and understand data types, true value types, structs and things in Go, and why memory locality was so important for Go, and why even the people working on optimizing for that in the Go team – why that was important. I needed metaphors and something tangible to be able to relate to to grow my mental model of that, my Kopfkino of that.

[00:44:13.27] So those are two of the main, most delightful ones I heard. I’ve heard many more, but those are two of the ones that I really enjoyed, and that have helped me kind of frame my way of looking and thinking about those two very hard things.



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here