Some considerations for learning a programming language

This is part of a collection of information about computer programming languages,
which is part of my web collection of information.


Intro

Learning to program can be very satisfying. You have the opportunity to create a useful tool or solve a complex problem, however programming can also be extremely frustrating, if you don't approach it correctly.


Are you observant?

To start with, programming requires you to be very detail-oriented. If I call you up on the phone and need to leave a message for someone who is not at home, I might ask you to tell him to call me back, but not after 10:00 pm tonight. In response, you may write a note saying "John called, call him back before 10 tonight" or you might write "John called and wants you to call back, but not after 10pm." Both are valid, and serve the same purpose, and as for leaving a note work perfectly well. However if this was a program, they would not necessarily serve the same purpose nor work the same. Consider the following four statements:

You might say that these four sentences convey the same message, and are the same, but in the field of programming, they are different. The difference may only be a capital letter instead of a lower-case letter, or a different punctuation mark, but that causes the sentences to be different. In programming, you need to be very carefully to type things exactly as they should be for things to work right. If you get this realization and really take it to heart, it will make the task of learning to program much easier. It also really helps to develop an eye for seeing and remembering details. For example in C, < is the less than operator, << is a binary bit shift, << is also the insertion operator (ie: cout << "hi\n"; ). ++num; will immediately increment num, while num++ will increment it after evaluating the statement. Don't worry if you didn't understand all of what I just wrote, just remember to memorize the rules, operators and syntax of the language you are learning perfectly. It will help you immensly.


What language to learn?

Almost every textbook on learning a programming language has a section near the beginning which discusses how to choose which language is better, or trying to convince you that one particular language is the best, or telling you to choose the best one for the task at hand, etc. So I though this page should also have a similar section.

There are many, many programming languages out there, and many of them are good and serve good purposes. I can only reccommend that you choose carefully, especially if it is your first programming language. Some have better possiblilities for employment, some are more widely-used than others, some have better compiler support, some have quicker development timelines than others, some create smaller executable, some process faster than others, some are compiled and some are interpreted... and the list could go on and on. In general, as an unqualified statement, I would recommend C++ as a first programming language for the majority. It is powerful, fast, you can create reusable code, it is widely used and supported etc. It is also harder to learn than VB and other languages, but here is my theory. If you are going to learn to drive, you might as well start out learning on a stick-shift, and get it over with, rather than start with an automatic, and later have to try to overcome your "handicap" of not being able to drive a stick. Of course, after learning one language, whichever one it is, subsequent ones will come easier, just as learning to drive a stick would come easier after learning on an automatic, but you had to learn twice. C++ is a full-fledged language which will give you a great starting place. Many languages have a syntax very similar to C++, which will give you a 60%-off coupon for learning these languages. But the choice is yours. Make it and stick to it. Learn your language well, dominate it, and learning others will then be easier.


Some general thoughts on learning

This section should probably go in a separate document. It deals with some important factors that apply not only to learning a programming language, but also to learning in general.

A. Why are you trying to learn this?

What is your motivation and how motivated are you to learn? If you don't want to learn (ie: it is something that is being forced on you) you are most likely not going to learn. In other words, you learn what you want to. If you really have an inner desire to program, then that desire will carry you through the hard times. It will keep you motivated to continue plugging away when all you run into are seg. faults and you simply cannot find the source of the problem. Motivations outside of you, for example your employer is requiring you to learn it, or it's required in your school, can be good motivators if you han't been looking for a new job and you really want good grades in school.

B. Persistence

This basically leap-frogs off the previous paragraph about motivation. If you are truly motivated, you will be persistent in you attempt to learn. This is very important becuase there will be times, perhaps many times, when you will be facing a seemingly unsolvable problem. If you have persistence, you will keep trying and keep trying, and look for help, and simply keep at it until something gives. If you're not going to give, something else has to. This is very important to help you learn because, just as your motivation will cause you to have persistence, your persistence will cause you to, in actuality, find the solution.

C. Books and research

If you like to read, if you have an insaciable thirst for learning, if you do not like to have any doubts about what you are doing, if you know how to search the internet and use a library, then you will have a better chance at learning. Knowing how to research and find information will help you greatly. The textbook or tutorial that you are using to learn is not necessarily going to give you all of the information that you need, nor is it going to necessarily explain the topics in a way that you can easily comprehend. Each one of us has a differnt learning style, and for that reason, we each need different material to be able to assimilate and consolidate information. Motivation will make you persistent, and knowing how to do research and find an answer to your question will cause your persistence to pay off, in that you will learn




Contine browsing the collection of information about some programming languages,
or return to my web collection of information.


This entire website and all contents are copyright 2004 www.reliply.org