View Poll Results: Do you plan your project before you start coding?

Voters
19. You may not vote on this poll
  • Yes

    11 57.89%
  • About 1/2 of the time

    6 31.58%
  • No

    2 10.53%

How to plan a program...

This is a discussion on How to plan a program... within the C++ Programming forums, part of the General Programming Boards category; I have really gotten into making my ascii based rpg but I find myself getting lost in my code. I ...

  1. #1
    plzduntlakliekthiskthx
    Join Date
    Oct 2002
    Posts
    138

    How to plan a program...

    I have really gotten into making my ascii based rpg but I find myself getting lost in my code. I always see people around here saying you should always plan your programs before you make them, but I dont know exactly the best way to plan it. I already did a search on google but I could't find anything good, so I posted here . If anyone has any tips please post em! Thank you!

  2. #2
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Grab some paper and a pen...doodle a bit, doodle some more, write some variable names down, doodle a bit more, go get something to eat, come back, talk to some friends online, doodle a bit, go get some caffeine, come back, do any doodling which might be relevant to the program, perhaps plan out classes and structs and functions a bit, at least what you want them to do...find a good way to organize it all, and then do some coding.
    Away.

  3. #3
    Registered User
    Join Date
    Feb 2003
    Posts
    162
    I only plan if I get in over my head in something, and just can't figure something out....Basically, I just use Visio and draw out a nice flow chart, and draw the different path's of the programs and such...After that, I go into greater detail, and then do each different path 1 at a time, and more and more detail (depending on the size of hte program), and go from there...After that, It usually takes me under an hour to actaully code the program
    Last edited by Jamsan; 04-22-2003 at 05:21 PM.

  4. #4
    Registered User
    Join Date
    Aug 2002
    Posts
    87
    The best way is to take a problem, then take a solution and start writing out all the different steps required to get to the solution. Then you divide those up again etc. You this until you can clearly see where you are going with your program and have all the big tasks divided into smaller tasks. Then you start coding. Don't get irritated when half-way through the programming you have to go back and revise your plan a bit.

    And never forget:
    "Weeks of coding can save you hours of planning!!"
    (personally i still prefer weeks of coding though )

  5. #5
    Evil Member
    Join Date
    Jan 2002
    Posts
    638
    DivX: I personally prefer the other way around, working from the problem-space outward and mapping a solution onto code. I find it tends to result in more robust programs, as often a problem space for one program intersects another, and the solutions are in partial intersection as well.

  6. #6
    Xei
    Xei is offline
    Registered User Xei's Avatar
    Join Date
    May 2002
    Posts
    719
    Starting an application is usually more difficult from the beginning. You need to plan on 'where' exactly to start coding, then from there you just branch off creating functions to do specific things... soon after you have a set of functions which you can use together to make a working application. What I do is print off my work, and on the way to school I look over my code for errors or ways which may be more efficient. It also helps to make the code look neat, it doesn't matter how long it is as long as you can read it with ease, and don't forget to add comments so that you don't get lost in your own code in the future when referencing it.
    "What are you after - the vague post of the week award?" - Salem
    IPv6 Ready.
    Travel the world, meet interesting people...kill them.
    Trying to fix or change something, only guaruntees and perpetuates its existence.
    I don't know about angels, but it is fear that gives men wings.
    The problem with wanting something is the fear of losing it, or never having it. The thought makes you weak.

    E-Mail Xei

  7. #7
    Registered User
    Join Date
    Apr 2003
    Posts
    33
    Usually when i am first given an assignment, i quickly judge what methods would work best and just remember what i decided on using. Then when it comes down to sitting at the computer and coding it in i just remember what would have been the easiest way to do it, and i just do it. Of course i'm not a genius and it doesn't always work out smoothly, but then i just go over what doesn't work and then it does

    -Bill
    cout << My_Balls;
    cin >> Jo_Mouf;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Issue with program that's calling a function and has a loop
    By tigerfansince84 in forum C++ Programming
    Replies: 9
    Last Post: 11-12-2008, 01:38 PM
  2. Need help with a program, theres something in it for you
    By engstudent363 in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 01:41 PM
  3. Replies: 4
    Last Post: 02-21-2008, 10:39 AM
  4. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 01:27 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21