home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!news.univie.ac.at!scsing.switch.ch!univ-lyon1.fr!ghost.dsi.unimi.it!rpi!uwm.edu!spool.mu.edu!hri.com!opl.com!regina!harvey
- From: harvey@opl.com (Harvey Reed)
- Newsgroups: comp.object
- Subject: Re: Maintenance and OO
- Message-ID: <harvey.728148390@regina>
- Date: 27 Jan 93 15:26:30 GMT
- References: <1993Jan25.093100@axion.bt.co.uk>
- Sender: news@opl.com
- Lines: 76
-
- pkeddie@axion.bt.co.uk (Paul Keddie) writes:
-
-
- >...
- >1) Are 00 programs harder to maintain than normal functional programs?
-
- IMO a well written OO program is much easier to maintain.
-
- >2) Do maintainers need to adopt new approaches to maintenance for 00
- > programs?. For example, I've found trying to track function calls can
-
- Traditional practices dictate that an employees performance is measured by
- the bulk of code produced in a development cycle. Using traditional
- practices in OO development can lead to programs that are incapable of
- being maintained.
-
- Once employers realize the folly (and some do!), they will let the
- developers spend more time designing, and so on with the
- obvious benefits. I am fortunate to have found such an employer.
-
- Suppose a well written (and designed!) C++ program falls into your lap
- as a maintainer. The first thing to do IMO is to thoroughly understand
- the design. Maintaining OO (and C++) requires a more global understanding
- of the system than with C.
-
- I think this is a result of the fact that well designed OO packages
- (class, whatever) tend to get reused over and over, so the end result
- is that fixing a line of code can have impact throughout the system.
-
- > lead to dead ends if you come to a call to 'Handle' in an event-driven
- > program. Is my approach wrong?
-
- IMO debugging an OO system is more tedious than traditional C. The key
- here is to have small unit tests for each package, class whatever. If
- there is suspicious behavior, go back to the unit tests first and see
- if they were comprehensive enough, also the unit tests might give
- you clues as to how the "live" system differs from the unit test. My bias
- is to use debugging as a last resort. This bias has served me well.
-
- >3) Are there more difficulties because of C++ rather than the 00 paradigm?
-
- Refer to the endless arguements on comp.lang.c++
-
- >4) Is badly written C++, 00 programs worst than the equivalent C programs?
-
- A badly written C++ program can be your worst nightmare. A well written
- C++ program is a dream to work with. C falls in between somewhere.
-
- -------------------------
-
- I've been using C++ since 1987-88, Modula-2 before that. I enjoy the
- C++ language, but understand peoples frustrations. I would never
- go back though.
-
- Once you get the hang of it, OO and C++ are *very* productive. The
- key (as many people will tell you) is:
-
- 1. There is no substitute for up-front analysis and design
-
- 2. There is no substitute for building quality in up-front
-
- 3. There is no substitute for catering your standards toward
- the people who will be maintaining your system.
-
- -----------------------
-
- If you turn out to have more questions specific to C++, you should
- move your post to comp.lang.c++
-
-
-
- --
- ++harvey
- ===========================================================================
- internet: harvey@opl.com / hreed@cs.ulowell.edu / h.reed@ieee.org
- voice/fax: 617-965-0220 / 617-965-7599
-