Well, Dave, people can try to learn however they want. And if they’re here just to have fun, it surely doesn’t matter much. If they’re interested in finding positions in industry, getting paid for programming, there are still lots of ways to get there.
You and I have very different programming styles, it appears. Yet, I’ll bet that we’d find some very significant similarities if we looked. They would probably revolve around using the power of the language well, around simplicity, around avoiding duplication, and so on. The things formalists call coupling and cohesion. We might approach those things differently but would still be doing similar kinds of things in similar ways … because they work.
To get good at programming, one needs to program – a lot. Practice, practice, practice. But there’s more. We need to see different ways of doing things. We need to learn better ways – and we’ll surely learn worse ways. And we need to learn to distinguish between the better and the worse.
We learn a lot by reading code. When we read code, we can learn from the experience of the person or persons who wrote it. If we read only our own, we’re always reading the code of someone no more experienced than we are. If we read lots of people’s code, we see more options and many of them will be better than what we’ve discovered on our own, so far. (Many may not be: experienced programmers are not necessarily good ones. There’s good money to be made in cleaning up old code messes if you can stand the smell.)
We can read examples. Dave’s examples here are great and they are many. Ignatz’s as well. Probably there are others here whom I have just not found yet. Examples are nice because they can give us an isolated view of a clean solution to a single problem. That makes it much easier to learn.
And we can learn from principles. I can usually explain why I do things the way I do, because I’ve spent years trying to help people learn to be better programmers. So I had to think about what I did, why I did it, why it worked – or didn’t work.
My Adventures in C# book (not recommended here) is unique in that it is a huge book showing how I developed a large program, and it includes every single mistake I made. Try this, fail, try that. It tried to show what programming is really like, when you’re learning as you go.
To me, programming is full of lessons that come with the fun (and with the frustration). “Well, not gonna do THAT again,” is the sign of learning.
So, what’s my point? Folks can read books on programming if they want to, and they’ll learn a lot if they read good ones. Or they can find a friendly forum and separate the wheat from the chaff in the help. Or they can sit down with a pal. Or work on their own. Practice, study, pay attention.
In the end, we get better when we learn what works well, what doesn’t work so well, and why. We can get there on our own, or with help. I’m happy to have help.
And yeah, I’m in some books. Including a few I wrote. And don’t buy my new one, The Nature of Software Development expecting a programming book. It’s way more abstract than that. Some people really like it. I like it fairly well, it nearly says what I was trying to say.