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)
Re:Just Pick One and Learn it Well (Score:5, Informative)
Re:Just Pick One and Learn it Well (Score:4, Insightful)
visual studio which will cost you a fortune
Come again? [microsoft.com]
Re:Just Pick One and Learn it Well (Score:4, Insightful)
and did you forget that i have to buy an entire worthless operating system just to run this damn visual studio ? and if i wanna be up to date after 3 years i'd have to buy another bloody version of windows and get another licence for visual studio
i'd go with java, but not because of the cost, but because java will be the same after 3 years whereas the next versions of C# will probably blow the current version away. C# is far from being a mature language. your java knowledge today is still valid after 3 years from now. but the C# you learn today may be worth less than my posting here on slashdot.
i just recently reviewd mono on my ubuntu box, and i'm sad to say that c# doesn't impress me much. i mean it's ok but expected something much more. if it doesn't really offer anything fascinating that java already has, where's the point ?
ps. was i just lazy while reading the c# api or did i really not spot the dynamic classloaders which open a totally another dimension in java ?
Re:Just Pick One and Learn it Well (Score:5, Insightful)
The majority of the world is using that particular worthless operating system. If you program for that platform, you may want it available for testing.
i'd go with java, but not because of the cost, but because java will be the same after 3 years whereas the next versions of C# will probably blow the current version away.
Are you sure that Java never changes [sun.com]?
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:Just Pick One and Learn it Well (Score:5, Informative)
As for features that C# offers that Java doesn't... Wikipedia has a list [wikipedia.org] and links to other sites with more. Whether or not you find these features useful or painful is a matter of taste, though. Many of the features of C# were created to make Visual Basic-style GUI creation easy and painless. C# offers operator overloading, true multidimensional arrays, delegates and unsigned types. Unless you have the pleasure of running in an entirely Java/managed environment, those unsigned types are a life saver (or at least a sanity saver). Delegates (multicast function pointers) make wiring up event-based GUIs a little easier. True multidimensional arrays are either invaluable or useless, depending on the kind of software you write. Operator overloading can also be useful, provided it's used carefully (and can cause no end of confusion if it's not).
Re:Just Pick One and Learn it Well (Score:4, Insightful)
I'm pretty sure dynamic class loading has been around longer than Java, or even unchecked exceptions. So I say it would be sillier to be missing a way to dynamically load classes.
Out of curiosity, how many "major" languages have checked exceptions? Java is the only one I can think of off the top of my head.
It's been a while since I worked with Java, and I'm far from an expert. But when I was dinking around with it, I found it extremely annoying that I had to label every function that could possibly throw an exception. The compiler needed to be smart enough to detect whether a function might throw an exception, in order to tell me that I had forgotten to label it... So if the compiler can tell this without me telling it so explicitly, that pretty much relegates the label to syntax-enforced documentation.
Not to mention people got so sick of being required to write pointless code to handle pointless exceptions, that they figured out a ways to hack around it, making the checking useless:
http://www.oreillynet.com/pub/wlg/5559 [oreillynet.com]
All of that seems silly to me. But that's just MHO.
Or maybe it's not just mine. This guy, and many others, seem to agree that checked exceptions in general are kind of silly:
http://www.mindview.net/Etc/Discussions/CheckedEx
Re:Just Pick One and Learn it Well (Score:3, Insightful)
That's a grudge with developers, not the language. And that argument goes for any language. Give a lousy developer a tool and he will abuse it to no end.
Personally... I've coded both Java and C#, and to be honest.. I prefer C#. I think it's all the goods of Java plus a little nice extras.
Re:Just Pick One and Learn it Well (Score:4, Informative)
Also, it won't work whjen the comeout of the next
Express editions are NOT compatible with different
So, the first hit is free.
Re:Just Pick One and Learn it Well (Score:4, Insightful)
If you are writing enterprise scale apps, you'd be an idiot to use the express version. If you want to write enterprise scale apps, buy it from MS - what's wrong in MS demanding that you pay them for it when after all, you are trying to make money out of it?
*shakes head*
Free for the first hit? Your comparison is ridiculous - they've made it free so that you can use it for educational and non-commercial purposes. If you want to do commercial development, pay them. I see nothing wrong in that - it's the way businesses work.
But oh wait, you mean they ought to give it to you for free while you can make money out of it? Nice one, there.
Re:Just Pick One and Learn it Well (Score:5, Insightful)
That's what their competition is doing.
Re:Just Pick One and Learn it Well (Score:3, Insightful)
I know they do some funny things but still...
Re:Just Pick One and Learn it Well (Score:3, Insightful)
Re:Just Pick One and Learn it Well (Score:3, Insightful)
Re:Just Pick One and Learn it Well (Score:4, Insightful)
So? I'll learn C# off the Express version, and Java off Sun's compiler. If the company wants to use Java, good for them. If the company wants me to use Visual, let them pay for the real version, and good for them too.
I'm not seeing the problem. It's intentionally an Express version so people can learn from it for free. In a corporate environment, you pay for a proper version of Visual with better features, more optimization, real support, etc.
Visual Studio is Free! (Score:5, Informative)
Windows 2000 (or was it 2k3?)
Windows XP Pro
Microsoft Office Pro
Microsoft Visio
Microsoft Visual Studio
and something else.
Price is not an issue in this.
Re:Just Pick One and Learn it Well (Score:3, Informative)
You can download them for free here. [microsoft.com] You can also get SQL 2005 Express Edition on the same page.
Re:Just Pick One and Learn it Well (Score:3, Insightful)
If you're planning on paying money for an IDE I would recommend IntelliJ IDEA as it beats them all hands down.
Re:Just Pick One and Learn it Well (Score:5, Informative)
Re:Just Pick One and Learn it Well (Score:3, Informative)
If you're programming in Java, Eclipse's code assist can be linked to the source code and the documentation for not just the standard library but ANY library that the project uses. IIRC, you can do this with Vi
Re:Just Pick One and Learn it Well (Score:2)
Less FUD please, thanks.
Re:Just Pick One and Learn it Well (Score:5, Informative)
The biggest problem with leaning Java is the class libraries. Eclipse makes it easy to learn them, especially with the ctrl-space completion.
Re:Just Pick One and Learn it Well (Score:3, Insightful)
Re:Just Pick One and Learn it Well (Score:3, Informative)
Definitely know your job market!! (Score:5, Insightful)
This is of course coming from a recently graduated CS major, so take it for what it's worth.
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.
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.
Re:Just Pick One and Learn it Well (Score:3, Informative)
I agree.
I've been using Java since 1996, and it's served me well. But Sun are being way to proprietary about lots of bits of the language and libraries, and it isn't really an open source system. Same is true of C#, no better, not significantly worse. It's also really wrong to think of these as two different languages - they're /much/ more similar than dialects of LISP, for example.
Re:Just Pick One and Learn it Well (Score:3, Insightful)
If java were as bad as you think, it simply wouldn't be used. Not with MS trying to usurp and/or kill it at every opurtunity.
It's clear that whatever is going on with your server has everything to do with the code and not the language.
Java - Duh. (Score:2, Insightful)
If you are a Linux nut (as well you should be) then it's
gotta be Java since C# is a work of the devil.
In the end, once you know one OOP language, you know 95%
of what you need to work in any OOP language - so if you
learned Java - but needed to pick up C# or C++ or something
in the future, it wouldn't be that hard.
I guess you could do the course in C# and teach yourself
Java in parallel on your Linux box...but that's more work.
Re:Java - Duh. (Score:3, Insightful)
Exactly. And if you've intelligence greater than that of a gnat you pick the right language for the job.
Unfortunately there are the questions of support and "shop language", which will often overrule the most well reasoned case for using the best tool. I fought it a few times, ultimately losing in one costly case (costly because we eventually had to scrap the alternative and go back to what I'd argued f
Re:Java - Duh. (Score:2)
Not quite. The basic concepts are the same throughout all OO languages, of course, but the fact that Java and C# (and, to a lesser extent, C++) are so similar is - basically - that they all have a common ancestor in C, and that they also build upon each other to some extent. Other OO languages are different, though - if you have ever programmed in Smalltalk-80, for example, you'll know what I mean. (Bea
Re:Java - Duh. (Score:3, Insightful)
If you want to write okay co
Re:Java - Duh. (Score:3, Informative)
It's funny you say that, given the sprawling
emacs! (Score:3, Funny)
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.
Re:As someone who has taken both... (Score:4, Insightful)
J# == MSJava;
both -- then more -- it's fun! (Score:4, Insightful)
the field changes very quickly so if you learn to be flexible, you'll be more ready for the new languages and systems that are around a year or two after you start working too
remember -- languages and programming is fun! if it's not fun for you then you are in the wrong field and you should seriously think about that early on.
Take whichever one... (Score:5, Insightful)
Cheers,
b&
Re:Take whichever one... (Score:5, Funny)
Java. (Score:5, Insightful)
The advantage of Java in my mind is that it can be used in a Linux environment where you will be forced to understand the "application creation" process from top to bottom, as opposed to a Window environment where you just write the code and let the OS and the tools provided do all the other work for you.
Learning a new language is trivial. Make sure that you understand the CONCEPTS of coding.
Re:Java. (Score:2)
Re:Java. (Score:5, Interesting)
Re:Java./ CS ~= computer programming (Score:4, Funny)
You must be new here. Math is a subset of Computer Science.
Either will be fine... (Score:2, Insightful)
Java -- move on to C++ (Score:2, Insightful)
It doesn't matter too much (Score:5, Informative)
The language (whether C# or Java) is just how you express what it is you're trying to accomplish.
Now - With all that said: I'd take Java, for one simple reason: It's been around longer and there are more free resources out there to help you with it.
But remember - as much as 90% of what you learn in Java will apply to C# and vice versa, as long as you focus on the base language (and not API's like SWT, Swing, or WinForms).
If you are at DeVry (Score:4, Funny)
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.
Re:If you are at DeVry (Score:3, Informative)
CIS majors don't deal with embedded microprocessor programming.
That's brilliant. You completely defeated the insult. Well done.
Why not... (Score:2)
Re:Why not... (Score:2)
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.
Re:Java is more credible as a cross platform langu (Score:2, 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
Instructors Are What Matters (Score:5, Insightful)
What are the instructors like? That should matter more.
A class at that level is supposed to be about some "concept". Either OOP, or databases, or design, or algorithms... If the class is JUST about the language/platform, then don't even bother taking the class. Unless you have some industry/job specific need to learn a language, then I would avoid it.
Some instructors end up getting bogged down in platform specific issues. For example, ADO when the course should instead be about databases.
So, I'd figure out which instructor will offer the most conceptual learning. Language doesn't matter... unless the FCC is involved. Learn concepts, theory, good practices, etc.
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.
Hard decicision..... (Score:2)
Target? (Score:2)
Irrelevant. (Score:2)
Learning a programming language. (Score:3, Insightful)
You can learn the latest fad programming language and keep it on your resume' for a 10+, (Java),20+ (C, C++), or 50 (COBOL) year lifespan, but why must it be one-or-the-other?
Every program in a programming language has its purpose; to get system to behave in a certain way in a finite number of steps. School is there to teach you the fundamentals; that you can use as a basis to expand your knowledge with new knowledge, and get a feel for the idioms and syntax. Ask not what language to learn, but what can you do with the language.
For you, special price! (Score:2)
Learn the one which you have access to the most resources right now. You'd want to be able to ramp quickly with a good tutor, intersting project and common crowd. In the future, you can cut your own way, given the company you want to work for.
Interesting companies in all sectors are hiring both types of programmers, so ignore the scare of vendor lock. Rather than product, try to know either one *deeply* right now. Both platforms are intricate and demand quite a bit of ramp.
And for god's sake man
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).
I would definitly choose Java, but..... (Score:2, Troll)
Learn the concepts not the Language. (Score:2, Informative)
it all comes down to the resume (Score:4, Insightful)
Learn "PHB" or other "Business-speak" language (Score:2)
Tough choice (Score:2)
Personally I would choose Java but perhaps that's because I ahve made a good living from knowing Java. I don't see either Java or C# really having much impact in Linux anytime soon. Java has issues with deployment in almost every distribution and Mono just isn't there yet.
It doesn't matter. (Score:3, Insightful)
Languages mean nothing. If you're still stuck on only knowing some languages, you have a lot more to learn than OO concepts.
Java. (Score:2, Insightful)
With Java you can take your code anywhere. As the first widely adopted VM standard, Java is now taught in universities instead of C++ (and certainly C# isn't **widely** used in academia - MS nuts, not
Re:Java. (Score:3, Insightful)
How does using Mono and Gnome lock me into Microsoft?
The lock-in that has caused problems for me is lock-in into Java: Sun's J2SE implementation has caused me numerous problems, there is no sensible alternative, Sun's willingness to fix bugs has been poor, and since it's closed source, there is no way of fixing it.
Re:Java. (Score:3, Informative)
In summary, it is indeed patented, but also standardized. As a result, licenses must be given on a reasonable and nondiscriminatory manner. That means they can't decide who gets to have a license and the license terms have to be the same for everyone. Furthermore, they have to follow ISO and ECMA's licensing rules, which prevents overly constrictive licensing. Furthermore, the companies involved have agreed to provide the licenses on a royalty free basis
Re:Java. (Score:3, Informative)
So
The
Re:Java. (Score:3, Insightful)
If the name "Microsoft" leaves too much of a bad taste in your mouth for you to actually consider what's a better choice, you're not an engineer--you're a zealot.
Only Java if it's Java 5 (Score:3, Insightful)
it doesn't really matter. (Score:2)
Java is cross-platform so go with that (Score:2)
OO is overrated. (Score:4, Funny)
Wish I got to use C# instead (Score:3, Informative)
C# has goto, unsigned data types, all data types treated as objects,
It already wins in my book.
Unless I could choose Python instead. :D
Obviously learn Java (Score:3, Informative)
I'm assuming you're more productive with Linux than Windows. Since you're a student, it seems obvious to me that you should learn Java. Why? Because it's easier to develop (and compile) Java code on a linux machine than it is to develop (and compile!) C# code on a linux machine. I'm assuming you want to be sitting at a linux box when doing your assignments (whether at home or in the computer lab), since you'll be more productive, and can concentrate on programming rather than on the idiosyncrasies of the OS/GUI you are using.
Purely to make this learning experience as fruitful as possible, I recommend sticking with Java on Linux. In the future, support for C# coding on Linux may be better... but you need to learn now!
Re:Obviously learn Java (Score:3, Insightful)
I also learned to code under unix, starting with c/c++ and eventually picking up bash, perl, etc. In college, I
C# (Score:5, Insightful)
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
I don't want to sound facetious... (Score:3, Insightful)
Java at Job Fare (Score:5, Interesting)
It's Obvious (Score:3, Insightful)
Really it doesn't matter. Anyone I would hire I would expect to be able to pick up a language and be good with it in a few weeks, including the general libraries, etc.
which language? (Score:5, Funny)
If all the complaints here about outsourcing are correct, rather than Java or C# you should learn Hindi.
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(!)
Language? (Score:4, Insightful)
You should be able to program in any language.
The right question is to ask what systems you should be learning? What problem solving techniques should you be studying? What software engineering technique is approriate to use?
You should be able to pick up any language on the fly. Languages are a dime a dozen. Systems such as database systems, operating systems and graphic systems are dramatically different. What language you use to access them is immaterial or should be. If you understand the internal workings of a database you'll be far better served when developing database applications then spending time studying the intricacies of a language. Use what you need. It's silly to become familiar with all aspects of a language when you are only called upon to use 10% or 20% within the scope of a project.
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...
best ide and either c# or java (Score:3, Insightful)
Open source ide for java: for all platforms either eclipse or netbeans.
Question of c# or java: really there is not much difference between c# and java, just like comparing a brand of apples as opposed to apples and oranges. Really the decision is do you want to be in the microsoft world or not. If not stick to java. If you do stick to microsoft - hope they do not change direction in the future.....
DeVry: it's not the teachers, it's the students. (Score:3, Funny)
The better course of action is to transfer your credits to a university that has more women attending.
Re:Diehard Linux user? (Score:5, Insightful)
No. No you should not.
Re:Neither! (Score:2)
Rich.
Re:Neither! (Score:2)
Re:which to choose (Score:2)
Re:Java in school C# at work (Score:2)
Re:Java.. (Score:5, Informative)
The exact opposite, actually. .NET has an excellent framework for web services.