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 :)"
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.
which to choose (Score:1, Insightful)
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&
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.
Either will be fine... (Score:2, Insightful)
Java -- move on to C++ (Score:2, Insightful)
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.
Re:Just Pick One and Learn it Well (Score:4, Insightful)
visual studio which will cost you a fortune
Come again? [microsoft.com]
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 for in the first place.)
When it's your own box, choose wisely, not fasionably.
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.
Re:Diehard Linux user? (Score:5, Insightful)
No. No you should not.
it all comes down to the resume (Score:4, Insightful)
Re:Java - Duh. (Score:3, Insightful)
If you want to write okay code that works, VB-style, go with C#/.NET. Microsoft tends to slap together code in any way that works, without much thought to good design... or rather they just don't know good design (they have no sense of taste). You'll see a lot of marketing-inspired APIs and code that behaves strangely because it is tied to their old Win32 apis. But, your results will work better on Windows.
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.
Learn Smalltalk (Score:1, Insightful)
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, notice the asterisks before flaming). Basically this adds up critical mass. The language is never going away. And because of its unique properties I predict it will have more staying power than most other languages. People will be porting that VM when we're all dead.
Java is well specified and unencumbered. Even the source of Sun's VM is available (though not under the GPL, at least you can read it, see what's going on in the VM, and fix bugs), and there are Gnu implementations that are farther along already than Mono - and I doubt Mono will catch up.
Based purely on raw numbers of job offers, if you're looking to make money off this skill you would be flipping crazy to learn C#... although OTOH once you know one, the other won't be too difficult.
C# people claim their language is "better." I've used both - C# is not better enough to justify the baggage of being locked into the world's most notorious vendor. In many cases the supposed advantages of C# are a wash or even bad ideas - such as their pointless and absurd practice of mixing VM and non-VM code at every opportunity, and allowing unsafe code to be mixed in... Thus eliminating the boundaries on the well-defined, well-tested native stack and ruining most of the advantages of a VM while keeping most of its disadvantages.
C# people claim their runtime is language agnostic. It is not. It's C* agnostic. Any language significantly different from a C/C++/Java-like language can't be supported efficiently. No surprise there.
I don't expect Mono to succeed even in its modest promises, although if they do, they may wish they didn't. Perhaps their best path will be to stop trying to be compatible and diverge into a kind of "dirty
Only Java if it's Java 5 (Score:3, Insightful)
Re:As someone who has taken both... (Score:4, Insightful)
J# == MSJava;
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 ?
Client or server side software? (Score:2, Insightful)
Re:Just Pick One and Learn it Well (Score:1, Insightful)
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.
C# (Score:-1, Insightful)
DUHvry (Score:2, Insightful)
Re:Java is more credible as a cross platform langu (Score:2, Insightful)
-Mark
C# (Score:5, Insightful)
I don't want to sound facetious... (Score:3, Insightful)
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.
Re:Neither! (Score:1, Insightful)
If you're serious about programming after you graduate then my advice is to expose yourself to as many different programming languages as you can and becoming as close to an expert as possible in at least one. OCaml is a great language to learn but the learning curve is pretty steep. Lisp is also worth learning, for reasons that Eric Raymond has already stated. And then learning Perl, Python or Ruby is great when you want to write a short program quickly. So since you'll probably be looking for a job after you graduate, one idea is to take a class in Java/C# from the better professor, learn it well, and check out the languages mentioned above.
Also remember that once you're on the job you're going to be putting in a lot of hours on a single language, so you'll want to get as much breadth as you can now because you'll be getting the depth later.
Both -- but Java first (Score:2, Insightful)
Really, I'd concentrate on four languages, C++, C#, Java, and a good scripting language (Python, Ruby, try to avoid PHP)
Also take a parallel/distributed computing class. Having a firm grasp on the concepts of parallel processing, network communication, and distributed processes is key to understanding how a lot of computer systems interact and work together. It is also *very* handy when you are debugging an application because you learn to think in a non-linear fashion and will thus pick up on subtle programming errors more quickly.
Language is only a tool... (Score:1, Insightful)
1. You need to know OOP concepts.
2. You need to know non-OOP concepts so as to know whether and when to use them.
3. You need to know design patterns.
4. You need to be able to come with solutions quickly because problems keep arising all the time in software development. In these cases, language will not matter. Your company may have already chosen a language or it may not have. Perhaps your solution will cause them to change the language.
5. You need to be able to come up with good solution quickly. What is good will only be defined by the needs.
Also, the choice of a language depends upon what you want to do. If you want to do corporate programming (following methodologies, creating audit trails, following procedures, and then doing programming) then either C# or Java is good for you. However, if you want to do programming for pleasure, C and C++ will be good.
C++ is a world waiting to be explored. Java and C# are tame animals. Everyday you will find something new and unexpected in C++. Compared to C# or Java, C++ takes longer to master. This means that once you have climbed the mountain of C++, other languages will be minor obstacles.
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:As someone who has taken both... (Score:1, Insightful)
So, if you are really learning C#, then that is fine. However, if you are learning all about how to use the Visual Studio UI, and memorising the WinForms class structure, then it is not such an appealing option.
Re:Java is more credible as a cross platform langu (Score:2, Insightful)
I've already found it's ability to use libraries from multiple sources very helpful, I've used a DLL written in VS .NET 2003 that had no consideration for Linux yet it works perfectly. Mono also allows you to run Java [mono-project.com] code in the Mono environment but also allows you to use the .NET stuff (and other code you write in C# etc) in Java! That flexibility to me is very impressive, it's well worth checking out.
As for the main topic, both C# and Java are just languages. Programming is a lot about knowing how to think about a problem rather than the actual syntax. If you can conceptualise how to tackle a problem in a programmatic way that's half the job of a programmer. Learning the language itself is a secondary task and you can pickup a working knowledge of most languages within a few days.
Don't limit yourself to just one language to be an expert in, it'll limit your ability to be employed down the track. Looking at C# and Java however are good choices, if you know how to program in C you'll wonder why it took you so long!
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 thought linux was the shit, and I was going to focus my career specifically on unix development. I scorned windows-weenies (well, I still do that, heh), and assumed that the unix development environment was god's gift to programmers.
After graduation, I picked up a job software engineering. The firm I worked for had a variety of clients with different platform and language requirements, and although I assumed I would be doing unix coding, guess what team I ended up on? That's right, a C# project for XP. I spent the first month cursing the Windows programming paradigm, then the second month struggling to re-adjust to OOP. By the third month, I thought C# was pretty cool, and I was about ready to sign my soul over to satan... ok, so I wasn't a
I quit that job awhile back and now I write audio processing software in C++ for OSX and Windows. Linux is pretty much worththess as far as audio and music applications go (imho), so the closest I get to pure unix programming is busting out the occaisional '#include <unistd.h>' in a carbon application. I still prefer unix development under OSX to visual studio, but after all of the above struggle, I can say that I'm sufficiently comfortable developing and porting under Windows as well.
So, the point of the story is that when you're in school, it's better to take classes in things that you don't know about, instead of just picking up easy A's in classes that you don't have to sweat as much in. You'll thank yourself later, and even if you don't immediately use the stuff that you learn, it's useful to know how to adapt to foreign development languages and environments. Doing this in college is pretty non-consequential... if you don't get the hang of it right away, then you get a bad grade and a miserable semester. If you don't catch on in the real world, it could mean weeks of lost time, bad reviews, and most importantly, unhappiness at your job.
And we all know how much that sucks.
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: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, Insightful)
That's what their competition is doing.
Re:Java. (Score:1, Insightful)
C# is an official ECMA standard [ecma-international.org], Java is not. So tell me again who can more easily take their toys and go home?
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.
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: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: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.
Re:Just Pick One and Learn it Well (Score:3, Insightful)
On balance if I had to go for one, and really couldn't use Python, I'd learn Java.
Re:Just Pick One and Learn it Well (Score:3, Insightful)
Also, Eclipse provides support for automating repetitive tasks, such as renaming things or moving classes into new packages. These tasks are conceptually simple, yet you'd have me do them in a text editor, making perhaps hundreds of changes by hand. Eclipse can do it automatically, and it's basically flawless, since the change is made through knowledge of the compiled strucutre, so it has to be correct.
Also, Eclipse can tell me if there are syntax errors in my file as I type them. That saves a lot of time because I can fix things as I go. It's not like MS Word's spell-check-as-you-go... in a programming language if the syntax-check-as-you-go says it's wrong, it's wrong.
As for wizards, I rarely use them, but every tool has its place. Do you also code your own RMI stubs or have you given in to using the code generator for that?
Re:Just Pick One and Learn it Well (Score:2, Insightful)
Real problem is that many IDE's are itself buggy or just not intuitive at all. And many make dramatic changes between versions.
Just image you're doing J2EE application on two or three application serves, and each of them have their own IDE that it is integrated to it. Then imagine you need to do bits PHP, C++ and
In one project, great problem what a buggy IDE version on all team members computers, that caused allkinds of confusion that slowed us down and frustated us.
And I do agree that when learning things, use text editos first.
And I do agree that I wouldn't like to do everything by hand, like writing all XML settings to some application servers Enterprise bean's description file.
But, one shouldn't be dependant of IDE, it just should help to do faster things you already know how to do, not replace the knowledge. If IDE stops working, then you know what to do, one shouldn't be dependant on IDE in any case.
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.
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.....
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: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.
.Net Needed (Score:2, Insightful)
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.