Professional Documents
Culture Documents
Full Ebook of System Design Interview Fundamentals 2Nd Edition Rylan Liu Online PDF All Chapter
Full Ebook of System Design Interview Fundamentals 2Nd Edition Rylan Liu Online PDF All Chapter
https://ebookmeta.com/product/acing-the-system-design-interview-
meap-v07-zhiyong-tan/
https://ebookmeta.com/product/fundamentals-in-ophthalmic-
practice-christopher-liu/
https://ebookmeta.com/product/engineering-system-design-2-2nd-
edition-gavin-buskes/
https://ebookmeta.com/product/vehicle-suspension-system-
technology-and-design-2nd-2nd-edition-avesta-goodarzi/
The Fundamentals Of Graphic Design 2nd Edition Gavin
Ambrose
https://ebookmeta.com/product/the-fundamentals-of-graphic-
design-2nd-edition-gavin-ambrose-2/
https://ebookmeta.com/product/the-fundamentals-of-graphic-
design-2nd-edition-gavin-ambrose/
https://ebookmeta.com/product/data-driven-engineering-
design-2022nd-edition-liu/
https://ebookmeta.com/product/grokking-the-object-oriented-
design-interview-1st-edition-educative-io/
https://ebookmeta.com/product/java-j2ee-design-patterns-
interview-questions-you-ll-most-likely-be-asked-2nd-edition-
vibrant-publishers/
SYSTEM DESIGN
INTERVIEW
FUNDAMENTALS
All rights reserved. No part of this book may be reproduced or
transmitted in any form or by any means, electronic or mechanical,
including photocopying, recording, or by an information storage and
retrieval system—except by a reviewer who may quote brief
passages in a review to be printed in a magazine or newspaper—
without permission in writing from the publisher.
Although the author and publisher have made every effort to ensure
that the information in this book was correct at press time, the
author and publisher do not assume and hereby disclaim any liability
to any party for any loss, damage, or disruption caused by errors or
omissions, whether such errors or omissions result from negligence,
accident, or any other cause.
Table Of Contents
Chapter 1: Understanding System Design Interview
Introduction & Goals
System Design Interview Framework
System Design Technical Fundamentals
System Design Interview Questions
Why Should You Care about System Design?
The Purpose of a System Design Interview
How do I Prepare for a System Design Interview?
Chapter 2: System Design Interview Framework
System Design Interview Framework Flow
Step 1: Gather Requirements
Purpose
Functional Requirements
Gathering Features
Clarify Terminologies
Non-Functional Requirements
Scale
How Many Active Users Are There in the System?
How Are the Users Distributed Across the World?
What Are Some Scenarios That Could Lead to High QPS?
What Are Some Scenarios That Could Lead to High Storage
and Bandwidth?
Performance Constraints
What is the Availability and Consistency Requirement?
What Is the Accuracy Requirement?
What Is the Response Time and Latency Constraint?
What Is the Freshness Requirement?
What Is the Durability Requirement?
Step 2: Define API
Purpose
How to Define API
Distracting Input Parameters
Missing Input Parameter
Vague and Nonsensical Input Parameter
Ensure the Response Satisfies the Requirement
User Experience with Response Code
User Experience with Response Data Structure
Intuition on Inefficiencies
Vague and Nonsensical Output
Step 3: Define High-Level Diagram Design
Purpose
Position of High-Level Design
How to Approach High-Level Design
Where Do I Start?
Don’t Be Distracted with Additional Features
Don’t Prematurely Optimize
Table Interesting Discussion Points
Have Logical Separation Between Services
Vague and Nonsensical Design
How Much Detail Should I Provide?
Depth Oriented Questions
Go With the Flow
Step 4: Data Model and Schema
Purpose
How to Approach Data Model and Schema
Add More Detail into the Arrows
Add More Detail into the Queue
Add More Detail into the Database
Add More Detail into Cache and App Servers
Don’t Be Distracted with Additional Features
Vague and Nonsensical Design
Step 5: End to End Flow
Purpose
Step 6: Deep Dive Design
Purpose
How to Approach Deep Dive Design
How to Come Up with Discussion Points
API and Interprocess Calls
Micro Services, Queue, and Databases
Detailed Algorithm, Data Structure, and Schema
Concurrency
Operational Issues and Metrics
Security Considerations
How to Frame a Solution Discussion
Priority of Discussion
Chapter 3: Interviewer’s Perspective
Rubric Leveling Explained
Rubric Examples for Each Section
Functional Requirement Gathering
Non Functional Requirement Gathering
API Design
High-Level Diagram
Data Structure and Schema
Deep Dives
Chapter 4: Communication Tactics and Common Mistakes
Improve Public Speaking
Keep the Requirements Simple
Conclude and Make a Stance
Articulate Your Thoughts
Control the Interview
Listen to the Interviewer
Talk Over the Interviewer
Show Confidence with Your Justifications
Resolving Disagreement
Discussion Point With Trade-Offs
Quality Over Quantity
Math With a Purpose
Focus on the Right Things
Spewing Technical Details With an Intention
Don’t Jump Into a Real-World Design
Chapter 5: Technical Toolbox
Back-of-the-Envelope Math
What is the Purpose?
Do I Need to Do Math?
Types of Back-of-the-Envelope Calculations
Back-of-the-Envelope Calculation Techniques
Common Mistakes
API Design
Idempotency
Client vs Server Generated Data
Efficiency
Correctness
Focus on the Core
Schema Design
Defining Schemas
Indexing Strategies
What is Indexing?
Primary Index
Secondary Index
Index Use Cases
Key or Attribute Lookup
Range Lookup
Prefix Search
Composite Index
Geo Index
Databases
Definition
Purpose
How Do I Choose a Database?
Types of Databases
Relational Database
Document Store
Columnar Store
Object Store
Wide Column Store
Reverse Index Store
In-Memory Store
Geo-Spatial Databases
ZooKeeper
Real-Time Data Update
Use Case
Short Poll
Long Poll
Server-Sent Event
WebSocket
How to Pick a Protocol
How to Scale WebSockets
WebSocket Load Balancer
Is Connection Still Alive?
Concurrency Control and Transaction
Definition
Purpose and Examples
Single Thread
Single Thread Micro Batch
Partition Into Multiple Serial Processing
Pessimistic Locking
Optimistic Locking
Change Product Requirement to Simplify
How to Pick a Concurrency Strategy
Replication
Definition
Purpose and Examples
Leader-Follower Replication
Leader-Leader Replication
Leaderless Replication
How to Pick a Replication Strategy
What Should Be My Replication Factor?
Sharding Strategies
Definition
Purpose and Examples
Vertical Sharding
Horizontal Sharding
Hash Key
Range Key
Other Data Structures
Outlier Keys
Geo-Shards
Sharding Considerations
Making the Final Recommendation
Cache Strategies
Definition
Purpose and Examples
Improve Latency
Improve Throughput
Improve Bandwidth
Cache Considerations
Cache Hit Rate
What Are You Caching?
Write to Cache
Cache Invalidation
Cache Eviction
Failure Scenario and Redundancy
Data Structure
Thundering Herd
Asynchronous Processing
Definition
Purpose
Synchronous and Asynchronous
Reasons for Asynchronous Processing
The Nature of the Job is Asynchronous
The Processing Time is Indeterministic
The Processing Time is Long-Running
Improve Perceived Latency
Batch Processing
Purpose
Build Reverse Index for Search
Word Count for Document
Considerations
Stream Processing
Purpose
System is Down
Late and Out of Order Events
Watermark
Checkpointing
Batch Size
Lambda Architecture
Batch vs Stream Processing
Data is Enormous
Compute Intensive
Complexity of Streaming
Use Case
Lambda Architecture
Queue
Message Queue
Publisher Subscriber
Delivery Semantics and Guarantees
Custom Queue
Conflict Resolution
Last Write Wins
Conflict-Free Replicated Data Type (CRDT)
Keep Records of the Conflict
Custom Conflict Resolution
Security
API Security Considerations
Man in the Middle Attack
Authentication
Timeout
Exponential Backoff
Buffering
Sampling
ID Generator
UUID
Auto Increment
Auto Increment Multiple Machines
Strongly Consistent and Fault Tolerant
Distributed Roughly Sorted ID
Offline Generation
Custom ID
Compression
Lossless vs Lossy
Compression Efficiency
Quality of File
Computing Time to Compress a File
Compatibility of Devices
Compressed File Usage
Pass Only Needed Data
Filtering
Pass Chunk Delta with Rsync
Fail to Open
Distributed Transaction
Money Transfer
Blob Storage and Metadata Storage
Third Party Data Source
Database and Queue
Cache and Storage Update
Abstract Design Choices
Cold Storage
Networking
IP and Port
Domain Name System (DNS)
How to Route to the Closest Region
OSI Model
API Gateway
Content Delivery Network
Improve Latency
Reduce Bandwidth
Better Availability with Redundancy
CDN Considerations
Monitoring
Latency
QPS
Error Rate
Storage
Metrics Count
Full-Text Search
Text to Token Path
Normalize Step
Tokenize Step
Remove Stop Words Step
Stemming
Indexing
N-Gram
Search Query
Ranking
Data Source and Indexing Pipeline
Service Discovery and Request Routing
Load Balancing
Shard Discovery
Product Solutions
Chapter 6: System Design Questions
Ridesharing Service
Step 1: Gather Requirements
Functional Requirement
Non-Functional Requirement
Step 2: Define API
Step 3: Define High-Level Diagram
Step 4: Schema and Data Structures
Step 5: Summarize End to End Flow
Step 6: Deep Dives
Driver Location Update
Location Storage Failure Scenario
Location Storage Search
Match Making Concurrency
Bursty Requests
Top Watched YouTube Video
Step 1: Gather Requirements
Functional Requirement
Non-Functional Requirement
Step 2: Define API
Step 3: Define High-Level Diagram
Step 4: Schema and Data Structures
Step 5: Summarize End to End Flow
Step 6: Deep Dives
Client versus Server Timestamp
Aggregation Service Data Structure
Aggregation Service Scaling Deep Dive
Metrics Storage Deep Dive
Aggregation Service Failures
Late Events
Post Watermark Processing
Emoji Broadcasting
Step 1: Gather Requirements
Functional Requirement
Non-Functional Requirement
Step 2: Define API
Step 3: Define High-Level Diagram
Step 4: Schema and Data Structures
Step 5: Summarize End to End Flow
Step 6: Deep Dives
Fan-out Factor
Connection Storage Complexity
Globally Distributed User Case
Connection Store Design
Load Balance WebSocket
Stream Replay
Instagram
Step 1: Gather Requirements
Functional Requirement
Non-Functional Requirement
Step 2: Define API
Step 3: Define High-Level Diagram
Step 4: Schema and Data Structures
Step 5: Summarize End to End Flow
Step 6: Deep Dives
Optimize for the Feed Read Query
Duplicate Posts
Global User Base
Distributed Transaction
Feed Ads
Poor Bandwidth
Distributed Counter
Step 1: Gather Requirements
Functional Requirement
Non-Functional Requirement
Step 2: Define API
Step 3: Define High-Level Diagram
Step 4: Schema and Data Structures
Step 5: Summarize End to End Flow
Step 6: Deep Dives
Scale for the Write Throughput - Delay Data
Scale for the Write Throughput - Near Real-Time
Idempotency of Metrics
Number of Unique Users
Scaling for Read
Cloud File Storage
Step 1: Gather Requirements
Functional Requirement
Non-Functional Requirement
Step 2: Define API
Step 3: Define High-Level Diagram
Step 4: Schema and Data Structures
Step 5: Summarize End to End Flow
Step 6: Deep Dives
Normalized and Denormalized
Secondary Indexing
Database Choices
Out of Sync Files
File Upload
Scale It Up
Folder Deletion
Rate Limiter
Step 1: Gather Requirements
Functional Requirement
Non-Functional Requirement
Step 2: Define API
Step 3: Define High-Level Diagram
Step 4: Schema and Data Structures
Step 5: Summarize End to End Flow
Step 6: Deep Dives
Rate Limiter Product Design
Rate Limiter Algorithm
Rate Limiter Failure Scenario
Data Storage Long Time Horizon
Data Storage Short Time Horizon
Client Facing Latency Sensitive Rate Limiting
Chat Application
Step 1: Gather Requirements
Functional Requirement
Non-Functional Requirement
Step 2: Define API
Step 3: Define High-Level Diagram
Step 4: Schema and Data Structures
Step 5: Summarize End to End Flow
Step 6: Deep Dives
Concurrency of Channel
Database Solution
Chat Architecture
Read Performance Consideration
Real-Time Protocol
Database Sharding Strategies
What’s Next
Appendix
Appendix 1: Number Conversions
Appendix 2: Capacity Numbers
Appendix 3: Math Number Assumptions
Appendix 4: Product Math Assumptions
Appendix 5: Advanced Concepts
HyperLogLog
Count-Min Sketch
Collaborative Filtering
Operational Transform
Z-Score
EdgeRank
Bloom Filter
TF / IDF
Page Rank
Appendix 6: Security Considerations
Appendix 7: System Design Framework Cheat Sheet
Chapter 1:
Understanding System Design
Interview
Introduction & Goals
We are writing this book because we want to help people prepare
for a system design interview. Studying for a system design
interview is difficult because software engineering is deep and
complex. There are a lot of engineering resources, but you only have
so much time to prepare. Sometimes even if you understand one
component deeply, the interviewer is more interested in something
else.
We will not distract you with information that doesn't matter. For
example, we will not copy and paste "Numbers Everyone Should
Know" from Jeff Dean directly because, in a generalist interview, no
one will ask about L1 cache reference being 0.5 ns, since that is on
the microprocessor level. However, 150 ms for sending a packet
halfway around the world is essential when you’re designing a
latency-sensitive globally distributed application.
When putting together the building blocks, you may have to dig
deeper to address the critical bottlenecks. When you come up with a
solution to a bottleneck, you may have made another component
worse. Then you need to talk about options and trade-offs. And
ultimately, you need to show leadership by making a final
recommendation. System design is about understanding the problem
you’re trying to solve before coming up with a solution. It is not
about coming up with a solution and finding a problem to fit into
that solution.
Because of that, this book will focus intensely on the system design
framework and the fundamental building blocks for system design
interviews. We will present how to relate them to system interview
questions for each of the fundamental building blocks. For example,
instead of telling you an exact clarifying question you should ask the
interviewer, we will provide information on the fundamentals of
asking good questions. Instead of telling you about how a piece of
technology works (you can just search it online), we will focus more
on when, where, and why you can apply that technology. Knowing
when and why to use the building block comes from experience and
is harder to find online, and that’s something we will be focusing on.
The more senior you are in software engineering, the more system
design matters for an interview and for your job. Even if you are an
efficient coding ninja, coding to the wrong architecture will cost the
company more money than if you hadn’t code. System design
interviews are weighted much more heavily the more senior you
become. For most well-known companies, staff-level positions
require multiple rounds of system designs.
Being good at system design helps you continue to climb the ladder
as you’re making a more significant impact on the overall business.
Being more senior in an organization has a considerable bump in
compensation as well. The annual total compensation difference
between a senior engineer and a staff engineer can be between
150k and 200k US dollars. That requires you to do well in a system
design interview.
Being good at system design allows you to see the overall picture of
your company’s architecture better. Remember when you were an
entry-level engineer confused about some of the technical terms and
wondering about the whys of technical decisions? It can be pretty
frustrating. Having the proper fundamentals allows you to better
connect the dots and gives you a sense of satisfaction. So invest in
yourself now to pass the interview and become a better architect.
This book tries to strike a balance between too shallow and too
deep. We will provide the reasoning behind our design choices for
the problem at hand. At times, you may disagree, but that’s ok! If a
design decision is easy to conclude, it’s probably not that interesting.
But the value we would like you to get out of this book is to warn
you not to look at another blog and try to memorize the solutions,
and instead to understand the fundamentals. Know when, where,
and why you would apply a solution for a given problem.
You should go through this book and search on Google if there are
concepts and vocabularies that you don’t understand. Then, join the
discord community to provide feedback and learn from others. Most
importantly, schedule a lot of live system design interview practices
with experienced and qualified engineers. We can’t stress enough
the importance of realistic mock interviews since so much of it is
based on communication and how you present your arguments.
Finally, enjoy and process, since you’ll be leveling your design skill
outside of the interview context as well. Good luck!
Chapter 2:
System Design Interview
Framework
System Design Interview Framework Flow
Having a framework for system design is more important than often
believed. An unstructured interview will make the flow difficult for
you and the interviewer to follow.
We will dig much deeper into each section but take this chapter
seriously as this is what makes system interviews unique from your
day-to-day work. Also, you do not want to trivialize sections like
requirement gathering, as they are way more important than you
think. For the suggested timing, we will assume it is a 40-minute
interview. Here’s the reasoning for the flow:
Warning
A lot of candidates have been doing back-of-the-envelope
calculations right away after requirements gathering. This is a
mistake.
If you feel like the result QPS calculation will impact your later
designs, feel free to do the back of the envelope math after you
finalize the APIs. Otherwise, it’s preferred to do the math during
deep dive, where you can use your math result to justify a need to
discuss scalability.
Functional Requirements
Gathering Features
During this section, act as a product manager and develop user
stories to solve the users’ problems. Even though we’re software
engineers, interviewers do look for solid product sense and strong
user empathy. When given a question, think about:
Situation
Interviewer:
“Please design a file storage system”
Don’t Do This
Candidate:
“Can I assume the user can save the file into a cloud storage and
they should also be able to view the files in a dashboard”?
Interviewer:
“Yeah sure, and the users would like to view their files in a file-
system-like dashboard.”
Candidate:
“Ok, we will need to create folders and each folder should have
files and folders”
Do This
Candidate:
“Why are we building file storage? What is the customer problem
we’re trying to solve?”
Interviewer:
“The users would like to organize their local files into the cloud
with the same folder-like structure. They want to ensure they don’t
lose the photos and would like to occasionally browse their files.”
Candidate:
“Ok, to solve that customer pain point, we can have a feature
where the user can click and drop a folder and we will recursively
upload the folders and files within it. And here’s a wireframe of
what I think the end-user should see. We will ensure the system
has strong durability”
Analysis
Even though both approaches lead to similar APIs that create and
view files, the latter approach demonstrates much stronger user
empathy. You’re suggesting features to solve customer problems
rather than just coming up with random features that seem
related. Because you understand the product, you can leverage it
by claiming the importance of the durability of your system since
users won’t like to lose their life memories.
Do This
“Here are the features I think we can go with to solve the
customers’ problem:
Non-Functional Requirements
After you agree on the features, identify areas that make your
design unique and challenging. You should ask questions to build
preliminary tuition on what could break your system and, when it
does, some areas that can be compromised to scale for those
bottleneck challenges. Also, asking good questions gives
interviewers good data points about how you think about the design
by focusing on what matters.
Scale
How Many Active Users Are There in the System?
The goal of this question is to figure out the scale of the system.
Sometimes you might need to adjust the question to fit the context
of the interview design question. For example, if the interviewer asks
you to design a web crawler, you might want to ask how many URLs
and pages you have to crawl. You can use this number to build the
intuition on the scale and calculate the math.
How Are the Users Distributed Across the World?
Globally, different users access applications as the world becomes
closer together through the internet. Unfortunately, the latency for
cross-globe communication may significantly impact the user
experience. Therefore, it’s crucial to figure out the distribution to
discuss geo locality design in the deep dive section.
What Are Some Scenarios That Could Lead to High QPS?
The goal here is to demonstrate your ability to think of scenarios
that can break your system. One example is bursty situations that
cause a thundering herd problem. Just as in real life, when there’s a
design proposal, you look for real-life scenarios that may cause
headaches for your system. Not only do you demonstrate experience
by considering the worst case, but it also brings up deeper design
considerations with interesting trade-offs that will leave the
interviewers with stronger impressions. A design without bottlenecks
isn’t challenging and interesting. You should be the candidate who
proactively comes up with difficult cases instead of waiting for the
interviewer to provide them.
Design Slack
“Should I worry about supporting a company level chat room that
has tens of thousands of employees where there may be a lot of
chats?
Design E-Commerce
“Should I worry about the situation where many buyers try to buy
an item at the same time leading to inventory problems?”
What Are Some Scenarios That Could Lead to High Storage and
Bandwidth?
The goal here is to figure out what kind of pattern could cause the
system to have high storage and bandwidth such that you need to
scale the storage system. One factor is the amount of memory
passed through a request and how frequently the servers handle the
requests.
Design Netflix
“Can I assume users like to watch movies at night and anticipate
bigger traffic during those hours? Can I assume there is only a
small subset of popular movies most people like to watch?”
Performance Constraints
Remember, if the world ran on supercomputers with no network
latency, computers would never go down, and with unlimited
storage, we would not have to worry about distributed systems.
However, things do break, and networks do get congested. To
achieve the scale that we need, we may have to make sacrifices to
our system. You should discuss and agree with the interviewer on
the constraints before proceeding further. Here are some high-level
idea aspects to consider:
What is the Availability and Consistency Requirement?
The goal here is to discuss whether the system can tune the user
product experience’s consistency to meet the availability demand
better. A common mistake candidates make is to be too solution-
focused, where candidates begin talking about choosing an AP
system (CAP Theorem) over the CP system. Focus on the user
experience instead.
Situation
Interviewer:
“Please design Facebook Newsfeed”
Don’t Do This
“I will choose AP system over CP system because we need the
newsfeed product to be highly available and it is ok to be
inconsistent.”
Do This
“When a user posts a feedback, can I assume that it is ok to have
some delay before the user’s post shows up in other users’ feed in
case I need to optimize for availability?”
Analysis
In the Don’t example, it’s unclear which part of the system should
favor availability over consistency. In a system, there could be
components that are “CP” and other components that are “AP.” You
need to be clear on the use cases. Even if every feature within it
should be “AP,” there is much more clarity if you describe the user
experience.
Reminder
People often confuse latency with response time. However, from
the end-users’ experience, we want the response time, not latency,
because that’s how long the users have to wait before they get a
response.
Real-Time
A stock trader sitting at home needs the data to be real-time
because a delay in the price feed may cause the trader to make
the wrong trading decision.
Near Real-Time
When a celebrity is streaming their experience at a baseball game
on Facebook Live, the stream itself should be near real-time, but a
couple of seconds delay is acceptable. The users won’t feel a
difference with a couple of seconds delay, but if the stream is
delayed by a couple of hours, some users will likely find out
because the game is already over.
Batch Process
Because real-time and near real-time systems are challenging and
expensive to build, some applications can still have a good user
experience even if it takes a couple of hours or days to run. For
example, a static website’s web crawler for search does not need
to be updated often.
High Durability
When you’re storing users’ life photos, it is extremely important to
be highly durable. Losing a photo would mean never being able to
see that moment of their life again. So, in the interview, you
should emphasize the importance of durability design to prevent
correlated failures.
Medium Durability
For casual chats that happened years ago, you might argue that
the users will rarely look at the ancient chat history again. While
the chat history is still important to be durable, losing a message
that happened years ago wouldn’t get a user super angry
Low Durability
For a rich sharing service to capture drivers’ location, it is
acceptable if we lose a driver’s location for a moment in time
because we will get their location for their next update in the next
few seconds. So losing location data wouldn’t result in many
impacts on the underlying system.
Step 2: Define API
Purpose
The purpose of the API is to have a detailed agreement between the
end-user and the backend system. Having a detailed API contract
gives you and the interviewer confidence that you are both on the
same page with the functional requirements.
Some of the examples below may look trivial and easy on the
surface, but during an interview when under time pressure, many
candidates make mistakes. Most candidates don’t take a second look
to double-check if their API design makes sense. Making mistakes on
designs that should be straightforward will raise an interviewer’s
eyebrow.
API Signature
Once you’ve identified the scope of the API that you need to define,
you need to come up with an API signature that clearly defines what
it does. Naming is probably the most important aspect to define
clearly in this step. For example, if the interviewer asked you to
come up with an API to request for Uber rides, name it
“request_ride” instead of “rides” or “fetch,” which don’t articulate
what the API does.
Input Parameter
The biggest warning we have for this section is that everything
counts. If you decide to introduce an input parameter because it
kind of makes sense, you need to be able to justify it if the
interviewer asks you about it. The converse is also true; if you forget
an input parameter, the interviewer might come back and question
how you’re going to achieve a functional requirement without certain
information from the client. Of course, if the input doesn’t make
sense, you’re also going to be questioned about it.
Distracting Input Parameters
You should not introduce input parameters that are not important to
the functional requirements. If you give the interviewer more input
parameters than needed, it doesn’t mean it is better; it is harmful in
an interview since it’s unfocused and distracting.
Situation
After the functional requirement gathering phase, the interviewer
just wants you to focus on matching a single rider request with a
driver, and that’s it.
Don’t Do This
request_ride(user_id, pickup_location, destination, car_type,
is_carpool, payment_method)
Do This
request_ride(user_id, pickup_location, destination)
Analysis
Since the agreement with the interviewer is to focus purely on the
core functionality of matching the ride and the driver, don’t start
introducing a bunch of functional features like different levels of
car type while you’re designing the API. Introducing a bunch of
random inputs can be very distracting to you and the interviewer.
If you feel like the feature is essential to talk about and feel like
you forgot to bring it up during the functional requirement
gathering phase, feel free to ask about it. Ask, “Should I worry
about different levels of car types” before directly putting the
parameter in the API.
API Design
API Issue
Goal
Upload photo upload(user_id, folder_id) You’re missing the
to the server photo bytes to be
stored.
Request ride request_ride(user_id, The system wouldn’t
for Uber destination_address) know where to pick
the user up.
Get newsfeed get_feeds() You forgot the user
for a user you’re fetching the
feeds for.
Vague Input
When you design an API input, it’s necessary to clarify inputs that
the interviewer can interpret in many ways. For example, consider
book_calendar(user_id, starting_time, ending_time)—the granularity
of time is critical for the end design. If you forgot to discuss the time
Another random document with
no related content on Scribd:
In der Schule war Henry Ford ein »Dummkopf«, der Lehrer konnte
wenig mit ihm anfangen.
Henry hatte mit 15 Jahren die Schule satt, lief davon und fand eine
Stellung in einer Maschinenwerkstatt. Er begann mit 10 Schilling die
Woche — heute verdient er 28 Schilling die Sekunde.
Einige Jahre später starb sein Vater und er mußte nach Hause,
um die Farm zu verwalten. Doch als Farmer blieb er erfolglos.
Das beste, was er tat, während er auf der Farm lebte, war seine
Heirat mit der Tochter eines Nachbarn.
Eines Abends, bei der Lektüre einer Farmerzeitung, sah er das
Bild eines neuen pferdlosen Wagens, den ein Franzose erfunden
hatte.
Er war fasziniert. Das Bild packte ihn und änderte völlig die
Richtung seines Lebens.
Er vernachlässigte seine Farm und begann in seiner Scheune
einen pferdlosen Wagen zu bauen. Er spannte eine alte Maschine
vor einen alten Jagdwagen — die ganze Umgebung machte sich
über ihn lustig.
In den Armenhäusern Amerikas leben heute verschiedene alte
Männer und Frauen, die vor 25 Jahren sich herrlich damit
amüsierten, Henry Ford auszulachen.
Gegen den Rat aller verließ er plötzlich die Farm und ging nach
Detroit. Er bekam eine Anstellung als Mechaniker mit 30 Pfund
monatlich und arbeitete nachts an seinem pferdlosen Wagen.
Er baute einen, der einen Zylinder hatte — ein verschrobenes,
schnaufendes, lächerliches Ding. Aber es bewegte sich.
Acht lange Jahre besserte er an diesem absurden Motor herum.
Endlich ging er — so gut, daß Henry damit ein Rennen gewann.
Mit einem Schlag wurde er und sein Motor berühmt. Er gewann
weitere Rennen. Er schlug sogar Barmey Goldfield, den besten
Rennfahrer in jenen Tagen. Er schlug Goldfield in einem Dreimeilen-
Rennen.
Einige Freunde liehen ihm 3000 Pfund, mit denen er eine kleine
Motorenfabrik begann. Er verschaffte sich die besten Betriebsleiter.
Er zahlte sie gut und sie organisierten ihm ein riesiges Geschäft.
Er ist ein schlanker, athletischer, sonnverbrannter Mann von
einfachstem Geschmack. Macht und Reichtum haben ihn nicht
verdorben. Als ich ihn das letztemal in seiner Detroiter Fabrik sah,
zeigte er einem Telephonmädchen, wie sie ihr Schaltbrett zu
bedienen habe.
Er ist kein Geschäftsmann im gewöhnlichen Sinne. Er ist ein
Mechaniker — ein Erfinder. Er begründete seinen Erfolg durch die
richtige Schätzung des Prinzipes der Standardisation.
Henry Ford weiß, wie man es macht.
Er hat die Probleme seines Geschäftes gelöst. Er hat uns den
einen richtigen Weg gezeigt, Menschen zu behandeln, Güter zu
erzeugen und Profite zu machen, ohne sich Feinde zu machen.
Hätten wir 1000 Fords, wir würden hohe Löhne, hohe Profite,
niedrigere Preise und keine Arbeiterunruhen haben. Wir würden
Frieden und Wohlfahrt haben.
Nehmen Sie beispielsweise Fords Methoden als Arbeitgeber. In
dieser Hinsicht ist er ganz eigenartig. Er ist einen vollkommen
ungewöhnlichen Weg gegangen und hat damit einen großen Erfolg
erzielt.
Tatsächlich scheint Henry Ford sich weit mehr als Arbeiterführer
denn als Arbeitgeber zu betrachten.
Er gibt seinen Leuten mehr als sie verlangen.
Er gibt ihnen bessere Arbeitsbedingungen, als sie jemals sich
träumen konnten.
Er beobachtet und beschützt sie. Er hat aus seinen 55 000 Leuten
die bestbezahlte und zufriedenste Arbeiterarmee gemacht, die die
Welt je gesehen hat.
Kein Arbeiterführer hat für die Arbeiter so viel getan, wie Henry
Ford.
Im Jahre 1914 waren seine Arbeiter vollständig zufrieden, aber
plötzlich verdoppelte er ihre Löhne. Als Ergebnis machte er im Jahre
1915 einen größeren Reingewinn, als je zuvor.
Er schützt seine Arbeiter gegen jede Ungerechtigkeit. Er hat 2000
Werkführer, und nicht einer von ihnen darf einen Arbeiter entlassen.
Im Jahre 1919 wurden von 50 000 Arbeitern nur 118 entlassen.
Ein eigener Stab von dreißig Leuten untersucht alle
Schwierigkeiten zwischen den Werkführern und den Arbeitern. Hat
ein Werkführer häufige Konflikte mit seinen Leuten, so wird er sehr
bald in das Direktionsbureau berufen und darüber aufgeklärt, daß
seine Methoden falsch sind.
Ford hat nichts gegen die Gewerkschaften, aber er macht es in
jeder Beziehung besser als sie. Er betrachtet das
Gewerkschaftswesen als einen notwendigen Schutz gegen törichte
oder ihre Leute schindende Arbeitgeber, aber er ist weder töricht
noch ein Leuteschinder.
In seiner Fabrik gibt es keine Rücksichtslosigkeit und keine
Unbarmherzigkeit. Sie ist wirklich eine der gütigsten und
menschlichsten Einrichtungen. In ihr herrscht mehr Sympathie und
Herzensgüte, als in den meisten Kirchen. So gibt es zum Beispiel in
den Ford-Werken vierhundert Arbeiter, die entlassene Sträflinge
sind. Sie wurden als Verbrecher ausgestoßen, aber Ford hat ihnen
eine Chance geboten. Er hat sie zur Selbstachtung zurückgeführt
und sie leben jetzt ein ehrenhaftes und glückliches Leben.
Es gibt in den Ford-Werken zweitausend schwache und
verkrüppelte Leute. Sie tragen ein Abzeichen, das besagt: »Nur für
leichte Arbeit.«
Es ist eine von Fords Theorien, die er hartnäckig vertritt, daß er
seinen Anteil an der Sorge für Krüppel, Verbrecher und Blinde zu
tragen hat. Einer seiner tüchtigsten Arbeiter ist ein blinder Mann.
Vor sechs Jahren stellte Ford zweihundert Leute an, um
herauszufinden, wie seine Arbeiter leben. »Ich wünsche, daß meine
Leute ein reines und gesundes Leben führen«, sagte er.
Vor kurzem aber hat er dies wieder eingestellt. »Es bringt zu viel
Herumschnüffeln in Privatangelegenheiten mit sich«, sagte er. »Wir
wollen diese Abteilung in eine Erziehungsabteilung umwandeln.«
Er spart keine Ausgabe, um seinen Arbeitern in der Fabrik die
besten Arbeitsbedingungen zu schaffen. Er hat einen besonderen
Stab von siebenhundert Malern, Fensterwaschern, Tischlern usw.,
um alles rein und frisch zu erhalten. Der Boden seiner Werke ist so
sauber wie ein Küchenboden.
Alle zwölf Minuten wird die Luft erneuert. Aller Rauch und alles
Gas der Gießerei wird beseitigt. Es gibt keine kalten oder überhitzten
Räume.
John R. Commons hat vor kurzem die Ford-Werke besucht, um
sich über die »Schnelligkeitshetzen« zu informieren. Und er
berichtet, daß er nichts davon bemerkt hat, außer »in einem Teil der
Gießerei unter neuangestellten Arbeitern«.
Kurz gesagt: Zwischen Ford und seinen Leuten besteht kein Krieg.
Auf keiner Seite gibt es einen Verdacht. Ford glaubt an seine Leute
und sie glauben an Ford.
Er hat eine Gewerkschaft von achtzigtausend Mann organisiert
und er ist ihr Führer.
Er hat sein ganzes Geschäft hoch über Ausstände und
Aussperrungen erhoben.
Er hat dem Krieg zwischen den Arbeitern und der Betriebsleitung
ein Ende gemacht. Er hat Friede auf Erden und den Menschen ein
Wohlgefallen in seinen Werken verwirklicht.
Er ist wahrscheinlich kein Mann von großem Wissen, aber er hatte
den Mut, die Grundsätze der Gerechtigkeit und Wirksamkeit zur
Anwendung zu bringen. Er handelte. Er führte. Er hat jedem anderen
Arbeitgeber gezeigt, was getan werden kann.
Von
HERBERT N. CASSON
sind in unserem Verlag erschienen:
Business
16 Lehrsätze vom Geschäftserfolg. Dritte
Auflage.
Das Buch für den größten und den kleinsten Kaufmann. Es
behandelt die neue Wissenschaft vom Geschäft. Es gibt in reiner
Wahrheit und Klarheit viel von dem Besten, was auf amerikanischem
Boden an Erkenntnis und Erfahrung gereift ist.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must, at
no additional cost, fee or expense to the user, provide a copy, a
means of exporting a copy, or a means of obtaining a copy upon
request, of the work in its original “Plain Vanilla ASCII” or other
form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.