シャドーイング練習: What Software Architecture Should Look Like • Dave Farley • GOTO 2022 - 動画で英語スピーキングを学ぶ

レッスンを作成中...
1
Wikipedia defines software architecture as the functional structures of a software system and the discipline of creating such structures and systems.
2
Well you can kind of see what they mean
3
but it's a pretty dry definition and it raises as many questions as it really answers.
4
After all, what does fundamental mean anyway?
5
And for that matter, what does structure mean in this context too?
6
The last bit is really only saying architecture is produced by a disciplined approach to architecting things.
7
To be fair to Wikipedia, this is a difficult idea to nail down.
8
Even though I think that most of us would agree that it's an important one in some way.
9
So here is my take on software architecture.
10
What does it mean and what does it take to do a good job of it?
11
Hi, I'm Dave Farley of Continuous Delivery.
12
Welcome to my channel.
13
If you haven't been here before, please do hit subscribe.
14
And if you enjoy the content today, hit like as well.
15
My thinking on software development, design and architecture is deeply informed by what I think of as an engineering approach.
16
I describe this generally applicable approach in my new book, Modern Software Engineering.
17
It's doing rather well in the rankings on Amazon at the moment, and he's collecting some very nice reviews.
18
So do check it out.
19
There's a link to that in the description below too.
20
I think of myself as a software developer.
21
Probably more accurately these days, I'm a consultant first and a developer second.
22
But I also spent a considerable part of my career being called a software architect in one form or another.
23
I couldn't then and can't now tell you any significant difference in my focus between the times
24
when I was called a developer and the times when I was called an architect.
25
Ultimately, I think this is about design.
26
Maybe it's about design at different scales, but I confess that I'm rather skeptical of that.
27
The slippery nature of defining architecture as design on a bigger scale is that design in information systems is kind of fractal.
28
There are things that matter at all levels of detail
29
and there are tiny details that will invalidate grand assumptions
30
and there are grand assumptions that can prevent effective progress at the level of tiny detail.
31
A popular description of software architecture comes from Grady Booch who says architecture represents the significant design decisions
32
that shape a system where significance is measured by cost of change.
33
I don't disagree with this definition but I don't like it very much it implies
34
that these are the details
35
that we need to get right at the start to succeed it makes some sense
36
if we're looking retrospectively at a system
37
but it's a pretty poor guide to building one be omniscient for something this complex
38
that simply isn't going to happen for me there's only one approach to architecture that makes any sense at all.
39
It has to be an evolutionary process.
40
We will guide the design of our system by modifying the constraints that we apply to that design.
41
These constraints or rules of the road are what we think make sense at any given point.
42
These form an important aspect of our architecture.
43
We create a kind of tourist map of the system that we can use as a tool to guide design choices.
44
Here's the tourist map from one of my systems.
45
This map guides the evolution of the system in the direction of the outcomes that we aim to achieve.
46
If we're doing a good job we'll discover our inevitable mistakes and update our tourist map as our understanding deepens.
47
Let's try and walk into this problem a little bit more carefully.
48
One great definition of software architecture is it's the stuff that we wish we'd got right at the start of a project.
49
perhaps a little more helpfully it's the shared understanding
50
that the expert developers have of the system design both of
51
these definitions come from ralph johnson i'd add a couple of
52
words to the second it's a snapshot of the shared understanding
53
of the expert developers you hope it doesn't change too often
54
but you should expect it to change i think that in combination these definitions get something rather important right.
55
At the start of any project, we don't yet know the answers, but we still need to make some guesses about what may work in order to begin.
56
If we're going to be creating this system as part of a team, we need a way to discuss design ideas to communicate with each other about the system
57
and think about where different behaviours of the system will be handled.
58
Our tourist map will help a lot with these conversations.
59
Debating new features in front of the tourist map can we can explore the implications of our design choices
60
and maybe spot improvements or mistakes in the map.
61
I like Ralph Johnson's focus on the stuff we wish we
62
got right rather than a focus on the stuff we must get right.
63
We focus on the stuff that worry us.
64
I like it because we almost certainly won't get it right first time but it is important stuff.
65
That aligns very nicely with my thinking
66
and my approach to development in general really which is significantly focused on maintaining my freedom to get things wrong.
67
That probably sounds a bit weird but I want the freedom to make a mistake
68
and the ability to learn and recover from it.
69
For that we need the ability to contain the complexity and to manage it.
70
Fundamentally the architecture of our system is realized in the shapes that we make with our code.
71
All software has an architecture.
72
in some of them though it happened by accident in others it was worked on with great care
73
and grew to be something good good architecture allows us to
74
isolate one part of the problem from another this could be functional let's create services aligned with bounded context
75
so that they can change more independently of one another
76
or it could be in the jargon of architects non-functional let's shard the data in our system
77
so that it can scale linearly as demand rises
78
more formal approaches to architecture often discuss architectural measures of quality
79
this is the list from ISO I can see how talking about the illities of a system can help
80
but in reality I don't really buy into the idea of non-functional requirements very much
81
inside every non-functional requirement is a feature of the system that users care about If not, why are we doing it at all?
82
Even something as seemingly self-centered as making our code maintainable is
83
really about ensuring our ability to continue to deliver value to our users in the future.
84
These things, security, performance, scalability, testability, deployability, resilience, and so on,
85
are behaviors of our system as much as taking payment with a credit card.
86
We have to design the system to exhibit these behaviours.
87
If we are sensible, we will design our system to manage the complexity of these things by compartmentalising them from other behaviours where we can.
88
The reason that people get worried about these kinds of qualities of a system
89
and try to teach them somewhat differently is that they tend to have a broader impact than many features.
90
can't usually fix security or scalability or resilience in a single place in your system.
91
These are often referred to as cross-cutting concerns but that doesn't mean
92
that these things are architectural concerns and other things are not.
93
These are just behaviors that people often forget about while chasing other kinds of features.
94
Whether you call yourself an architect or not and and whether you work in a big team or alone, for any given piece of software,
95
you need to decide how it should behave.
96
And that means how you process credit cards or what color your buttons are, as well as is it okay to leak money to attackers
97
or fall over when there are more than three people using it.
98
This is our responsibility as software developers.
99
For some types of systems, some of these problems are genuinely difficult And it helps a lot when you have smart,
100
experienced people on the team who have seen ways to cope before.
101
But that doesn't mean that architecture is somebody else's problem.
102
Whether you are in your first day on the job or a grizzled veteran, your decisions may impact on the architecture of the system.
103
This is another of those slippery aspects of software.
104
There is very little distance between what looks like a small change and that small change having a massive impact.
105
In fact, the only things between that being true are luck
106
or a good working design and architecture that we understand and can use to guide our fine grained decisions.
107
So that gives us another step forward in understanding this complex concept a little better.
108
The architecture of our software is the collection of constraints
109
that we agree to adopt and maintain that will provide us some protection from making dumb mistakes.
110
My preference is to engage every developer, whatever their experience in architectural discussions,
111
allowing everyone to develop their own understanding of the architecture and to contribute to it as development proceeds.
112
Architect as a job description has seen a bit of a decline in recent years.
113
This is mostly in response to agile development's reaction against big upfront design.
114
The problem with this is, as Dave Thomas famously said, big upfront design is dumb, no upfront design is dumber.
115
So we need to start somewhere, but where?
116
The real answer is that you make a guess based on your understanding of the problem so far and your experience.
117
If you're any good at this kind of thing, you try to treat this guess as an experiment.
118
How could you show that your guess is wrong.
119
Try that.
120
Working incrementally, whether in fine-grained design or big picture architecture, is essential to doing a good job of anything complex.
121
There's a caveat to this, but as ever, you need to understand the trade-offs.
122
If the problem that you are solving is pretty common, then you could adopt a tried and tested architectural approach,
123
an off-the-peg architecture if you like.
124
This is a good idea as long as you understand the constraints and the fit of that architecture to your problem.
125
Because the other big problem with software architecture as an idea is that there's no one size fits all.
126
There's no such thing as a generically good architecture.
127
Rather it's a matter of whether a particular architecture fits the needs of the system.
128
one of the most successful widely applicable architectures was a layered
129
system backed up by a relational database something like this a ui some logic
130
and a database for systems with a moderate number of users
131
and relatively simple crud style features this was a very good choice i think
132
that one of the reasons it was a good choice though is quite informative i think a principal reason
133
that the clever but slow idea of transactions in relational databases took hold was
134
because it allowed programmers to write multi-user systems without worrying too much about the horrible complexity of concurrency.
135
If you open a transaction, read some data, change it, and write it out again, the database will block any other access to that data
136
while you're dealing with it and as long as
137
that as long as your transaction lasts it locks access to the data this was very good
138
if this architecture fit your problem it kept the programming model simple it's still good
139
if it fits your problem today and it fits quite a lot of problems quite well
140
however as the web grew in influence
141
and massive scale computing became more common having a relational database management system as a synchronization point to your data,
142
a source of truth, simply didn't scale.
143
So people started experimenting with other approaches.
144
I was once asked to consult on a huge project.
145
They had decided to use a NoSQL database as their primary data store,
146
which is fine, but they'd forgotten or didn't realize the importance of the protection
147
that transactions that they were more accustomed to had given them.
148
This NoSQL database wasn't transactional.
149
So data was shared by multiple processes and written to by multiple processes and the results were essentially random.
150
Whoever wrote last got to store their changes.
151
Everyone else would lose theirs and without any indication of the loss.
152
It made me feel a bit queasy just to think about this big system with all the data shared
153
and no protection or coordination between concurrent processes.
154
This was a problem of not really thinking about the architecture of the system but only the tools.
155
That's not the same thing.
156
A collection of tools alone doesn't make a software architecture.
157
This team had seen one of the big web companies develop
158
this great looking NoSQL database to help them scale up and it did that,
159
but only in the context of a whole raft of other choices and constraints that this team hadn't thought to apply.
160
There is another somewhat similar very common mistake that probably is a little closer to your own software.
161
Microservices were invented to decouple development.
162
They're intended to be independently deployable, freeing teams to work separately from other teams,
163
which means you don't get to test them together before you release.
164
If you are Netflix or Amazon, this is fantastic.
165
If you are a small development shop with a handful of developers, it's almost certainly overkill and so pretty inefficient.
166
And worse than that, most teams that I see that claim to practice microservice approach aren't.
167
They don't have independently deployable services, which means that they have to test them all together before they feel confident to release them.
168
This is in fact a distributed monolith, which is a rather complex choice, good for some things, but never simple.
169
I think that software is more complicated than we often think.
170
So the sensible thing is to approach it with a little bit more caution.
171
I don't mean that we should agonise for weeks or months before taking the first step, completely the opposite in fact,
172
but we should work on the assumption that our best guess so far is almost certainly wrong.
173
So architect our systems to allow us to recover when we learn more and find out where it's wrong.
174
This takes skill, certainly, but it is realistically the only sensible choice in my opinion.
175
Architecting a complex system is not something that someone in an ivory tower does at the start of a project.
176
It's also only partly intentional.
177
Like more fine-grained design decisions, it's an iterative incremental exercise in a kind of guided evolutionary process.
178
This is not terribly precise, and sometimes, even despite cleverness, expertise, and experience, people get things wrong.
179
That is, I am afraid, an inevitable consequence of dealing with something as tricky and complex as software.
180
A few years ago, a performance optimization strategy in Intel processors meant that encryption could be broken,
181
obviating all of the clever security architecture features in the web, cloud, on-premises systems, even mobile devices, and on pretty much every operating system.
182
That is a salutary lesson in how fragile architecture and design can be to tiny things.
183
a good way to approach this is to think about the things
184
that you are unsure of I was chatting to my friend Kevlin Henney a few days ago
185
and we were talking about design he said as soon as
186
someone says I don't know there's a seam in the design
187
that's quite a good way to think start the design of
188
your system with your best guesses based on what you know
189
so far and be on the look at for the things that you don't know or are unsure about.
190
You don't have to do a depth first exploration of these things.
191
In fact, you shouldn't.
192
But you do think about how to insulate the stuff that you do understand from the things that you don't.
193
Crude sketches in code of those things that you don't yet understand
194
and abstraction can act as placeholders while you make progress
195
and grow your understanding for the bits of the code that you do know.
196
Don't build world-class security into the first sketches of your system.
197
Don't take on the burden of making your system perfectly scalable from day one, but do design your system as best as you can imagine
198
so that you will be able to enhance security without undoing the progress
199
that you've already made and that you can take advantage of your great work
200
so far and allocate it differently so that it does scale up if that's a demand.
201
Insulate the parts of the system that you understand well from those that you don't yet.
202
These kinds of design approaches are at the heart of what I describe in my modern software engineering book.
203
Using the techniques to manage complexity, to give you a chance to go back and enhance or even correct architecture missteps when you discover them.
204
When we built our exchange at LMAX, we had three different fundamental attempts at the basic architecture of our system.
205
But because we'd taken an incremental approach to its design, only a small part of our effort was lost on each change.
206
My final piece of advice on software architecture is to aim to be intentionally a little bit vague about the detail.
207
Architecture should guide our decisions with constraints,
208
but in great architecture there are actually relatively few constraints but those that are there are pretty rigidly enforced.
209
Thank you very much for watching.
210
Thank you.

