Matrice Masthead
Home Page
Training Courses
Consulting Details
Details of integrated programmes
Contacting Matrice
Text search of Matrice site

Go to selected page

Lattice -> Matrice

The Health and Safety Programmes

When adopting object technology, there are an awful lot of suggestions, practices, edicts and dire warnings to remember and try not to fall foul of. Whether you got your analysis, design and language training from Matrice or someone else (or from apprenticeship, reading or having been thrown in at the deep end), most development teams will want to get some assurance that their project is healthy and that the prognosis is good.

Whilst happy to carry out checks on any development activity, we have found that the commonest and most far-reaching mistakes are made in designs and in C++ implementations.

The C++ Health and Safety Check

Here's a little checklist:

  • Does the important mantra, “variables have types and objects have classes” make sense to you?
  • Do you know what fragile superclasses are, and how to avoid them?
  • Do you know why private inheritance is not normally used with object-orientation?
  • Do you know the canonical class format -- the twelve or so components and rules for a well-behaved class?
  • Do you know when to use built-in arrays and when to avoid them; and what the alternatives are?
  • Do you know why you will probably not want to use exceptions?
  • Do you know how to avoid prefixes in class names?
  • Do you know the keyword that single-handedly can double (OK, significantly improve) a program’s safety.
  • Do you know why “programmers who write programs in C++ aren’t creating object-oriented C++”?
  • Do you know why, and how, you should get rid of most of your switch/case uses?
  • Do you know when you could and should return a reference and when you mustn’t return a reference?
  • Can you list all the meanings of static and say how you can and should restrict it to just one basic meaning?
  • Are you sure as to exactly what happens to private members under inheritance?
  • Do you know how and why it is that the public member functions in good object-oriented code aren’t really public at all?
  • Why is it likely that a member function name is unlikely to be any good if it’s taken less than fifteen minutes to choose?
  • Can you list at least three reasons why self-messaging is important?

The answers to these questions and many more design practices, standards and style questions form part of the seminar and checklist deliverables of the programme.

The check-up addresses the practices and deliverables of a project to ensure that the software being produced is effective, safe and maintainable. Training courses only provide a beginning; to give confidence that the development practices and the deliverables are making the best use of C++, a follow-up in a different format can be very useful.

This kind of check-up is particularly important when C++ is the chosen language. C++ supports a very wide spectrum of development paradigms, but offers no guidance or restrictions on design or coding style.

A typical first health and safety check would take two or three days. It would begin with a seminar to revise design and implementation goals and practices; it would proceed through a phase of design and code review; and would finish with a seminar centred on the recommendations and feedback. Subsequent checks would focus on review and feedback -- through seminar and walkthrough.

Aims and Objectives

  • To ensure that the designs and the implementation practices are making safe and effective use of C++
  • To assess and/or put in place, standards and style guidelines for coding and detailed design
  • To appraise a project of its status regarding its practices, standards, style and deliverables
  • To offer recommendations for improvement where appropriate
  • To ensure that the two practices with the highest return on time invested -- CRC workshops and walkthroughs -- are in place and working effectively
  • To get an organisation to a position where further health and safety checks are a luxury rather than a necessity

The Object-Oriented Design Health and Safety Check

As well as, once again, ensuring that the designs are making effective use of object technology, are maintainable and will support future reuse, this check-up is also an opportunity to instigate Class Responsibility Collaboration (CRC) workshops. Along with a structured programme of "walkthrough" informal reviews, CRC workshops are one of the best investments of design time. For many organisations, though, finding experienced moderators for the first few workshops can be a problem.

[ Home | Training | Consulting | More on Matrice | Contacting ]



Questions or problems regarding this web site should be directed to webmaster@matrice.co.uk.
Copyright © 2005 Matrice. All rights reserved.
Last updated: 21 May, 2004