I
istillshine
Particularly for medium-sized (10,000 ~ 20,000 lines) programs, what
are useful strategies to design them before coding?
My strategies are:
1. Imagine what the final program would look like. Write down
options.
2. Write down many structures, such as
struct s1 {
/* contents */
};
struct s2 {
/* contents */
};
, and so on.
3. Write down many function prototypes, and classify them to different
..h files.
4. Write many macro definitions, such as "#define MAX_SIZE 100"
But having to change the original design during coding really troubles
me. Do you have any suggestions to avoid doing this?
are useful strategies to design them before coding?
My strategies are:
1. Imagine what the final program would look like. Write down
options.
2. Write down many structures, such as
struct s1 {
/* contents */
};
struct s2 {
/* contents */
};
, and so on.
3. Write down many function prototypes, and classify them to different
..h files.
4. Write many macro definitions, such as "#define MAX_SIZE 100"
But having to change the original design during coding really troubles
me. Do you have any suggestions to avoid doing this?