この動画で身につく英語スピーキングスキル

この動画を使った英語シャドーイングでは、2つの重要なスキルが身につきます。まず、専門用語を含む長文を自然なリズムで話す能力。「software architecture」「evolutionary process」などの単語が続く文章を、途切れないように発音する練習ができます。次に、意見を述べる際の抑揚の使い方。話者が「I don't disagree with this definition but I don't like it very much」という反論をするときの、語尾の上げ下げが鍵です。これらはIELTS スピーキング対策にも役立つ実践的なスキルです。

聞き取りに注意すべき発音のポイント

動画の中には、ネイティブスピーカー特有の連結発音や短縮発音がたくさんあります。例えば、「what does it mean」は「wadə zit mi:n」となり、「does it」が連結されます。また、「I think of」は「aɪ θɪŋkəv」となり、「of」が「əv」に短縮されます。これらの発音を聞き取り、真似ることで、より自然な英語を話すことができます。YouTubeで英語学習する際は、こうした細かな部分に注目することが大切です。

ネイティブのように話すコツ

シャドーイングをするときは、リズムとストレスを徹底的に真似ましょう。話者は「fundamental mean anyway」というフレーズで、「fundamental」と「mean」に強調を置いています。このように、重要な単語を強く発音することで、意思が明確に伝わります。また、文の途中でのポーズも観察しましょう。「After all, what does fundamental mean anyway?」の「After all」の後には短いポーズがあり、聞き手に考える時間を与えています。これらのリズムを身につけることで、shadowspeakの技術が向上し、自然な会話ができるようになります。shadowing siteでの練習も合わせて、日々の積み重ねが大切です。

