Programming - C# vs Java

C# is the way to go IMO. From there, Java is easy to pick up. Very similar. C# more feature rich though.

In time you well be able to pickup and run with most languages. I have been coding for 25 years now and find it very easy to pickup on different languages.
 
Not quite sure what exactly you mean by this.
In a broad "feature richness" Java and the libraries used with it are MILES ahead of C#

Well 2 things hit me hard when doing Java. C# is my primary language so way more fluent in it.
1. LINQ.
2. Poor implementation of generics and anonymous types.

Just the 2 points above make a big difference to a developers life. I am used to them in C# now and feel pain when I have to code in Java.

I am not a fanboy BTW. I use whatever language is required for the job.
I feel like I have been put in a box when I code in Java. "Old ways" of doing things in C# is how I feel Java is. C# has evolved in a huge way.

Are you making your statement from a fanboy point of view or do you actually code in both? If you code in both can you clarify why Java is miles ahead. I am happy to make Java my primary language if this is indeed the case.
 
it is hard to quantify. I think my statement was to blanket too.

When we talk about a programming language, are we really just talking about the core language constructs, or do we include the frameworks and communities surrounding these. I suppose we are looking with the intention of choosing the best tool for the job, then the later is a better evaluator
 
it is hard to quantify. I think my statement was to blanket too.

When we talk about a programming language, are we really just talking about the core language constructs, or do we include the frameworks and communities surrounding these. I suppose we are looking with the intention of choosing the best tool for the job, then the later is a better evaluator

Agreed. The best tool for the job is the correct way to approach it. Being a fanboy only limits ones self IMO.
Honestly though, Java or C# is a good starting point for a n00b dev as you can jump between them rather easily as soon as you have one of them down. There do seem to be more juniour C# positions available though?

I come from a C++ background so C# was my natural choice when it came time to move on. Because of my C++ and C# background, I found Java pretty easy to pickup when I had to use it. Just a little limited compared to what I am used to. But all three have a lot of similarities.
 
C# has a number of features that really make the language easy to use. As a platform, in terms of application/server development, I dont know enough about the Java world to know whether they are equivalent. But I assume they are - I hear good things about Spring, Glassfish, Tomcat etc.

As for language features, C# has:
1. Properties. No more setInt() or getInt() polluting your class. So much easier! Why Java doesnt already have this is beyond me. It sounds simple, but it makes a world of difference.
2. Lambda expressions: very simple and intuitive method for basic set operations. Yes, they are not quick to execute, but very useful.
 
that C# Properties is quite interesting, from my 5 minutes of googling :)
I like the way you can quickly infer, with the auto-implemented properties, what is readonly, etc is quite nice

Code:
public class Customer
{
    public int ID { get; }
    public string Name { get; set; }
}
 
They are great! The old fashioned way of doing it involved you creating your own private variable to store the actual value, and then a property to act as an accessor. The new fashioned way, as you posted above, does that in one step, although the old fashioned way is useful if you have any complicated logic. For instance you might only want to instantiate it the first time it is used, so you check to see if the private variable is null and instantiate it if it is. I suppose its exactly the same kind of code that you could have in a getInt() method, just cleaner to implement and use.
 
While in University I would have agreed with most of you.

However now that I have experience as a Java developer I can tell you:
Experience is incredible important, the principles are easy to pick-up, learn and remember. Without them you would be completely lost but don't think that is all that matters. Not by a long shot.

Forget about "hardcore" and all that crap you hear about C++, C++ developers love going on about how "hardcore" C++ is but I've worked on C++ application and they were very simple in reality.

I'd happily go back to thinking that having to deal with memory allocation is complex. Or that understanding and working with pointers was difficult.

Working on enterprise Java applications has been one of the most difficult things I've ever worked on.

Having an application that connects to an AS400 and 4 different web-applications each exposing functionality through a WSDL, just the integration level is incredible in terms of complexity.

Next you have EJBs and Spring beans that are injected for those applications and beans that are injected from those beans and vice versa.

Before you know it your application is incredible big and using technologies like Spring, GWT, Java EE, your level of knowledge and complexity quickly outstrips anything I ever encountered with C++ (or .NET)

Just a basic web-application that connects to a few other applications that needs to be deployed as an EAR could easily consist of 8 different projects (Web, Test, EAR, Data, Base, X amount of client projects) each with hundreds of classes.

When new people join they have no clue where it starts and ends. It's like being given control of a Boeing but you've only ever flown Cessnas (and you thought Cessna was hardcore because you control the engine directly instead of it being done for you).

