Tuesday, March 4, 2008

College Courses

When I transferred to my current school last year, I heard a big buzz about a change in the department from C++ to Java. At my previous school (a very, very good one), Java was the focus of the curriculum. We did a lot of advanced things with Java, and although I don't use Java as my primary language, I learned a lot about programming. C++ was used to teach pointers primarily, but some of the OOP concepts were also presented of course. Now, the difference between that school and the one I'm at now is that this school is on semesters instead of quarters. At my old school, you could ideally finish all of your Java courses in your first year of school, thus opening the door for more specialized courses that didn't force you to use a certain language. The main issue of this post is to discuss the programming curriculum that I think should be in place in most schools, but isn't.

Below is a basic outline of the flow of programming courses that I would prefer be offered:

  1. C - Focus on basic programming logic, functions, recursion, arrays, and introduce structs.
  2. C++ - Pointers and memory management, heavy focus on OOP from novice to expert topics. I would choose to wait until now to deal with memory management because a lot of bad habits get formed when you do this stuff in C without knowing what you're doing.
  3. Java - Heavy focus on interfaces/abstract classes. The most confusing things to most people in Java is having to extend the standard library, override functions, etc...
  4. C# - With this language coming into popularity, it's a must have.
So, what's my logic here? I believe in starting from the ground up in order to establish good habits and strong skills. I began teaching myself C++ when I was in 8th grade. By the time I was forced into taking a Java class, I had no problem whatsoever picking it up. Take the inverse of that. Nearly everyone I've talked to that started programming in Java has struggled in C++ and/or despised it. Why? Java hides too many details from you that become your responsibility in C++. Basically, if you can code in C++, you can code in anything. I don't think you can honestly say that about Java. This is of course a general statement, this isn't to say that there aren't plenty of intelligent people out there that can program in any language, because of course there are. In fact, any programmer worth his weight can, and should be able to program in any language. The point though is that when you are teaching the material, it would be more beneficial to start with C/C++ and then simply learn the nuances of Java from there. The beauty of the above outline is that it allows you to move on to more specific topics such as data structures, GUI, threading, etc... and by the time you get there, you are armed with knowledge of 4 programming languages. The current trend seems to be to teach a particular course with a particular language in order to kill two birds with one stone. I'm not a big fan of this. I think someone is far better off coming into a data structures course with intimate knowledge of at least 2 programming languages as opposed to being expected to develop that knowledge of a language while at the same time mastering data structures. In addition to the above diagram, I think a school should offer at least 2 scripting languages and require one for a degree. Python, Ruby, Perl all come to mind.

My main concern is that a lot of kids will graduate from school with zero ability to program in anything other than Java. That's more of a reality than you may think, especially when C++ is essentially being removed from the curriculum of some schools. The bottom line on this is that C++ is widely used, and that isn't going to change. In fact, in some areas of Computer Science, namely Game Programming (console/PC), C++ is king.

More and more I'm finding kids in my CS courses that have never done a lick of programming work before coming to college. The market is always good for Computer Science, so they decide to pursue it as a career. These are one of groups of people that I have in mind when I say you can't go from Java and learn any language. The popular argument against this is that C/C++ is too complicated for these people. Maybe so, but I don't agree with that if the course is taught properly. Secondly, think of it as a "weed-out". It seems the popular choice for a "weed-out" course at a number of schools is discrete math. While I understand the concepts presented are important, I don't view them as things that are specific to this course. I think you garner all of the logic you need to in your programming courses/experiences. Secondly, I don't think this course serves as any sort of useful primer for a data structures course, and at a lot of schools that is how they have the pre-reqs set up. The only logical reason to do that is to "weed-out" kids that may not be cut out for this line of work. I think a more useful test would be teaching C/C++ as a first language as opposed to Java. After all, if you can't design and write solid code, you won't have a job very long. Anyone can sit down and work out logic puzzles.

Just my two cents.


Nathan said...

I completely agree with you. I've had plenty of discussions with other professors and students at my school and they are saying the same thing.

I also like how you touched a bit on the scripting languages. They can be very powerful in a number of situations and companies would really favor you if you possessed experience in those areas as well.

Well put.

owner said...

Thanks. I think scripting languages are very important. I can speak only from my experience in game development, but in general if you want to mock up an idea quickly, a language like Ruby is ideal. Also, not to mention the cross-platform nature of scripting languages.