The document discusses the use of metaphors in understanding software construction. It provides examples of common metaphors like writing, farming, and construction. The construction metaphor is discussed in depth and similarities are drawn between building a physical structure and developing software. Key points are that metaphors are heuristics rather than strict processes, and can provide insights by relating software development to familiar activities like building. The construction metaphor in particular highlights that preparation and planning increase with project size.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
82 views
CSC-321 Software Construction: Metaphors
The document discusses the use of metaphors in understanding software construction. It provides examples of common metaphors like writing, farming, and construction. The construction metaphor is discussed in depth and similarities are drawn between building a physical structure and developing software. Key points are that metaphors are heuristics rather than strict processes, and can provide insights by relating software development to familiar activities like building. The construction metaphor in particular highlights that preparation and planning increase with project size.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 10
CSC-321
Software Construction
Chapter 2: Metaphors Importance of Metaphors
• Important developments often arise out of analogies. By
comparing a topic you understand poorly to something similar you understand better, you can come up with insights that result in a better understanding of the less-familiar topic • The chemist Kekulé had a dream in which he saw a snake grasp its tail in its mouth. When he awoke, he realized that a molecular structure based on a similar ring shape would account for the properties of benzene. • Metaphors contribute to a greater understanding of software- development issues in the same way that they contribute to a greater understanding of scientific questions. • Earth-centered model to sun centered model… ? • Bachman compared this to change in computer programming in the early 1970s. When Bachman made the comparison in 1973, data processing was changing from a computer-centered view of information systems to a database-centered view. How to Use Software Metaphors • A metaphor serves more as a heuristic than it does as an algorithm. • An algorithm is a set of well-defined instructions for carrying out a particular task • A heuristic is a technique that helps you look for an answer. Heuristic is an algorithm in a clown suit. It’s less predictable, it’s more fun, and it comes without a 30-day money-back guarantee. • An algorithm for driving to someone’s house vs. heuristic for getting to someone’s house…? • The main difference between the two is the level of indirection from the solution. How do you use software metaphors? • Use them to give you insight into your programming problems and processes. Use them to help you think about your programming activities and to help you imagine better ways of doing things. Common Software Metaphors Software Penmanship: Writing Code • The writing metaphor suggests that developing a program is like writing a casual letter—you sit down with pen, ink, and paper and write it from start to finish. • It doesn’t require any formal planning, and you figure out what you want to say as you go. • For an individual’s work or for small-scale projects, the letter- writing metaphor works adequately, but for other purposes it doesn’t describe software development fully. • Writing is usually a one person activity… • When you finish writing a letter, you stuff it into an envelope and mail it. You can’t change it anymore… • In writing, a high premium is placed on originality… in software REUSE • Throw away a bad writing… In software: system might cost as much as a 10-story building Common Software Metaphors Cont’d Software Farming: Growing a System • Creating software as something like planting seeds and growing crops. • The weakness in the software-farming metaphor is its suggestion that you don’t have any direct control over how the software develops. Software Oyster Farming: System Accretion • Accretion (Nasho-numa) means any growth or increase in size by a gradual external addition or inclusion. Accretion describes the way an oyster makes a pearl, by gradually adding small amounts of calcium carbonate. • It means that you have to learn how to add to your software systems a small amount at a time. • The image of an oyster forming a pearl is a good way to visualize incremental development, or accretion. Common Software Metaphors Cont’d Software Construction: Building Software • Building software implies various stages of planning, preparation, and execution that vary in kind and degree depending on what’s being built. • If you’re building a simple structure a doghouse
• This loose approach is appropriate for small software projects too,
if you use the wrong design for 1000 lines of code, you can start over completely without losing much. Common Software Metaphors Cont’d Software Construction: Building Software (Cont’d) • If you’re building a house, the building process is a more complicated, and so are the consequences of poor design • First you have to decide what kind of house you want to build— analogous in software development to problem definition • Then you and an architect have to come up with a general design and get it approved. This is similar to software architectural design. • You draw detailed blueprints and hire a contractor. This is similar to detailed software design. • You prepare the building site, lay a foundation, frame the house, put siding and a roof on it, and plumb and wire it. This is similar to software construction • And so on… • Greater complexity and size imply greater consequences in both activities. Change in any one of them is expensive and the main cost component in both cases is people’s time. Common Software Metaphors Cont’d Software Construction: Building Software (Cont’d) What other parallels do the two activities share? • In building a house, you won’t try to build things you can buy already built • In building a software system you might also use prebuilt libraries of container classes, scientific functions, user interface classes • However, If you’re building a fancy house with first-class furnishings… ? • In building, you’d use different levels of planning, design, and quality assurance if you’re building a warehouse or a shopping mall than if you’re building a medical center or a nuclear reactor. • Making changes in the software brings up another parallel with building construction. To move a wall six inches costs more if the wall is load-bearing than if it’s merely a partition between rooms. • Similarly, making structural changes in a program costs more than adding or deleting peripheral features. Common Software Metaphors Cont’d Software Construction: Building Software (Cont’d) • The penalty for failure in an extremely large structure is severe, the structure has to be over-engineered. • When the Empire State Building was built, each delivery truck had a 15-minute margin in which to make its delivery. If a truck wasn’t in place at the right time, the whole project was delayed. • Likewise, for extremely large software projects, planning of a higher order is needed than for projects that are merely large. • The requirements specification for a 1,000,000 line of code system would typically be about 4,000-5,000 pages long and the design documentation can easily be two or three times as extensive as the requirements. • Forty million lines of code in windows 7… ? • Many terms common in software development derive from the building metaphor: software architecture, construction, tearing code apart. Key Points
• Metaphors are heuristics, not algorithms. As
such, they tend to be a little sloppy. • Metaphors help you understand the software- development process by relating it to other activities you already know about. • Some metaphors are better than others. • Treating software construction as similar to building construction suggests that careful preparation is needed and illuminates the difference between large and small projects.
Implementing Design Patterns in C# and .NET 5: Build Scalable, Fast, and Reliable .NET Applications Using the Most Common Design Patterns (English Edition)
CODING FOR ABSOLUTE BEGINNERS: How to Keep Your Data Safe from Hackers by Mastering the Basic Functions of Python, Java, and C++ (2022 Guide for Newbies)