So you've got an idea for a great program, but you have no idea how to implement it? It doesn't matter, we will help. True, you will have to spend a lot of time to learn the programming language, but this is normal. Even more, many successful programmers are self-taught. Once you have learned the basics, you can create simple programs in a minimum of time. Creation of more complex programs, of course, is a more serious task, but, as they say, patience and work will grind everything!
Part 1 of 7: Choosing a Programming Language
Step 1. Decide which programming language you will learn first
If you haven’t programmed before, then you need to start with something simple, designed for newbies - yet allowing you to achieve your goals. There are dozens of programming languages, each of which has its own fields of application, its own tasks and features. Here are a few of them:
- C is one of the oldest programming languages. Familiarity with C will make it easier to learn C ++ and Java.
- C ++ is one of the most popular programming languages these days, especially in terms of software development. True, it will take time to learn C ++, and it will take even more to learn how to use it … But it will pay off!
- Java is another very popular programming language that can run on almost any operating system.
- Python is one of the simplest programming languages that you can learn the basics in a couple of days. However, it is a very powerful language used to create many web and server applications.
Step 2. Prepare your development environment
You don't need so much to start coding - and that’s a “development environment”. However, what exactly is meant by this depends on the chosen programming language.
- Code editor - almost any programmer will find it more convenient to work in a special text editor - the code editor. You can, of course, work in Notepad, but without syntax highlighting and substitutions it will be a very sad experience. Popular code editors include Notepad ++, TextMate, and JEdit.
- Compiler - when working with many programming languages (C, Java, and so on), the program code must first be "assembled" - compiled, only then it can be run. Accordingly, you will have to install a compiler if you cannot do without it in your chosen programming language. By the way, most compilers will help you catch "bugs" - program errors.
- IDE (Integrated Development Environment) - in some programming languages, both the code editor, the compiler, and the debug module are all combined into a single integrated development environment. You can download the IDE, as a rule, from the website of the programming language.
Step 3. Read the tutorials
If you haven't programmed at all before, then you need to start small. So, it is worth finding textbooks or courses, at least online courses, which provide the basics of the basics of the chosen language, talk about its syntax, variables, functions and everything else, as well as how it is all connected with each other.
Are you interested? Check out Udemy, Khan Academy, Codecademy, Code.org, and other similar resources
Step 4. Download samples and open source software
It will be much easier for you to learn by example, working with samples, since there are plenty of them on the web. Start with simple programs that are somehow related to the program you want to make.
Step 5. Create simple programs to learn the basics
Since you started writing the code yourself, then start from scratch. Write some programs, say, to print a line or calculate a simple equation. Practice all of this - it will come in handy later, when working on more complex programs. Experiment, try to break even your own programs.
Step 6. Join the programming communities
The opportunity to ask questions of an accomplished programmer is invaluable. On the sites where programmers gather, you will find many like-minded people, regardless of what language you write in. Don't be afraid to ask, but never ask for help without trying every remedy available to you.
Step 7. Don't forget that learning a programming language takes a lot of time
You will not be able to write a program (complex) when you first sit down at a computer with a programming textbook. However, the more you learn and practice, the better you will program.
Part 2 of 7: Program Development
Step 1. Prepare a "design document"
A design document is a detailed description of the program being developed, and it is this document that needs to be done first, so that later, in the course of work, you can check with it and its goals. It is the design document that will allow you to do what you wanted, and not anything else.
- Everything that you want to implement in the program should be listed on the pages of the design document.
- In addition, the design document should also take into account the user, or rather, how he will work with the program.
Step 2. Make a block diagram of your program
This will be a kind of map showing how the user will move from one part of the program to another. At this stage, you don't need anything more complicated than a simple flowchart.
Step 3. Decide on the architecture of the program
The goals will define the facility … that is, the architecture. If you know and understand what tasks which architecture corresponds to, then the development process will go much more efficiently.
Step 4. Start with a 1-2-3 program
This is the simplest type of program, and its purpose is to allow you to adapt to the programming language. In general, the programs "1-2-3" are launched, they ask the user for some data, then they output the result, which ends.
- The next step in the 1-2-3 scheme will be the so-called REPL (Read-Execute-Print Loop). Simply put, this is a return to the first step of the program after the output of the calculation result.
- Think about programs like Pipeline. They are characterized by the fact that they transform user input and work consistently. This type is suitable for programs that require a minimum of user interaction - say, RSS readers. Such a program will represent several classes with a common loop.
Part 3 of 7: Prototyping
Step 1. Focus on one function of the program
More precisely, the prototype is always the main function of the program. Let's say you create an organizer program - then the main function will be the calendar and the ability to add events.
Step 2. Make sure the prototype works flawlessly
The prototype should be such that it can be used instead of the developed program. The prototype will become the foundation, the foundation for everything, so it should work accordingly. In other words, every prototype function must work flawlessly.
- You can make urgent changes to the prototype and test them.
- Of course, the task of testing a prototype requires the participation of many people at once.
- The prototype can and will change, that's a fact.
Step 3. Don't be afraid to recycle your prototype over and over again
This is its essence - first experiments, then release. It is on the example of the prototype that you can see if everything works as it should. If the prototype fails, it doesn't matter, just rewrite it from scratch, start all over again. Better so, believe me.
Part 4 of 7: Creating a Program
Step 1. Create a pseudocode base
This will become a kind of skeleton for your project and the basis for future work. Pseudocode differs from ordinary code in that … it is not "compiled" (not processed in the compiler), but it is perfectly readable by programmers and helps to understand what should happen at one or another step of the program.
Pseudocode, however, uses the same syntax as regular code, so you need to write pseudocode in the same way as a program
Step 2. Refine the prototype
You can take the prototype itself, you can take the pseudocode - in any case, the point is to make the prototype better, more perfect, faster!
Step 3. Start working on the program code
Here, in fact, we got to the point. It is the work on the program code that will take most of the time, not to mention countless compilations, no less countless tests and search for bugs … If a whole team is working on your program, then you should start with pseudocode so that everything goes smoothly.
Step 4. Don't forget to comment on the code
Describe the functions and features that you implement in your code. This is necessary not only so that someone else, having opened your sources, was able to figure out what's what, but also so that you yourself do not get confused in your own code if you return to it, say, in a year.
Part 5 of 7: Testing the Program
Step 1. Test all new functionality
Anything you add to the program must be tested, tested, and re-tested. And the more people put their hand to it, the better, the more mistakes can be found. Testers, of course, should know that they are working with a far from final version, and therefore errors are possible.
This phase of the program is often referred to as "alpha testing"
Step 2. Test the final version of the program
So, all the functions that should have been in the program have been added to it. Now what? Now tests again. Long, picky, thorough tests - and work on bugs, of course. Your program should now be tested by even more people than before.
This process is often referred to as beta testing
Step 3. Test the release version
As you continue to make corrections and additional content to the program, be sure to test everything.
Part 6 of 7: Creating Additional Content
Step 1. Think about what you need
This will depend on the program, so think about whether you need, say, audio recordings? Graphics? Content? Think about this before release.
Step 2. Consider outsourcing it all
If you need a lot of things, but you or no one on your team knows how to draw or record, then outsourcing is worth remembering. You can easily find freelancers who can prepare everything you need for you.
Step 3. Add all necessary additional materials to the program
Again, they should not spoil the functionality of the program. The addition of additional materials marks the beginning of the final stage of work on the program, unless, of course, the additional materials are not an integral and internal part of the program itself (as, for example, is the case with creating video games).
Part 7 of 7: Release the program
Step 1. Consider releasing your program under an open source license
Then other people will be able to access the source code of the program, make changes and improvements to it. True, under such a license, you are unlikely to receive income from the program - you will not be able to sell it, the code is open source. What is the reason? With the help of the community, who, if interested in your program, can turn it into a true masterpiece.
Step 2. Prepare to sell your program
To do this, you need an online store of the "showcase" type, so that customers can, by paying, download the program and start using it. Keep in mind, however, that the programs for which money is paid should work perfectly!
There are many more services you can sell, depending on what program you have
Step 3. Continue to support the released program with updates
Most likely, after the release, you will see a stream of messages about all sorts of errors and bugs. This is fine. You need to rank these messages in order of importance and start solving the corresponding problems, and then release updates to the program - the so-called "patches".
Do you want not to lose customers and gain a good reputation for yourself? Release patches often
Step 4. Get involved in advertising your program
If no one knows about it, then no one will use it. Send messages to thematic sites, give away a free trial, write a press release, do whatever is necessary to make your program known!