Learning Java or C# as a Next Language? 817
AlexDV asks: "I'm currently a second-term, CIS major at DeVry University. This coming term, I will have the choice of studying either Java or C# for my Object Oriented Programming class. Now I'm a diehard Linux user, so I'm slightly conflicted here. Which should I take?"
"I know C#.NET is primarily a Microsoft language, but, with Mono gaining momentum, it could very well become a major development platform for Linux as well. Novell has really been pushing it lately, and there seems to be a lot of very cool Linux apps being developed with it.
Java, on the other hand, is inherently more Linux-friendly due to its intentional cross-platform nature, but at the same time it doesn't really seem to be inspiring the same kind of developer enthusiasm as Mono. However, it's clearly not an insignificant OSS development language, with the recent news that Java has surpassed C++ as the #1 language for SourceForge projects.
Anyway, I though I'd toss that out there and get some opinions from other Slashdot readers. Any thoughts, advice, and/or rants are appreciated :)"
Just Pick One and Learn it Well (Score:5, Interesting)
As someone who has taken both... (Score:3, Interesting)
At least, on a basic level. Personally, I'd say if you're aiming for broadness on your resume, Java will get you a lot further than C#. But then, it really depends on the type of company you're aiming at.
Python (Score:2, Interesting)
Java is more credible as a cross platform language (Score:2, Interesting)
Java on the other hand is a cross platform environment supported by multiple competing vendors. That will leave you more nimble to develop and deploy on a wide variety of systems. There are great JVM's available from Sun, BEA, IBM and others. There are several great commercial and open source implementations of java servlet containers. Can C# really say the samr thing?
Definitely Java (Score:2, Interesting)
http://overholt.ca/wp/index.php?p=11 [overholt.ca]
Basically, GCJ is the future of high level OOP on the linux platform.
EIther is fine (Score:5, Interesting)
I think Java has more penetration in the market right now, but C# is certainly catching up. In my last job search, there seemed to be a lot of interest for C#/.Net jobs and very few Java related jobs (although most of my experience is in C#, so YMMV).
Re:Java. (Score:5, Interesting)
Re:Java is more credible as a cross platform langu (Score:2, Interesting)
Re:Neither! (Score:2, Interesting)
What versions? (Score:2, Interesting)
If you're asking "which is more fun", though, then you have to remember that you work in an environment, not just a language. Visual Studio
Re:Take whichever one... (Score:2, Interesting)
I'll second this and add, "...beware the preverbial 'THAT' professor." The one that will push back all your due dates and give you (quite literally) impossible assignments until nothing is due or everyone is failing respectivly and as a result, you pass for just showing up everyday.
I learned OOD the old fashoned way: C++. When I took the job I'm currently at they had me go through some mock developer training in which they put me in a position of a team lead. I can tell you right now that the best OOP programmers I had in my team had studied C++ first. Why? Pointers. C++ FORCES you to get all the astrisks and ampersands in the right place. Java certinly dosn't make you do that at ALL (note to nitpickers: Yes. 'References' not 'Pointers' *blinks* I don't care. Close enough.) and from what I remember of the little bit of C# I had, C# dosn't make you do that either.
I would suggest that you learn as MUCH C++ as you can over the holiday break. Bruce Eckel has an EXCELLENT excellent excellent book called "Thinking in C++" (he also has one called "Thinking in Java" that is very much the same, so if you take the Java course, DEFINATLY get that book).
Java at Job Fare (Score:5, Interesting)
My two cents... (Score:5, Interesting)
I agree, Java is the only truly cross platfrom alternative despite the fact that C#/.NET is being implemented on non Microsoft platforms, Java will remain the only really usable cross platform alternative for some time to come. That being said there are still white patches in the standard Java class libraries; like RS232 support for example which, surprise, surprise, is still widely used. The last time I looked this was only implemented for Sun and Linux but not Windows, OS.X and other OS'es (you had to install a special third party implementation of the standard RS232 interface from Sun). Although I like C# better than Java for a number of reasons I still wouldn't rely upon C# for cross platform application development which is something I see as an essential capability to have for any future software product that can afford it performance wise. I would only start implementing something in C/C++ if I really needed close control over memory usage, the ability to do heavy duty performance tuning etc. For anything else it really just pays (money wise) to throw hardware at the problem and develop in Java or C#. But since the
Re:Take whichever one... (Score:2, Interesting)
Java has better programming tools (Score:2, Interesting)
Cases in point, I tried MonoDevelop a few months back but gave up since it contained no integrated debugger. I needed a neural network library and found JOONE for Java but no such equivalent in C#. Both platforms have unit test facilities (JUnit and NUnit), but the number of extensions for JUnit dwarfs that of NUnit.
Based on the platform maturity criteria Java wins hands down. What are your objectives? I suspect you will need less aspirin completing your academic program in C# than in Java. Once you complete your program in C# you might be able to command a higher price on the job market but that is also a riskier proposition because C# is not entrenched like Java, and therefore the market for C# engineers is less stable than that of Java. Microsoft could pull the plug on C# in the future (and they've done this before with other technologies to force upgrades) and C# would quickly fade away, but Java would survive if Sun dropped support.
Java and C# are both C++ dialects, and their differences from C++ are largely identical (e.g. intermediate code, single inheritance, interfaces, garbage collection, lack of pointers). As some earlier posts noted, learning one enables you to pick the other up fairly rapidly at a basic level, but the standard Java and .NET libraries vary considerably (not to mention the non-standard libraries). Learning APIs/libaries/frameworks is where you will spend most of your learning efforts once you work professionally.
Re:Java - Duh. (Score:2, Interesting)
OTOH, there are also a lot of rough edges. Like how you access the number of elements in a Collection with the size() method, the number of elements in an array with the length property, and the number of characters in a String with the length() method. Oh, and that length property? Essentially unique; it's the only place in the language with a read only property.
Or how JFrame.add() used to universally throw an exception telling you to call JFrame.getContentPane().add() instead. ("Fixed" in 1.5 by just calling that method directly.) And while we're on that subject, the whole idea that the API has classes with (and condones implementing interfaces with, as is the case with the Collection interfaces) methods that always throw is smelly. If a method isn't supported, it shouldn't be there in the first place. Moving it out of the class/interface moves error detection from runtime to compile time -- and this is a good thing. (IMO the "proper" way to do this would be to have instead of Collection, have two interfaces. Collection would have only accessors. MutibleCollection would add the add(), remove(), etc. methods that change it.)
Or the fact that Java literature doesn't talk about pointers. They're called references in Java. Except for NullPointerException. Why not NullReferenceException?
Or the fact that String types are in a world of their own. They are more priviledged than user classes because they have operator+ defined on them, but less priviledged than the build-in types because (among other things) you can't use them in switch statements.
I could go on with just small, little details that I think make the statement that Java is a nice clean piece of work from a theoretical sense silly. (I could also go on with things I think are substantial omissions from the language/library, but that's off topic.)
Re:Just Pick One and Learn it Well (Score:3, Interesting)
Even more people are running Java capable OSs. In fact, it's a strict superset.
Re:C# (Score:1, Interesting)
Not to mention all the good programmers who had a hell of time getting hired as C# developers because they didn't have any experience in it yet. You'd think that these two issues would connect up, but evidently not.
It's good advice... (Score:5, Interesting)
The question comes down to economics (which one do you know you'll be able to get a job using) and preference (which tool set do you like better Visual Studio 2003 or {Eclipse | JDeveloper | JBuilder | IntelliJ | NetBeans | WSAD | ?}). You have to go with the one that meets those two criteria. Neither choice is bad and no one gets fired for choosing either of the two.
Oh, and fer-cryin-out-loud: don't choose something because you think it will make someone else happy or make you seem more "uber geeky" or whatever. Just do it for you and the rest will follow. And whatever you may think now, you are NOT married to this choice. That "wall" that everyone seems to imagine between Java vs.
Go Java, C# is mostly popular because of the IDE (Score:3, Interesting)
Java stands for purity. The language of 1.4 is very stripped down and contructs like foreach, generics and boxing/unboxing isn't in. In 1.5 these features were needed to compete with
Most of the IDEs are written in Java (Swing) making their GUI slow and heavy.
C# stands for impressiveness, "productivity" and _Microsoft_. If you ask people why they like C# many of them would (if they dare) claim that they are more productive and have an easier time developing because of the "smoothness" of the language. This, translated, means that they like the IDE, which is Visual Studio
C# and Java have many the same(/or at least very similar) features. I wouldn't critizise C#/.NET for the un/managed jumps, since they claim it as a strong feature themselves.
Java is good for educational purposes since it's _a lot_ better documented, accepted and tried.
C# is well for quick and dirty solutions, since the IDE is quick and the GUI quick and "integrated" (it looks a lot like native windows controls).
So in short, my experience is that Java is a better language because of so many small things, but
C# is going to be the accepted platform for developing windows apps since microsoft is pushing it out and shipping it with new windows versions. they already started developing a lot apps with it themselves.
For the record: I know both Java and C#.
My experience is that I was much more productive with C# because of the fast and integrated IDE, generics and the foreach construct - Absolutely nothing else(!)
Re:Java. (Score:2, Interesting)
I'm bit surprised that what I replied got 5 and 'insightful' and the general hostiliness towards
In work I use LAMP. I keep up Linux server for a hobby, which runs Debian. I've learned to program first with C, then with C++(OO), Visual C++ and Java. Most advanced learning in school and own time I've done with Java and J2EE. This all just to show I've not tied my fortune or past what MS does.
Sure, I still wouldn't do my enterprise level software with
I also feel personally that C# is more intuitive to program than with Java. Java has lot of good points, but it is clumsy. In a way that's both strength and weakness of Java. Good when learning it, but becames a drag for us more advanced.
Re:If you are at DeVry (Score:5, Interesting)
For example, when I added a complete computer control system to an RC Car with a 20% Nitro, 80% gasoline combustion engine I used a Motorola 6808 with 4K of RAM and programmed it entirely in C++ when I decided that it was taking to long to program in assembly.
You can view the entire project, including all code here: http://home.comcast.net/~starwreck/FinalReport.pd
Oh yeah, I did this entire project at DeVry.
this is better and runs anywhere (Score:4, Interesting)
It's a nice dynamically typed OO language with crystal clear syntax, ease of programming, quite a few very handy operators and builtin types, and it runs anywhere. And i mean it: it runs on Linux, Windows, MacInstosh, *BSD and even on the
Yes, you'll be able to transparently handle java or
Programming in C# or java feels like programming in assembly, comparatively...
Re:Definitely know your job market!! (Score:5, Interesting)
Now the .NET adoption hasn't gone quite as quick as Msft would have liked, but the fact remains that they're throwing their full weight behind this platform. They're not letting up like I had originally thought, but are rather pushing it even more furiously than before. The next generation of all of Msft's major (non-server) products are going to be .NET based; office already is, as is visual studio. Whether we like it or not, .NET experience is going to eventually become as in-demand as Win32 experience. Certainly not this year, not next year, but it's coming.
Microsoft isn't giving up on this one, and it's been independantly argued that moving to this type of architecture is actually going to be better for the rest of us anyway. I don't know if I agree with all the hype, but it's pretty clear that .NET is here to stay.
All of that aside, it's worth pointing out that C# is a very well designed language. This isn't something that was cobbled together by a couple of guys in a garage. The creators of this language did some fairly extensive research of the existing languages (including Java), and brought in the help of some of the foremost minds on the subject.
So, is it as good as they claim it is? Probably not. However, after only half a year of C# programming, I've gone back on my original stance and decided to use it as my primary rapid-application-development platform under Windows (with Python being used for all other OSes).
If you've got to learn one or the other, I'd go with .NET in the classroom. With it you can learn all the important concepts that you need to learn. Then, if you're any good at all as a programmer, you should be able to make the jump from C# to Java in just a few weeks at the most.
YES! First learn comp sci concepts, not languages! (Score:2, Interesting)
He said something along the lines of you don't just "learn to program Macs" or "learn to program Windows" (or "learn to program Linux"
So you should really focus on the core concepts like data structures and algorithms. Use whatever language the course uses.
Re:If you are at DeVry (Score:2, Interesting)
Re:C# (Score:4, Interesting)
Working with Java people or Linux zealots, on the other hand, is not for the faint of heart. They are so anti-microsoft, anti-capitolist software market, so friggin' self-righteous, and whatnot that its annoying. Since I'm not in this camp, I prefer the more lax Microsoft sheeple-type culture over the annoying and forceful anti-everying-but-what-I-believe-in camp.
Thanks,
Leabre