开发者

Advice on languages and places to learn them?

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 th开发者_如何转开发an adopting a new language so quickly?


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.


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:

  • Ruby from Java

  • Ruby in 20 minutes

  • Programming Ruby


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.


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


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!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