How do I create my own computer program?
How do I create my own computer program?
As you learn more about computers you may become interested in creating your own program, but are not sure where to start. For anyone interested in developing programs, games, or online services, you must start by learning a computer programming language. Understanding a programming language or at least the concepts of programming will help you in developing your own software.
Picking the Language
There are dozens of different programming languages available today and deciding what language you should learn can be a challenge in itself. See our listing of programming languages for a full listing of computer programming languages and examples of what type of programs they are capable of creating. Deciding on your language really depends on what type of program or scripts you'd like to create. For example, Java and Visual Basic are both popular languages to learn because of their relative ease and because both a good way to learn programming fundamentals. Other popular examples include C and C++, which are both widely used programming languages used to create programs, games, apps, drivers, operating system, and pretty much every software program capable of running on the computer. If you're more interested in developing scripts and programs like online forums and services Perl, PHP, and Python are all popular choices in addition to HTML.
Deciding on an editor
Once you've decided on the programming language, you must decide on your editor want to use to create your programs. Any program can be written in any text editor, which means if you're running Windows you could write your first program in a text editor such as Notepad. However, a text editor with at least syntax highlighting would be a much easier solution, especially anyone who is new to programming. Also, keep in mind that visual programming languages like Visual Basic will include the editor and compiler in the same tool used to create programs.
Most computer programming languages are high-level programming languages, which are easy for you to understand but impossible for the computer to understand. In order for the computer to understand your program it must be compiled or have an interpreter. Your programming language is the deciding factor on how the program will be compiled or ran on a computer. For example, Eclipse is a Java compiler that can take a Java program and compile it to be run on a computer. However, a language like Perl is an interpreted language, which means it doesn't need to be compiled, it only requires that Perl be installed on the computer or the server that is running the script.
Learning the language
After you've decided on the language, editor, and compiler you're ready to program. For most users the easiest way to start programming is with the infamous Hello World! program, a program that only prints Hello World! to the screen and a great way to make sure everything is working. After you've been able to run your program that prints Hello World! on the screen, the next step would be to take the time to learn all of the program languages syntax and have an understanding of the below concepts.
- Understand how to declare variables.
- Create conditional statements (e.g. if, elsif, and else)
- Perform loops (e.g. do, for, foreach, goto, and while)
- Understand escape sequences.
- How to make comments or temporarily disable parts of the code.
- Understand regular expressions.
As you're learning all of your programming languages syntax, a great way to learn is to start making a basic program. For example, if you're interested in creating your own game a good way to start would be to make a simple text game that runs through a bunch of conditional statements, stores item information in variables, and anything else that would challenge your skills. As you run into questions, doing a search on the Internet can answer most questions, and if you feel that you'd like to progress even further purchasing a book written for your programming language or taking a course in programming will develop your skills even further.