Most web-technologies (Spring for example) is as large as the entire Java langauge just by itself. Also consider that every few years a hot new framework comes along and suddenly all that knowledge needs to be adapted to a new framework. It's living in the fast lane, in terms of learning curve and keeping up to date.

C# is still very behind Java in terms of web-frameworks so it is much less complex which is a bonus (unless .NET cannot do what you want, then you are screwed)
 
Last edited:
Eish. Intimidation much for the aspiring programmers?

Don't worry about it dude. A beginner won't be expected to know it all. And not every environment will work like that.
You also get companies/programmers that like to over engineer to the point they don't know what they are doing.

Everywhere is different :)
 
Don't worry about it dude. A beginner won't be expected to know it all. And not every environment will work like that.
What he said is true, you won't be expected to know more than the basics. Usually more experienced people are hired rather than beginners but when a beginner is hired they will usually take at least a year to learn all the Java frameworks and technologies to the point that they could work on a project solo.

You also get companies/programmers that like to over engineer to the point they don't know what they are doing.
Hehe, I agree but some of the "over engineered" applications are used by the complex industries. One specific system was an insurance system, basically systems to deal with insuring new clients. It starts out with capturing information for clients in a legally acceptable manner (you wouldn't believe the complexity of that), then using rules engines to ask the client questions to calculate their premium based on the vastly complex package they selected (large amount of options). I wouldn't call the applications over-engineered really, they are just complex because they depend on so many other systems and have complex products with complex rules.

Everywhere is different :)
Absolutely, as a Java developer you'll almost always start with a different set of technologies. Most companies now use Spring but many of the other technologies depend on where you work. No company is going to expect an expert when you walk through the door. They only expect competency.
 
While in University I would have agreed with most of you.

However now that I have experience as a Java developer I can tell you:
Experience is incredible important, the principles are easy to pick-up, learn and remember. Without them you would be completely lost but don't think that is all that matters. Not by a long shot.

Forget about "hardcore" and all that crap you hear about C++, C++ developers love going on about how "hardcore" C++ is but I've worked on C++ application and they were very simple in reality.

I'd happily go back to thinking that having to deal with memory allocation is complex. Or that understanding and working with pointers was difficult.

Working on enterprise Java applications has been one of the most difficult things I've ever worked on.

Having an application that connects to an AS400 and 4 different web-applications each exposing functionality through a WSDL, just the integration level is incredible in terms of complexity.

Next you have EJBs and Spring beans that are injected for those applications and beans that are injected from those beans and vice versa.

Before you know it your application is incredible big and using technologies like Spring, GWT, Java EE, your level of knowledge and complexity quickly outstrips anything I ever encountered with C++ (or .NET)

Just a basic web-application that connects to a few other applications that needs to be deployed as an EAR could easily consist of 8 different projects (Web, Test, EAR, Data, Base, X amount of client projects) each with hundreds of classes.

When new people join they have no clue where it starts and ends. It's like being given control of a Boeing but you've only ever flown Cessnas (and you thought Cessna was hardcore because you control the engine directly instead of it being done for you).

Most web-technologies (Spring for example) is as large as the entire Java langauge just by itself. Also consider that every few years a hot new framework comes along and suddenly all that knowledge needs to be adapted to a new framework. It's living in the fast lane, in terms of learning curve and keeping up to date.

C# is still very behind Java in terms of web-frameworks so it is much less complex which is a bonus (unless .NET cannot do what you want, then you are screwed)

+one million
I dont want to worry about "plumbing". garbage collection, spring frameworks, orm's, etc, having these things is amazing. Lets you get down to the real objective at hand, making the client money (and yourself :) ).

Java+Spring+Cloud 2012 is gonna be a beautiful year :)
 
You'll find languages each have their own strengths and weaknesses. It doesn't matter too much which one you choose to learn first.

Forget about "hardcore" and all that crap you hear about C++, C++ developers love going on about how "hardcore" C++ is but I've worked on C++ application and they were very simple in reality.
Obviously not that many.
 
How do you okes rate the For Dummies books? I just got one java one for a mate, published last year.
 
How do you okes rate the For Dummies books? I just got one java one for a mate, published last year.

The Dummies books I've felt like introductory/overview courses that you would read if you really knew nothing on the subject. I've always preferred the Wrox and Apress books.
 
You also get companies/programmers that like to over engineer to the point they don't know what they are doing.

Simplicity is key, but when you get to the really big systems like government, banks, health insurance companies etc you are working on a different scale. Compared to other projects these are Everest vs that hill outside of town.
 
Top
Sign up to the MyBroadband newsletter
X