//
you're reading...
On Learning

How does one learn a new programming language?

How does one sculpt an elephant from a block of marble?

A simple answer is to chip away all the pieces of the marble that does not look like an elephant and hence what remains should be an elephant. Learning a new language is probably not that easy.

How does one go about it?

One key assumption here is that it is a new language you are trying to learn is not the first. One quick way to learn is what I would term parallel learning. It reminds me of the character in a science fiction book who says “I can fly this ship. It has the standard configuration, if not I can learn.” This is not Matrixesque.

Most programming languages have some basic constructs. Understand the constructs of one language – others become easy. Some basic constructs as you would probably know are: If-endif, for loops, while loops and switch. The basic constructs are generally invariant. The implementations are different across languages. So I normally recommend any one learning a new language to compare the syntax of a known existing language with the new language and do a match and learn. This really speeds the learning. Of course there is always the new syntax of the new language. That requires time.

Another important way to learn is like learning swimming. Jump into the language. Code some well-known programs. My favourites are:

  1. Cows and Bulls
  2. A Sorting Program
  3. Eight Queens Problem
  4. Finding 10 Digit Squares with unique digits
  5. Dog and Rabbit – Plotting the points of a rabbit on a rectangular border with a dog chasing it inside the rectangular.

These generally allows me understand a language possibly 70-90%. Does this method work for languages like Erlang?

Advertisements

Discussion

3 thoughts on “How does one learn a new programming language?

  1. This is true if the class of language is same. For example if you know Java, you can possibly learn C# this way. But will it help you learn assemblem?

    Posted by Udayan Banerjee | April 22, 2010, 4:54 pm

Trackbacks/Pingbacks

  1. Pingback: Channeling curiosity | A Ra News - May 15, 2014

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 66 other followers

%d bloggers like this: