Do you want to design a computer program? There's a lot to consider when designing a program, but there are some things you can do to help streamline the process. This wikiHow teaches you the basic steps to designing a computer program.

Steps

  1. 1
    Determine the program's overall goal. This is just an overall statement that explains what your program does in one or two sentences. What is the purpose of your program? What problem does it solve? For example, "My program will create a randomized dungeon."
  2. 2
    Determine any limitations or requirements your program has. Is there anything your program must have? This could be a deadline, budget, storage space and memory restrictions, or a special feature that other similar programs lack. For example, "Randomly generated dungeons must have a pathway from the entrance to the exit."
    Advertisement
  3. 3
    Find out if there is any technology that can do what you need. You don't always need to design a new program from scratch. Sometimes you can find pre-made programs and tools, or a combination of programs and tools that can accomplish what you need. You can save yourself a lot of time and resource by using existing solutions to problems you encounter.
    • For example, you can use open-source programs and pre-made code to construct fully functioning applications. Open-sourced programs are typically free-to-use, and you can modify the source code to fit your needs. You just need to give credit to the author of the original code.
    • You can use pre-made pieces of code or open-source applications to save you
  4. 4
    Determine which programming language you will use. It is recommended that you choose a language you are familiar with, if possible. However, in some cases, it may be better to choose a programming language that is more suitable for the intended operating system, or for the type of program you intend to create.
    • C/C++ are good general purpose languages. They're the most widely used languages and give you the most control over your applications and computer hardware.
    • C#: C# (pronounced C Sharp) is a newer version of C++. It has some new features and is a little easier to learn that C++.
    • Java: Java is a popular object-oriented programming language that is growing in popularity. It is the primary programming language for Android applications. It can also be used to create computer applications. For example, Minecraft was originally programmed in Java.
    • Swift: Swift was developed by Apple and is primarily used for developing apps for iPhone, iPad, macOS, Apple TV, and more.
    • Python: Python is another popular multi-purpose language. It's a good language for beginners because it's easy to learn and use.
  5. 5
    Determine what tools you are going to use. After you decide on a programming language, decide what tools you are going to use. Are you going to be using an integrated development environment (IDE)? Do you need a compiler or interpreter? How will you debug your program? Is there any third-party applications you can use? You should also think of a way to backup your code.[1]
    • An IDE is a comprehensive software development tools that contain a code editor, debugger, build tools, and sometimes a compiler. Popular IDE's include Eclipse, and Visual Studio.
    • Compilers:Languages like C/C++ require a compiler to convert the code to machine language your computer can understand. GCC is a free compiler that can compile C and C++.
    • Interpreters: Java and Python are languages that do not need to be compiled. However they do need an interpreter to execute the instructions. OpenJDK can interpret Java, which a Python has an interpreter available on their website.
  6. 6
    Determine the program's outputs. The output of a program is what the program will produces. Every screen the user sees as well as every printed statement or report is considered the programs output. If there is any audio components to the program, that is also considered program. You need to determine what will be on every screen, every printed page, and every field the user will use to input data.
  7. 7
    Determine the inputs of your program. A program's inputs are the data the program uses to produce it's outputs. The inputs can come from a user, a hardware device, another program, an external file, or written into the code. Be sure to consider as many of the possibilities as possible, especially when handling user input.
  8. 8
    Determine the main functions. After you've determined the inputs and outputs of your program, start creating a basic outline of how it will take the inputs and convert them into outputs. Think about what functions it will need to perform and what calculations it may need. You can create a flow chart outlining the process, or just make a list on paper.
  9. 9
    Break larger problems down into smaller problems. Once you determine what the main functions of your program will be, you can start breaking them down into smaller details. This will help you determine how each function will work. One way to do this is to use pseudo-code.
    • Pseudo-code is non-compilable text that explains what each line of code needs to do. For example "If player has gold key, open door. Otherwise, door is closed".[2]
  10. 10
    Start coding the main functions. They do not have to be filled in. Just make sure they exist. That way you have an outline that helps keep your program organized.
  11. 11
    Fill in the functions. Begin with those that depend on few or no other functions. Work on the big problems first. Then concentrate on the smaller details.
  12. 12
    Test your program. You will need to test your program often. Each time you implement a new function, you'll need to see if it works properly. Try using a variety of inputs to see how your program works in different situations. Have other people test your program to see how real users interact with your program. Use Print Statements to test different variables and sections of code.
  13. 13
    Troubleshoot any problems you run into. Whenever you are coding, it's almost certain you will run into a few problems. Here's a few tips that will help you solve any problems you run into:
    • Check the syntax and make sure your code is type right.
    • Check and make sure the spelling is correct.
    • Google any errors messages your receive and see if there's a solution.
    • Check online to see if anybody else created code with a similar function as yours. See what their solution was.
    • Take a break and come back later.
    • Ask for help.
  14. 14
    Finish your program. Once you have finished all the functions and you can run your program with a variety of inputs without any errors or crashes, your program is finished. You can turn it in or publish it.
  15. Advertisement

About This Article

Travis Boylls
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Travis Boylls. Travis Boylls is a Technology Writer and Editor for wikiHow. Travis has experience writing technology-related articles, providing software customer service, and in graphic design. He specializes in Windows, macOS, Android, iOS, and Linux platforms. He studied graphic design at Pikes Peak Community College. This article has been viewed 25,571 times.
How helpful is this?
Co-authors: 17
Updated: December 21, 2021
Views: 25,571
Categories: Programming
Article SummaryX

1. Determine your program's goal.
2. Determine any limitations your program has.
3. Determine the inputs and outputs.
4. Create an outline for the data flow.
5. Break bigger problems down into smaller problems.
6. Start coding the main functions.
7. Start coding the smaller details and problems.
8. Test, test, and test your program again.

Did this summary help you?
Advertisement