Slashdot Mirror


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 :)"

12 of 817 comments (clear)

  1. Just Pick One and Learn it Well by byteCoder · · Score: 5, Interesting

    For an object-oriented programming language, either C# or Java will be fine. Once you learn the language of one well, you'll be able to quickly learn the simple syntactical differences and nuances when you transfer to the other. The harder (in a relative sense) thing is to learn the class libraries and how to make use of the classes and methods to write your programs. Fortunately, again, there are similarities between the two. When coupled with a good intellisense-style editor, you'll be able to move from one to the other fairly readily, I would think. My advice is to just pick one and learn it well--learning the other at a future time should be a snap. As far as post-college job opportunities, corporations use both (but each corporation tends to focus on one or the other). Perhaps you should do a little local research to see which language/class library is in more demand where you live. I have plenty of consulting friends in the Minneapolis/St. Paul area that focus on each and who are all gainfully under contract (although C# experts are in slightly more demand and can get higher bill rates, unless you're a J2EE expert). For the long term, technologies will change and evolve. Learn the commonalities and the differences between the two and continually re-apply what you know when confronted with new technologies. Be adapable.

  2. As someone who has taken both... by TheSpoom · · Score: 3, Interesting

    C# == MS Java.

    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.

    --
    It's better to vote for what you want and not get it than to vote for what you don't want and get it.
    - E. Debs
  3. EIther is fine by Rycross · · Score: 4, Interesting

    I learned Java my freshman year of college. Once I graduated, I worked with C# professionally and found the switch fairly easy. I found the transition from C# back to Java for a recent project fairly easy too. They have very similar syntaxes, and both have ample documentation for their standard libraries, so learning one will make learning the other easier.

    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).

  4. Re:Java. by b17bmbr · · Score: 5, Interesting

    I teach the AP comp sci class at my high school. I stress repeatedly that they need to learn to program first, then do it in java second. I always show them examples with python, perl, php, even c, for comparison. Learning good programming techniques is entirely different from "learning (programming language)". It's like the debate over editors, ide's, whatever, it's the best tool for the job. Me, I like java for lots of things. But I also do alot with LAMP and the same concepts apply. Whether its branching, security, speed, or features, I always design first, code second. I can never emphasize that enough with my class.

    --
    My problem? I was perfectly gruntled, until some numbnuts came by and dissed me.
  5. Java at Job Fare by chiok · · Score: 5, Interesting

    Last February I was at a job fare without knowing either Java or C# and just about everyone hiring programmers at the booths told me they'd hire me if I had some Java background. No one mentioned C#.

  6. My two cents... by Savage-Rabbit · · Score: 4, 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?

    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 .NET implementations for the various OS'es will be developed by different parties (Microsoft, Nowell/Ximian etc...) rather than a being largely developed and/or coordinated by one party (Sun) like Java plus I wouldn't put it past Microsoft to use dirty tricks to make sure that .NET will always be more stable on Windows than other platforms.

    --
    Only to idiots, are orders laws.
    -- Henning von Tresckow
  7. It's good advice... by Da+VinMan · · Score: 4, Interesting

    I've got 8+ years MS tools based experience and 2+ years with Java (and some Python and Ruby thrown in for good measure), and I would totally agree. Neither C# or Java is perfect. They're both strongly typed, proprietary, virtual machine environments. Neither one is true open source (despite the rich set of open source applications developing around both). And neither one is appreciably better or more powerful than the other across the board.

    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. .NET is not a real technical barrier; just a cultural one.

    --
    Please mod this post only if you think others should/n't read this. I have enough ego^H^H^Hkarma. Thanks!
  8. Go Java, C# is mostly popular because of the IDE by scarlac · · Score: 3, Interesting

    Like many others, I would just clearify on the differences, and un-bloat the comments made by many people that don't really seem to get what they are recommending.

    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 .NET (afaik).
    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 .NET, and they like the framework.

    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 /really/ bad because of the lack a solid, fast IDE and an integrated windows look. If Java had just has a smoother windows integration, C# wouldn't have had a real chance.
    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(!)

  9. Re:If you are at DeVry by StarWreck · · Score: 5, Interesting
    Then I would pick whatever is used for french fry machines.
    CIS majors don't deal with embedded microprocessor programming. CET and EET majors deal with that type of programming. You can use a variety of languages to program the microcontroller in a french fry machine depending on which microcontroller you use and which development platform you use to load your program onto the processor; whether its Motorola/Freescale, Zialog, Intel, or PIC.

    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.pdf

    Oh yeah, I did this entire project at DeVry.
    --
    ... and in the DRM, bind them.
  10. this is better and runs anywhere by namekuseijin · · Score: 3, Interesting

    Learn Python, instead.

    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 .NET CLR ( IronPython implementation ) and the JVM ( Jython implementation ).

    Yes, you'll be able to transparently handle java or .net objects from it...

    Programming in C# or java feels like programming in assembly, comparatively...

    --
    I don't feel like it...
  11. Re:Definitely know your job market!! by tyler_larson · · Score: 4, Interesting
    Where I'm from, the Java market is nearly nil. The only reason I bothered to learn it was for development of cellphone games with J2ME. On the other hand, I didn't at all like the idea of learning .NET; I had thought that it was all a gimmick that would pass. But I had to learn because of the market demand.

    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.

    --
    "With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea...."
    RFC 1925
  12. Re:C# by leabre · · Score: 3, Interesting

    I forgot to say, when it comes to culture, I, by far, prefer working with Microsot programmers (.NET/C++/VB) becuase of their general attitude. In the many places I've worked and consulted, they generally (not as a rule of thumb) want to learn more, be good like that Java guys (there's a weird perception at play here) and are open to new ideas and not generally zealous and anti-linux or anti-oss.

    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