Thursday, February 4, 2010

17.2 Advanced Function Options











 < Day Day Up > 







17.2 Advanced Function Options





By now we've introduced you to



all

but one of Oracle's regular expression functions.

However, you've only seen them used in their

simplest form. Their full syntax is:





REGEXP_INSTR(source_string, expression 

[, position [, occurrence

[, return_option

[, match_parameter]]]])



REGEXP_LIKE (source_string, expression

[, match_parameter])



REGEXP_REPLACE(source_string, expression

[, replace_string

[, position [, occurrence

[, match_parameter]]]])



REGEXP_SUBSTR(source_string, expression

[, position [, occurrence

[, match_parameter]]])







If you're familiar with Oracle's

string-manipulation functions, you'll have no

trouble discerning the purpose of the

REGEXP

functions:








REGEXP_INSTR





Returns the character position at which text can be found matching a

regular expression in a target string.








REGEXP_LIKE





Discerns whether a given string contains text matching an expression.

This is a Boolean function, returning TRUE or FALSE, or NULL.








REGEXP_REPLACE





Performs a regular expression search-and-replace operation, which

you'll learn about in Section 17.3.








REGEXP_SUBSTR





Extracts text matching a regular expression from a string.









The parameters to these functions are as follows:






source_string





The string to be searched.






expression





A regular expression describing the pattern of text that you seek.






replace_string





A string generating the replacement text to be used in a

search-and-replace operation.






position





The character position within

source_string at which to begin a search.

This defaults to 1.






occurrence





The occurrence of the pattern you wish to locate. This defaults to 1,

giving you the first possible match.






return_option





Valid only for REGEXP_INSTR, and determines whether the beginning or

ending character position is returned for text matching a pattern.

The default is 0, for the beginning. Use 1 to return the ending

position.






match_parameter





A text string through which you may specify options to vary the

behavior of the regular expression matching engine.









The match_parameter deserves a bit of explanation.

It's a character string that you build using one or

more of the following letters: i,

c, n, m. One

use is to specify whether matching is case-sensitive. By default,

your NLS_SORT setting drives this aspect of regular expression

behavior. You can override that default on a call-by-call basis,

using i to get case-insensitive matching, and

c to get case-sensitive matching. Following is a

simple demonstration that works with our example data set. When the

i option is used, the match succeeds, even though

the case really does not match:





SELECT emp_id, text

FROM employee_comment

WHERE REGEXP_LIKE(text, 'CEDAR LAKE', 'c');



no rows selected



SELECT emp_id, text

FROM employee_comment

WHERE REGEXP_LIKE(text, 'CEDAR LAKE', 'i');



EMP_ID TEXT

---------- ---------------------------------------------

7499 1105 McConnell Court

Cedar Lake MI 48812

Home: (989) 387-4321

Cell: (237) 438-3333

7782 Academy Apartments, #138, Cedar Lake MI 48812

7788 #1 Water Tower Lane

Cedar Lake MI 48812







The n option is useful when working with data,

such as ours, that contains embedded newline (usually

chr(10)) characters. By default, the period

(.) does not match newlines, which is why the

following query brings back only the first line of comment text:





SELECT emp_id, REGEXP_SUBSTR(text, '.*') text

FROM employee_comment

WHERE emp_id = 7698;



EMP_ID TEXT

---------- ---------------

7698 Marion Blake







Using 'n' for the match parameter, you can have

the period match newlines, which in the case of this query, results

in the entire comment being returned:





SELECT emp_id, REGEXP_SUBSTR(text, '.*', 1, 1, 'n') text

FROM employee_comment

WHERE emp_id = 7698;



EMP_ID TEXT

---------- -----------------------

7698 Marion Blake

N1375 Lakeshore Drive

Vestaburg MI 48891

(989) 388-1234







This example also illustrates the important point that specifying a

match parameter forces you to also specify any preceding, optional

parameters that you would otherwise skip.





The final match option is m, which changes the

definition of line



with respect to the ^ and $

metacharacters. By default, line means the entire target

string
, so an expression such as ^.*$,

together with the n option, will bring back all

characters in the target string:





SELECT emp_id, REGEXP_SUBSTR(text, '^.*$', 1, 1, 'n') text

FROM employee_comment

WHERE emp_id = 7788;



EMP_ID TEXT

---------- --------------------

7788 #1 Water Tower Lane

Cedar Lake MI 48812







The



n option is necessary here, because otherwise the

period would not match the newline. If the period did not match the

newline, the expression would fail to match at that point, and it

would be impossible to match all characters between the beginning and

end of the string.





However, using the m option causes the definition

of line to change from the entire target string,

to any line within that string, where lines are

delimited by newline characters. The following example removes

n, replacing it with m:





SELECT emp_id, REGEXP_SUBSTR(text, '^.*$', 1, 1, 'm') text

FROM employee_comment

WHERE emp_id = 7788;



EMP_ID TEXT

---------- --------------------

7788 #1 Water Tower Lane







You can specify multiple match parameters in any order. For example,

'in' means the same as 'ni'. If

you specify





conflicting options, such as

'ic', the last option, 'c' in

this case, is the one that takes precedence.







Try our last example in this section using 'mn' as

the match parameter string. You'll get back the

entire target string. Why? Because of the greediness rule. When

'mn' is used, the first line is a match, but the

