Article Request: 101 Practical Uses for Pointers

Started by
3 comments, last by magic_man 13 years, 2 months ago
I think it goes without saying that the problem with pointers is not that beginners do not understand how they work or what they do, it's that someone without any practical programming experience cannot possibly fathom a situation where it would be necessary to create what seems like a third-party variable. When I see pointers in a complex source file, I smile and wave at them and imagine running through the silicon inside of my computer with *ptr and catching electrons like fireflies. We don't quite fall in love but in the end we decide that we can coexist having a very minimal understanding of each other. Instead of having another article that explains computer memory and binary, or reiterates the surrounding vocabulary of pointers and references, why not put together a tutorial which is more of a DEMONSTRATION of pointers - practical uses in both the console and Win32 environment; breaking down some low-level graphics API functions from OGL, DX, SDL etc. that accept pointers as their parameters; drastic/radical displays of memory management through the stack (i.e. maybe a program that taxes a large enough amount of your computers memory resources to actually make a visible difference in the performance of your PC, and then show how new() and delete() truly free up system resources). These are just a few things I can think of that may clarify the functionality of memory management to the confused masses. I'm sure you guys can think of more
------------------------------Put THAT in your smoke and pipe it
Advertisement
I wrote this lecture quite a few years ago to introduce pointers to some of my first year students. Not quite what you mean, but i guess somewhere in the right direction?

Quote:Original post by Drizzt DoUrden
Instead of having another article that explains computer memory and binary, or reiterates the surrounding vocabulary of pointers and references, why not put together a tutorial which is more of a DEMONSTRATION of pointers - practical uses in both the console and Win32 environment; breaking down some low-level graphics API functions from OGL, DX, SDL etc. that accept pointers as their parameters; drastic/radical displays of memory management through the stack (i.e. maybe a program that taxes a large enough amount of your computers memory resources to actually make a visible difference in the performance of your PC, and then show how new() and delete() truly free up system resources).

A person who doesn't understand pointers can't understand their application, really. It's cyclical, in a sense: you learn about pointers but don't understand them, then learn about their applications but don't understand them, but glean some more insight into what pointers are, which leads to greater understanding of the applications. Eventually you have a moment of tremendous clarity and fully understand both pointers and their application.

There is no shortcut, particularly for individuals lacking prior programming insight and knowledge. If introduction to pointers is also your first introduction to indirection, then you're going to struggle.

I wrote this lecture quite a few years ago to introduce pointers to some of my first year students. Not quite what you mean, but i guess somewhere in the right direction?




Can u please upload the file again as this link is not opening....

'RobTheBloke' said:

I wrote this lecture quite a few years ago to introduce pointers to some of my first year students. Not quite what you mean, but i guess somewhere in the right direction?




Can u please upload the file again as this link is not opening….

How hard did you try to find it young Jedi

Direct link
"You insulted me!" I did not say that in the private message Tom Sloper!

This topic is closed to new replies.

Advertisement