A Better Me on Software Engineering. Review of Code Complete by Steve McConnell Chapter 1 & 2

Kibikukimani
4 min readSep 23, 2020
Code Complete by Steve McConnell

Chapter 1

1.1 What is Software Construction

In chapter 1 the idea of Software Construction comes out strongly. It goes ahead to document some of the activities involved during the Software Construction process. The activities include

  1. Problem definition
  2. Requirements development
  3. Construction planning ( commonly know as coding or programming)
  4. Software architecture
  5. Detailed design
  6. Coding and debugging
  7. Unit tests
  8. Integration testing
  9. Integration
  10. System test
  11. Corrective maintenance

1.2 Importance of Software Construction

During software construction the source code is often the only accurate description of the software. Unlike code, the documentation of a piece of software might get outdated.

Software construction can be termed as the central activity in a software's’ SDLC (Software Development Life Cycle). In this case, it should ideally take 30 to 80% of the total time spent on a project.

Chapter 2

2.1 Importance of Metaphors

The book described a metaphor as comparing a topic you understand poorly to one that you understand better, you get great insights that help in understanding the topic you are less familiar with.

The use of metaphors is called modeling. The idea has been around for many decades and some of the most renowned scientist have use metaphors to model solutions to problems that revolutionized the world. A well known example is one of a 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 ringshape would account for the properties of benzene. Further experimentation con-firmed the hypothesis (Barbour 1966).

2.2 How to use Metaphors

A metaphor should not be relied on as a solution to a problem rather than more of a search light to assist in finding the solution. A metaphor should serve as a heuristic (technique that helps look for answers) . Don’t confuse it for an algorithm (well defined set of steps used to achieve a particular goal).

Metaphors should greatly be used to find insights, imagine better ways of doing something when programming.

2.2 Common Metaphors in software development

  1. Writing code

This metaphor compares software development writing a letter, where you take a pen and paper, pen down your thoughts, insert the letter in an envelope and mail it. This process omits the fact that software development requires quite some planning.

2. Growing of software like crops on a farm

This metaphor assumes writing code is like farming, where typically a farmer ploughs their land, sows the seed and over time during different stages of the plant growing the farmer applies different techniques to nurture the seed and help it grow. When you relate this to software, it assumes developing software in progressive bits and doing consecutive releases to a general whole, hence the idea of Growing Software.

The weakness in the software-farming metaphor is its suggestion that you don’t have
any direct control over how the software develops.

3. System Accretion

Accretion means any growth or increase in size by a gradual external addition or inclusion. This metaphor drives the idea of doing incremental development on your piece of software. Ideally first make the simplest possible version of the system that will run then add feature incrementally. Keep in mind that the goal of this metaphor is to have a fully working system at the end of the process.

If you remember nothing else about this metaphor, do not forget that is like how an oyster makes a pearl, by gradually adding small amounts of calcium carbonate.

4. 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 forget to to implement a feature of make a mistake, it’s not a big problem; you can fix it or even start over from the beginning.

In building a house, you won’t try to build things you can buy already built. You’ll buy a washer and dryer, dishwasher for your house. This puts the idea of buying (service/product) that you cannot develop/build but are required to make your project a success.

Here are the key points brought out in Chapter 1

■ Software construction is the central activity in software development; construction is the only activity that’s guaranteed to happen on every project.
■ The main activities in construction are detailed design, coding, debugging, integration, and developer testing (unit testing and integration testing).
■ Other common terms for construction are “coding” and “programming.”
■ The quality of the construction substantially affects the quality of the software.
■ In the final analysis, your understanding of how to do construction determines
how good a programmer you are, and that’s the subject of the rest of the book.

Here are the key points brought out in Chapter 2

■ 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.
■ Thinking of software-development practices as tools in an intellectual toolbox
suggests further that every programmer has many tools and that no single tool
is right for every job. Choosing the right tool for each problem is one key to
being an effective programmer.
■ Metaphors are not mutually exclusive. Use the combination of metaphors that
works best for you.

--

--

Kibikukimani

Kibiku is a Software Engineer fascinated by all things tech, striving to be a master of best Software Engineering principles and best practices of writing code