entire string is a longer match.




















     < Day Day Up > 



    Acknowledgments




    Ru-Brd









    Acknowledgments


    I'd like to thank my family, whom I bribed with four-wheelers with the advance money, in order to make losing a lot of Mom's time and attention worth it to them too. I especially want to thank my oldest daughter, Jennifer, for learning to make SpaghettiOs and hot dogs for herself and her sister so that Mommy could work on her book. I'd like to thank my youngest daughter, Jessica, for not letting me forget who is most important. And finally, I'd like to thank my husband, Ken, who really didn't understand why I needed to write this book but put up with it, and the never-ending crunching schedules, anyway … even when it didn't seem worth the four-wheelers anymore.


    Thanks also to my manager and my friend, Carolyn Ruby, who made this book part of "my job" and has always been so supportive in helping me achieve my goals and find my killer instinct. Thanks to Janet Farrell and Vera Plechash, my cheerleaders. Thanks to Ward Harold for catching the JMX vision and for buddying up with me so that I could see my name in print. Thanks to Leigh for championing JMX in WebSphere and the JCP. And finally, thanks to Shelley Kronzek for continuing to nag until we were doing something we really wanted to do in the first place and for being the mediator between us technical chickens and the big scary publishing world.


    � Heather Kreger


    Wow, I'm writing acknowledgements. That must mean this project is almost complete. Saints be praised! Thanks to St. Heather for introducing me to JMX and, especially, for handling all the "lead author" administration chores. Our editor, St. Shelley Kronzek, persevered with us on this project through a series of trying circumstances and still bought us dinner in San Francisco. Thanks for your patience and dedication, Shelley.


    Although I got to write the book, there is a fantastic group of people in Rome, Italy, who did most of the hard work of bringing JMX to life within Tivoli as TMX4J. To Kenneth Barron, Alfredo Cappariello, Raimondo Castino, Eliseba Costantini, Marco de Gregorio, Paola Diomede, Roberto Longobardi, Attilio Mattiocco, Marco Melillo, Alessio Menale, Chiara Montecchio, Massimiliano (Max) Parlione, Maurizio Simeoni, Massimo Tarquini, and Cosimo (Mimmo) Vampo, mille grazie ragazzi! My heartfelt thanks also go to Cesare Giuliani, the best development manager I've ever worked with, for turning my fuzzy musings into working code and never complaining when I didn't come back from Sabaudia when I said I would, and to Maurizio Piatti, who is simply my favorite Italian.


    Finally, special thanks to my wife Diana and our kids Matthew, Aaron, and Kelly Rose for putting up with the constant presence of Daddy's laptop and the absence of his homemade bread for all these months. You guys make it all worthwhile.


    � Ward Harold


    I would like to thank my wife and daughter, Cheryl and Claire, for their patience and support. You are my compass and my light. I would also like to thank my coauthors, Heather and Ward, for their continued support and enthusiasm. Thanks go to all of the members of the JSR 77 expert group who worked so hard to produce the specification. Thanks to the management at IBM, Michelle Swenson and Diane Copenhaver, for encouragement and resources. And I would also like to thank the folks at Addison-Wesley, Shelley and all of the reviewers, for their excellent comments and suggestions.


    � Leigh Williamson








      Ru-Brd



      11.5 Collection of Issues for Beyond Version 1.1



      [ Team LiB ]





      11.5 Collection of Issues for Beyond Version 1.1


      The public review period for CMMI version 0.2 in 1999 resulted in about 2,500 change requests to the model and the "books" that represent the model. Of these requests, approximately 400 were classified as "minor" and 500 were considered "global" (affecting several process areas or other elements). The remaining change requests were classified as being "local" to the individual model elements. For several of the change requests in the global and local categories, the CMMI Team lacked sufficient time to deal with them properly. Instead, they were placed on a list of potentially good ideas warranting more exploration.


      The use of version 1.0 resulted in many more change requests to the model components. The CMMI Team used the same process to deal with the large number of changes requested, and as happened prior to version 1.0's release, version 1.1 does not address all of the potentially good ideas from the reviewers. In this section, we discuss a few of the other major open issues�that is, issues deferred for consideration to after version 1.1.


      11.5.1 Advanced Practices


      The implementation of advanced practices remains an issue. Version 1.1 allows advanced practices in the Engineering category but not in the other process area categories. For the future, we would expect that as the model is used, one of two things would occur. First, process improvement in the Engineering process areas might be aided by the presence of advanced practices, prompting users of this model to seek the expansion of this concept across the entire model.


      Second, the value that advanced practices may have for process improvement might be viewed as insufficient to justify the architectural complexity they introduce, prompting model users to ask for their elimination across the entire model. The decision within the CMMI Team to put them into the initial model releases in a limited way was intended to lay the foundation for feedback either in favor of or opposed to advanced practices, as the team could not reach a consensus view. This disagreement was a part of the debate between proponents of staged versus continuous architectures.


      11.5.2 Generic Attributes


      EIA 731 contains generic attributes, an aspect of process improvement that is not included in any other source model. Generic attributes address the effectiveness of the process and the value of the work products produced by it. Proponents of generic attributes on the CMMI Team generated a proposal for CMMI generic attributes by making changes to improve the objectivity of the generic attributes in EIA 731. In the end, however, that proposal was not adopted.


      Generic attributes add a significant aspect to process improvement that is not addressed by the capability dimension or the process dimension: How effective are the processes in your environment, and do they produce work products that the stakeholders find valuable? Some organizations have developed the ability to evaluate this process-improvement dimension by adopting the Lean initiative. For CMMI, the question remains: Would the inclusion of generic attributes in a CMMI appraisal be of sufficient value, given the issue of their objectivity?


      11.5.3 Relationship to Other Process Areas


      CMMI version 1.1 includes a section in each process area titled "Related Process Areas," which contains (not surprisingly) references to other process areas. A recommendation was made and accepted by the CMMI Team (but not implemented in version 1.1) to change the title of this section to "Relationships with Other Process Areas," and to make its content more meaningful.[7]

      [7] An earlier version of CMMI (predating version 1.0) used two levels of reference: the currently used "informative" reference and a stronger reference. The stronger reference invoked another process area, stating "Use the x process areas to achieve y." The application of the "Use" reference was not consistent across the model, confused model users, and raised issues in the area of appraisal. It was not clear exactly what was implied by the stronger relationship between process areas. Given the many calls to reduce the model's complexity and of the time to adequately study the issue, the stronger reference was eliminated in version 1.0. Whether anyone will make the case to revive multiple forms of reference in CMMI remains to be seen.


      The needs related to this issue are as follows:


      • Model users need to understand the high-level (key) relationships between process areas.

      • Those who develop CMMI training materials need a mechanism to generate a high-level diagram to show relationships between process areas.

      • Model users need to understand the difference between references at different levels (components) of the model.


      The following guidelines were defined to restrict the use of the initial reference section in each process area to key process area interfaces:


      • Change the title of "Related Process Areas" to "Relationships with Other Process Areas."

      • Use the "Reference" architectural component but change the structure of the reference, in this section only, to an active statement of the relationship with other process areas.

      • Allow one to three sentences for each relationship description.

      • Include only the key relationships (that is, what the user needs to see at a high level).

      • Retain the normal references in the model from other components.

      • Generate a view in the Product Suite Repository that shows these relationships.


      The CMMI Product Team has recommended such a change for each process area as a part of the next release of CMMI.



      Example Update to Relationships Section


      The following example is a proposed update to the Technical Solution process area:


      Relationship with Other Process Areas


      The Requirements Development process area provides product-component requirements to this process area so that alternative solutions can be developed.


      The Requirements Development process area receives technical solutions, selected from the alternatives, to refine the product-component requirements.


      The Work Product Verification process area verifies that the product components meet their requirements. As verification issues are identified, the design may need to change. This is an iterative process and occurs throughout the development of the product.


      The Decision Analysis and Resolution process area provides structured decision-making practices that are used in selecting a technical solution from the alternative solutions.


      The Product Integration process area receives the product components following their implementation.


      The Product Integration process area provides integration test deficiencies to this process area for corrective action.


      The Validation process area provides validation deficiencies to this process area for corrective action.


      The Supplier Agreement Management process area handles the acquisition of all product components once the purchase decision is made in this process area.






        [ Team LiB ]



        Section 3.8. Objects








        3.8. Objects


        Ruby is a very pure object-oriented language: all values are
        objects, and there is no distinction between primitive types and object types as there are in many other
        languages. In Ruby, all objects inherit from a class named
        Object and share the methods defined by that class.
        This section explains the common features of all objects in Ruby. It is
        dense in parts, but it's required reading; the information here is
        fundamental.



        3.8.1. Object References


        When we work with objects in Ruby, we are really working with
        object references. It is not the
        object itself we manipulate but a reference to it.[*] When we assign a value to a variable, we are not copying an object "into" that variable; we are
        merely storing a reference to an object into that variable. Some code
        makes this clear:

        [*] If you are familiar with C or C++, you can think of a
        reference as a pointer: the address of the object in memory. Ruby
        does not use pointers, however. References in Ruby are opaque and
        internal to the implementation. There is no way to take the address
        of a value, dereference a value, or do pointer arithmetic.


        s = "Ruby" # Create a String object. Store a reference to it in s.
        t = s # Copy the reference to t. s and t both refer to the same object.
        t[-1] = "" # Modify the object through the reference in t.
        print s # Access the modified object through s. Prints "Rub".
        t = "Java" # t now refers to a different object.
        print s,t # Prints "RubJava".





        When you pass an object to a method in Ruby, it is an object
        reference that is passed to the method. It is not the object itself, and
        it is not a reference to the reference to the object. Another way to say
        this is that method arguments are passed by value
        rather than by reference, but that the values
        passed are object references.


        Because object references are passed to methods, methods can use
        those references to modify the underlying object. These modifications
        are then visible when the method returns.



        3.8.1.1. Immediate values

        We've said that all values in Ruby are objects and all objects
        are manipulated by reference. In the reference implementation,
        however, Fixnum and Symbol
        objects are actually "immediate values" rather than references.
        Neither of these classes have mutator methods, so
        Fixnum and Symbol objects are
        immutable, which means that there is really no way to tell that they
        are manipulated by value rather than by reference.


        The existence of immediate values should be considered an
        implementation detail. The only practical difference between immediate
        values and reference values is that immediate values cannot have
        singleton methods defined on them. (Singleton methods
        are explained in Section 6.1.4.)





        3.8.2. Object Lifetime


        The built-in Ruby classes described in this chapter have literal
        syntaxes, and instances of these classes are created simply by including
        their values literally in your code. Objects of other classes need to be
        explicitly created, and this is most often done with a method named new:


        myObject = myClass.new



        new is a method of the Class
        class. It allocates memory to hold the new object, then it initializes
        the state of that newly allocated "empty" object by invoking its
        initialize method. The arguments to new are passed
        directly on to initialize. Most classes define an
        initialize method to perform whatever initialization
        is necessary for instances.


        The new and initialize
        methods provide the default technique for creating new classes, but
        classes may also define other methods, known as "factory methods," that
        return instances. We'll learn more about new,
        initialize, and factory methods in Section 7.4.


        Ruby objects never need to be explicitly deallocated, as they do
        in languages like C and C++. Ruby uses a technique called
        garbage collection to automatically destroy objects that are no longer needed.
        An object becomes a candidate for garbage collection when it is
        unreachable—when there are no remaining references to the object
        except from other unreachable objects.


        The fact that Ruby uses garbage collection means that Ruby
        programs are less susceptible to memory leaks than programs written in
        languages that require objects and memory to be explicitly deallocated
        and freed. But garbage collection does not mean that memory leaks are
        impossible: any code that creates long-lived references to objects that
        would otherwise be short-lived can be a source of memory leaks. Consider
        a hash used as a cache. If the cache is not pruned using some kind of
        least-recently-used algorithm,
        then cached objects will remain reachable as long as the hash itself is
        reachable. If the hash is referenced through a global variable, then it
        will be reachable as long as the Ruby interpreter is running.




        3.8.3. Object Identity


        Every object has an object identifier, a Fixnum, that you can obtain with the object_id
        method. The value returned by this method is constant and unique for the
        lifetime of the object. While the object is accessible, it will always
        have the same ID, and no other object will share that ID.


        The method id is a deprecated synonym for object_id. Ruby 1.8
        issues a warning if you use it, and it has been removed in Ruby
        1.9.


        __id__ is a valid synonym for
        object_id. It exists as a fallback, so you can access
        an object's ID even if the object_id method has been
        undefined or overridden.


        The Object class implements the
        hash method to simply return an object's ID.




        3.8.4. Object Class and Object Type


        There are several ways to determine the class of an object in Ruby. The simplest is
        simply to ask for it:


        o = "test"  # This is a value
        o.class # Returns an object representing the String class



        If you are interested in the class hierarchy of an object, you can
        ask any class what its superclass is:


        o.class                       # String: o is a String object
        o.class.superclass # Object: superclass of String is Object
        o.class.superclass.superclass # nil: Object has no superclass



        In Ruby 1.9, Object is no longer the true root
        of the class hierarchy:


        # Ruby 1.9 only
        Object.superclass # BasicObject: Object has a superclass in 1.9
        BasicObject.superclass # nil: BasicObject has no superclass



        See Section 7.3 for more on
        BasicObject.


        So a particularly straightforward way to check the class of an
        object is by direct comparison:


        o.class == String       # true if is o a String



        The instance_of? method does the same thing and is a little more elegant:


        o.instance_of? String   # true if o is a String



        Usually when we test the class of an object, we would also like to
        know if the object is an instance of any subclass of that class. To test
        this, use the is_a? method, or its synonym kind_of?:


        x = 1                    # This is the value we're working with
        x.instance_of? Fixnum # true: is an instance of Fixnum
        x.instance_of? Numeric # false: instance_of? doesn't check inheritance
        x.is_a? Fixnum # true: x is a Fixnum
        x.is_a? Integer # true: x is an Integer
        x.is_a? Numeric # true: x is a Numeric
        x.is_a? Comparable # true: works with mixin modules, too
        x.is_a? Object # true for any value of x



        The Class class defines the === operator in such a way that it
        can be used in place of is_a?:


        Numeric === x            # true: x is_a Numeric 



        This idiom is unique to Ruby and is probably less readable than
        using the more traditional
        is_a? method.


        Every object has a well-defined class in Ruby, and that class
        never changes during the lifetime of the object. An object's
        type, on the other hand, is more fluid. The type of
        an object is related to its class, but the class is only part of an
        object's type. When we talk about the type of an object, we mean the set
        of behaviors that characterize the object. Another way to put it is that
        the type of an object is the set of methods it can respond to. (This
        definition becomes recursive because it is not just the name of the
        methods that matter, but also the types of arguments that those methods
        can accept.)


        In Ruby programming, we often don't care about the class of an
        object, we just want to know whether we can invoke some method on it.
        Consider, for example, the << operator. Arrays,
        strings, files, and other I/O-related classes define this as an append
        operator. If we are writing a method that produces textual output, we
        might write it generically to use this operator. Then our method can be
        invoked with any argument that implements <<.
        We don't care about the class of the argument, just that we can append
        to it. We can test for this with the respond_to?
        method:


        o.respond_to? :"<<"  # true if o has an << operator



        The shortcoming of this approach is that it only checks the name
        of a method, not the arguments for that method. For example,
        Fixnum and Bignum implement
        << as a left-shift operator and expect the
        argument to be a number instead of a string. Integer objects appear to
        be "appendable" when we use a respond_to? test,
        but they produce an error when our code appends a string.
        There is no general solution to this problem, but an ad-hoc remedy, in
        this case, is to explicitly rule out Numeric objects
        with the is_a? method:


        o.respond_to? :"<<" and not o.is_a? Numeric 



        Another example of the type-versus-class distinction is
        the StringIO class (from Ruby's standard
        library). StringIO enables reading from and writing
        to string objects as if they were IO objects.
        StringIO mimics the IO
        API—StringIO objects define the same methods that
        IO objects do. But StringIO is not
        a subclass of IO. If you write a method that expects
        a stream argument, and test the class of the argument with
        is_a? IO, then your method won't work with
        StringIO arguments.


        Focusing on types rather than classes leads to a programming style
        known in Ruby as "duck typing." We'll see duck typing examples in Chapter 7.




        3.8.5. Object Equality


        Ruby has a surprising number of ways to compare objects for
        equality, and it is important to
        understand how they work, so you know when to use each method.



        3.8.5.1. The equal? method

        The equal? method is defined by Object to test whether two values
        refer to exactly the same object. For any two distinct objects, this
        method always returns false:


        a = "Ruby"       # One reference to one String object
        b = c = "Ruby" # Two references to another String object
        a.equal?(b) # false: a and b are different objects
        b.equal?(c) # true: b and c refer to the same object



        By convention, subclasses never override the
        equal? method.


        Another way to determine if two objects are, in fact, the same
        object is to check their object_id:


        a.object_id == b.object_id   # Works like a.equal?(b)





        3.8.5.2. The == operator

        The == operator is the most common way to test for equality. In the
        Object class, it is simply a synonym for
        equal?, and it tests whether two object references
        are identical. Most classes redefine this operator to allow distinct
        instances to be tested for equality:


        a = "Ruby"    # One String object
        b = "Ruby" # A different String object with the same content
        a.equal?(b) # false: a and b do not refer to the same object
        a == b # true: but these two distinct objects have equal values



        Note that the single equals sign in this code is the assignment
        operator. It takes two equals signs to test for equality in Ruby (this
        is a convention that Ruby shares with many other programming
        languages).


        Most standard Ruby classes define the ==
        operator to implement a reasonable definition of equality. This
        includes the Array and Hash
        classes. Two arrays are equal according to == if
        they have the same number of elements, and if their corresponding
        elements are all equal according to ==. Two hashes
        are == if they contain the same number of key/value
        pairs, and if the keys and values are themselves equal. (Values are
        compared with the == operator, but hash keys are
        compared with the eql? method, described later in
        this chapter.)



        Equality for Java Programmers


        If you are a Java programmer, you are used to using the
        == operator to test if two objects are the same
        object, and you are used to using the equals
        method to test whether two distinct objects have the same value.
        Ruby's convention is just about the opposite of Java's.




        The Numeric classes perform simple type conversions in their
        == operators, so that (for example) the
        Fixnum 1 and the
        Float 1.0 compare as equal. The
        == operator of classes, such as
        String and Array, normally
        requires both operands to be of the same class. If the righthand
        operand defines a to_str or
        to_ary conversion function (see Section 3.8.7), then these operators invoke the
        == operator defined by the righthand operand, and
        let that object decide whether it is equal to the lefthand string or
        array. Thus, it is possible (though not common) to define classes with
        string-like or array-like comparison behavior.


        != ("not-equal") is used in Ruby to test for inequality. When Ruby sees
        !=, it simply uses the ==
        operator and then inverts the result. This means that a class only
        needs to define the == operator to define its own
        notion of equality. Ruby gives you the != operator
        for free. In Ruby 1.9, however, classes can explicitly define their
        own != operators.




        3.8.5.3. The eql? method

        The eql? method is defined by Object as a synonym for
        equal?. Classes that override it typically use it
        as a strict version of == that does no type
        conversion. For example:


        1 == 1.0    # true: Fixnum and Float objects can be ==
        1.eql?(1.0) # false: but they are never eql!



        The Hash class uses eql? to check whether two hash
        keys are equal. If two objects are eql?, their
        hash methods must also return the same value.
        Typically, if you create a class and define the ==
        operator, you can simply write a hash method and
        define eql? to use ==.




        3.8.5.4. The === operator

        The === operator is commonly called the "case equality" operator and is
        used to test whether the target value of a case
        statement matches any of the when clauses of that
        statement. (The case statement is a multiway branch
        and is explained in Chapter 5.)


        Object defines a default
        === operator so that it invokes the
        == operator. For many classes, therefore, case
        equality is the same as == equality. But certain
        key classes define === differently, and in these
        cases it is more of a membership or matching operator.
        Range defines === to test
        whether a value falls within the range. Regexp
        defines === to test whether a string matches the
        regular expression. And Class defines
        === to test whether an object is an instance of
        that class. In Ruby 1.9, Symbol defines
        === to return true if the
        righthand operand is the same symbol as the left or if it is a string
        holding the same text. Examples:


        (1..10) === 5    # true: 5 is in the range 1..10
        /\d+/ === "123" # true: the string matches the regular expression
        String === "s" # true: "s" is an instance of the class String
        :s === "s" # true in Ruby 1.9



        It is uncommon to see the === operator used
        explicitly like this. More commonly, its use is simply implicit in a
        case statement.




        3.8.5.5. The =~ operator

        The =~ operator is defined by String and
        Regexp (and Symbol in Ruby 1.9)
        to perform pattern matching, and it isn't really an
        equality operator at all. But it does have an equals sign in it, so it
        is listed here for completeness. Object defines a
        no-op version of =~ that always returns
        false. You can define this operator in your own
        class, if that class defines some kind of pattern-matching operation
        or has a notion of approximate equality, for example.
        !~ is defined as the inverse of
        =~. It is definable in Ruby 1.9 but not in Ruby
        1.8.





        3.8.6. Object Order


        Practically every class can define a useful
        == method for testing its instances for equality.
        Some classes can also define an ordering. That is: for any two instances
        of such a class, the two instances must be equal, or one instance must
        be "less than" the other. Numbers are the most obvious classes for which
        such an ordering is defined. Strings are also ordered, according to the
        numeric ordering of the character codes that comprise the strings. (With
        the ASCII text, this is a rough kind of case-sensitive alphabetical
        order.) If a class defines an ordering, then instances of the class can
        be compared and sorted.


        In Ruby, classes define an ordering by implementing the <=> operator. This operator
        should return –1 if its left operand is less than its
        right operand, 0 if the two operands are equal, and
        1 if the left operand is greater than the right
        operand. If the two operands cannot be meaningfully compared (if the
        right operand is of a different class, for example), then the operator should return
        nil:


        1 <=> 5     # -1
        5 <=> 5 # 0
        9 <=> 5 # 1
        "1" <=> 5 # nil: integers and strings are not comparable



        The <=> operator is all that is needed to
        compare values. But it isn't particularly intuitive. So classes that
        define this operator typically also include the
        Comparable module as a mixin. (Modules and mixins are covered in Section 7.5.2.) The Comparable mixin defines
        the following operators in terms of <=>:



        <
        Less than

        <=
        Less than or equal

        ==
        Equal

        >=
        Greater than or equal

        >
        Greater than



        Comparable does not define the
        != operator; Ruby automatically defines that operator as the negation
        of the == operator. In addition to these comparison
        operators, Comparable also
        defines a useful comparison method named
        between?:


        1.between?(0,10)  # true: 0 <= 1 <= 10



        If the <=> operator returns
        nil, all the comparison operators derived from it return
        false. The special Float value
        NaN is an example:


        nan = 0.0/0.0;     # zero divided by zero is not-a-number
        nan < 0 # false: it is not less than zero
        nan > 0 # false: it is not greater than zero
        nan == 0 # false: it is not equal to zero
        nan == nan # false: it is not even equal to itself!
        nan.equal?(nan) # this is true, of course



        Note that defining <=> and including the
        Comparable module defines a ==
        operator for your class. Some classes define their own
        == operator, typically when they can implement this
        more efficiently than an equality test based on
        <=>. It is possible to define classes that
        implement different notions of equality in their ==
        and <=> operators. A class might do
        case-sensitive string comparisons for the ==
        operator, for example, but then do case-insensitive comparisons for
        <=>, so that instances of the class would sort
        more naturally. In general, though, it is best if
        <=> returns 0 if and only if
        == returns true.




        3.8.7. Object Conversion


        Many Ruby classes define methods that return a representation
        of the object as a value of a different class. The
        to_s method, for obtaining a String representation
        of an object, is probably the most commonly implemented and best known
        of these methods. The subsections that follow describe various
        categories of conversions.



        3.8.7.1. Explicit conversions

        Classes define explicit conversion methods for use by application code
        that needs to convert a value to another representation. The most
        common methods in this category are to_s,
        to_i, to_f, and
        to_a to convert to String,
        Integer, Float, and
        Array, respectively.


        Built-in methods do not typically invoke these methods for you.
        If you invoke a method that expects a String and
        pass an object of some other kind, that method is not expected to
        convert the argument with to_s. (Values
        interpolated into double-quoted strings, however, are automatically
        converted with to_s.)


        to_s is easily the most important of the
        conversion methods because string representations of objects are so
        commonly used in user interfaces. An important alternative to
        to_s is the inspect method.
        to_s is generally intended to return a
        human-readable representation of the object, suitable for end users.
        inspect, on the other hand, is intended for
        debugging use, and should return a representation that is helpful to
        Ruby developers. The default inspect method,
        inherited from Object, simply calls
        to_s.




        3.8.7.2. Implicit conversions

        Sometimes a class has strong characteristics of some other class.
        The Ruby Exception class represents an error or
        unexpected condition in a program and encapsulates an error message.
        In Ruby 1.8, Exception objects are not
        merely convertible to strings; they are string-like objects and can be
        treated as if they were strings in many contexts.[*] For example:

        [*] Doing so is discouraged, however, and Ruby 1.9 no longer
        allows the implicit conversion of Exception to
        String.


        # Ruby 1.8 only
        e = Exception.new("not really an exception")
        msg = "Error: " + e # String concatenation with an Exception



        Because Exception objects are string-like, they can be used with the string
        concatenation operator. This does not work with most other Ruby
        classes. The reason that Exception objects can behave like
        String objects is that, in Ruby 1.8,
        Exception implements the implicit conversion method
        to_str, and the + operator
        defined by String invokes this method on its
        righthand operand.


        Other implicit conversion methods are to_int
        for objects that want to be integer-like, to_ary for objects that want to be
        array-like, and to_hash for objects that want to be
        hash-like. Unfortunately, the circumstances under which these implicit
        conversion methods are called are not well documented. Among the
        built-in classes, these implicit conversion methods are not commonly
        implemented, either.


        We noted earlier in passing that the ==
        operator can perform a weak kind of type conversion when testing for
        equality. The == operators defined by
        String, Array, and
        Hash check to see if the righthand operand is of
        the same class as the lefthand operand. If so, they compare them. If
        not, they check to see if the righthand operand has a
        to_str, to_ary, or
        to_hash method. They don't invoke this method, but
        if it exists, they invoke the == method of the
        righthand operand and allow it to decide whether it is equal to the
        lefthand operand.


        In Ruby 1.9, the built-in classes String,
        Array, Hash,
        Regexp, and IO all define a
        class method named try_convert. These methods
        convert their argument if it defines an appropriate implicit
        conversion method, or they return nil otherwise.
        Array.try_convert(o) returns
        o.to_ary if o defines that
        method; otherwise, it returns nil. These try_convert methods are convenient if you want to
        write methods that allow implicit conversions on their
        arguments.




        3.8.7.3. Conversion functions

        The Kernel module defines four conversion methods that behave as global
        conversion functions. These functions—Array,
        Float, Integer, and
        String—have the same names as the classes that they
        convert to, and they are unusual in that they begin with a capital
        letter.


        The Array function attempts to convert its argument to an array by calling
        to_ary. If that method is not defined or returns
        nil, it tries the to_a method.
        If to_a is not defined or returns
        nil, the Array function simply
        returns a new array containing the argument as its single
        element.


        The Float function converts Numeric arguments to
        Float objects directly. For any
        non-Numeric value, it calls the
        to_f method.


        The Integer function converts its argument to a Fixnum or
        Bignum. If the argument is a
        Numeric value, it is converted directly.
        Floating-point values are truncated rather than rounded. If the
        argument is a string, it looks for a radix indicator (a leading
        0 for octal, 0x for hexadecimal,
        or 0b for binary) and converts the string
        accordingly. Unlike String.to_i it does not allow
        nonnumeric trailing characters. For any other kind of argument, the
        Integer function first attempts conversion with
        to_int and then with
        to_i.


        Finally, the String function converts its
        argument to a string simply by calling its to_s
        method.




        3.8.7.4. Arithmetic operator type coercions

        Numeric types define a conversion method named coerce. The intent of this
        method is to convert the argument to the same type as the numeric
        object on which the method is invoked, or to convert both objects to
        some more general compatible type. The coerce
        method always returns an array that holds two numeric values of the
        same type. The first element of the array is the converted value of
        the argument to coerce. The second element of the
        returned array is the value (converted, if necessary) on which
        coerce was invoked:


        1.1.coerce(1)      # [1.0, 1.1]: coerce Fixnum to Float
        require "rational" # Use Rational numbers
        r = Rational(1,3) # One third as a Rational number
        r.coerce(2) # [Rational(2,1), Rational(1,3)]: Fixnum to Rational



        The coerce method is used by the arithmetic
        operators. The + operator defined by Fixnum doesn't know about
        Rational numbers, for example, and if its righthand
        operand is a Rational value, it doesn't know how to
        add it. coerce provides the solution. Numeric
        operators are written so that if they don't know the type of the
        righthand operand, they invoke the coerce method of
        the righthand operand, passing the lefthand operand as an argument.
        Returning to our example of adding a Fixnum and a
        Rational, the coerce method of
        Rational returns an array of two
        Rational values. Now the +
        operator defined by Fixnum can simply invoke
        + on the values in the array.




        3.8.7.5. Boolean type conversions

        Boolean values deserve a special mention in the context of type conversion. Ruby is very strict with its
        Boolean values: true and false
        have to_s methods, which return "true" and "false" but define no other
        conversion methods. And there is no to_b method to
        convert other values to Booleans.


        In some languages, false is the same thing as
        0, or can be converted to and from
        0. In Ruby, the values true and
        false are their own distinct objects, and there are
        no implicit conversions that convert other values to
        true or false. This is only half
        the story, however. Ruby's Boolean operators and its conditional and
        looping constructs that use Boolean expressions can work with values
        other than true and false. The
        rule is simple: in Boolean expressions, any value other than
        false or nil behaves like (but
        is not converted to)
        true. nil, on the other hand
        behaves like false.


        Suppose you want to test whether the variable
        x is nil or not. In some
        languages, you must explicitly write a comparison expression that
        evaluates to true or
        false:


        if x != nil   # Expression "x != nil" returns true or false to the if
        puts x # Print x if it is defined
        end



        This code works in Ruby, but it is more common simply to take
        advantage of the fact that all values other than
        nil and false behave like
        true:


        if x       # If x is non-nil
        puts x # Then print it
        end



        It is important to remember that values like
        0, 0.0, and the empty string
        "" behave like true in Ruby,
        which is surprising if you are used to languages like C or
        JavaScript.





        3.8.8. Copying Objects


        The Object class defines two closely
        related methods for copying objects. Both clone and
        dup return a shallow copy of the object on which they
        are invoked. If the copied object includes one internal state that
        refers to other objects, only the object references are copied, not the
        referenced objects themselves.


        If the object being copied defines an
        initialize_copy method, then clone and dup
        simply allocate a new, empty instance of the class and invoke the
        initialize_copy method on this empty instance. The
        object to be copied is passed as an argument, and this "copy
        constructor" can initialize the copy however it desires. For example,
        the initialize_copy method could
        recursively copy the internal data of an object so that the resulting
        object is not a simple shallow copy of the original.


        Classes can also override the clone and
        dup methods directly to produce any kind of copy they
        desire.


        There are two important differences between the
        clone and dup methods defined by
        Object. First, clone copies both
        the frozen and tainted state (defined shortly) of an object, whereas
        dup only copies the tainted state; calling
        dup on a frozen object returns an unfrozen copy.
        Second, clone copies any singleton methods of the
        object, whereas dup does not.




        3.8.9. Marshaling Objects


        You can save the state of an object by passing it to the class method
        Marshal.dump.[*] If you pass an I/O stream object as the second argument,
        Marshal.dump writes the state of the object (and,
        recursively, any objects it references) to that stream. Otherwise, it
        simply returns the encoded state as a binary string.

        [*] The word "marshal" and its variants are sometimes spelled with
        two ls: marshall, marshalled, etc. If you spell the word this way,
        you'll need to remember that the name of the Ruby class has only a
        single l.


        To restore a marshaled object, pass a string or an I/O stream
        containing the object to Marshal.load.


        Marshaling an object is a very simple way to save its state for
        later use, and these methods can be used to provide an automatic file
        format for Ruby programs. Note, however, that the binary format used by
        Marshal.dump and Marshal.load is
        version-dependent, and newer versions of Ruby are not guaranteed to be
        able to read marshaled objects written by older versions of Ruby.


        Another use for Marshal.dump and
        Marshal.load is to create deep copies of objects:


        def deepcopy(o)
        Marshal.load(Marshal.dump(o))
        end



        Note that files and I/O streams, as well as
        Method and Binding objects, are
        too dynamic to be marshaled; there would be no reliable way to restore
        their state.


        YAML ("YAML Ain't Markup Language") is a commonly used alternative to the Marshal module that dumps objects to (and
        loads objects from) a human-readable text format. It is in the standard
        library, and you must require 'yaml' to use
        it.




        3.8.10. Freezing Objects


        Any object may be frozen by calling its freeze method. A frozen object
        becomes immutable—none of its
        internal state may be changed, and an attempt to call any of its mutator
        methods fails:


        s = "ice"      # Strings are mutable objects
        s.freeze # Make this string immutable
        s.frozen? # true: it has been frozen
        s.upcase! # TypeError: can't modify frozen string
        s[0] = "ni" # TypeError: can't modify frozen string



        Freezing a class object prevents the addition of any methods to
        that class.


        You can check whether an object is frozen with the
        frozen? method. Once frozen, there is no way
        to "thaw" an object. If you copy a frozen object with
        clone, the copy will also be frozen. If you copy a
        frozen object with dup, however, the copy will not be
        frozen.




        3.8.11. Tainting Objects


        Web applications must often keep track of data derived from untrusted user
        input to avoid SQL injection attacks and similar security risks. Ruby
        provides a simple solution to this problem: any object may be marked as
        tainted by calling its taint method. Once an object
        is tainted, any objects derived from it will also be tainted. The taint
        of an object can be tested with the tainted? method:


        s = "untrusted"   # Objects are normally untainted
        s.taint # Mark this untrusted object as tainted
        s.tainted? # true: it is tainted
        s.upcase.tainted? # true: derived objects are tainted
        s[3,4].tainted? # true: substrings are tainted



        User input—such as command-line arguments, environment variables,
        and strings read with gets—are automatically
        tainted.


        Copies of tainted objects made with clone and
        dup remain tainted. A tainted object may be untainted
        with the untaint method. You should only do this, of
        course, if you have examined the object and are convinced that it
        presents no security risks.


        The object tainting mechanism of Ruby is most powerful when used
        with the global variable $SAFE. When this variable is
        set to a value greater than zero, Ruby restricts various built-in
        methods so that they will not work with tainted data. See Chapter 10 for further details on the $SAFE
        variable.










        Specific Practices by Goal



        [ Team LiB ]



























































































































        Specific Practices by Goal


        SG 1 Provide IPPD Infrastructure


        An infrastructure that maximizes the productivity of people and affects the collaboration necessary for integration is provided.


        An organizational infrastructure that supports and promotes IPPD concepts is critical if IPPD is to be successfully sustained over the long term. An IPPD infrastructure includes the following:



        • An organization's shared vision that promotes IPPD concepts such as concurrent development and integrated teaming


        • A work environment that enables efficient and effective collaboration and integration


        • People trained to collaborate, integrate, and lead others as necessary



        SP 1.1-1 Establish the Organization's Shared Vision

        Establish and maintain a shared vision for the organization.


        Establishing and maintaining the organization's shared vision involves creating, communicating, using, and periodically evaluating and revising the shared vision. An organization's shared vision captures the organization's guiding principles including mission, objectives, expected behavior, and values. The shared visions of a project's integrated teams should be consistent with the project's shared vision, which in turn should be consistent with the organization's shared vision. (See the definition of "shared vision" in the glossary.)


        Creating a shared vision involves establishing and actively maintaining agreement and commitment about what is to be done and how it will be accomplished, both procedurally and behaviorally. A shared vision is a result of an ongoing dialogue among all the people who will make it real. It continues to evolve as more ideas are shared.


        The organization's shared vision facilitates people working together, helps those people to attain unity of purpose, and creates a common understanding of the end state that the organization is aiming to achieve. The organization's shared vision must speak to every element of the organization. Effectively impacting the lowest levels of the organization necessitates impacting the highest levels as well. The organization's leaders need to be role models for the actions of the organization. Their commitment to IPPD is critical to its success in the organization. They must clearly communicate their expectations for the organization's projects and integrated teams and what the projects and integrated teams can expect from management.















        Table . Practice-to-Goal Relationship Table

        Continuous Representation



        Staged Representation



        SG 1 Provide IPPD Infrastructure



        SG 1 Provide IPPD Infrastructure




        SP 1.1-1 Establish the Organization's Shared Vision




        SP 1.1-1 Establish the Organization's Shared Vision




        SP 1.2-1 Establish an Integrated Work Environment




        SP 1.2-1 Establish an Integrated Work Environment




        SP 1.3-1 Identify IPPD-Unique Skill Requirements




        SP 1.3-1 Identify IPPD-Unique Skill Requirements



        SG 2 Manage People for Integration



        SG 2 Manage People for Integration




        SP 2.1-1 Establish Leadership Mechanisms




        SP 2.1-1 Establish Leadership Mechanisms




        SP 2.2-1 Establish Incentives for Integration




        SP 2.2-1 Establish Incentives for Integration




        SP 2.3-1 Establish Mechanisms to Balance Team and Home Organization Responsibilities




        SP 2.3-1 Establish Mechanisms to Balance Team and Home Organization Responsibilities



        GG 1 Achieve Specific Goals


         


        GP 1.1 Perform Base Practices


         

        GG 2 Institutionalize a Managed Process



        GG 3 Institutionalize a Defined Process




        GP 2.1 Establish an Organizational Policy




        GP 2.1 Establish an Organizational Policy




        GP 2.2 Plan the Process




        GP 2.2 Plan the Process




        GP 2.3 Provide Resources




        GP 2.3 Provide Resources




        GP 2.4 Assign Responsibility




        GP 2.4 Assign Responsibility




        GP 2.5 Train People




        GP 2.5 Train People




        GP 2.6 Manage Configurations




        GP 2.6 Manage Configurations




        GP 2.7 Identify and Involve Relevant Stakeholders




        GP 2.7 Identify and Involve Relevant Stakeholders




        GP 2.8 Monitor and Control the Process




        GP 2.8 Monitor and Control the Process




        GP 2.9 Objectively Evaluate Adherence




        GP 2.9 Objectively Evaluate Adherence




        GP 2.10 Review Status with Higher Level Management




        GP 2.10 Review Status with Higher Level Management



        GG 3 Institutionalize a Defined Process


         


        GP 3.1 Establish a Defined Process




        GP 3.1 Establish a Defined Process




        GP 3.2 Collect Improvement Information




        GP 3.2 Collect Improvement Information



        GG 4 Institutionalize a Quantitatively Managed Process


         


        GP 4.1 Establish Quantitative Objectives for the Process


         


        GP 4.2 Stabilize Subprocess Performance


         

        GG 5 Institutionalize an Optimizing Process


         


        GP 5.1 Ensure Continuous Process Improvement


         


        GP 5.2 Correct Root Causes of Problems


         


        The organization's shared vision needs to be grounded in reality. Organizations may be tempted to include in their shared vision broad statements about integrated teaming and employee empowerment. It is more important, however, to use the shared vision to set reasonable expectations on the rate of change in an organization. Unrealistic proclamations can transform the shared vision into a source of frustration and cause the organization to retreat from it after initial pilot demonstrations.


        The organization's shared vision should be articulated in sufficient detail to provide criteria against which the shared visions of the projects and integrated teams can be aligned. For example, the organization's shared vision should address the use of integrated teams for projects, the focus on the customer, and the concurrent development of both product-related life-cycle processes and the product. These concepts, in turn, should be reflected in the shared visions of the projects and integrated teams. Guidelines for how projects and integrated teams should develop their shared visions should be made part of the organization's process asset library.


        Maintenance of the organization's shared vision involves evaluating its use and currency. Results of evaluations may indicate the need to update the organization's shared vision or to establish and maintain organizational practices and structures that implement the shared vision.


        Typical Work Products


        1. Organization's shared vision


        2. Evaluations of the organization's shared vision


        3. Guidelines for shared vision building within projects and integrated teams




        Subpractices


        1. Identify expectations, constraints, interfaces, and boundary conditions applicable to the organization's shared vision.


        2. Create a shared vision for the organization.


          The shared vision can include what the people in the organization can expect from the organization (e.g., some organizations have developed an "employees' bill of rights").



        3. Communicate the shared vision both externally and internally.


        4. Ensure that organizational practices and structures are aligned with the shared vision.


        5. Periodically review the shared vision and update it as necessary.


          Reexamine the shared vision to determine weaknesses and misunderstood parts. Revise the shared vision to improve its clarity and applicability to the current state of the organization. Periodically reinforce the clarity and reality of the shared vision.



        6. Provide guidelines for shared vision building for use by projects and integrated teams.


          These guidelines should establish the context for the shared visions of the projects and integrated teams.

          Shared visions of the projects should be focused on product and contribute to achievement of the organization's shared vision. Shared visions of the projects could relate the minimum competencies, or demonstrated capabilities, for people assigned to integrated teams, such as individual leadership capabilities. Proposed products, activities, partnerships, organizational and project structures, and shared visions of the projects are tested against the organization's shared vision.


          For the integrated teams, nurturing integration necessitates special attention to the objectives, values, and behaviors that are needed to affect integrated teamwork. Aspects, such as team operations, team behaviors, team responsibilities, and collaboration with interfacing teams, can be addressed.







        SP 1.2-1 Establish an Integrated Work Environment

        Establish and maintain an integrated work environment that supports IPPD by enabling collaboration and concurrent development.


        An integrated work environment includes the physical infrastructure (e.g., facilities, tools, equipment, and support needed to effectively use them) that people need to perform their jobs effectively. Properly functioning environments help people communicate clearly and efficiently about the product, processes, people needs, and organization. An integrated work environment helps integrate the business and technical functions and the interfaces among teams, projects, and organizations.


        The integrated work environment must accommodate both collocated and distributed integrated teams as required. Two-way communications media should be easily accessible by all relevant stakeholders.


        Encouraging open dialogue by providing communication mechanisms enables everyone to effectively engage in and contribute to information sharing. Appropriate mechanisms might include meeting rooms, email, fax, FTP or Web sites, video teleconferencing capabilities, and others depending on the organization's culture and its project and integrated team preferences for efficient and effective information sharing. The types of information needed, which agents (projects, integrated teams, or individuals), and how many of them produce, own, and need that information should be considered in deciding the mechanisms to be used.


        Integrated communication tool sets reduce time spent converting information from one medium or platform to another, and correcting transcriptions or misunderstandings when people do the conversions. Requirements for product and process information usability throughout the life of the product are important characteristics to consider in the selection of information-exchange tools. In an IPPD environment, it is particularly important that the tools for designing and developing the product-related life-cycle processes are integrated with the tools for designing and developing the product and product components.


        Integrated work environments are developed with the same, or greater, rigor as that used to develop a specific product or service. Integrated work environments are capital assets that are often expensive, have unique implementations, are irreversible (their implementation can destroy or make unusable the assets being replaced), and whose modification disrupts ongoing activities. The rigor appropriate to the development should be matched to the magnitude of the needs to be resolved and the deployment risks.


        Typical Work Products


        1. Requirements for the integrated work environment


        2. Design of the integrated work environment


        3. Integrated work environment




        Subpractices


        1. Determine requirements for the integrated work environment.


          Requirements for the integrated work environment are typically based on the following:


          • The organization's set of standard processes


          • The objectives of the organization articulated in the organization's shared vision


          • The needs associated with developing, maintaining, and delivering the products and services of the organization




        2. Regularly evaluate the effectiveness of the existing environment and forecast the need for additional, upgraded, or new tools or integrated work environment components.


        3. Maintain awareness of current and emerging technologies, tools, and resources that are related to the integrated work environment.


          Maintaining awareness may be accomplished through industry journals, professional societies, conferences, trade shows, or benchmarking.

          Examples of technologies, tools, and resources include the following:



          • Computing resources and software productivity tools


          • Communications systems, tools, and resources


          • Communication tools (e.g., email, telephone, databases, archives)


          • Manufacturing and production facilities


          • Engineering or simulation tools


          • Proprietary engineering tools


          • Prototyping or production equipment


          • Work space


          • Office equipment and supplies


          • Raw or stock input materials


          • Transportation resources


          • "Hotlines" and "help desks"


          • Information brokerage services


          • Support staff and/or services


          • Information-technology capabilities


          • Process enactment and management tools






        4. Plan, design, and implement an integrated work environment.


          The critical aspects of the work environment are, like any other system, requirements driven. Work environment functionality (stimulated by customer needs and requirements) is explored with the same rigor as any other system development. Are the performance improvements (e.g., timely interoperable communications, safety, security, maintainability) worth the costs (e.g., capital outlays, training, support structure, disassembly and disposal of existing environments, performance and maintenance of the environment) and risks (e.g., workflow and project disruptions)?

          Requirements are developed for the duration of the work environment and address, as appropriate, the three different cases for work environment improvements: developing a new environment, migrating an existing environment to new capabilities, and maintaining awareness of new and evolving technologies to exploit improvement opportunities. As required, the integrated work environment or some of its components can be developed in house or acquired from external sources.




        5. Provide ongoing maintenance and operational support for the integrated work environment.


          Maintenance and support of the integrated work environment can be accomplished either with capabilities found inside the organization or hired from outside the organization.

          Examples of maintenance and support methods include the following:



          • Hiring people to perform the maintenance and support


          • Training people to perform the maintenance and support


          • Contracting the maintenance and support


          • Developing expert users for selected automation tools





        6. Monitor and evaluate the adequacy of the integrated work environment to satisfy user needs.


          Refer to the Project Monitoring and Control process area for more information about practices for monitoring and controlling the work environment.


          The work environment should be monitored throughout its existence to ascertain if, and when, its performance degrades below that expected (or specified) as well as to identify opportunities for improvements. The key operating characteristics of the integrated work environment should be identified. The key operating characteristics are those performance, product, and process characteristics that can be measured and compared against expected capabilities of the integrated work environment. End users should be surveyed to determine the adequacy of the current environment and to identify potential improvements. Changes should be planned and implemented based on the analysis of usage and performance data and on identified real and potential problems.



        7. Revise the integrated work environment as necessary, by adding, deleting, or replacing components.





        SP 1.3-1 Identify IPPD-Unique Skill Requirements

        Identify the unique skills needed to support the IPPD environment.


        Refer to the Organizational Training process area for more information about determining training needs and delivering the training.


        IPPD is a sufficiently different view of product development that the organization's leadership and workforce will need to develop new skills. IPPD requires integrative leadership, and interpersonal skills beyond those typically found in traditional environments where people tend to work alone or primarily interact with others from their own, or similar, functions or disciplines. Specific skills emphasized in an IPPD environment include the following:



        • The skills to integrate all appropriate business and technical functions and their processes


        • The interpersonal skills to coordinate and collaborate with others


        • The leadership skills to act, and successfully influence others to act, to achieve the shared vision



        Training to support these new skills must be established and maintained to sustain the ongoing adoption of IPPD in the organization.


        Each integrated team member needs to understand what is vital to other team members in terms of product characteristics and the descriptions, expectations, and interfaces of the processes associated with the other functions represented on the team. This understanding can often be augmented through cross training of individuals across their function or discipline boundaries.


        Collaboration among integrated team members is essential to create a team product rather than a collection of independent products. Enhanced interpersonal skills can help bridge the differences among disparate functions and disciplines as well as the differences in cultures, values, and backgrounds.


        Leadership demands also increase under IPPD. Leadership challenges include: ensuring that all team members mutually understand their roles and responsibilities; employing people in their intended roles; and effectively accessing the depth and wealth of specific expertise resident in the organization and integrating it into the overall integrated team effort.


        Typical Work Products


        1. IPPD strategic training needs


        2. IPPD tactical training needs




        Subpractices


        1. Provide requirements for IPPD skills for inclusion in the organization's strategic training needs.


        2. Provide requirements for IPPD skills for inclusion in the organization's tactical training plan.






        SG 2 Manage People for Integration


        People are managed to nurture the integrative and collaborative behaviors of an IPPD environment.


        In an IPPD environment, special attention needs to be paid to aspects of organizational leadership and management. Nurturing integration necessitates focus on the objectives, values, and behaviors that are needed to affect integrated teamwork. The organization establishes the IPPD guidelines and processes that become part of the organization's set of standard processes and the project's defined process. The organization's standard processes enable, promote, and reinforce the integrative behaviors expected from projects, integrated teams, and people. For all IPPD processes and guidelines, people are recognized not as the tools or means to the end, but as part of a mutually beneficial collaboration to achieve the objectives.


        In stimulating the integration needed, team-related incentives may be appropriate for people who work together. However, the value of individual excellence should not be overlooked. A balanced approach that addresses both individual performance as well as team performance would help maintain high standards of both team and individual achievement. Expectations from projects, integrated teams, and people are typically communicated in the form of policies, operating procedures, guidelines, and other organizational process assets.


        SP 2.1-1 Establish Leadership Mechanisms

        Establish and maintain leadership mechanisms to enable timely collaboration.


        Implementing IPPD introduces challenges to leadership because of the cultural changes required when people and integrated teams are empowered and decisions are driven to the lowest level appropriate. Effective and efficient communication mechanisms are critical to timely and sound decision making in the integrated work environment. Once an integrated work environment is established and training is provided, mechanisms to handle empowerment, decision making, and issue resolution also need to be provided to affect the timely collaboration of relevant stakeholders required for IPPD.


        In an IPPD environment, it is particularly important that clear channels of responsibility and authority be established. Within the projects and the organization, issues can arise when individuals or integrated teams assume too much or too little authority and when the level at which decisions are made, or who owns what decisions, is unclear. Organizational guidelines that scope the degree of empowerment for integrated teams serve an issue-prevention role. Best practices promote documented and deployed organizational guidelines that can preclude issues arising from empowerment and authority misinterpretation.


        Empowerment does not necessarily mean that every decision in an IPPD environment must occur at the lowest level, that it must be done collaboratively, or even that it must reflect consensus among all integrated team members or project participants. Decisions on the style and procedures for leadership and decision making for projects and among integrated teams need to be made in collaboration with the relevant stakeholders. In establishing the context for decision making, the various kinds of issues are described and agreements are reached on the decision type that will be used to resolve each kind of issue.



        Some examples of decision types include the following:



        • Command.
          The leader examines the issue and makes a decision alone.



        • Consultative.
          The leader receives and examines inputs on the issue from relevant stakeholders and makes the decision.



        • Collaborative.
          Issues are raised by any relevant stakeholders (including the leader), issues are discussed, and solutions are voted on. Rules are needed to determine whether this vote is binding on the leader.



        • Consensus.
          Issues are raised by any relevant stakeholders, including the leader, and are discussed until all members of the integrated team can live with and support the decision.



        • Structured.
          Major issues may be decided using formal evaluations. The steps in formal evaluations may be carried out in a collaborative way.





        For many issues, a command decision may be adequate. For issues that require several different areas of expertise or that have far-reaching consequences, collaborative decisions may be more appropriate. Defining decision types and the authority of those entrusted to make decisions enables efficient operations.


        Mechanisms that grow leadership talent enable lower organizational unit delegation, which, in turn, enables faster, better responses to changing customer needs, technology, and environmental conditions.


        Leadership characteristics cannot be viewed as solely embodied in the manager/leader. When leadership characteristics are evident in more than the leader, individual group members lead decision making and activities that heavily involve their areas of expertise. This flexibility can result in improved group efficiency and effectiveness.


        Even with well-intentioned empowerment, leadership, and decision making, issues will arise that cannot be resolved at the same level. An organizational process for issue resolution can form the basis for project-and integrated-team-specific procedures and help ensure that basic issue-resolution avenues are available to projects and integrated teams when unresolved issues must be escalated. An organizational process for issue resolution can serve both issue-resolution and issue-prevention roles.


        Typical Work Products


        1. Guidelines for determining the degree of empowerment of people and integrated teams


        2. Guidelines for setting leadership and decision-making context


        3. Organizational process documentation for issue resolution




        Subpractices


        1. Establish and maintain guidelines for the degree of empowerment provided to people and integrated teams.


        2. Collaboratively determine rules for the use of different decision types in making various kinds of decisions.


          Refer to the Decision Analysis and Resolution process area for more information about approaches for evaluating and selecting among alternatives.



        3. Define the process for using the decision-making rules.


        4. Define a process for conflict resolution when an issue cannot be decided at the level at which it arose.





        SP 2.2-1 Establish Incentives for Integration

        Establish and maintain incentives for adopting and demonstrating integrative and collaborative behaviors at all levels of the organization.


        The recognition and reward systems in an organization are one of the motivators for behavior and value changes. To support IPPD, the recognition and reward systems (both positive rewards and negative consequences) need to recognize a shift in values from a single point of success or failure (e.g., providing a management incentive package to the product or program manager alone) to integrated team success or failure (e.g., providing layered incentives to integrated team members based on degree of involvement and contribution).


        Individual excellence still should be recognized, but criteria should discern whether such excellence was achieved at the expense of the integrative behaviors expected or in support of them. For example, individuals (such as leaders) removing integration barriers or implementing collaboration capabilities may be just as important as an integrated team performing well. Care should be taken, however, not to single out individuals for recognition for a team's achievement.


        Incentives should be consistent with the objectives of the organization and applied to achieve desired behavior at all levels of the organization. Criteria can establish guidelines for the reassignment of people who are unable to demonstrate desired behavior and the selection of people who can exhibit desired behavior for challenging or important jobs.


        Compensation is not the only motivator, although giving an object of some value is an appropriate recognition. Reinforcement of positive behavior via thanks or praise is usually appropriate, especially soon after the observed performance of a task. Such immediate recognition reinforces the collaborative nature of working in an IPPD environment. If staff must wait for yearly performance appraisals, their motivation for working outside of their strict functional job description is lessened.


        The yearly performance appraisals also need to be addressed. Review mechanisms should be structured so that both home organization supervisors and team leaders contribute to a person's performance review.


        Typical Work Products


        1. Policies and procedures for performance appraisal and recognition that reinforce collaboration


        2. Integrated team and individual recognition and rewards




        Subpractices


        1. Structure the recognition and reward system to be consistent with the IPPD environment.


          The organization's recognition and reward system should recognize the value of individual and integrated team excellence and enable, promote, and reinforce integration.



        2. Develop guidelines for team as well as individual recognition.


        3. Define procedures for integrated review processes that involve both the integrated team leader and the functional manager.


        4. Establish criteria for distinguishing behaviors that promote integrated team performance from those that establish barriers to team behaviors.





        SP 2.3-1 Establish Mechanisms to Balance Team and Home Organization Responsibilities

        Establish and maintain organizational guidelines to balance team and home organi zation responsibilities.


        Here "home organization" refers to that part of the organization to which personnel are assigned when they are not in an integrated team. This home organization may be called the "functional organization," "home base," "home office," or "direct organization." Regardless of what it is called, it is often responsible for the career growth of the personnel assigned to it (e.g., performance appraisals and training to maintain functional and discipline expertise). In an IPPD environment, reporting procedures and rating systems should recognize that people's responsibility is focused on the integrated team, not on the traditional home organization. A balance must be struck, however, because the responsibility of integrated team members to their respective home organizations is still important, specifically for process implementation and improvement. Workloads should be balanced among projects and functions, while ensuring career growth and advancement. Mechanisms should be created that support the home organization responsibility but align the workforce to meet business objectives in a teaming environment.


        Striking this balance is difficult for an organization but exceedingly important for the personnel and the success of IPPD implementation. The balance must be reflected in the personal or career development plans for each individual. The knowledge and skills needed for an individual to succeed in both their functional and integrated team role should be honed, taking into account current and future assignments.


        Guidelines should also be in place for disbanding teams and maintaining home organizations. It has been observed that sometimes teams attempt to remain in place beyond their productive life in organizations that do not have a home organization for the team members to report back to after the team is dissolved.


        Typical Work Products


        1. Organizational guidelines for balancing team and home organization responsibilities


        2. Performance review process that considers both functional supervisor and team leader input




        Subpractices


        1. Establish guidelines for home organization responsibilities in promoting integrated team behavior.


        2. Establish guidelines for team management responsibilities to ensure integrated team members report appropriately to their home organization.


        3. Establish a performance review process that considers input from home organization and integrated team leaders.













          [ Team LiB ]