For fun or for work you may need to learn how to use a new computer language quickly. Assuming you can already program to a reasonable proficiency in one language, this is not as hard as it first sounds. I have developed a methodology that helps me learn the majority of the features in the shortest possible time. These will enable you to do more than write "Hello World" and should be enough to get whatever job you need to get done, done!
1. Search
Use your favorite search engine and look for articles about your new language. Don’t look for tutorials just yet. You are searching for a general understanding of how your language looks and how to perform basic tasks. Learn How to:
- Save Strings into Variables
- Save Numbers into Variables
- Test for conditions to be true or false
- How to do basic mathematics (+-/* mod)
- Create Loops
- Create Functions that return data
- Create Functions that do not return data (subroutines)
- Enumerate through a list
- Create an Array
- Accept User Input
- Display Output
- Create Global Variables
- Use conditional logic, switch or case statements
- Resize an Array
- Handle dates and times.
- Write to a file
- Read from a file
- Debug your Code
- Handle errors
*HINT: If you know another language it may be a good place to start by searching for "Language Comparison C++ C#" (if you knew one and wanted to learn the other)
You should now have a basic understanding of what you are looking at. Each language (to me at least) has their own distinct look and feel. If can understand the basics above then any program that you look at you should be able to understand most of what you see in tutorials, without having to read in detail. Keep on searching until you can easily answer the above questions - or have a page bookmarked so you can check back quickly.
2. Exercise
Find a quick and brief "Hello World" application tutorial. Find one that has the source code and an explanation of how it works. Download the code - bring up your programming interface and get the code to work. There is nothing worse than having a compiler that is not working, and trying for a long time to get something to work, thinking it is your coding mistake, to find out hours later that your compiler was not setup properly.
Understand the code you just implemented. You should not have to type it out - as your searching before should have told you all you need.
3. Read
Get a book on your language, buy one aimed at Intermediate users, the basic ones seem to spend most of the book explaining what you searched for before. Online tutorials are good, but it can be hard to skip forward basic chapters and flip back to see what you want.
If you like ebooks then download one but for me it is fastest to have a physical book that I can hold open next to me and start typing. The typing as opposed to copying and pasting seems to make your brain get the knack of mastering the new language faster and makes it more intuitive when you want to start building your own programs.
4. Ask
Now you have been reading for a while you hopefully should be understanding what your new language requires and how to do some simple tasks. If there is anything that you do not understand at this point, read a little more. If you still do not get it then ask. There are people like me who are happy to answer people’s questions when they are not sure what they are doing. This can save you much frustration and critical time in learning your new language. Have you ever wondered why people go to school, rather than just read? People learn their first languages best through interacting with other people. Being able to ask is critical to this. If you are stuck then find someone to help you - you may learn more for a small investment of time than you can any other way. Note that I ask you to ask for help in step 4, because with a background in the language, you will understand help better than if you are just starting and have no idea what you are doing. You also will be able to talk intelligently and ask multiple things in one go.
5. Slow Down
You are nearly there. You should have a grasp for the basics, and be comfortable looking at your new language. If you jump straight into programming your desired application you will still make some big mistakes. Reflect what you have done, what you want to do, think about what you have learnt and some of the subtleties of the new language. Compare how you would do things in your previous language experiences and how you would in your new one. If you can not answer these questions do not panic, you should be more comfortable after the next step. If you slow down you may notice things that you had never thought of before. You also should be noticing by now that even though a new language sounds daunting that it is very similar to others you have learnt in the past.
6. Program
You have been aching to get into your tasks and want to bash out your new language…. Patience you are nearly there, but the more effort you spend in preparation will give you a better and more long lasting appreciation of your new language. Now is the time that you put down your book, close your browser and bring up your programming interface. You are going to build some applications that should take you no time at all, but will demonstrate how much you have learnt, or have to learn before you can progress.
Build applications that can do the following:
- Display a series of numbers created in a loop
- Create an application that takes user input and displays what was input in reverse
- Create a count down application, that will take input of a number, and will display a number each second for the input number
- Create an application that can take in an amount and a conversion factor and produce the product - ie cm -> in
- Create an application that takes in a user’s age as input and displays messages depending on how old they are - ie 0-10 "Baby"
- Accept a series of numbers from user input and display them in descending or ascending order
- Build a recursive function to find 10 factorial
- Build an application to take user input and save it to a file
- Display on the screen data that you have retrieved from a file.
- Create an application that will take input that is in the form of numbers to divide 100 by, display the results and handle errors if 0 is input.
- Create an application that is an alarm clock, that will take a time to alarm, display a message, and keep on displaying the message until the input kill or sleep is submitted. Sleep will then make it wait a given period and repeat. Kill will close it
- Create a calculator application. Using /+-* square root, square, powers, sin, cos, tan, factorial, modulous. Have different output options and a memory option.
Although there is much else that you can do to practice your skills this should make you happy creating functions, using the general tools that you searched for and if you can do all of this you should be confident that you can do anything.
6. Reflect
Again, it is time to think about what you are doing. Slow down and consider why you wanted to learn this language in the first place. If you had a task in mind do you have the tools to be able to achieve it? Are there things that you will need to do that you can not do yet, ie connect to the internet or write to databases? If so now is the time to get those skills together, going to your book may be all you need. Also consider what you want to write next, come up with some specifications about what you want to do and consider how you are going to do it. This way you can just sit down and program and not be distracted.
7. Go For It
Now is the time to put your hard work to use. Build the program that you had in mind when you started. Remember the skills you have and be confident. Do not refer back to your text unless you have to - most of what you want to do should be natural to you now. Being confident will mean that your programming should be elegant and fast, the time you spent in preparation will be paying you back handsomely now. Be happy and congratulate yourself on mastering a new skill.
8. Explore and Think
Now you have your new language skills don’t think that you know everything and start flaming an expert in a news group. Think about what you are doing and why you have done it that way. Don’t get angry at your new language because it does some things in different ways than you are used to - embrace the difference!!! Do some more reading, get to know and really appreciate the subtle nuances which are the reasons that multiple languages exist.
%DIGG%





































I find the “slow down” very important. You need to give sometime before the programming language ideas settle in you!
I have been trying learn Ruby for sometime and looking back, I did almost the same steps you have given.
If you want to become an expert in a language, the best way is to tackle a complex project, one which is more complex than just calculating “factorial”!
Hi Java Guy, I agree completely, to become an expert you need to go beyond the basics, you need to explore things that people have not tried before and to come up with solutions to the bugs and subtleties of the language. I have also found that for personal tasks, where you are learning for fun it is much harder to get an expert knowledge, compared to when someone is paying you to do things that you would not even dream of yourself and there are deadlines to get it done.
I would find it very hard to isolate how to go through that process of becoming an expert and I suspect that it differs from person to person. However - above, the steps should indicate how to get familiar enough with the language that you can start on the large project so your work is focused on what you want to achieve rather than how you are going to start going about it.