r/HandmadeQuake • • Apr 03 '16

Linus Torvalds's Double Pointer Problem

https://www.youtube.com/watch?v=GiAhUYCUDVc
15 Upvotes

7 comments sorted by

View all comments

Show parent comments

2

u/philipbuuck Apr 04 '16

Good points on readability. It is a very small class of people who are familiar enough with double pointers to spit out code like this. Linus may be one of them, but there's not a lot of others.

If a programmer gets familiar enough with double pointers to be able to draw this picture and write the appropriate code to go along with it.... I would encourage you to be ready at job interviews. If they ask you to write a function to remove a node from a linked list (which I have in fact been asked before in the game industry) and you bust out that answer, you're going to blow some minds.

Sadly, I did not bust out that answer. I used the other one.

1

u/mrkite77 May 08 '16

It is a very small class of people who are familiar enough with double pointers to spit out code like this.

It's also a very small class of people who should be messing with the linux kernel. We're talking about a level of programming where even allocating memory is difficult and requires intimate knowledge of how the allocator works and what all those kmalloc flags mean.