Hi, I've been thinking about this for a while. What is the best way to design a program?
What I don't understand is how people think of which classes etc. they will use and what they are called. For example, in a program which simulates the card game BlackJack. How/why do people have a class/etc for say CardPack,Card. I honestly don't know how to word this question properly. So I will tell you what i do.

If I am writing a small program, I don't know what classes i will need to write, if I was doing that blackjack game, I would just have a class called Card or something(I wouldn't think of having a separate Cardpack class until I found that I need some different functionality or something). Are there any specific steps i should take when designing a program? I hope somebody understands my dilemma because I can't really express what I mean properly.

What is the best way to design a program?

Opinions will vary, and methodologies can be mutually exclusive (ie top-down vs bottom-up design). Design is actually a pretty deep subject.

Are there any specific steps i should take when designing a program?

In small programs, I'll just wing it and refactor as I go. For larger applications I'll usually start by coming up with user stories to help with visualizing the entire system. From there it's easier to dig down and add details with a big picture view.

Opinions will vary, and methodologies can be mutually exclusive (ie top-down vs bottom-up design). Design is actually a pretty deep subject.


In small programs, I'll just wing it and refactor as I go. For larger applications I'll usually start by coming up with user stories to help with visualizing the entire system. From there it's easier to dig down and add details with a big picture view.

I guess it's just difficult for me to understand that. For the small programs I have done it as you said. I have never made a large application and that is where my worries are coming from! I guess I just need to know, does it take a lot of planning to get an idea of the classes etc needed for a large application? What kind of time frame?..I think I have it in my head, that because small programs are so easy to write, and I can "make it up" as I go along, I therefore think large applications must be the same. And is therefore pretty intimidating!

does it take a lot of planning to get an idea of the classes etc needed for a large application?

Yes, but my idea of a large application is probably very different from yours. For example, your blackjack game example would be small to me.

What kind of time frame?

It depends on the scale of the project, the size of the development team, and client participation.

I think I have it in my head, that because small programs are so easy to write, and I can "make it up" as I go along, I therefore think large applications must be the same.

As the scale of a project increases, the rules change. So no, large programs are not the same as small programs. Fresh college graduates who think they're invincible geniuses are often chagrined when they face reality. ;)

So no, large programs are not the same as small programs. Fresh college graduates who think they're invincible geniuses are often chagrined when they face reality. ;)

Ha, I realise this which is why I want to get my head round it now! Thanks for your time, I don't feel as worried now, knowing that there is actual work put into design and not the first thing off the top of your head.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.