tags:

views:

245

answers:

6

Duplicate

See also:

http://stackoverflow.com/questions/419959/language-for-non-programmers-to-start-learning-programming

http://stackoverflow.com/questions/190957/what-language-is-best-for-a-beginner-to-learn

http://stackoverflow.com/questions/4769/easiest-language-to-start-with

I'm for advice on learning a new programming language. I have no specific goals but mere interest. The only thing I have in my background of relevance is HTML and CSS. I'm a geek at heart and would like to be able to play with some APIs and the like.

From what I have read around the web, PHP seems like an easy access point but is too messy for my taste.

C/Java seem to have high barriers to entry and sound too complex to be able to enjoy light heartedly.

Python and Ruby both appear to be pretty handy but I wouldn't know how to pick between them (though plenty of people seem to be saying Ruby is better because they can type @ instead of self). As a side note how do the frameworks work? If I learnt Python/Ruby do I have to learn anything else to be able to use Django/Rails?

Any ideas to help me out?

Cheers,

Luke

A: 

At the risk of starting a flame war, I would say python as you can do more than just rails with it :)

Andrew Cox
A: 

See this question.

Hank Gay
A: 

"Learning the language" really means to learn the libraries. The syntax, and formulation of algorithms, are relatively easy to comprehend; then you need to learn libraries, and keep doing that throughout your carrier.

For library learning, the application "domain" matters - GUI is totally different from admin, say. Let's assume web programming. You need to learn how to setup the webserver, in addition to learning language and library. As for libraries, you typically need, in web programming, to learn these things:

  • templating
  • database access
  • URL processing
  • request/form processing

So you won't learn just Ruby, but you need to learn Rails as well, likewise for Python+Django.

Martin v. Löwis
A: 

There is a great book for beginners, be it hobbyists or non-professionals for starting out with Ruby... it's called simply "Learn to Program". Outside of teaching Ruby concepts - it teaches programming concepts as a whole, an important factor for beginners. Now as for and Ruby vs. Python thing... whatever... This book will get you through some fundamentals of what's it's like to cut code. You can move onto Python afterwards if you want. There is another book called "Practical Programming", which is based on Python but much more technically oriented then the previous book.

As to whether or not you'll be able to instantly use Django or Rails... not really... but you'll be able to understand them much better and you'll just have to learn the architecture that it puts you in (MVC for example).

Tim K.
A: 

I would lean towards python, because it tends to be more easily understood, which means you'll probably get better examples to learn with.

chills42
+1  A: 

I have no specific goals but mere interest.

This doesn't answer your question, but a lot of programmers find it useful to have a specific goal. For example:

  • I learned assembly because I had a goal (which was, to write a faster game of Asteroids than I could using Basic).
  • Even when, later, my goal was to "learn C", I did that by learning to use C to develop some accounting software (so, finishing that accounting software became my immediate goal, and learning C followed as a consequence of achieving that goal).

Even if your goal is only temporary or for learning purposes, having a goal helps learning ... the converse, having no goals, might be like learning a human language without having anything you want to say or anyone you want to talk to.

ChrisW