4 ms·
The notion of pointers is interesting - to me, as a relative novice to programming, pointers seem as the intuitive way of doing things - and not at all hard. W
by mixmax 19y ago
The notion of pointers is interesting - to me, as a relative novice to programming, pointers seem as the intuitive way of doing things - and not at all hard. What this implies is that different people have very different mental models of the world and how it works. I know people that I would certainly consider smarter than myself who have trouble understanding the concept of pointers - so it's not just about intelligence, though a certain baseline is probably needed.
On the other hand I have serious trouble understanding faith and the thought of a god - this is one of the things that just doesn't seem to fit into my mental model of the world. So understanding certain abstract concepts seems to have some kind of correlation to how you view the world, and what you find to be easy and what you find to be hard.
I'm not quite sure I brought the point across in a coherent manner - but one can hope...
- wallflower 19y agoThis insightful News.YC thread that I stumbled upon a while back seems to explain C pointers in a different manner better than I have seen elsewhere: http://news.ycombinator.com/item?id=87348 http://news.ycombinator.com/item?id=87348 (Other than the stuff about casting between pointers and ints though.. ) "That was the lightening bolt moment. The problem with pointers in C is that the [star][varname] syntax means two different things, and they are actually contradictory from a certain perspective. In one context it means "declare a variable that is a pointer" and in the other it means "deference". Whenever my languages-brain bit looked at this it couldn't deal with it, recognised it as a contradictory positions and basically shut me down, but not in a way that let me work out what was going on. Have a look at it yourself from that perspective - hopefully you'll see what I always did. Now whenever I look at C code I instead just think "everything is an int and pointers are all about casting ints, and a star when you declare something is your way of telling the compiler that the type of this thing is int-pointer instead of just int". Thus I now have no difficulties at all."
- mixmax 19y agoVery well written, thanks for the link.
- maximilian 19y agoI never really understood pointers fully until I learned a bit of assembly as part of a computer architecture course. Once you realize that the computer stores everything as numbers, its like: ooooh. Addresses are just numbers written in Hex to scare away people who don't do number-base switching. In face, computers just play around with numbers mostly in different bases to ease playing around with them.
- jules 19y agoOne of the problems I had with them in C was the weird syntaxes. `load` & `store` instructions are much easier to understand.
- oz 19y agoWhere faith is concerned, remember that it is your faith in the US Government (assuming you are in the US) that transforms an elaborate print on paper into money. As it isn't backed by a precious commodity, it is inherently worthless. Collective faith makes the system work. To me, science and philosophy, the 2 things normally used to refute the idea of God actually prove it better than anything else. Science and philosophy are searches for universal laws and principles. What makes these principles universal, i.e., applicable in all instances? If there were no intelligent design, these laws and principles would perhaps be better described as leaky abstractions, as opposed to concepts which always apply. Think of things like pi, the golden ratio etc, which are so oft-repeated in nature, science and engineering. Seems far-fetched that all this 'just happened.' Supreme intelligence was at work. BTW, although I am not a Christian, I am the son of a Minister and a Christian woman, so I am biased. Greetings from Jamaica!