I have no interest in evaluating languages based on how quickly they lead to money; only how they affect your ability to program. Additionally, I am not particularly experienced. I’ve only been programming for three or four years. Take my words with a grain of salt.
I remember one semester in college where I was using three separate programming languages at the same time. VB, Java, and Assembly (16-bit x86). Sometimes it lead to a small amount of confusion, but it was still a good experience. I would suggest beginning a second language soon after achieving minimal competence with your first language, but continuing to learn the first as well. Sticking too long to a single language encourages you to stick in a rut, and think that is the only way to do things. Go down as many paths as you are able to. Getting in a language rut is not a good idea.
Java is not the most amazing language in the programming world, but it is an extremely useful one to learn. It contains a C style syntax without some of the more difficult aspects. In other words, you learn how to program in the traditional way, but more easily. It is relatively verbose, and strict on some matters, but that teaches a methodical way of programming that is necessary to making good programs, but less strict languages do not teach. You can do anything in Java, and most of it is of reasonable difficulty. While you will need C++ to round out your C style, knowing Java is a very good stepping stone for it. It is an advantage to learning how to program that it is not interpreted (ignore that it compiles to bytecode), since that means you must have a coherent thought before writing it. When just learning, winging it is not the best strategy. Complexity should be approached by the newbie programmer as quickly as they are able to handle it.
Prolog might be the most amazing programming language, but I wouldn’t recommend it to someone just learning how to program, and it isn’t particularly transferable. It does give a person a way to think about the problem directly in a logical manner. The algorithms can often be expressed in a more pure form than in other languages, since it utilizes a search algorithm to actually get the answer rather than a series of commands. I would have liked to learn some algorithms in Prolog.
As an example:
factorial(0,1).
factorial(1,1).
factorial(N):=
N>1,
N * factorial(N-1).
This looks almost exactly like the algorithm as it would be described. In fact, this could be used to intuitively explain the algorithm perfectly to someone who didn’t know what factorial was. Notes: Prolog operates on equivalence. The first line declares that factorial(0) is logically equivalent to the number 1. Likewise factorial(1) is logically equivalent to 1. Disclaimer: As a (hopefully) just graduated CS student, I have written two different term papers and given a 36 minute presentation related to Prolog, but was only exposed to it these last few months, and have not yet had the chance to do a significant amount of programming in it. (19 units ftw.) I wish I had taken the opportunity to use it when I first heard of it a couple years ago; it was that or Lisp and I did Lisp.
On that note, Lisp. Definitely a good language, it can be very difficult to learn, especially due to the overabundance of parenthesis obscuring the fundamentally different approach to problems. I freely admit that my first attempt to learn Lisp went down in flames. Make sure you understand Lisp’s fundamentals, because they are not the same as a more normal programming language. It takes real dedication to properly learn Lisp. Still, Lisp is one of those languages I wish I had spent more time on. It is a different and excellent way to think about problems, and is a very good language to expand your horizons after you already know how to program. While it is possible to write in a C style in Lisp (Common Lisp at least), make sure to avoid that temptation if you really want to understand it. It is especially good for recursion, and you are right about the whole code as lists thing being an interesting perspective. I didn’t really learn much about Lisp macros. Okay, fine. I wish I had done Prolog and Lisp.
If you want to be a good programmer, then you must learn assembly of some form. It would be utterly insane to try to learn programming with assembly, (of course, some did, and I wouldn’t be here on my computer if they hadn’t.). Understanding how the machine actually (logically) works is a huge step toward being a good programmer. A user can afford to only know what is done, a programmer needs to learn how it is done, and why. High level languages will not make you a good programmer, even if they are what you end up using for your entire career. The two semesters I spent learning how the computer operates on a logical level were of extreme importance to me as a programmer, and assembly is an important part of that.
I have no interest in evaluating languages based on how quickly they lead to money; only how they affect your ability to program. Additionally, I am not particularly experienced. I’ve only been programming for three or four years. Take my words with a grain of salt.
I remember one semester in college where I was using three separate programming languages at the same time. VB, Java, and Assembly (16-bit x86). Sometimes it lead to a small amount of confusion, but it was still a good experience. I would suggest beginning a second language soon after achieving minimal competence with your first language, but continuing to learn the first as well. Sticking too long to a single language encourages you to stick in a rut, and think that is the only way to do things. Go down as many paths as you are able to. Getting in a language rut is not a good idea.
Java is not the most amazing language in the programming world, but it is an extremely useful one to learn. It contains a C style syntax without some of the more difficult aspects. In other words, you learn how to program in the traditional way, but more easily. It is relatively verbose, and strict on some matters, but that teaches a methodical way of programming that is necessary to making good programs, but less strict languages do not teach. You can do anything in Java, and most of it is of reasonable difficulty. While you will need C++ to round out your C style, knowing Java is a very good stepping stone for it. It is an advantage to learning how to program that it is not interpreted (ignore that it compiles to bytecode), since that means you must have a coherent thought before writing it. When just learning, winging it is not the best strategy. Complexity should be approached by the newbie programmer as quickly as they are able to handle it.
Prolog might be the most amazing programming language, but I wouldn’t recommend it to someone just learning how to program, and it isn’t particularly transferable. It does give a person a way to think about the problem directly in a logical manner. The algorithms can often be expressed in a more pure form than in other languages, since it utilizes a search algorithm to actually get the answer rather than a series of commands. I would have liked to learn some algorithms in Prolog. As an example: factorial(0,1). factorial(1,1). factorial(N):= N>1, N * factorial(N-1). This looks almost exactly like the algorithm as it would be described. In fact, this could be used to intuitively explain the algorithm perfectly to someone who didn’t know what factorial was. Notes: Prolog operates on equivalence. The first line declares that factorial(0) is logically equivalent to the number 1. Likewise factorial(1) is logically equivalent to 1. Disclaimer: As a (hopefully) just graduated CS student, I have written two different term papers and given a 36 minute presentation related to Prolog, but was only exposed to it these last few months, and have not yet had the chance to do a significant amount of programming in it. (19 units ftw.) I wish I had taken the opportunity to use it when I first heard of it a couple years ago; it was that or Lisp and I did Lisp.
On that note, Lisp. Definitely a good language, it can be very difficult to learn, especially due to the overabundance of parenthesis obscuring the fundamentally different approach to problems. I freely admit that my first attempt to learn Lisp went down in flames. Make sure you understand Lisp’s fundamentals, because they are not the same as a more normal programming language. It takes real dedication to properly learn Lisp. Still, Lisp is one of those languages I wish I had spent more time on. It is a different and excellent way to think about problems, and is a very good language to expand your horizons after you already know how to program. While it is possible to write in a C style in Lisp (Common Lisp at least), make sure to avoid that temptation if you really want to understand it. It is especially good for recursion, and you are right about the whole code as lists thing being an interesting perspective. I didn’t really learn much about Lisp macros. Okay, fine. I wish I had done Prolog and Lisp.
If you want to be a good programmer, then you must learn assembly of some form. It would be utterly insane to try to learn programming with assembly, (of course, some did, and I wouldn’t be here on my computer if they hadn’t.). Understanding how the machine actually (logically) works is a huge step toward being a good programmer. A user can afford to only know what is done, a programmer needs to learn how it is done, and why. High level languages will not make you a good programmer, even if they are what you end up using for your entire career. The two semesters I spent learning how the computer operates on a logical level were of extreme importance to me as a programmer, and assembly is an important part of that.