One of the main problems of people that have an idea and want to start develop it, is that they do not know how to start the project in the right way.
Most of them just open the development environment and start coding it without paying attention to all the other stuff.
In order to accomplish a better code and from that a better application I am recommending on the following steps in developing your application.
Let see, you have an idea on your mind, you can visually it already works and you want to just sit down and start coding it, after a while your code is started to be big you starting to get lost in your code and after a while it turn to be patch of patches, this happens especially to developer that want to do their own project in the first time, but not only them.
So what do you have to do?
- Sit down and start write what you want your application to do.
- Write down a flow for your application.
- Try to organize it into objects.
- Write down what each object contains, like methods and so on (not in code).
- Use a source code management system (SVN).
- Start to build each object till it does what its need to do.
If you have all this organized, you will be able to locate problematic areas and in future look you will be able to fast track the object that has the problem and fix it, it will also give you a more easy way to update or upgrade the application by just modify the object that needs the changes.
Sit down and start write what you want your application to do:
Just take a paper or open your favorite text editor and start to write down all the things you want your application to do, everything it does, no matter if you think you are not to code it later on or not, you do not need to think as a developer, think as the user, or as a child, who is going to use the application, what do you expect the application to do if you bought it. This step is very important it will be easy for you to split it down into object later on. Think of it as the spec file for the application you’re trying to build.
Write down a flow for your application:
Think like the user, what is the flow that the application needs to do, I think it be good to split it down to several flows like, first installation of the application, first run, normal run, update, application do and so on, the more you write down the more you help yourself in the testing process.
Try to organize it into objects:
Think of it as a splitting your application to parts, each part needs to be as independent as it can, in that way you have several object each one do what its need to do. This way you will have an easy way to truck bugs location and to make application updates. If you manage to make each object a separate component, like a library or a dll, it be easy to update the application in next versions or in bug fixing, you can fix the problematic dll/object and just make an update to it and send it as an update package, using the net, or a web site. I also recommended to create/ or get a good log system that can handle log files, this way you will have a file that can be used for bug tracking and fixing. One of the best things in using object is that you can use it later on in other projects that you want to develop, this call code reuse.
Write down what each object contains, like methods and so on (not in code):
After you have the objects, you need to write down what each object needs to do, keep in mind that it good to write everything that you think this object needs to have, it actually organized what you write in the first section into their object location, even if you, in this stage, do not think you can code it nor need it, put it here, so you will have it for future use, you can always add an empty function, in the code step, that represent this part of the object, and in future version to actually implement it or removed it, according to what you think.
Use a source code management system (SVN):
A SVN will give you a great option to manage and more organized the project files, from source files to executable files. It gives you the option to roll back easy if you have any problem in the last file you work on, it also be easy to compare the file with older or newer files, and it back up all your project files.
Start to build each object till it does what its need to do:
In here you need to start works on your object, actually write the code for each object. You can start by write the function names even if the function will be empty in this part write them down, you can implement it later on, or in next version, as a programmer, sometime you start to work on one function and another one is entering into your mind and you just go to that function and start to work on it. Do not forget to add comment in front of every function that tells you what this function do, so you able to remind yourself what you thought about when you coded it. If you’re using a comment in the functions body, remember to delete them in the release version, good against reverse engineering.
Well if you start your project in organized steps you will have an easy maintenance in the future from bug fixing to version releases.
After all the development process, in my mind, is the best part, cause after the application start to run, it’s feels like you played as D”R Frankenstein and created your masterpiece.