concept knowledge in category security

appears as: knowledge, knowledge
Secure by Design

This is an excerpt from Manning's book Secure by Design.

Writing software is by no means a trivial task. As a developer, you’re required to have skills within a wide range of disciplines. You’re expected to be knowledgeable in areas ranging from programming languages and algorithms to system architecture and agile methodologies. Although these software development disciplines span various fields of knowledge and can be quite different from one another, one term that keeps occurring when discussing almost all the different disciplines is design. But what do people mean when they use the word design?

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

Listing 12.14 No repetition of knowledge, although same regexp used twice
    BookDelivery(String ordernumber, String recipient,
                String streetaddress, String zipcode) {
 
        this.ordernumber = notNull(ordernumber);
        matchesPattern(ordernumber, "[0-9]{5}");    #1  
        this.zipcode = notNull(zipcode);
        matchesPattern(zipcode, "[0-9]{5}");    #2  
        ...
    }

#1   Regexp representing one thing: format of order numbers
#2   Regexp representing something else: format of zip codes

It might look as if you’re repeating yourselves, because the same regexp occurs twice. But you aren’t repeating yourselves in the sense of DRY, because those two regexps encode different pieces of knowledge: the knowledge about what order numbers look like and the knowledge about what zip codes look like. The occurrence of the same regexp is coincidental.

Figure 14.1 Combining knowledge from different sources yields new solutions.

figure14-01.eps