Writing a computer program

Finnish translation thanks to Oskari Laine, Helsinki, Finland. Spanish Translation provided by the WindowsHelper Team Introduction Today, most people don't need to know how a computer works.

Writing a computer program

Preparation Use a sheet of graph paper to create a small maze that fits on a rectangular grid. Start out with a small, easy-to-solve maze. You can make a more difficult one later. Make sure the maze has clearly labeled "start" and "finish" points. Procedure Imagine that you are a person walking through your maze, starting at the "start" point.

On a separate piece of paper write directions, one step at a time, for how you would walk through the maze. For example, use commands like "move forward two squares," "turn left" and "turn right. If you prefer, you can draw arrows for your directional instructions instead of writing out the words.

Does it take awhile to write out the step-by-step instructions? How does this process compare with drawing the maze?

writing a computer program

Now, hand your maze, the directions and a pencil over to your volunteer. Instruct them to follow your directions exactly as they go through the maze, even if they see a mistake.

They are not allowed to solve the maze on their own or change the directions. Watch closely to see if the volunteer successfully completes the maze by following your directions.

Did they crash into any of the walls or make it all the way to the finish line? If your volunteer made it all the way to the finish line, then congratulations! Your program did not have any bugs.

Try making a bigger, more complicated maze and start over. Carefully trace through your program step by step to see where things went wrong. Did you tell them to move one block too far or turn one block too early?

Just one mistake can throw off your entire program and cause a crash later on, so look carefully! After you discover the bug, rewrite your program. If you only need to change one or two steps, you can just erase them instead of rewriting the whole thing. Have your volunteer try the maze again, following your new program.

Did they solve it this time? If not, keep debugging your program until they solve the maze. How difficult was the process of finding and fixing bugs for your maze instructions? Computer programs are written in many different "languages," which all have slightly different formats but very similar underlying concepts.

For example, what about using commands that are defined relative to absolute directions on the piece of paper like "move up," "move down," "move left" and "move right;" as opposed to turning left or right as if you were a person standing in the maze?

Although these two languages are different, can you see how they both be used to do the same thing? Try this project with more complicated mazes that include diagonal or curvy lines.

If you can no longer rely on a rectangular grid for movement, how would you write the program? What sort of language might you need to introduce? You can also try introducing new commands like "move forward until you reach an intersection" or "move forward until you hit a wall.

Instead of using a maze on paper, write a program to navigate a person walking through your house or school. Can they move from room to room without bumping into a wall by only following your directions?

Observations and results You probably found that it only takes one bug early on in a program to cause a crash.

The best free software for writers write more efficiently without distractions | TechRadar

When solving a maze, there is little room for error—make one wrong turn and you can—literally—crash by bumping into a wall or you can get lost! Have you ever used a computer program that crashed or played a video program with a glitch?Unlike writing a paper or other tasks you may be familiar with, computer programming can be very unpredictable in terms of time requirements.

The time it can take to finish a computer program can be estimated, but you have to plan and allocate time to deal with unexpected circumstances. A computer program is a list of instructions or commands that tell a computer what to do.

For example, when you are typing on a computer, there are commands that instruct it . Writing software, computer programs, is a lot like writing down the steps it takes to do something.

Before we see what a computer programming language looks like, let's use the English language to describe how to do something as a series of steps. Before you start writing a computer program, first take four critical steps to design it. By doing so, you don’t waste time writing a computer program that doesn’t work or that solves the wrong problem and isn’t worth trying to salvage afterward.

Welcome to FreeWriter. Looking for free software to write a book? Do you have a report or something long to write? FreeWriter is a new and revolutionary piece of software that turns the whole writing process on its head.

If you use a computer to write, please spare us a minute to explore this new tool. Songwriting, Lyric Writing, Poetry and Creative Writing Software Whether you’re writing a song, a poem, a novel, a script, a blog, or whatever your written or verbal communication happens to be, MasterWriter will unlock all that the English language has to offer.

Best Book Writing Software: 13 Top Writing Tools For Authors in