John Ousterhout Google Talk
- 26Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
According to John Ousterhout, what is the most important concept in all of computer science?
According to John Ousterhout, what is the most important concept in all of computer science?
26 questions
- 1
According to John Ousterhout, what is the most important concept in all of computer science?
- A
Problem decomposition
- B
Layers of abstraction
- C
Complexity management
- D
Abstraction
Correct answer
AProblem decomposition
Explanation
Ousterhout explicitly states that problem decomposition—how to chop up a complicated problem into pieces that can be built independently—is the most important concept, more so than abstraction or layering.
- A
- 2
How does CS 190 Software Design Studio primarily teach software design?
- A
Through lectures on design patterns
- B
By assigning readings from classic software engineering papers
- C
By having students build large systems iteratively with code reviews
- D
Through team-based competitions to build the fastest code
Correct answer
CBy having students build large systems iteratively with code reviews
Explanation
The course uses an iterative approach where students build a system, receive code reviews, revise, and repeat, similar to how English writing is taught.
- A
- 3
In the original version of CS 190, what did students do in the third phase?
- A
They started a new project from scratch
- B
They added features to another team's project
- C
They refactored their own project from phase one
- D
They merged all team projects into one system
Correct answer
BThey added features to another team's project
Explanation
In the first two offerings, the third phase required students to add features to another team's project. Ousterhout later changed it to starting a new project from scratch to focus more on design.
- A
- 4
How many lines of code does Ousterhout typically read during a code review week?
- A
Less than 1,000
- B
50,000 to 100,000
- C
5,000 to 10,000
- D
20,000 to 30,000
Correct answer
D20,000 to 30,000
Explanation
Ousterhout states he reads 20,000 to 30,000 lines of code in a week during the code review phase.
- A
- 5
What is a 'deep class' according to Ousterhout's design principle?
- A
A class with a simple interface but significant underlying functionality
- B
A class that inherits from many base classes
- C
A class with a complex interface that hides little implementation
- D
A class with a large number of methods
Correct answer
AA class with a simple interface but significant underlying functionality
Explanation
A deep class has a small interface (low cost) and large functionality (high benefit), providing a good abstraction that hides complexity.
- A
- 6
Which of the following is an example of a shallow class or method?
- A
A database connection pool
- B
Unix file I/O interface with five functions
- C
TCP/IP protocol stack
- D
A getFoo method that simply returns a field
Correct answer
DA getFoo method that simply returns a field
Explanation
A getFoo method is shallow because it has almost no implementation and the interface is essentially the implementation, providing no information hiding.
- A
- 7
What is 'classitis'?
- A
The belief that more classes are always better, leading to many small shallow classes
- B
The tendency to make classes too large and monolithic
- C
The overuse of inheritance hierarchies
- D
The practice of using abstract base classes for all designs
Correct answer
AThe belief that more classes are always better, leading to many small shallow classes
Explanation
Classitis is when developers create many tiny classes each adding minimal functionality, resulting in shallow abstractions. Ousterhout cites the Java Class Library as an example.
- A
- 8
According to Ousterhout, what is the ideal way to handle exceptions?
- A
Use return codes instead of exceptions
- B
Throw exceptions for every possible error condition
- C
Catch all exceptions at the top level and log them
- D
Redefine semantics so that the error condition no longer exists
Correct answer
DRedefine semantics so that the error condition no longer exists
Explanation
The best approach is to 'define errors out of existence' by changing the semantics so that the exceptional case becomes normal behavior, eliminating the need for exception handling.
- A
- 9
How did Unix solve the problem of deleting an open file?
- A
It deletes the directory entry but keeps the file data until all handles are closed
- B
It prevents deletion if any process has the file open
- C
It moves the file to a temporary location and deletes it later
- D
It returns an error and requires the process to close the file first
Correct answer
AIt deletes the directory entry but keeps the file data until all handles are closed
Explanation
Unix removes the directory entry immediately, but the file's data persists until the last open handle is closed, allowing processes to continue accessing it without errors.
- A
- 10
What was the mistake in the original Tcl 'unset' command?
- A
It could not delete multiple variables at once
- B
It was case-sensitive, causing confusion
- C
It required explicit variable quoting
- D
It threw an exception when attempting to delete a non-existent variable
Correct answer
DIt threw an exception when attempting to delete a non-existent variable
Explanation
Ousterhout made unset throw an exception if the variable didn't exist, but in practice users often needed to delete variables that might not exist, leading to cumbersome catch blocks. He later realized it should simply do nothing in that case.
- A
- 11
According to Ousterhout, what should Java's substring method do instead of throwing exceptions for out-of-range indices?
- A
Return an empty string immediately
- B
Modify the string to match the requested range
- C
Clip the indices to the string's range and return the overlapping portion
- D
Throw a different type of exception
Correct answer
CClip the indices to the string's range and return the overlapping portion
Explanation
Ousterhout suggests that substring should return the overlap between the requested indices and the available string, so that out-of-range requests simply return a subset or empty string, eliminating the need for exception handling.
- A
- 12
In the tactical programming approach, what is the primary goal?
- A
To write comprehensive unit tests before any implementation
- B
To produce a great design that will pay off in the future
- C
To get something working as quickly as possible, even if it means cutting corners
- D
To refactor existing code for better structure
Correct answer
CTo get something working as quickly as possible, even if it means cutting corners
Explanation
Tactical programming focuses on getting the next feature or bug fix working, often at the expense of design quality. Ousterhout argues this leads to accumulation of complexity.
- A
- 13
What is a 'tactical tornado'?
- A
A programmer who writes excellent code at very high speed
- B
A tool that automatically refactors code
- C
A manager who prioritizes design over deadlines
- D
A developer who produces large amounts of shoddy code quickly and is considered a hero
Correct answer
DA developer who produces large amounts of shoddy code quickly and is considered a hero
Explanation
A tactical tornado is a programmer who churns out enormous amounts of low-quality code rapidly, often seen as a hero by management despite leaving a trail of complexity.
- A
- 14
According to Ousterhout, how much slower should you be willing to go initially when investing in design?
- A
10% to 20% slower
- B
At least 50% slower
- C
Twice as slow to ensure perfection
- D
The same speed, just with better planning
Correct answer
A10% to 20% slower
Explanation
Ousterhout suggests that a 10% to 20% initial slowdown is affordable and will pay back within months, making the overall speed higher in the long run.
- A
- 15
What change did Facebook make to its company motto after realizing the problems with its code base?
- A
From 'Move fast and fix things' to 'Move thoughtfully with robust infrastructure'
- B
From 'Move quickly and break things' to 'Move quickly with solid infrastructure'
- C
From 'Move fast and break things' to 'Move fast with stable infrastructure'
- D
From 'Move quickly and innovate' to 'Move steadily with quality assurance'
Correct answer
BFrom 'Move quickly and break things' to 'Move quickly with solid infrastructure'
Explanation
Facebook changed its motto from 'move quickly and break things' to 'move quickly with solid infrastructure' after acknowledging the mess in their code base.
- A
- 16
Which companies does Ousterhout cite as examples of having strong design cultures?
- A
Google and VMware
- B
Facebook and Twitter
- C
Apple and Intel
- D
Microsoft and Amazon
Correct answer
AGoogle and VMware
Explanation
Ousterhout mentions that Google and VMware were known for their strong design culture, particularly in the early 2000s, attracting top programmers.
- A
- 17
What is one of the biggest challenges for the strategic programming approach?
- A
It eliminates the need for unit testing
- B
It requires complete upfront design before any coding
- C
Managers often push for quick features, making it hard to invest time in design
- D
It is only applicable to large-scale systems
Correct answer
CManagers often push for quick features, making it hard to invest time in design
Explanation
Ousterhout notes that managers often prioritize features and releases, making it difficult to invest in design. He suggests having great engineers advocate for design culture to management.
- A
- 18
How does Ousterhout suggest programmers should approach changes to existing code?
- A
Make the smallest possible change to minimize risk
- B
Rewrite the entire module from scratch
- C
Always look for something to improve, even if just to break even on complexity
- D
Avoid modifying existing code unless absolutely necessary
Correct answer
CAlways look for something to improve, even if just to break even on complexity
Explanation
Ousterhout advises that when changing code, you should strive to improve the design, because your changes likely add some complexity. Aim to leave the code cleaner than you found it.
- A
- 19
What role do red flags play in Ousterhout's design philosophy?
- A
They are signs that a class is too deep
- B
They are specific patterns indicating that a design is likely flawed
- C
They are used to mark code that needs optimization
- D
They are compiler warnings that must be eliminated
Correct answer
BThey are specific patterns indicating that a design is likely flawed
Explanation
Ousterhout describes red flags as specific, recognizable patterns that signal trouble in the design. Beginners can use them to know when to change direction.
- A
- 20
According to Ousterhout, why is complexity in software so hard to fix once it accumulates?
- A
Because modern tools make refactoring impossible
- B
Because it usually results from a single large mistake
- C
Because management rarely approves refactoring efforts
- D
Because it comes from hundreds of small mistakes spread across many places
Correct answer
DBecause it comes from hundreds of small mistakes spread across many places
Explanation
Complexity is not a single big mistake but thousands of small ones made by many people over time, making it overwhelming to address.
- A
- 21
What hiring advice does Ousterhout give?
- A
Use coding challenges that focus on algorithms only
- B
Hire for slope (learning ability) rather than y-intercept (current knowledge)
- C
Prioritize candidates from top-tier universities
- D
Look for candidates with the most experience in the specific technology you use
Correct answer
BHire for slope (learning ability) rather than y-intercept (current knowledge)
Explanation
Ousterhout argues that hiring for slope—the ability to learn quickly—is more valuable than hiring for current specific skills, especially in a startup where needs change rapidly.
- A
- 22
What is Hyrum's Law?
- A
Software complexity grows until it becomes unmaintainable
- B
Adding more developers to a late project makes it later
- C
Every abstraction leaks
- D
With enough users, all observable behaviors of an API will be depended on, regardless of the contract
Correct answer
DWith enough users, all observable behaviors of an API will be depended on, regardless of the contract
Explanation
Hyrum's Law states that given enough usage, every observable behavior of an API—even unintended ones—will be relied upon by some user, making it hard to change.
- A
- 23
Does Ousterhout believe that the choice of programming language significantly impacts software design quality?
- A
No, but language choice affects performance more than design
- B
No, design principles are fairly universal across languages
- C
Yes, object-oriented languages are always better
- D
Yes, functional languages produce better designs
Correct answer
BNo, design principles are fairly universal across languages
Explanation
Ousterhout states that design principles are universal and can be applied in any language. He cites Unix file I/O in C as an example of great design.
- A
- 24
In Ousterhout's class, why does he not include unit testing?
- A
He believes unit testing is unnecessary for good design
- B
The class projects are too small for meaningful unit tests
- C
Students are expected to learn unit testing on their own
- D
The course is only 10 weeks and he focuses on design; unit testing is a distraction
Correct answer
DThe course is only 10 weeks and he focuses on design; unit testing is a distraction
Explanation
Ousterhout decided to omit unit testing from the course because it would take time away from design instruction, given the limited 10-week quarter.
- A
- 25
What was Ousterhout's motivation for writing the book 'A Philosophy of Software Design'?
- A
To provide a step-by-step recipe for software design
- B
To promote his course at Stanford
- C
To document his research on software engineering
- D
To reach a wider audience and start a conversation about design
Correct answer
DTo reach a wider audience and start a conversation about design
Explanation
Ousterhout wrote the book to reach more people than his class can, and to kick-start a discussion on software design principles within the community.
- A
- 26
According to Ousterhout, what is the key reason why tactical programming leads to poor design?
- A
It discourages code reuse
- B
It encourages too much upfront planning
- C
Small shortcuts and kludges accumulate rapidly
- D
It relies on premature optimization
Correct answer
CSmall shortcuts and kludges accumulate rapidly
Explanation
In tactical programming, each small shortcut seems harmless, but they accumulate quickly from many developers, resulting in an unmanageable, spaghetti-like codebase.
- A

Ask anything
We've read this whole study set, so questions about it get the best answers.