この動画の文法

話し手がよく使っている文型を、動画の実際の表現とともに紹介します。

文型動画での表現
条件文 if + 節, will/would + 動詞 — 条件とその結果If we're doing a good job we'll discover · If we are sensible, we will design
受動態 be + 過去分詞 — 誰がするかより、何が起きるかに焦点を当てるis produced · being called · was called
現在完了形 have/has + 過去分詞 — 過去の出来事が今も関係しているhaven't been · have seen · has seen
関係詞節 who / which + 節 — 人や物について情報を加えるreally which is · services, which means · monolith, which is

シャドーイングとは?英語上達に効果的な理由

シャドーイング(Shadowing)は、もともとプロの通訳者養成プログラムで開発された言語学習法で、多言語習得者として知られるDr. Alexander Arguelles によって広く普及されました。方法はシンプルですが非常に効果的:ネイティブスピーカーの英語を聞きながら、1〜2秒の遅延で声に出してすぐに繰り返す——まるで「影(shadow)」のように話者を追いかけます。文法ドリルや受動的なリスニングと異なり、シャドーイングは脳と口の筋肉が同時にリアルタイムで英語を処理・再現することを強制します。研究により、発音精度、抑揚、リズム、連音、リスニング力、そして会話の流暢さが大幅に向上することが確認されています。IELTSスピーキング対策や自然な英語コミュニケーションを目指す方に特におすすめです。

シャドーイングのやり方: ステップ別の完全ガイドを読む →