As computer programmer has to often learn different programming languages for different projects. Even a single project may require two or more programs to interact. A programmer is often faced with the challenge of learning new programs in short period of time. So how does one go about updating skills to pick up a new programming language – fast & easy.
Over the last few years, i have worked out a way to get going with writing computer programs in a language with as less as half an hour of work !
Don’t take me wrong – You can only get acquainted with a program in such short time – mastering a language can take years of hard work. But you don’t need to wait for years till you have mastered before you write a codes in a language.
So here’s how I approach to learn a new programming language:
Step 1. Installation & usage: It is a good idea to read a brief about the reason why this program was built and what purposes does it suit the most. The first step is to know how to install, use and run programs. This includes knowing how to make / compile/ interpret and run a script in a given language.
Step 2. Flow control: The first thing to know is the flow control of the program – While the common norm for most of the programs is a top-to -down flow – there are programs that have a different flow structure . So this should be first thing to check out.
Step 3. Data types: I next prefer to learn how a given program handles data types like strings, decimals, integers, real, floats, long, boolean etc. While the core concept remains common for most of the programs – they sometimes behave differently under different programming languages .
A knowledge of data types equips me with the names & kinds of objects that can be dealt with by the program.
Step 4. Dealing with Variables: Next in the sequence, I normally try to learn about the way the program handles variables of string & numerical data types. I specifically look for the way the program handles the place holders for the variables.
Step 5. Operators & Precedence group: Look for operators that may be differently handled from other commonly -defined operators. (For e.g use of ^ or ** for handling power operations).
Step 6. Conditional evaluation: Look how a programs handles loops and takes action based on circumstances. In particular, I look into the syntaxes of “For-While, Do-While, While Next and If-then-else-elseif.
Step 7. Iteration: I then try to learn how the program handles iteration. This is often required for applying one algorithm to different sets of data. In short i try to understand how functions are created and called and how function attributes are applied and handled.
Step 8. Recursion: Recursive function is a function that contains a call to itself. This is normally required if a output depends upon a current or previous output as well as the current inputs. Recursion makes it easier to express ideas in which the result of the recursive call is necessary to complete the task. When learning a new program i try to understand how (if at all ) the program handles recursion.
Step 9. Data structures: A programmer is often required to group data into bags of homogeneous or heterogeneous bags like arrays, sets, lists, tuples, and matrices. Knowing how a program handles different data structures is vital for any serious programming.