How to Learn a Programming Languages
How to Learn a Programming Language:
Use Some Steps For Programming
1
Decide what you want to do.
Some programming applications with strong Web presence and good
materials for beginners are game programming, Web site creation,
automation of common tasks ("scripting"), text processing, and
scientific problem solving. If you just think programming would be cool
to learn and don't have any specific applications in mind, that's okay,
but thinking about what you want to program in advance will help you
make informed decisions during your learning experience. Also remember
that programming can be a frustrating job if you don't pay proper
attention or make too many mistakes while writing code.
2
Choose a programming language. When you first begin to learn, choose an easy-to-learn, high level language such as Python. Later, you may move on to a lower level language such as C or C++ to better understand how exactly programs run and interact. Perl and Java
are other popular languages for beginners. Research your target
application to learn if there are languages you should definitely know
(e.g. SQL for databases) or avoid. Don't be confused by jargon like
"object-oriented", "concurrent", or "dynamic"; these all mean things,
but you won't be able to understand them until you actually have some
programming experience.
3
Find learning resources.
Search the Web for good places to start on the languages mentioned
above, and be sure to check the language's home page (if it has one) for
an official guide or handbook. Also, find someone who already knows how
to program. Online tutorials are nice, but they can be frustrating at
times if you can't get answers to specific questions. Sometimes library
and videos help a lot.
4
Start small. You
can't expect to write a bestselling 700-page masterpiece if you have no
practical writing experience; programming is the same way. Start with
basic constructs and write small programs (10 to 30 lines) to test your
understanding of the concepts. Stretch yourself, but don't try to run
before you can walk.
5
Put in the time. It
takes many hours of practicing problem-solving skills on different types
of problems before you can call yourself an expert. Project Euler
has many small programming assignments, ranked roughly by difficulty,
that are useful for honing your skills and keeping in practice. Also
learn making flowcharts.
6
Keep at it.
Programming can be very frustrating, but successfully completing a
program can be intensely satisfying and pleasing. Don't give up if you
don't understand a concept; programming can be a very abstract thing to
learn. When working on a particularly intricate problem, take periodic
breaks to let your brain relax and relegate the problem to your
subconscious mind. Make a good schedule for working.
7
Keep learning.
Knowing one programming language is good, but knowing four or five is
better. Regardless of what language you use most often, having knowledge
of others to draw on will make you a better programmer and better able
to understand common constructs and problems in the abstract. So learn
several programming languages, especially two or three with different
design philosophies, such as Lisp, Java, and Perl. But learn each of
them properly.
Tips
- If you are interested in game programming, investigate Python, C++,
and Java. Of the three, C++ is probably the best performer, Python by
far the easiest to learn, and Java best able to run on Windows, Mac OS,
and Linux without change.
- For most people, programming something that interests them or that
they can use is more interesting than textbook examples. Use a search
engine to find out about projects that interest you.
- Print books can be a valuable resource, but ask an experienced
programmer for recommendations before dumping money on what may be very
well-hyped fluff.
- For automating tedious tasks ("scripting") on Windows, look up C#
(which is similar to Java), Visual Basic ; for other platforms, Perl,
Python, and bash (or other shells) are common.
- Tutorials of any sort are not sufficient to learn a language well.
Try to find people around you who have the same interests, and learn
from one another. Browse and join message boards so you can be exposed
to the techniques and discussions of a dynamic programming community.
- When you learn something new, it is often helpful to implement it
yourself and then tweak the design, predicting the results, to make sure
you understand the concept.
- Languages commonly used in Web development include Python, Ruby,
PHP, ASP, and Java. Web developers also need to have a strong basis of
HTML and JavaScript (which is not the same thing as Java), and are
likely to find SQL useful as well.
- Make use of up-to-date application programming interfaces and
official reference materials available from the software publisher.
- Learn about Free software. Study the source code of the programs available at the Free software directory. Why re-invent the wheel when you can make it better? Just make sure you understand what you're programming.
- References are there to help you. Don't be ashamed if you don't
remember everything by heart; that comes with time. The important thing
is knowing where to find reference material.
- Talk to other programmers; read other programs. This is more important than any book or training course.
- Get involved in a language standardization effort. It could be the
ANSI C++ committee, or it could be deciding if your local coding style
will have 2 or 4 space indentation levels. Either way, you learn about
what other people like in a language, how deeply they feel so, and
perhaps even a little about why they feel so.
No comments:
Post a Comment