How to write a computer software program


















Welcome to the wonderful world of web development. However, you should be able to author simple HTML and CSS by hand before you begin building web applications, because a web page is the frontend to every webapp.

This HTML tutorial is a good place to start. JavaScript is the programming language of the web browser, the magic that makes dynamic in-page effects go. JavaScript is also the stuff of bookmarklets, Greasemonkey user scripts, and Ajax , so it's the key to making all sorts of web goodies.

Start learning JavaScript here. Server-side scripting: Once you're good at making things happen inside a web page, you're going to need to put some dynamic server action behind it—and for that, you'll need to move into a server-side scripting language, like PHP, Python, Perl, or Ruby.

For example, to make a web-based contact form that sends an email somewhere based on what a user entered, a server-side script is required. Scripting languages like PHP can talk to a database on your web server as well, so if you want to make a site where users can log in and store information, that's the way to go. Excellent web development site Webmonkey is full of tutorials for various web programming languages.

PHP's online documentation and function reference is the best on the web. Each entry like this one on the strlen function includes user comments at the bottom which are often as helpful as the documentation itself.

I happen to be partial to PHP, but there are plenty of other server-side scripting languages you might decide to go with instead. Web frameworks: Over the years, web developers have had to solve and resolve the same problems and rewrite similar code to build dynamic web sites.

To avoid making everyone reinvent the wheel for every new web development project, some programmers have come up with development frameworks that do some repetitive work for you.

The popular Ruby on Rails framework, for example, takes the Ruby programming language and offers a web-specific structure for getting common web application tasks done. In fact, Adam used Rails to build his first serious and impressive! Here's his take on how to build a web site from scratch with no experience.

For example, if you want to put a dynamic map on your web site, you want to use a Google Map instead of building your own custom map. Almost every modern web service you know and love has an API that lets you include data and widgets from it in your application, like Twitter, Facebook, Google Docs, Google Maps, and the list goes on. Integrating other webapps into your web application via API's is the final frontier of rich web development. Your choice of programming language is the deciding factor on whether or not you'll need a third-party program to compile or interpret it.

For example, Eclipse is an interpreter that takes a program written in Java and "translates" it into code understood by a computer. Other languages, like Perl, are interpreted, meaning they do not need to be compiled. These languages only require that they are installed on the computer or the server that is running the script.

After you have decided on a programming language, editor, and compiler, you are ready to program. For most users, the easiest way to start is with the famous " Hello World! After you have run your program that prints "Hello World! To do so, you need to understand the following concepts:. See our programming terms for a full list programming-related terms. As you run into questions, an Internet search can answer most of them.

Books written for your programming language or programming courses are great ways to develop your skills further. To be able to come up with a functional and useful program, the developer must understand how these components interact and how the instruction codes in the computer program will be executed by both the hardware and the software environments. Step 5 After strengthening these necessary skill sets, it is important to choose the type of programming language that will be used to create the computer program.

For beginners, it is recommended to begin with languages with simple syntaxes. Step 6 In writing the computer program itself, the first part is always specifying the problem. The computer programmer must make sure that he understands what the problem really is in order to provide the correct solution.

Step 7 The next step is to design an algorithm that will address the problem. This is where everything is broken down into smaller and less complicated sets that when taken together will resolve the initial problem. Step 8 In this phase, the algorithm is translated into computer codes by following the syntax defined by the chosen programming language. This is an important step because any wrong translation can affect the final program.

Step 9 The last step is the compilation and running of the program. This is where the compiler tool checks if all codes conform to the syntax of the programming language. All of the different programming ideas and models, like "Object Oriented Programming", and "Functional Programming" and "Aspect Oriented Programming" are all Turing equivalent inventions that are meant to make it easier to write programs and make use of them.

This also applies to all of the books and blog postings about computer programming, because they are either teaching how to use a set of function calls assembled together into a library, or the most advisable strategy for making your own library of function calls, or how to organize a team of programmers who are making programs and libraries of function calls.

Information is always numbers to a computer, but often words to us. The metaphor that programmers are taught is of a cardboard box with a label on it, and the label is the variable. The cardboard box is misleading, because in the computer's memory it's like a single massive cardboard box, and on the edges someone has used a marker to draw dividing lines.

A variable simply applies a temporary label to one of those marked divisions, along with a rule for figuring out how many divisions that name covers. Words, sentences, paragraphs and books are numbers linked together like sausage links into strings. To a computer they're opaque in meaning and processed like a sausage machine chopping them into segments according to one rule or another. I could say, "break up this string by its spaces" and get a list of all the words in a sentence, or I could say "break it up by hyphens" and get the three numbers in a Social Security number.

For example, if the input to such a program was "" then it would produce three discrete values like this:. The computer doesn't care what the meaning of either the input or the output is, so if I give it the first sentence of A Tale of Two Cities and ask it to break it up by hyphens like a social security number, the computer will shrug and return an array with one element containing:. This is the first example of, and the essence of a bug. A bug is the result of not preparing the computer for what it would be told.

Just like telling your pregnant wife that you're sterile, you may have a result that's catastrophic for both of you. Bugs are dealt with by regulating the input and broadening the scope of what the program can cope with. A variable is called such because it's a name that belongs to something that can change, or vary.

Someone called Trevor Lewis may be a schoolboy in and a musician in because they change.



0コメント

  • 1000 / 1000