Advice for novice programmers thread
Posted: Thu Sep 18, 2003 11:48 am
It occurs to me that it might be of use for the newer programmers here if the senior members wrote down whatever general advice they could offer in a single thread, which newbies could read immediately. What I have in mind is not so much a FAQ as a listing of advice for how to start off.
Let me start off with my own recommendations about learning to program:
My advice is to try to look beyond the languages you're working in and understand the more general principles involved. Programming is more than just writing code in a given language; if you can see the larger picture, then you should be able to work in any language, with a little time and effort.
Don't get caught up in learning a particular language, such as C or VB, too early on; it is all too easy to get a kind of tunnel vision that way. It is better to start of in a language that is suited for beginners, and concentrate on learning the concepts, than to jump into something where you'll struggle with the language itself so much that you miss the ideas.
You do, however, want to understand the languages themselves; indeed, the more languages you know, the easier it is to see the general ideas, as they apply to each different language in turn. While you will probably want to specialize eventually, it is best to get a broad view first.
If I were to suggest a specific curriculum, it would be:
Let me start off with my own recommendations about learning to program:
My advice is to try to look beyond the languages you're working in and understand the more general principles involved. Programming is more than just writing code in a given language; if you can see the larger picture, then you should be able to work in any language, with a little time and effort.
Don't get caught up in learning a particular language, such as C or VB, too early on; it is all too easy to get a kind of tunnel vision that way. It is better to start of in a language that is suited for beginners, and concentrate on learning the concepts, than to jump into something where you'll struggle with the language itself so much that you miss the ideas.
You do, however, want to understand the languages themselves; indeed, the more languages you know, the easier it is to see the general ideas, as they apply to each different language in turn. While you will probably want to specialize eventually, it is best to get a broad view first.
If I were to suggest a specific curriculum, it would be:
- Start off learning HTML markup before getting into an actual programming language; it is structured quite similarly to many programming languages, but is much easier to learn.
- Learn a language that can be run interactively. This means that you can write pieces of a program at the interpreter prompt, rather than having to write a whole program at once; you can learn the pieces of a program separately, and try out things on the fly, and get an immediate response. Good languages for this are Python, Scheme, FORTH, ML, or Smalltalk. If you can, learn two different ones, one after the other, before continuing, as that will help you see how different languages affect how you program.
- Go on to a simple compiled language, like Pascal, running it on the command line (rather than in an IDE). C is an OK choice for this, but you'd probably be better off waiting until you understand low-level programming better. You could just skip this part, as it just is to get you used to the idea of compiling programs and using the linker and debugger.
- Learn some assembly language. While it is unlikely that you will ever use it very much in general programming, understanding how the cvomputer works at the lower level will help you understand a lot of how the programs really work in general. Make sure that you learn about addressing, character strings, and stack frames, in particular.
- Learn the basics of Perl scripting now. Perl is ubiquitous, and even a little of it can make a big difference.
- Now dive into C, and learn it in depth; if you are doing a lot of programming, you will definitely want to know it, and now you should be ready to really understand it.
- Go back and learn more Perl, or another scripting language like VBA. If you have a chance, and didn't earlier, learn a little bit of both Scheme and Smalltalk.
- Last, tackle either C++ or Java, depending on what you mean to be doing with it. You can always go back and learn the other; you should by now have enough language experience under your belt that even a massive language like C++ should be easy to learn enough to work in.