Help2Go
Free Computer Help.
Powered by Volunteers.




Getting Started with Programming

by Oscar Sodani
January 12, 2004

Oscar Sodani is a founder of Help2Go and owner of Help2Go Networks, an IT consulting firm in the Washington D.C. area. Oscar holds the CISSP certification as well as industry certifications from Microsoft, Cisco and Novell.

The computer revolution has taken a form hold on the world, and on the job market. One of the easiest ways to break into a high-paying computer career is by learning how to program. If you can learn some basic skills, many companies will hire and train you -- companies always need new programmers.





This article will not teach you how to program; instead, we'll cover the different programming languages that are most likely help your career and talk about the basics of how a simple program is created.

There are two basic types of program: interpreted scripts and compiled binaries.

Scripting

A script is a program that takes the form of a simple text file. The programs' instructions are executed from the top of the script to the bottom, in order. The most basic scripting language is called, most appropriately, BASIC. A BASIC script looks like this:

10 PRINT "Hello"
20 GOTO 10

This simple program would just print "Hello" over and over again on your screen. Of course, you can make scripts that are much more complex and powerful than that.

Scripting has made a comeback with the advent of the Internet. Many web sites use scripting languages to provide personalized HTML pages to their visitors. For instance, you'll notice that all of Help2Go's web pages end with the extension ".php". This is because we at Help2Go use a scripting language called PHP to create our web pages.

You've probably heard of some of the other scripting languages in use on the Internet: ASP (Active Server Pages), JavaScript, Cold Fusion, JSP (Java Server Pages, and Perl. Watch the URLs of your favorite web pages nowadays: chances are that they'll have an extension of .cfm, .asp, .php, .jsp, or .pl .

After writing a script, you will need a program called an interpreter that will analyze the script and execute the proper commands. A script is nothing without its interpreter, but luckily, you can find an interpreter program to work on almost any computer. For instance, if you write a Perl script, you can execute that script on Windows, UNIX, Macintosh, or Linux machines, as long as you have a Perl interpreter installed on that machine.

For web-based scripts, the interpreter program is built into the web server program. Every PHP script I write for this web site is automatically interpreted by the web server that hosts Help2Go. Because scripts are so portable from system to system, you can find myriad web sites that offer scripts and examples to budding programmers for free (check the See Also section at the end of this article).

Compiled Binaries

This is the more traditional method of programming, the kind that produces powerful Windows programs like Netscape Communicator or Microsoft Word. You can choose to program in several different languages, like C++, Pascal, Visual Basic, or Java. Here's how it works:

You create files called "source code", which are text files containing the commands to execute. Source code is written using the programming language you want to use. It is recommended that you write the source code using a program called an IDE, or Integrated Development Environment. An IDE can be a commercial program, such as Microsoft Visual C++ or Borland Delphi, or it can be a free program such as Eclipse or NetBeans. The IDE you use is often a result of the programming language that you choose to learn.

Once you have finished the source code, you will need a program called a compiler that will turn your code into a working program. The final result is called an executable file, or compiled binary. The compiler, and resulting executable file, is specific to a particular operating system. If you are using Netscape in Windows right now, the executable file you are running is called "netscape.exe" and will only work on a Windows PC.

For instance, if I write a program using C++, I will need to use a C++ compiler to turn it into a program. If I use a Windows-based compiler, such as Borland's Turbo C++, my result will be a program that will only work on Windows-based machines. If I use a Macintosh-based compiler, then my program will only run on Macintoshes. This is a very important point to remember -- and the reason that there is a separate Windows version and a Macintosh version for most programs.

Starting Out

For learning's sake, you are best off learning how to code web pages with HTML, and then moving on to web scripting languages such as PHP. There are many free web sites devoted to teach HTML, so getting started is easy. One of my favorites is HTML Goodies. Books on these subjects are plentiful and invaluable.

If you are looking to invent a program to sell to the consumer community, then your best bet is to start learning Visual Basic or Visual C++. These Microsoft products will enable you to create binaries that work only with Windows PCs, which is what the majority of consumers use. While these programs are very expensive, it may be worth the cost if you have a great idea that you want to develop into a program.

However, if you are just starting out with programming and are looking to get a good paying job, then your best bet is to program using Java or C++ in Linux. Linux offers a free compilers called gcc (for C++) and many free IDEs. While your programs won't be used by the general public, the Linux programming community will be very helpful to get you started and on your way. Most Linux programs are open-source, which means that you can actually look at the source code of commercial products and modify it if you wish. This is the best way to learn. Unfortunately, most Windows products are NOT open-source, so you'll be on your own if you choose the Windows way.

What about Esperanto?

What's the best language? Not an easy question -- ask 100 people and you may get 100 answers. I prefer web-based scripting, which is why most of my programs are written in Cold Fusion or PHP. If you want to make quick and easy Windows programs, Visual Basic is the way to go. For complex Windows programs, choose Visual C++.

Most hard-core programmers use C++ or Java. Java has created a large following in the past two years, and it is a very valuable language to know. If I were starting out as a programmer, learning a few scripting languages (such as PHP) would be my first step, followed by Java and C++.

The best books on programming are the ones published by O'Reilly. Search for O'Reilly at your favorite bookstore and you can't go wrong (they're the books with the strange animals on the cover).

Millions of jobs are waiting, unfilled, for skilled programmers. With time and effort, anybody can learn these skills. Try to learn the latest and greatest technology -- it's a great way to "catch-up" to those who may have more experience than you. As those old Cisco commercials would say, "Are you ready?"



Have a question? Need help? Get free, friendly person-to-person help with your computer questions or spyware questions in our help forums!

Creative Commons License

(C) 2008 Help2Go - Contact Us