Learning Java or C# as a Next Language?
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, 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 :)"
Cool! Language Wars. Let loose the flaming trolls!!
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.
www.sjbaker.org
It really doesn't make a difference
just pick one, and then learn the other on your own. don't fool yourself into thinking that one will be more important by the time you graduate.
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.
...is being taught by a better professor.
Cheers,
b&
All but God can prove this sentence true.
Learn Java. And try to use it in the Linux environment. Basically, what is important here is not the fact that you are going to learn a certain language, but that you will learn how to write object oriented code. Once you learn that, you can pick up c#, c++, etc.
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.
But C# and .NET might open more doors for you. Java has done a good job catching up to new features in C#, so learning C# will help you with Java as well. There is a fairly strong market (trying to hire someone right now) for good C# people, and not a lot of canidates.
Well, I would suggest learning Java and the basic concepts of OOP. Once you are comfortable, I would suggest learning C++ and doing the memory management/Garbage collection work yourself, if your intentions are for knowledge rather than just a shortcut to a fat paycheck.
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.
"If you want to improve, be content to be thought foolish and stupid." - Epictetus
visual studio which will cost you a fortune
Come again?
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.
No. No you should not.
You're going to learn the same programming concepts in either course? Then at the risk of sounding a bit cynical, pick the one you would rather have on your resume. That's really the only difference here.
The only thing that matters are the concepts. Take it in Modula-2 or C++ or Delphi or Eiffel, but learn the object concepts.
Languages mean nothing. If you're still stuck on only knowing some languages, you have a lot more to learn than OO concepts.
--
Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
Go to the start of it all and really learn objects and messages in a full object system. Download a version of Smalltalk for free from http://www.smalltalk.org/versions.
There is no future in C#, because it's Microsoft's toy, and it will always be Microsoft's toy. If they want they can take it and go home. When MS decides its time to stop, as they did for many of their other much vaunted initiatives, then that's it, your party is over. Yes, I know about Mono. It doesn't matter.
.NET"... All fun and games until MS sues them. And if you dismiss this as a conspiracy theory... and go to embrace the patented, "standardized" platform of the people who financed SCO anyway... you will certainly get what's coming to you, eventually.
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
Tired of Political Trolls? Opt Out!
The language changes in Java 5 are sufficiently significant that they eliminate most of the ways Java was awkward up to that point. Actually using the earlier versions involves a whole lot of annoying kludges which make it unnecessarily hard to learn and use. I think that Java is a better design overall, but they're similar enough that you may as well learn whichever has a more expressive version being taught at your school.
C# != MSJava;
J# == MSJava;
Viable Slashdot alternatives: https://pipedot.org/ and http://soylentnews.org/
wow, visual studio for free for one year man ... what should i do after 366 days ?
... "dam this is cheap ..."
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 ?
I'd tell you the chances of this story being a dupe, but you wouldn't like it.
Depending on what kind of software you want to write, and for which platform, you might want to factor in whether you are going to develop client-side or server-side software. My personal opinion is that very few Java based client application feel native to any environment. A java client application looks "java" like. So if you are aiming for Windows client side applications, C# is probably a better choice for the future. If you're aiming server side, and you are already "invested" in Linux/Unix server systems, Java is probably a better choice right now.
Your reading comprehension is rather low (though the fact that you can't even capitalize is a hint). If you could read, you'd realize that it is free to download for 1 year. If you download it for free, you keep it for free, for as long as you like. After 1 year, Microsoft (may) start charging a small amount for it, about the cost of 1 game.
I know Java and am fairly comfortable with C# as well, yet I put 90% of my effort into Java and C because my job market, Northern Virginia, relies heavily on federal contract work which is almost always standardized on J2EE. Be practical. If your area is very pro-Microsoft, don't waste your time with Java because it will make you less marketable. Focus your time instead on learning good OOP practices, take a few CS courses on things like data structures and algorithms and you'll be set.
This is of course coming from a recently graduated CS major, so take it for what it's worth.
Click here or a puppy gets stomped!
I'm on my last term at DeVry West Hills on the NCM program. Honestly, my experience with DeVry, I didnt learn anything. I've learned more on my own and in the workplace and getting paid for it rather than paying at least $50k for tuition and not learning anything. The tuition keeps getting raised every semester. When I started 2 1/2 years ago the tuition was at $240 per unit, now its at $460 per unit. The professors there are horrible (except for one teacher whos the only one i respect). My advice: Bail out on DUH-Vry as soon as you can and go to a different school... before they raise tuition again. You're better off taking your programming classes at a junior college.
Maybe, but Java has been there many yearslonger than C#, just the fact that people start compairing means enough I would say. C# is getting a bigger language.
-Mark
Most people will probably say learn Java, particularly on /.. Java programmers are extremely common. The company I work for had a hell of a time hiring a C# developer with any experience. .NET is the future of development on any MS platform. For an entry level position, if you're looking for jobs, I don't think it will matter, but smaller shops are not going to want to spend the time for you to get familiar with the nuances of whatever language they are using. I think that C# has a larger potential for quick rewards right now since there are so few programmers compared to a rising demand. In the long run, though, I don't think it will make much different and the two are similar in most aspects.
but I would pick Python... but if you really have to, then Java... the whole point of this course is not that you are learning a programming language... but that you are learning the fundamentals of Object Oriented Programming. The language is a means to an end... just think yourself lucky... I had to suffer Eiffel on my OOP course
Donald 'Duck' Dunn: We had a band powerful enough to turn goat piss into gasoline.
Obviously you're going to DeVry not because of your passion for mathmatics and computer science but because you want to learn how to program and try and get a job being a programmer. For this reason alone I would pick up C# as there is a ton of market opportunities for C# programmers right now.
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.
"If you are a dreamer, a wisher, a liar, A hope-er, a pray-er, a magic bean buyer
As someone who graduated from DeVry with a degree in CIS four years ago I'll add my two cents. Java and C# are close enough that it would be wise to take the language that is taught by the better professor (the slave driver type, if possible). If you know one, it won't be too tough moving to another. For instance, I know Perl pretty well. When I wanted to learn Ruby, it only took me a few hours to translate a 500 line Perl program to Ruby. I can't imagine the Java/C# situation is radically different.
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.
Make yourself more hire-able, learn both. Start with Java though, you can learn it in a familiar environment (linux) easily.
:-)
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.
I am currently working in C# so biased towards it. I would say go for any language, but that's not the end of it. Use the language as a tool. There are several things you will need to learn in order to be a better programmer/software engineer/corporate person. ...
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.
and did you forget that i have to buy an entire worthless operating system just to run this damn visual studio ?
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?
It also depends whether they are really teaching C# (the language) or .NET (the framework). I took a "GUI programming with C++" class years ago, and basically all it involved was learning how to use the Visual C++ 4.0 GUI and memorising the MFC class structure. There was little discussion of basic GUI principles, and no discussion of alternatives to MFC.
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.
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 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!
www.techwatch.com.au
I think if anything, this is a better argument for learning C# on a Windows environment. It's all about diversification, man... if you keep sticking to what you know, you'll put yourself into a corner, and it will make it harder for you to branch out later. And, as a superficial bonus, the more points like this you have on your resumé, the better it will look to a potential hiring officer.
.NET fanatic, but still, I think that C# is a more elegantly designed language than Java.
:)
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.
"Quoting famous computer scientists out of context is the root of all evil (or at least most of it) in programming." - K
He's learning the language, not using it for writing enterprise scale apps. There is a difference.
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.
I downloaded Visual C# Express just to check it out and it's safe to say that it isn't anywhere near the same level as Eclipse or Netbeans. Furthermore, if there's something that Eclipse or Netbeans doesn't do that you would like it to, there's most likely already a plug-in available that does just that. If not plug-ins for both IDE's are extremely simple to make.
If you're planning on paying money for an IDE I would recommend IntelliJ IDEA as it beats them all hands down.
"A Lisp programmer knows the value of everything, but the cost of nothing." - Alan Perlis
But oh wait, you mean they ought to give it to you for free while you can make money out of it?
That's what their competition is doing.
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.
You mean Sun isn't a business?
I know they do some funny things but still...
I hereby inform you that I have NOT been required to provide any decryption keys.
Apple's not a business? http://www.apple.com/macosx/features/xcode/
Shop as usual. And avoid panic buying.
And your reading cmomprehension is also pretty low. It is for the express version; For practical reasons, it is useless for the professional evironment.
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.
But the question isn't one of whether Microsoft is right to charge for C#. It's one of given the choice of something to learn, which do you pick. The one that's free forever, or the one that's free for a year. The one that has future cost imlications would have to be significatly superior to justify that. Now I'm fairly agnostic on that, my platform of choice these days is Python. But one thisng Java has going for it is that it is truly platform independant. C#, despite the best efforts of monad to fill all the gaps that aren't Windows, isn't. It's a proprietary platform for a single system.
On balance if I had to go for one, and really couldn't use Python, I'd learn Java.
I guess I'm not exactly clear on how using an IDE that auto-completes stuff means the programmer understands less. I've coded tons in IDEs that did squat, and in text editors, and you'll have to pry my copy of Eclipse out of my cold dead fingers. There's no way I'd want to go back to having to remember every single method of every class again, considering that in a class library as large as Java's, plus all the third-party libs, there's bound to be methods that don't conform to naming conventions. I don't need to remember if the Foo class has a getId or getID method; Eclipse will tell me. But I do need to know what that method does.
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?
Well, there allkinds of IDE's and my opionions one good should suffice for all. I use Eclipse and hope it developes to be that one.
.NET, and each of those you need second set of editors. Soon you're owner of many editors, which each excel something other doesn't. And a guinea pig for new versions of IDE's from the software vendors or programmers.
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.
Nobody knows the trouble I've seen, nobody knows has the trouble seen me, even I sometimes wonder why I write these line
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.
Open source ide for c#: windows (sharpdevelop) , on linux (monodevelop), on mac (monodevelop).
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.....
"It'd be pretty silly to be missing something like dlopen or LoadLibrary..." Just like missing checked exceptions? Yeah that would be silly.
c eptions
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
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
Between learning C# and Java, I would choose C#. I recuit software engineers and 90% of the positions we are looking for desire experience with C#/.Net. The demand for C# programmers doesn't seem to be slowing down any time soon.
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.
Not Buzzword 2.0 compliant. Please speak english.