Re: [gtk-list] Re: Need help in GTK-project
- From: erik it et tudelft nl (Erik Mouw)
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Need help in GTK-project
- Date: Sat, 11 Dec 1999 15:11:28 +0100 (CET)
John C Atkeson wrote:
> >>
> > Why do I need a headerfile for this? Sorry to ask such stupid
> > questions, but this is my first BIG program... at school al always
> > learned to program in just one .c file and that was quite stupid I
>
> Are you serious? It's really bad programming practice.
> <<
> Eh, not that bad.
>
> It's a tradeoff, modularity is good, but 50 source files can be a lot
> harder to maintain than 5.
> E.G. renaming (or just finding) a variable is much easier with a
> minimum of files. (Notice how the best tutorial examples are only 1
> piece of code? Programs are written to be read by people... If not, they
> go extinct.)
You are right: sometimes modularity is not that efficient. However, for
every program that isn't a simple straight-forward task modularity helps
you creating, testing, and maintaining the code. (Tutorial examples
are straight forward programs: show how a certain feature works.)
However, the program Bart is working on is a clear example where
modularity will help. He actually needs two major modules: one to
control the motor and another one that handles the user interface.
Given the fact that he admits that this is his first big program, it
is a bit strange that his teachers didn't tell him about modular
programming.
Erik
--
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands
Phone: +31-15-2785859 Fax: +31-15-2781843 Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]