Thursday, November 6, 2014

Mastering a new coding language is very easy

I know many languages starting with C, C++, Java, C#, Visual Basic, VB.Net, Basic, Pascal, FORTRAN…

Last year, when I started on the venture of developing iPhone games I had to start on a new language (Objective C). 

Here, I will try to list few things to keep in mind while learning a new language to make life easier and learning faster.

#1–Language is just tool of the trade. Making programs which solves my problem in efficiently is what matters 

I have come across many people who are hung on a language. Freshmen out of collage are advised  about the importance of a language. They many a times leave good jobs in search of find a job in search for a specific language. Programming for them is learning syntax of a particular language. They would be list on their experience of how to write for loop, defining arrays …

I have found many people who have spent more than 4 years in one language without knowing more than writing for loops and few simple statements.

Unless, you understand the data structure of a language, different constructs, like hash maps, arrays, and sets … you would stick to solving your problem by just using the arrays where set would have been a better choice.

#2 – 80-20 rule Pareto principle. 20% of syntax makes 80% of language

Each language has 20% most common key constituents. If you learn them you would be able to code 80% of your programming needs.  
1.       A Hello World Program
2.       Compute Program
3.       Loops
4.       Symbolic Constants
5.       Conditionals
6.       Arrays
7.       I/O Capabilities
8.       Functions

If you are able to just learn 8 above topics, you would have mastered 80% of the language for your programming needs.

#3 – Common Constructs

All languages common constructs are designed same. Example- for loop is for in all languages, all languages would have while, do-while constructs for loops.

Their defining would mostly in scoping the loop

In C,    for (;;) {    } Ă   {   }   curly brackets are scoping any construct.

Same is the case with PHP, java …

In C,   printf("\n");   for printing words…

Java, System.out.format("\n");

PHP,  printf("%d", "17,999") 

Don''t they look just the same :) 

#5 – Save your money. The best resources are free

In my life I have never used any book to learn a language. 

All my language learning is hands-on with Google, StackOverflow when I am stuck …

All you can ever learn in language exists somewhere in some site. All you need is to find it. However, you will need to be smart enough to change the things as per your needs to make it run ….  

#6 – Create SMART goals.

S.M.A.R.T. goals on the other hand are Specific, Measurable, Attainable, Relevant, and Time-bound.

Start with a hello world program to set up environment. 

And then begin your journey to learn the language with a small but very creative program which would include using functions, for loops , reading and writing files. 

If the language includes database then after files you could relace file by a database query and updating.

If you start with same program in language you would be able to relate new language construct with newer one giving you fast-track learning. 

It is exactly like how we do in our speaking language where we relate a new language like French with our mother tongue.

Ex- What is eating called in French?  What is sleeping called in French …  

Ex- How will do this thing like calling function in “C#”. How will I pass parameters to new function?

#7 – Time to Master- Explore uniqueness of the language.

Once you have mastered the average constructs and making easy programs. You will be able to understand other peoples coding. 

Now is the time to explore new features of the language and also the complex features. 

For this you may google for specific "technical terms" as you now know specifically what to search for.

You may get these things from Git-hubs, Open-Source repositories as they have code of people who have written best of utilities. 

You can learn from their codes, their best practices and lot more things specific to language.     

That is all there is it to learn a new language …

Happy Learning!!!

No comments:

Post a Comment