News for hackers. Stuff that matters.
Re:C for Python programmers (2011) by acbart on Monday November 07, 2016 @08:52PM (#12896974)
The trick to teaching pointers is to model memory with boxes. You have a stack, and a heap, and you draw arrows to represent pointers. At some point, you need to reveal that those arrows are just numeric indices, but the visual helps early on. The * and & operators just let you follow the value in the pointer. I've had a number of students who were baffled up until I showed them this model.

Notational Machine for the win!

Re:C for Python programmers (2011) by stevekemp on Tuesday November 08, 2016 @12:02AM (#12897796)
Back in the 80s the programming books I used always showed memory as little lines of boxes.

https://usborne.com/browse-books/features/computer-and-codin...

Re:C for Python programmers (2011) by userbinator on Monday November 07, 2016 @09:51PM (#12897209)
In general, thinking of memory as an array of bytes is helpful, and each byte has an address which is itself a series of bits that can be stored in memory --- and the concept that ties it all together and what I find makes a lot of people just "get it" is the fact that memory can itself store addresses that denote locations within it.
Re:C for Python programmers (2011) by Anthony-G on Tuesday November 08, 2016 @04:27PM (#12904092)
That's a perfect example of how knowing some assembly code helps with learning C.