Title: Theory / Important / CS / Development / Software engineering at Google

Name: Hyrum's law
Definition: Any behavior of your implementation will be relied upon by some user, whether or not it is in the API contract

Question: "It is clever is"
Answer: an insult for software engineering (but a compliment for programming)
Context: Software engineering

Question: How to check whether a policy scales
Answer: Consider the work imposed on a single engineer. If the organization scales by 10 or 100, will the policy requires 10 or 100 times more work from this engineer?
Page: 1
Context: Software engineering

Question: How did Google ensured code deprecation scales
Answer: The team deprecating a code is in charge of helping every user switch to the new code
Page: 13
Chapter: 1
Context: Software engineering

Name: The Beyonce rule
Definition: complicated, one-off bespoke tests that
aren’t triggered by our common CI system do not count
Page: 14
Chapter: 1
Context: Software engineering
Intuition: If you liked it, you
should have put a CI test (originally, a ring) on it,

Question: How to ensure that developers don't relie on specific details of implementation
Answer: Update compiler and other tools regularly, ensuring that only what does not change (the contract normally) gets used in code
Page: 14
Chapter: 1
Context: Software engineering

Question: What is the issue with trying to force an implementation to be non deterministic when the contract does not specify a specific behavior
Answer: users may rely on being non deterministic in their implementation
Page: 14
Chapter: 1
Context: Software engineering

Question: At Google, what is the goal in case of disagreement
Answer: Reach a consensus, not unanimity
Page: 18
Chapter: 1
Context: Software engineering
Answer2: Ensure that everyone understand why the choice is made, even if other may have taken another one

Question: What is the biggest risk when moving compilation to centralized system
Answer: The individual contributor lose the incentive to have the build efficient, to reduce dependencies to what is necessary
Page: 21
Chapter: 1
Context: Software engineering

Name: Jevons Paradox
Definition: Consumption of a resource may increase as a response to greater efficiency in its use
Page: 21
Chapter: 1
Context: Software engineering

Question: What are the risk with forking
Answer: Not benefitting from security patches applied to the original product
Page: 22
Chapter: 1
Context: Software engineering
Answer2: many forks may lead to duplicate work, each team unaware of the other forks

Left: Software engineering
Right: Programming
Left2: the set of policies, practices, and tools that are necessary to make
that code useful for as long as it needs to be used and allowing collaboration across a
team
Right2: the immediate act of producing code
Page: 23
Chapter: 1
Context: Software engineering at Google

Question: What question to consider before measuring data
Answer: what do you want to know exactly
Answer2: what do you expect as answer (to debiais)
Answer3: what are the action you expect to take depending on the result
Answer4: who will decide whether those actions are taken; do they know enough stats to understand the result
Answer5: Can they wait for the result before taking action, and will the result be valid when action is potentially taken

Name: The streetlight effect
Definition: The tendancy to measure what is easy to measure instead of what is relevant to our goal
Etymology: The joke of someone searching their keys under streetline because it's easier and not where they lost them

Question: Why can a rule be omitted from styleguide
Answer: It is usually evident for most programmer. E.g. don't use goto

Question: What is the goal of styleguide rules
Answer: Optimize for reader, not writter. E.g. use if/else instead of conditional expression in python

Question: What is the point of consistency?
Answer: A developper can read a new codebase and directly contribute to it
Context: Code
Answer2: A reviewer can review directly and don't have to concentrate on the style
Answer3: The style will remain the same through time and with change in team
Answer4: Bots and tools can safely alter the code

Name: Test size
Definition: The kind of ressource a test use
Page: 215
Context: Google
Example: Small, medium, large

Name: A small test
Definition: A test using a single thread and process
Page: 215
Context: Google
Intuition: Far less likely to be flaky.

Name: A medium test
Definition: A test running on a single machine
Page: 215
Context: Google
Example: A test accessing a local database

Name: A large test
Definition: A test that potentially requires multiple machines to run
Page: 215
Context: Google
Example: test with actual database/network access
Example2: Testing the interaction of distributed system accross multiple computer

Name: An hermetic test
Definition: A test that contains all of the information necessary to set up, execute and tear down its environment
Page: 218
Context: Google

Name: Test scope
Definition: how much code is being validated by a
given test.
Page: 218
Context: Google

Name: Narrow-scoped test
Definition: test designed to validate the logic in a small, focused part of the codebase, like an individual class or method
Page: 219
Context: Google
Name2: Unit test

Name: Medium-scoped test
Definition: test designed to verify interactions between a small number of components
Page: 218
Example: For example, between a
server and its database
Name2: Integration test

Name: Large-scoped test
Definition: designed to validate the interaction of
several distinct parts of the system, or emergent behaviors that aren’t expressed in a
single class or method.
Page: 218
Name2: functional tests
Name3: end-to-end tests
Name4: system tests

Question: What should a deprecation message be
Answer: Actionable (tell what to use instead)
Answer2: Relevant (show it first time they use the method is better than months after the method was added as a dependency)

Question: When should deprecation warning should be sent
Answer: As soon as there is some usable replacement

Question: What should be done if a public library is modified and used internally
Answer: rename it and change its package. Hence, if a project depends on modified and official library, there are considered are two distinct libraries and no link error occurs

Question: How much version of a library should be used in the whole monorepo
Answer: A single one

Question: Why should there be a single version of each library in the whole monorepo?
Answer: If there is a vulnerability, it can be fixed a single time for every version
Answer2: Two projects are guaranteed to use the same version of the library

Question: Time constraint on production code
Answer: It lives at most 6 months. No version build earlier than 6 months ago can run on prod