C++ v Java v ???
-
Thanks, Dan. Interesting info on tiobe. The students have had a C course. This would be their second programming course. The text I use is Savitch's Absolute C++, AW. This may shed light as to subject material. I do offer a third special topics course that implements the MIT Beer game or Hunt the Wumpus in a distributed environmnet in C# (and XAML). WRT the MSDN article I mentioned above, I think a good portion of the beginning 2nd term students might fail on your tag line.
MSoulia wrote:
The students have had a C course
If they started with C I think they probably should stay with C/C++ for the rest of the core/into courses.
MSoulia wrote:
I think a good portion of the beginning 2nd term students might fail on your tag line.
IF their CS101 teacher failed them that badly I guess it'll be up to you to fill in the gaps in what they should've learned while covering new material.
3x12=36 2x12=24 1x12=12 0x12=18
-
I fanatically suggest C using the C++ compiler; I'll call it C/C++. (Among other things, it lets you transition to C++ easier and lets you take advantage of many C++isms in procedural code AND it teaches developers that you don't have to use templates and write convoluted classes to write C++ code!) One of the biggest problems with new developers is that they are amazingly ignorant about how computers work. They tend to be oblivious of what their code translates into in real terms. They assume garbage collector means more than it does (that they can sit in a tight loop doing new xxx every iteration!) C/C++ teaches you HOW a computer works and HOW languages really do what they do beneath the covers. When taught with Windows, it also teaches the base API and how Windows works which is also helpful. Java and .NET aren't just magic, but it seems that way too many new developers treat them like they are. C/C++ also makes teaching basic algorithms fairly straightforward--and by that I don't just mean the concept of the algorithm, but how it really works. Yes, it can be ugly, but you can avoid that with good planning. (All languages can get quite ugly, C/C++ just hands you the shotgun, takes off the safety and aims it at your feet for you. But with that power, you get understanding and that is sorely lacking with too many recent graduates.) I do a lot of embedded development. If I've learned one thing is that it's really hard to teach Java/C#/VB programmers to write decent embedded code, even in their own damn languages, let alone C/C++. I now prepare myself for the howls of protest and boldly state: OOP is an oversold concept. I can't count the times that simple procedural code (or simple classes treating methods procedurally) makes faster, easier to understand and much more stable code. Even if it took a little more time to write (which it does less often than many think) the time saved on debugging and maintenance, let alone support calls, makes up for it. Another advantage of C; Visual Studio. Yeah VS 2010 sucks blah blah blah, but it's still the best damn thing on the market by magnitudes. One of the best ways to learn C is to use the debugger (plus having fresh graduates actually know how to use a debugger would be a HUGE leap forward.) I seriously recommend C as the starting language for everyone.
Joe Woodbury wrote:
Another advantage of C; Visual Studio. Yeah VS 2010 sucks blah blah blah, but it's still the best damn thing on the market by magnitudes. One of the best ways to learn C is to use the debugger (plus having fresh graduates actually know how to use a debugger would be a HUGE leap forward.)
Agree. Learning a debugger should be part of any intro course regardless of the language/platform.
3x12=36 2x12=24 1x12=12 0x12=18
-
Hi All - If you wouldn't mind, I would like your input, zealots and all, regarding the time honored debate of a learning programming language. I'm once again involved in a discussion as to which language, C++ or Java (or Objective-C) is best suited for a 2nd term programming course. Java pundits point to tiobe.com. Us C++ guys have a keen eye on the pending C++0x release and its current boost libs. The course is currently taught in C++. What other surveys, polls, etc. (admittedly not nearly as diverse and informed as CodeProject) would compare to tiobe.com? Thank you. Let the games begin...
If I had the choice of teaching a class across at least one semester, then I'd definitely introduce several concepts. The most important of which is that a programming language is nothing more than a tool that translates the concepts that you should know into binary. I'd plan out a project that would last the whole semester with twice a week checks to make sure that things are on track. Start with pseudo-code and from there onto C or Python. Yes, Python. On top of all that, to make sure that students learn the concepts right, I wouldn't have them do things through an IDE, let them boot strap themselves. Vim on Linux, they want to learn to understand compiler outputs, proper debugging.. Of course, these are just pointers on how to go about it, but I'm certain it will drill how things work into their brain. This way, when they tackle a problem, they can think their way into a solution. That is the most important thing, not a language.
If the post was helpful, please vote, eh! Current activities: Playing Star Craft II. Don't bother me, eh? Now and forever, defiant to the end. What is Multiple Sclerosis[^]?
-
Hi All - If you wouldn't mind, I would like your input, zealots and all, regarding the time honored debate of a learning programming language. I'm once again involved in a discussion as to which language, C++ or Java (or Objective-C) is best suited for a 2nd term programming course. Java pundits point to tiobe.com. Us C++ guys have a keen eye on the pending C++0x release and its current boost libs. The course is currently taught in C++. What other surveys, polls, etc. (admittedly not nearly as diverse and informed as CodeProject) would compare to tiobe.com? Thank you. Let the games begin...
I programmed in BASIC and assembly language first, then C, then Forth, then C++, then Java then C#. With BASIC I learned control flow, variables, conditionals, simple data access. With Assembly and C, I learned what things actually look like in memory. It gives you a sense at what your limits are, and more importantly, what the possibilities are as far as footprint and performance. With FORTH I learned meta-programming With C++ I learned Object-Oriented Programming, generic programming, and ability to create efficient libraries (ala STL, Boost) With Java and C# I learned reflection, virtual machines, garbage collection. If I didn't already know OOP and generics, I would have learned that, too. So, what if you learn programming with just C# and Java, what would you be missing? I think you'd be missing out if you never understand meta-programming -- it's worth looking at so that you know it's there and exists. But most importantly, C# and Java hide the hardware. So you're really not laying down the bits exactly the way you want (especially truth with Java). Maybe the best thing to do is to use C# or Java for most of computer-science, and then add a course where you actually write code for a single-board computer or micro-controller using low-level C or assembly language. That should give you the breadth you're looking for.
-
Hi All - If you wouldn't mind, I would like your input, zealots and all, regarding the time honored debate of a learning programming language. I'm once again involved in a discussion as to which language, C++ or Java (or Objective-C) is best suited for a 2nd term programming course. Java pundits point to tiobe.com. Us C++ guys have a keen eye on the pending C++0x release and its current boost libs. The course is currently taught in C++. What other surveys, polls, etc. (admittedly not nearly as diverse and informed as CodeProject) would compare to tiobe.com? Thank you. Let the games begin...
A hello world programmed in C++ is just much a greeting as a hello world in Java. I would say measure how superior you feel you are and find yourself on this chart. Cool Kids
-
Hi All - If you wouldn't mind, I would like your input, zealots and all, regarding the time honored debate of a learning programming language. I'm once again involved in a discussion as to which language, C++ or Java (or Objective-C) is best suited for a 2nd term programming course. Java pundits point to tiobe.com. Us C++ guys have a keen eye on the pending C++0x release and its current boost libs. The course is currently taught in C++. What other surveys, polls, etc. (admittedly not nearly as diverse and informed as CodeProject) would compare to tiobe.com? Thank you. Let the games begin...
The 2nd term is a whole year, right? The audience already knows something but the employment and other things like that are at or below the horizon? If so... I guess C++ is too ugly to be taught at this stage. It may leave a false impression that ALL programming is a mind dead mess. Java is an oversimplified language with compromise loving disconnected afterthought additions. The way it treats generics alone is sufficient to damage the mindset of the students. Besides, if you do not go into libraries, what are you going to speak about after the first couple of months? I guess C# is just right. It has many features and no one is there without a good reason. I guess even the simplest approach - taking one feature after another and explaining them in a problem/solution style - will make a great course. Pay more or less attention to alternative solutions and C# will fit a year long course perfectly. Besides, the way how LINQ was added to C# (that is, a bunch of features that are each logical and useful while magically allow for LINQ when combined) must be shown to students as early as possible.
-
I fanatically suggest C using the C++ compiler; I'll call it C/C++. (Among other things, it lets you transition to C++ easier and lets you take advantage of many C++isms in procedural code AND it teaches developers that you don't have to use templates and write convoluted classes to write C++ code!) One of the biggest problems with new developers is that they are amazingly ignorant about how computers work. They tend to be oblivious of what their code translates into in real terms. They assume garbage collector means more than it does (that they can sit in a tight loop doing new xxx every iteration!) C/C++ teaches you HOW a computer works and HOW languages really do what they do beneath the covers. When taught with Windows, it also teaches the base API and how Windows works which is also helpful. Java and .NET aren't just magic, but it seems that way too many new developers treat them like they are. C/C++ also makes teaching basic algorithms fairly straightforward--and by that I don't just mean the concept of the algorithm, but how it really works. Yes, it can be ugly, but you can avoid that with good planning. (All languages can get quite ugly, C/C++ just hands you the shotgun, takes off the safety and aims it at your feet for you. But with that power, you get understanding and that is sorely lacking with too many recent graduates.) I do a lot of embedded development. If I've learned one thing is that it's really hard to teach Java/C#/VB programmers to write decent embedded code, even in their own damn languages, let alone C/C++. I now prepare myself for the howls of protest and boldly state: OOP is an oversold concept. I can't count the times that simple procedural code (or simple classes treating methods procedurally) makes faster, easier to understand and much more stable code. Even if it took a little more time to write (which it does less often than many think) the time saved on debugging and maintenance, let alone support calls, makes up for it. Another advantage of C; Visual Studio. Yeah VS 2010 sucks blah blah blah, but it's still the best damn thing on the market by magnitudes. One of the best ways to learn C is to use the debugger (plus having fresh graduates actually know how to use a debugger would be a HUGE leap forward.) I seriously recommend C as the starting language for everyone.
I agree totally with the reasoning behind your post - it is amazing how little many people (even with the relevant paper qualifications) understand about how a computer works and hence what the issues are with doing certain tasks efficiently and effectively in such an environment. Even basic things like the underlying differences in integer and floating point escape many otherwise skilled people (who wonder why their huge financial calculations end up differing from the expected value by a small percentage after time). An understanding, in basic terms, of how the underlying hardware actually works makes it obvious why certain things have to be done the way they are, even in supposedly very high level languages that are intended to hide the architecture of the machine. Having started with paper-tape and punched card mainframe systems, worked up through assembly language programming and embedded systems, and then majored in C++ since version 1.0 (and including parallel processor development long before multi-core CPUs were a twinkle in the Intel milkman's eye - remember the Transputer?), I've seen an awful lot of languages and methodologies come and go. I could see the great advantages of OOP principles for my development and adopted them, but have long thought that C++ has become so complex (and full of gotchas for the unwary) that developing using the latest template schemes, Standard Library classes etc has become 80% learning the language and 20% solving the problem. Bear in mind too that it is possible to write OO code in almost any language, even assembler... I've also gradually come to the conclusion that programming is like driving a car - the core problem-solving skills you need are the same almost regardless of language, dev environment etc, and the language you use is the car: it might have a bigger or smaller engine, left or right hand drive, automatic or manual gearbox and so on, but it's still a car and if you know how to drive well, you'll be able to get along. So, what would I recommend? Tricky, but I tend to agree that if you want to demonstrate how what gets written relates to the constraints of the underlying hardware, but also want something that gives transferable skills, its really got to be C/C++ (ANSI C in other words I suppose). If you were trying to teach skills that are more applicable to higher level business or web environments, then probably Java (+ data handling and touching upon SQL etc) (or maybe Scala?) My main point is you need to be teaching the principles, not the l
-
I'd say all are more useful than the several modules of lotus notes plus the module in fortran we had to do. Then again I'm stuck in foxpro land at the moment. My guess is that Java and .NET are most in demand, they tend to be the best choices for developing most general business apps imo. There don't seem to be many C++ jobs around which is just as well as I don't think many would be able to handle it.
-
Thanks, Dan. Interesting info on tiobe. The students have had a C course. This would be their second programming course. The text I use is Savitch's Absolute C++, AW. This may shed light as to subject material. I do offer a third special topics course that implements the MIT Beer game or Hunt the Wumpus in a distributed environmnet in C# (and XAML). WRT the MSDN article I mentioned above, I think a good portion of the beginning 2nd term students might fail on your tag line.
I finally figured out the tag line... I have seen it numerous times but never dwelt on it too long. The context of the current conversation helped. If the first semester was C, definitely stick to C++. I think a lot of people who start in Java and C# do not get a good understanding of pointers and hence do not understand how reference assignments in Java and C# actually work. They are really just primitive pointers that can not be dereferenced. As an employer, I would rather teach a C++ programmer Java than the other way around. You might throw in some C++ topics that will help translate into other languages. e.g. a class that has only pure virtual functions that is used via multiple inheritance with 2 totally different concrete type hierarchies. (a la Java interface) Here is another one that I learned the hard way. Use space, not 0 if you want to beautify C code. 1x01=1 1x04=4 1x08=!compile error.
-
Hi All - If you wouldn't mind, I would like your input, zealots and all, regarding the time honored debate of a learning programming language. I'm once again involved in a discussion as to which language, C++ or Java (or Objective-C) is best suited for a 2nd term programming course. Java pundits point to tiobe.com. Us C++ guys have a keen eye on the pending C++0x release and its current boost libs. The course is currently taught in C++. What other surveys, polls, etc. (admittedly not nearly as diverse and informed as CodeProject) would compare to tiobe.com? Thank you. Let the games begin...
A good CS program should teach concepts, not languages. Any object oriented language will do the job to teach inheritance, polymorphism, etc. All you need is a language that the teacher is comfortable enough to teach the concepts properly with it. I think C++ is not required if they already got the low level part with C. Still, it could be a good candidate.
-
Thanks, Dan. Interesting info on tiobe. The students have had a C course. This would be their second programming course. The text I use is Savitch's Absolute C++, AW. This may shed light as to subject material. I do offer a third special topics course that implements the MIT Beer game or Hunt the Wumpus in a distributed environmnet in C# (and XAML). WRT the MSDN article I mentioned above, I think a good portion of the beginning 2nd term students might fail on your tag line.
I wouldn't like C for a first course, its not OO. I work in several languages and almost wince when I have to return to C, using char*, no classes, etc.. I'd think the 2nd semester students would have to relearn things after C, that aren't used as much any more. I like C#, but that is Windows centric, and quite similar to Java... C++ is great, but extra work, and as stated not used in as many places.
-
Hi All - If you wouldn't mind, I would like your input, zealots and all, regarding the time honored debate of a learning programming language. I'm once again involved in a discussion as to which language, C++ or Java (or Objective-C) is best suited for a 2nd term programming course. Java pundits point to tiobe.com. Us C++ guys have a keen eye on the pending C++0x release and its current boost libs. The course is currently taught in C++. What other surveys, polls, etc. (admittedly not nearly as diverse and informed as CodeProject) would compare to tiobe.com? Thank you. Let the games begin...
PASCAL! It was good enough for me, it's good enough for you. :)
ragnaroknrol: Yes, but comparing a rabid wolverine gnawing on your face while stabbing you with a fountain pen to Vista is likely to make the wolverine look good, so it isn't exactly that big of a compliment.
-
Tiobe is basically counting google/etc hits. It's not really anything I could consider a useful metric for measuring use/employment levels. That said, what language is your CS101 class taught in? IMO the first few general programming classes should all use the same language so that you can concentrate on teaching programming not the platform itself. Either C/C++/Java/C# could be used for the core courses without major problems IMO. However at some point at least one of C/C++ (memory management, pointers) and one of C#/Java (real world, higher level, standard libraries that don't suck or make you reinvent the wheel) need to be taught before graduation. A web course with CSS/Ajax/html5/buzzwords probably needs done as well, although the backend language here probably matters less.
3x12=36 2x12=24 1x12=12 0x12=18
Dan Neely wrote:
However at some point at least one of C/C++ (memory management, pointers) and one of C#/Java (real world, higher level, standard libraries that don't suck or make you reinvent the wheel) need to be taught before graduation.
Since when C/C++ is not a real world language? Maybe this is true in your world, but there are tons of SW still being written in C/C++ today. I would add also ADA as when you can make a program compile in it, you have been enforced to get some good practices by force, so other way it wouldn't even compile. Also some model-based programming also. I like Rose RT with C++. Of course, I am not from a web world, but real-time safety critical world.
-
My introduction to computing class used pseudo code so students would have to focus on concepts and not rely on language features. Imagine having to write your first binary search tree with nothing more than a pen, paper, and a rudimentary understanding of doubly linked lists. And then the merge sort ...
Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost
Wished more professors back when I was in school used that thinking. I was never good at remembering every single specific rule of syntax of all the languages thrown at me in college, so I didn't get amazing grades in many of my programming classes. But the few professors who gave most/full credit for nailing the logic in pseudo code gave me the best grades. I also felt that I learned more in those classes, since I focused more on the logic (which I'm good at), as opposed to memorizing syntax (which I occasionally flubbed).
-
Wished more professors back when I was in school used that thinking. I was never good at remembering every single specific rule of syntax of all the languages thrown at me in college, so I didn't get amazing grades in many of my programming classes. But the few professors who gave most/full credit for nailing the logic in pseudo code gave me the best grades. I also felt that I learned more in those classes, since I focused more on the logic (which I'm good at), as opposed to memorizing syntax (which I occasionally flubbed).
I'm not so sure about pseudo code. I contracted on a project where the lead guy "pseudo" coded the whole app, handed us his document, and said code it up. The devil is in the details. Everyone needs to choke on a missing syntactical element and fix it after staring at it for 10 minutes or so. You can't get that experience with pseudo code.