3

My final for my last java class will be Monday. What would be a good language with many free sources (poor college student here) to work off of? I've heard good things about Ruby and Erlang but both seem alien to me.

Perhaps there is something I should try in Java first before moving to another language like some kind of framework or libraries that would advice me more than adopting a new language so quickly?

  • Are you looking to get into programming languages for the internet (Ruby, PHP, ASP, etc)? – matthewpavkov Dec 10 '10 at 23:01
  • 1
    possible duplicate of [Need Advice: What languages should I learn?](http://stackoverflow.com/questions/1144556/need-advice-what-languages-should-i-learn) – Felix Kling Dec 10 '10 at 23:02
  • This is really more of a question for programmers.stackexchange.com . – jkerian Dec 10 '10 at 23:02
  • @matthewpavkov Programming for webpages looks fun but something that I can use not just for would be better I think. –  Dec 11 '10 at 01:00

6 Answers6

6

As a Student, i hear those words a lot from many of my professors:

"Its not about the language, its about algorithms!!"

Which after almost 4 years of trying different languages, i find this to be true. Because if you learn how to do something in one language... the rest is just applying your knowledge using different syntax.

My advice is to stick with what you started (Java), and after you master the basics, then deal with:

  • Inheritance
  • Polymorpism
  • Data Structures

Because you will find the above in almost every language.

Algorithm Animations helped me visualize and understand a lot.

Also read this post.

Community
  • 1
  • 1
athspk
  • 6,722
  • 7
  • 37
  • 51
  • 1
    I disagree - the language is important. The language you use can restrict or enhance the way you tackle algorithms. – david4dev Dec 10 '10 at 23:21
  • 5
    I believe the language is important in the stage of production. If you are producing a Web app, you might go for PHP instead of C, or if you are producing an SMTP Server you may go for Python instead of Whatever. But in the stage of learning, i believe you stick with one language. – athspk Dec 10 '10 at 23:29
3

I would definitely recommend Ruby - as a fun language to learn more about programming. Java is statically typed and strictly object oriented, so it is natural that Ruby feels alien to you.

Ruby is strong in a number of paradigms - especially object oriented, functional and metaprogramming. Learning lots of paradigms and how to combine them will make you a better programmer no matter what future languages you use.

Having learnt Java, JRuby would be good implementation of Ruby to use - it is written in Java and runs on the JVM. Another advantage of JRuby is that you can use Java libraries from your Ruby code. Just install jruby from your package manager and you should be ready to go.

To learn ruby check out the following resources:

david4dev
  • 4,854
  • 2
  • 28
  • 35
  • 1
    Netbeans works with jruby out of the box. When I tried ruby before I had to fiddle with everything a lot to get it working on Windows. JRuby looks like a good choice then. –  Dec 11 '10 at 00:56
2

Since you already know java, get a taste of other styles like Python, Perl and Ruby. PHP, Java, and C++ are closely related style wise.

Babiker
  • 18,300
  • 28
  • 78
  • 125
  • I noticed that in some of my books I purchased personally. It would be on a subject and have a disclaimer that you should have basic C or C++ knowledge but the syntax looks almost identical and many times I can understand what the C/C++ code is doing without the book explaining. –  Dec 11 '10 at 00:59
2

I would recommend looking at Scala, F#/SML/Ocaml and Haskell -- but Scala in particular:

The reason for this is Scala shows that a "fun" statically/strongly-typed high-level (in a real sense) 'OO' language can exist. There are many useful programming constructs that are not possible in Java due to design and implementation limitations. (Scala is by no means a perfect language.)

Even learning just C#3/4 (which generally has a less powerful type system than Scala, although not all areas overlap) will open eyes with constructs that are not easy to do in Java -- simply passing around "functions" as objects or being able to uniformly and easily run queries and manipulations over lists are something out of reach with Java. You can fake closures/lambdas in Java (look at anon-inner classes or the Functional Java library), but it is hardly pretty: Scala and C# add language support for these constructs so they are "natural".

I won't speak ill of Ruby or Python (or many other languages, excluding PHP ;-) -- but one thing that they lack is static typing. Some people find this a blessing, but I generally find it a curse (good static type systems can prove the absence of a number of type problems) -- the problem is that, if Java/C/C++ is/are the only statically typed language(s) you have dealt with, you will think that static typing has to be painful (and implies "too much type annotation" and "too brittle/closed types") -- this is simply not true in more advanced statically typed languages with type inference, view-bounds, typeclasses, etc.

Learning Haskell will really open your eyes up to a different approach -- but it really is a different beast and requires forgetting how language X works. You can write "Java in Scala", even if not advisable/idiomatic, but you really can't write "Java in Haskell".

Community
  • 1
  • 1
1

If you are looking for web development, I would strongly suggest learning PHP (it is a really fun and useful language). If you are looking to develop for the desktop, C++ and if you want to try iPhone / iPad development, try Objective-C.

I took a Java class and I found that it gave me a good foundation for moving to Objective-c, you just need to be careful because the language does not manage your memory usage (no garbage collector). All of the above languages have tons of support freely available on the internet. If you are looking for a technique to learn a language, I find that looking at example code is the best way to go.

Hope this helps!

Chris
  • 1,037
  • 15
  • 26
  • I never went over garbage collection. I know of it but not any specifics. I know supposedly some garbage collection is better than others at certain things. I think my university does offer a class for C or C++ but I am not certain. Anyways my specific concentration doesn't require it and I see proof of concept for many things in much higher level languages. –  Dec 11 '10 at 00:55
1

I Totally agree with what Chris said, Make sure that when you start learning, look for everything in Google, there are thousands of resources available for how-to's about the language you chose to go with.

Ryan
  • 433
  • 1
  • 11
  • 29