Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have a program that i need to do.

I know what the program should do, but i dont know how to approach making it

What is the best way to arrange my ideas and thoughts, layout the what the program should do, aproach doing it correctly and transform my thoughts and ideas into code?

share|improve this question

closed as not a real question by Doc Brown, gnat, ChrisF Sep 5 '12 at 12:33

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Do you know a programming language? What have you tried already? Is the project small enough for one person or do you need a team? –  akton Sep 5 '12 at 0:01
2  
I don't think this is an answerable question here because the question is to broad. If you have no clue at all, I suggest you begin by a simple programming book first. If you already learned programming, then probably, you need to read some more. Maybe a book like this helps (never mind the title, I don't mean any offense): books.google.ca/… –  Emmad Kareem Sep 5 '12 at 0:03
    
How long have you been programming? I would say this is probably the best place on stackexchange for guidance which is different from an answer and so it's true this can't be "answered", but more details are needed even for guidance to be given with any meaningful use to you. –  Jimmy Hoffa Sep 5 '12 at 1:35
    
I think this question is not constructive and can not be answered in a correct way. I would say "go and take a degree in computer science", but I don't want to be rude. –  Patkos Csaba Sep 5 '12 at 12:23
add comment

5 Answers

Try:

  1. Start with something simpler, much simpler if need be. Get that working then slowly add features.
  2. Look for other software that implements similar features and see how they do it. Sites like github.com and codeplex.com have lots of open source software that you can use for inspiration. Just remember that there still may be copyright on the code.
  3. Is there a library out there that does what you want? Use that for the hard piece and focus on the rest.
  4. Has someone you know written something similar? Discuss the problem with him or her. They make be able to give you some hints.
  5. Is the problem too complex? Can you solve a different problem or in a different way and still keep the customer happy?
  6. Ask a specific question on stackoverflow.com!
share|improve this answer
add comment

Here's one approach: (suitable for small programs)

  1. The google trick. Try to find 7 words that fully describe your requirement.
  2. Figure out class names. You need all of them - partial list is not ok.
  3. Choose one class.
  4. Figure out method names. Again, full list is needed.
  5. Write function prototypes. You must understand data to decide types.
  6. Write implementation of a method(s) - must implement the prototype fully. Once correct return value is available, the implementation is ready and must not be modified.
  7. repeat from (3) until all classes are implemented.
  8. write main() function.
  9. instantiate some objects in main().
  10. do NOT call any member functions in main().
  11. write some algorithms that need object references.
  12. the algorithms can call member functions.
share|improve this answer
    
There's great value in what you're saying, but this will not be apparent to someone who's just starting to code ("Figure out class names. You need all of them - partial list is not ok." - why?). My advice would be to rather try to code something any way you can, and when you hit walls try revisiting the above answer and see which of the adivces listed there will make your wall go away. Repeat as needed. –  Shivan Dragon Sep 5 '12 at 10:51
add comment

There's actually a book which answers exactly that question:

How to Design Programs – An Introduction to Programming and Computing by Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi

They are currently working on a second edition, and after that, a second volume (How to Design Components).

The really cool thing about this book is that it gives you a set of recipes for designing programs. In other words, it gives you step-by-step instructions which you can (semi-)mindlessly follow in order to design a program.

Or, to put it yet another way: it contains a set of programs for writing programs, so that you don't have to figure out how to write a program: the authors figured it out for you!

share|improve this answer
add comment

It really depends on complexity of your program's requirements. If the program is trivial GUI application then you might start by writing some short user manual, which would imply user requirements for your program. After you have complete user manual, then you design GUI to match your manual, and adding each features described in the manual until it's done.

share|improve this answer
add comment

Here you are some practical steps to follow:

  1. Start with High level design - by defining big picture, what your program should do
  2. Continue with page-flow and navigation design
  3. Write pseudo-code and create placeholders for functions
  4. Write actual code under the defined pseudo-code
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.