シャドーイング練習: You are wasting memory - 動画で英語スピーキングを学ぶ

レッスンを作成中...
1
Take a look at this C code and tell me what the output of that printf will be.
2
If you said 12, you are correct, and that's because each integer is 4 bytes wide.
3
Now, what happens if I add a character to the structure?
4
You probably already know that a character has a size of 1 byte, but if we run this program, we can see that the structure became 16 bytes.
5
This happens because of memory alignment.
6
You can imagine memory as a row of numbered boxes, where each number represents an address.
7
Each box can hold exactly one byte.
8
We know that on 64-bit machines an integer is usually four bytes.
9
For it to be aligned, its address must be a multiple of its size.
10
If a value is not aligned, on some architectures and older computers, working with it might be slower.
11
But how is the structure represented in memory by the compiler?
12
The structure is represented as a series of consecutive values, each starting at a specific padding from the beginning of of the structure.
13
The padding is needed so that each value is correctly aligned.
14
As you can see here, the value D would occupy only one byte, but three extra bytes are added so that the value C is correctly aligned.
15
If we add another character at the end of the structure, another 3 bytes of padding are added because the whole structure must be aligned to the alignment of the structure itself,
16
which is the maximum alignment between the members of the structure.
17
This way, when creating an array of this structure, the first member is always correctly aligned.
18
So to save memory, we can move our characters close together
19
so that only 2 bytes of padding are added making the whole thing 16 bytes instead of 20, while keeping everything correctly aligned.
20
We can check that in C as well.
21
As you can see, this code represents what was shown in the previous images.
22
Now take a look at the output of this.
23
If we move E, like this, the output changes.
24
Now if you want to ignore alignment and remove padding for some reason, you can use the packed attribute like this on GCC and CLang and the compiler will not insert any padding,
25
as you can see here from this output, but note that on some architectures this might make the code slower.
26
So in conclusion, if you don't wanna waste memory over padding, remember to place your structural members correctly.
27
Bye!

この動画で話す練習をする理由は?

この動画では、プログラミングにおけるメモリの使用について説明しています。特に、メモリのアライメントとパディングの重要性に焦点を当てています。動画を通じて、技術的なトピックについて話す練習をすることは、特定の専門用語を学ぶ良い機会です。YouTubeで英語学習を行う際、このような専門的なコンテンツを利用することで、語彙力を高め、実際の会話のための自信をつけることができます。技術的な内容を強調することで、英語を話す際に必要な深い理解が得られ、また異なるアクセントや言い回しを実践することが可能になります。

文法と文脈での表現

動画の中で、話者が使ういくつかの重要な構文を分析してみましょう。以下は、特に注目すべきポイントです。

  • メモリのアライメント - メモリのアライメントは、整数やキャラクターのサイズに関連する重要な概念であり、英語での技術的な話し合いでも頻繁に使用されます。
  • パディングの削減 - パディングを減らす方法についての説明は、英語の表現力を大いに向上させるでしょう。シンプルな言い回しを通じて技術的な概念を簡潔に説明することが求められます。
  • 構造体のメンバー配置 - 構造体内のメンバーの配置に関する話は、視聴者が理解しやすく、また日常の会話にも応用しやすい表現です。

一般的な発音の落とし穴

この動画で扱われている技術的な用語や表現の中には、発音が難しいものがいくつかあります。特に注意が必要な単語には以下のようなものがあります:

  • アライメント(alignment) - 「アライメント」と言うとき、正しく発音できるように練習することが重要です。
  • パディング(padding) - この単語もリズムに注意して発音しましょう。
  • 構造体(structure) - 特に「ストラクチャー」という発音に慣れることが大切です。

英語の発音を良くするためには、これらの単語を何度も声に出して練習することが有効です。動画の内容を「shadowspeak」や「shadowspeaks」とともに繰り返すことで、耳を鍛え、発音力を向上させることができます。

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

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