C# or JAVA? I want to learn one.

mephiston5

Senior member
May 28, 2005
206
0
76
So, I had this computer programming class (Delphi) in school. The general goal of the class was to make sure we had some basic programming knowledge to help us collect or transform data for social science research.

While I liked Delphi, I would like to spend the summer learning/transitioning to a language that is more mainstream and web friendly.

I have two major goals that I would like to be able to accomplish with whatever language I pick. First, I want to be able to build data collection applications that I can host online, rather than locally (think surveys but more interactive).

Second, and I think any language with regular expressions would work, I want to be able to scrape web data.


So, would C# or JAVA be a smart choice for me? Anything else I should consider?

Thanks.
 

HumblePie

Lifer
Oct 30, 2000
14,665
440
126
Learn to program first. Syntax is secondary. Knowing constructs and what you WANT to do is more important than the actual syntax. I know I can program anything in any language, even ones I've never used before, because I know what I want to do and the capabilities of what I'm using.

Sure there are many nuances of any language that can make programming certain constructs easier than other languages, but in today's programming world it is easy to look these up on the internet.
 

Ancalagon44

Diamond Member
Feb 17, 2010
3,274
202
106
Simply put, either. There are differences between the two, but not many that matter for you.

I prefer C# myself, but Java is still good. Java is more cross platform though.
 

Cogman

Lifer
Sep 19, 2000
10,286
145
106
I prefer C# as well. Java is annoying to write IMO. The whole Java.OO.Package.interface.function.doSomething() thing just bugs me.
 

beginner99

Diamond Member
Jun 2, 2009
5,318
1,763
136
If my goal was to create a web application and host it somewhere I would probably choose php.
But then php is pretty retarded language to learn first. And once you have those bad habits...

I vote for Java.
 

Train

Lifer
Jun 22, 2000
13,587
82
91
www.bing.com
Learn to program first. Syntax is secondary. Knowing constructs and what you WANT to do is more important than the actual syntax. I know I can program anything in any language, even ones I've never used before, because I know what I want to do and the capabilities of what I'm using.

Sure there are many nuances of any language that can make programming certain constructs easier than other languages, but in today's programming world it is easy to look these up on the internet.

It's kinda hard to learn to program without using a programming language.
 

manko

Golden Member
May 27, 2001
1,846
1
0
If you're on Windows, I'd recommend C# as well. They're probably the two closest languages of the major ones out there. I started C# after a Java course and could apply almost everything I learned from Java in C#. Visual Studio/Express is nice too and I was hard pressed to get as nice an interface done in any of the Java IDE's as quickly and easily as I can with VS and C#.

I'm not into anything advanced yet, but the only potential negative for C# is that it's not as easily cross-platform as Java. There is Mono, but I'm not sure that it supports 100% of what you can do with it on Windows.
 

LokutusofBorg

Golden Member
Mar 20, 2001
1,065
0
76
C# is Java done right, essentially.
I love this. :)
If you're on Windows, I'd recommend C# as well.
This is a great way to help you decide since the only real considerations in this decision are essentially corollary. If you are a Linux/Mac user or you are thinking you will ever be one, then learn Java. If you are a Windows user and that probably will not be changing, then C# all the way. They're both great languages to learn, it really comes down to a platform choice.
 

AyashiKaibutsu

Diamond Member
Jan 24, 2004
9,306
4
81
Learn to program first. Syntax is secondary. Knowing constructs and what you WANT to do is more important than the actual syntax. I know I can program anything in any language, even ones I've never used before, because I know what I want to do and the capabilities of what I'm using.

Sure there are many nuances of any language that can make programming certain constructs easier than other languages, but in today's programming world it is easy to look these up on the internet.

I'd like to see you just jump right into Haskell or Prolog. Not all languages work like procedural or OO ones do. Although yea once you learn Java/C#/C++/etc you can use any of the other languages that work like it easily.

The only thing I prefer on Java over C# is their documentation for the libraries is way better in my opinion.
 

Cogman

Lifer
Sep 19, 2000
10,286
145
106
If you're on Windows, I'd recommend C# as well. They're probably the two closest languages of the major ones out there. I started C# after a Java course and could apply almost everything I learned from Java in C#. Visual Studio/Express is nice too and I was hard pressed to get as nice an interface done in any of the Java IDE's as quickly and easily as I can with VS and C#.

I'm not into anything advanced yet, but the only potential negative for C# is that it's not as easily cross-platform as Java. There is Mono, but I'm not sure that it supports 100% of what you can do with it on Windows.

Just a small note. Mono has patchy support. Some areas it supports really well, others, not at all. The defining differences are ease of implementation and interest. Most of the commonly used features of .Net are there, but they don't even have full support for the 2.0 standard.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I'd like to see you just jump right into Haskell or Prolog. Not all languages work like procedural or OO ones do. Although yea once you learn Java/C#/C++/etc you can use any of the other languages that work like it easily.

The only thing I prefer on Java over C# is their documentation for the libraries is way better in my opinion.

I think everyone realizes that functional languages are a paradigm shift. I've tried to learn Haskell twice now, and I just don't get it. But for the OP's purposes, in terms of mainstream languages, I agree that syntax is less important than getting comfortable with the fundamentals.
 

Schadenfroh

Elite Member
Mar 8, 2003
38,416
4
0
C# is a newer language, Microsoft had a chance to see what works and what does not work after Sun took the initial plunge. Sun has made great strides in Java, but they still have to support somewhat more legacy code than Microsoft has to deal with. If I could snap my fingers and make C# the dominant language, I would.

But, I am a Java programmer at the end of the day. Java is more popular and more non-Microsoft friendly. I do not see C# surpassing Java anytime soon in terms of popularity unless Oracle screws it up.

However, as stated above, become a good problem solver and know the concepts behind the syntax well and then learning a new programming language will be trivial.
 

tatteredpotato

Diamond Member
Jul 23, 2006
3,934
0
76
I think everyone realizes that functional languages are a paradigm shift. I've tried to learn Haskell twice now, and I just don't get it. But for the OP's purposes, in terms of mainstream languages, I agree that syntax is less important than getting comfortable with the fundamentals.

Functional programming requires you to relearn all you're microprogramming techniques (like for-loops and if-statements). I learned ML taking a compiler design class and it rather difficult to wrap my mind around initially, however once you learn the style you realize that there are a lot of problems more easily solved using a functional style, and vice versa.

I wouldn't recommend a functional language to someone who's just learning though.... most production code is still OOP or procedural, but I do recommend learning it eventually.
 

degibson

Golden Member
Mar 21, 2008
1,389
0
0
My advice to the OP, who ...
would like to spend the summer learning/transitioning to a language that is more mainstream and web friendly

Is to ignore functional programming and languages. Pretend they don't exist. There are times at which a functional abstraction is the right approach, but they have nothing to do with mainstream, web-friendly, or even programmer-friendly concerns.
 

masteryoda34

Golden Member
Dec 17, 2007
1,399
3
81
C# is probably better suited towards reaching your goals.

Java is a better language to learn general programming skills with, in my opinion. These skills are easily transferable between OO languages.