I need proggramming tutorials that actually teach me

Started by
102 comments, last by M2tM 17 years, 9 months ago
Quote:
I have a friend who always strives to learn why things are there. He works from the ground up, I mean, sticks and stones to make a fire to creating tools to baking clay pots to pouring concrete foundations to sawing off logs and making a house eventually.


"Why things are there" means that you understand why(and when) you should use unions instead of structs, or floats instead of ints, or lists instead or vectors, or why the class hierarchy is like it is, or why that function is private and the other is public, or why the order you call several functions are like that,etc... You can't do without that. You need to understand the code you're writing. If you don't know why things are coded like they are, you're either coding randomly hoping that you'll get it to "work" or copying&pasting from tutorials.

Your friend, I assume, needs to know how things work under the hood, like how std::vector is actually implemented or what assembly code the compiler produces. This is another matter entirely.
Advertisement
Think an assembly implementation of a list and you're getting the picture... But yeah.

I think it's important to understand how vectors and lists work under the hood, especially if you plan on doing anything complex with them and pointers... (hint, avoid it) But there's understanding why important and relevant things are as they are, and then there's understanding why anything is as it is.

And yes, I understand your point as well, but it isn't entirely another matter. It's just the "understanding why" taken to the extreme.
_______________________"You're using a screwdriver to nail some glue to a ming vase. " -ToohrVyk
Quote:Original post by M2tM
I have a friend who always strives to learn why things are there. He works from the ground up, I mean, sticks and stones to make a fire to creating tools to baking clay pots to pouring concrete foundations to sawing off logs and making a house eventually.

Oh, this almost certainly wasn't my intent. My intent was to force the OP to realize why he is typing these things rather than just copying and pasting code, not to re-implement everything from bare metal.
I also realize that, trust me. I like talking about things which aren't really going to happen. Just humor me and smile :)
_______________________"You're using a screwdriver to nail some glue to a ming vase. " -ToohrVyk

This topic is closed to new replies.

Advertisement