> For the complete documentation index, see [llms.txt](https://cs61b-2.gitbook.io/cs61b-textbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cs61b-2.gitbook.io/cs61b-textbook/31.-software-engineering-ii/31.5-exerises.md).

# 31.5 Exerises

## Factual

1. For each of the following, state whether they prevent, exacerbate, or have no effect on information leakage.
   * using unnecessary print statements to show the state of the program while it's running
   * employing temporal decomposition when architecting your code
   * creating deep modules
   * using helper methods and classes
2. In Woolley's study, which factors correlated with the quality of a team's output?

<details>

<summary>Problem 1</summary>

The key to remember is that information leakage is *not* related to the state of the program. Instead, it's when multiple pieces of code reflect a single design decision/module, introducing unnecessary complexity and dependencies.

* **Using unnecessary print statements to show the state of the program while it's running:** no effect on information leakage.&#x20;
* **Employing temporal decomposition when architecting your code**: exacerbates information leakage.
* **Creating deep modules**: prevents information leakage.
* **Using helper methods and classes**: prevents information leakage.

</details>

<details>

<summary>Problem 2</summary>

The two most important factors were *turn-taking* during conversations and the average ability of the group members to *recognize emotional state* from a person's eyes.

</details>

## Metacognitive

1. Give some examples of unnecessary obscurity that contributes to complexity.
2. Give some examples of unnnecessary dependencies that contribute to complexity.

<details>

<summary>Problem 1</summary>

There are many kinds of obscurity that can contribute to complexity. These include putting too much code into one function or module, having a large amount of variables that need to be maniuplated, and not breaking up your code or having helper functions.

</details>

<details>

<summary>Problem 2</summary>

One example is copy-pasting code across different modules. This means that to change this block of code, you have to change every location that this code appears in.

</details>
