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:
- Cows and Bulls
- A Sorting Program
- Eight Queens Problem
- Finding 10 Digit Squares with unique digits
- 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?