473,769 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to make a plan of how you implement a program?

Hi, I have a question. I am learning about how to use c++ language. I
have attempted to make my own programs, using the knowledge that I have,
but sometimes when I get stuck on writing a code, it took me a long time
to figure out what I should do. For instance, I was writing a program
which tells you all the prime numbers that are less than the number you
input on the console. It was a very short program, but it took me a
while to write the code successfully. Then I thought that the reason why
I got stuck was that I started writing the code without having any plan.
I just sat down in front of the computer, and started writing the code.
I heard that some people knows how to make a over-all plan of how he
wants to implement his code before he actually starts writing. I heard
about drawing a flowchart, then somebody said that a flowchart is not an
effective way for a large program.
Could anybody tell me how more experienced programer makes his plan
for writing his code, so that there is less chance that he gets stuck
while he's writing his code?
Thank you very much, and have a good day.

Jul 19 '05
13 3414
In article <INY5b.8876$kW. 2449@edtnps84>, takashi <tw******@telus .net>
writes
Hi, I have a question. I am learning about how to use c++ language. I
have attempted to make my own programs, using the knowledge that I
have, but sometimes when I get stuck on writing a code, it took me a
long time to figure out what I should do. For instance, I was writing a
program which tells you all the prime numbers that are less than the
number you input on the console. It was a very short program, but it
took me a while to write the code successfully. Then I thought that the
reason why I got stuck was that I started writing the code without
having any plan. I just sat down in front of the computer, and started
writing the code. I heard that some people knows how to make a over-all
plan of how he wants to implement his code before he actually starts
writing. I heard about drawing a flowchart, then somebody said that a
flowchart is not an effective way for a large program.
Could anybody tell me how more experienced programer makes his plan
for writing his code, so that there is less chance that he gets stuck
while he's writing his code?
Thank you very much, and have a good day.

You will need to learn UML which in turn will teach you object oriented
software development principles. There are loads of books on the subject
or you could take a course.

good luck
Tom
--
http://www.shacc.demon.co.uk
Jul 19 '05 #11

"Tom Mullan" <to*@shacc.demo n.co.uk> wrote in message
news:cH******** ******@shacc.de mon.co.uk...
In article <INY5b.8876$kW. 2449@edtnps84>, takashi <tw******@telus .net>
writes
Hi, I have a question. I am learning about how to use c++ language. I
have attempted to make my own programs, using the knowledge that I
have, but sometimes when I get stuck on writing a code, it took me a
long time to figure out what I should do. For instance, I was writing a
program which tells you all the prime numbers that are less than the
number you input on the console. It was a very short program, but it
took me a while to write the code successfully. Then I thought that the
reason why I got stuck was that I started writing the code without
having any plan. I just sat down in front of the computer, and started
writing the code. I heard that some people knows how to make a over-all
plan of how he wants to implement his code before he actually starts
writing. I heard about drawing a flowchart, then somebody said that a
flowchart is not an effective way for a large program.
Could anybody tell me how more experienced programer makes his plan
for writing his code, so that there is less chance that he gets stuck
while he's writing his code?
Thank you very much, and have a good day.

You will need to learn UML


Gosh, how did we manage all these years, without UML? ;-)

Jul 19 '05 #12
Bob Jacobs wrote...
"Tom Mullan" <to*@shacc.demo n.co.uk> wrote...
You will need to learn UML


Gosh, how did we manage all these years, without UML? ;-)


We drew class diagrams, sequence diagrams et al. using other notation
instead, and got on with it without invoking the Elder God Hype.

:o)

Chris

Jul 19 '05 #13

"E. Robert Tisdale" <E.************ **@jpl.nasa.gov > wrote in message
news:3F******** ******@jpl.nasa .gov...
takashi wrote:
Could anybody tell me how more experienced programmer makes his plan for writing his code, so that there is less chance that he gets stuck while
he's writing his code?


1. Identify all of data objects in your problem.
2. Group the data objects of the same type together.
3. Implement the Abstract Data Type (ADT) for each group as a class.
An ADT specifies
a. all of the values that an object of a particular type can have and
b. all of the methods which can be applied to an object of that type.
4. Solve the problem by instantiating the objects and applying
the appropriate methods for objects of each type.


Some programmers start typing their code into the PC,
they first write some comments and then fill in the code thereafter.
They may refer to their previous working code or somebody's else's code
for useable design patterns or idioms to use in their solution.
They may even refer to some Algorithms text to get some helpful
datastructures and pseudocode
if the programming problem is a particularly hard one.

Using pencil and paper to draw some classes and attributes and jotting down
some tricky algorithms in short pseudocode
may help in school projects or assignments where the solutions may not be
readily available in any textbooks or journal articles
Jul 19 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
1440
by: Roy | last post by:
Hey all, I'm a relative newcomer to asp.net and have 2 simple code snippets below. Everything works fine, I'm just curious if there is a more efficient way to do the job as the update takes quite a while. Here's the proc: **************************************** CREATE PROCEDURE @Recon char(10), @Book nvarchar(50), @Van nvarchar(5),
17
6442
by: UJ | last post by:
Is there any way for a windows service to start a windows program ? I have a service that will need to restart a windows app if it needs to. TIA - Jeff.
6
4900
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
19
2445
by: zzw8206262001 | last post by:
Hi,I find a way to make javescript more like c++ or pyhon There is the sample code: function Father(self) //every contructor may have "self" argument { self=self?self:this; //every class may have this statement self.hello = function() {
10
13643
by: OppThumb | last post by:
Hi, I've been searching this newsgroup for an answer to my question, and the closest I've come asks my question, but in reverse ("How to figure out the program from plan/package"). I've -- shall we say, inherited? -- a COBOL program with very little documentation that I've recompiled for debugging purposes. The compile/link/bind have all been done, but nothing in the output tells me what plan the program has been bound to, so I can't...
2
2654
by: ielamrani | last post by:
Hi, I am trying to run a make table query and it's giving me the following error: "Numeric Field Overflow" Here the query: SELECT tblPCRAFees., tblPCRAFees., tblPCRAFees., IIf(="SSSG" Or ="QUADA" Or ="169","50","35.70") AS Charge,
0
4575
by: Neff | last post by:
I have a clustered installation of SQL Server 2005 running on Windows 2003 with SSIS installed on the cluster. I'm running SQL Server Management Server on one of the cluster nodes and I can right click and create a new maintenance plan and drag a 'Back Up Database Task' into the plan. (Using the wizard also works.) However if I try to open the the Backup item in the plan I get the following error
82
3734
by: Bill David | last post by:
SUBJECT: How to make this program more efficient? In my program, a thread will check update from server periodically and generate a stl::map for other part of this program to read data from. Let's name the update method as doUpdate and stl::map read methods as getData and copyData. Since stl::map is not thread-safe, we should do synchronization by ourselves. A usable solution is to create a boost::mutex::scoped_lock object in all above...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9994
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8870
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.