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

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

    1. Re:Just Pick One and Learn it Well by theGeekDude · · Score: 5, Informative

      Well if you choose Java, then you can use free Eclipse IDE which is excellent. Otherwise if you choose c#, the ony decent ide is visual studio which will cost you a fortune.

      --
      Dont waste you time reading stupid sigs like this.
    2. Re:Just Pick One and Learn it Well by Trepalium · · Score: 5, Informative
      Yes, you were just lazy. They're called assemblies in C#, and you can dynamically load them via the System.Reflection.Assembly.Load() method. It'd be pretty silly to be missing something like dlopen or LoadLibrary in C#, wouldn't it? You typically have to combine that with an application domain so you can unload the assemblies.

      .Net's reflection capabilities are quite a bit more extensive than Java's (there is native support for outputting byte-code and even entire classes at run time). If you want to pick on C#/.Net, pick on it's limited exception handling (unchecked exception handling only makes 'black box' use of objects more difficult), or simply the fact that C#'s feature set is obviously derived from Java.

      As for features that C# offers that Java doesn't... Wikipedia has a list 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).

      --
      I used up all my sick days, so I'm calling in dead.
  2. Take whichever one... by TrumpetPower! · · Score: 5, Insightful

    ...is being taught by a better professor.

    Cheers,

    b&

    --
    All but God can prove this sentence true.
    1. Re:Take whichever one... by breckinshire · · Score: 5, Funny

      Has more ladies! Oww!

  3. Java. by dan_sdot · · Score: 5, Insightful

    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.

    1. 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.
  4. Instructors Are What Matters by moehoward · · 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.

    --
    "If you want to improve, be content to be thought foolish and stupid." - Epictetus
  5. Re:Diehard Linux user? by Anonymous Coward · · Score: 5, Insightful
    If you're a "diehard Linux user," shouldn't you already know Java?

    No. No you should not.

  6. Definitely know your job market!! by ShatteredDream · · Score: 5, Insightful

    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.

  7. C# by Unnngh! · · Score: 5, Insightful

    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.

  8. 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#.

  9. Visual Studio is Free! by MBCook · · Score: 5, Informative

    It doesn't matter. As a DeVry student he gets a free software bundle that includes:

    Windows 2000 (or was it 2k3?)
    Windows XP Pro
    Microsoft Office Pro
    Microsoft Visio
    Microsoft Visual Studio .NET
    and something else.

    Price is not an issue in this.

    --
    Comment forecast: Bits of genius surrounded by a sea of mediocrity.
  10. which language? by belmolis · · Score: 5, Funny

    If all the complaints here about outsourcing are correct, rather than Java or C# you should learn Hindi.

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