[Techtalk] Programming languages for women

Mary linuxchix at puzzling.org
Mon Mar 4 15:00:28 EST 2002


On Sun, Mar 03, 2002 at 10:55:03PM -0500, David Merrill wrote:
> The key is good organization of your code. If you organize your
> procedures and functions as methods of objects, you can forget about
> that code when you write the gui. Proper encapsulation and logical
> organization are what matter most, breaking the complex problems down
> into a set of simple problems. Nobody can handle the complexity of a
> large scale project.

I usually aim to create as many "black boxes" as possible.

So if you have a method

int get_next_leap_year(int year)

with a comment "Returns the next leap year after the paramater year" you
just call the method and 'trust' (assume that at some point you or
someone wrote the method and tested it) that it works. Object
orientation is a larger version of the same thing. This way, although in
a large project you might have written hundreds (maybe thousands) of
methods and objects, it only takes a minute or two to look at the
method/object and know how it can be used.

-Mary.



More information about the Techtalk mailing list