Практика Shadowing: Go’s Big Mistake - Изучайте разговорный английский с YouTube

B2
It's been no secret that I love Go, okay?
⏸ Пауза
207 предложений
Если предложения слишком короткие или длинные, нажмите Edit, чтобы их изменить.
1
It's been no secret that I love Go, okay?
2
I have spent many an hour programming on Go.
3
I built an entire whole, like, Doom, where a thousand people could play Doom all at the same time via Go.
4
I have been a big fan of Go for a very, very long time.
5
It was one of my go-to languages
6
that I would reach for whenever I'd want to build anything that kind of interacts with the command line, anything that needs to interact with the system.
7
Very quick, very simple, and honestly, I just have a lot of warm feelings about it.
8
But I do know it's a simple language.
9
There's nothing about it that was complex.
10
There was nothing about it that you could do or represent in a complex way.
11
And that's honestly been a huge appeal for me is
12
that I could do so much because all I would care about it,
13
all I would focus on is writing about the problem as opposed to solving the kind of ancillary problem.
14
And this has been the Go mantra for a long, long time, which is like you go into any Go project, pretty quickly you can feel at home.
15
Everyone uses the same formatter.
16
Every function effectively looks like you would write it to, everything is pretty constrained in the exact same way because there's really only one way to write Go.
17
But those days, they're changed.
18
And we're going to be doing a lot of yapping here.
19
So I hope that you're prepared because this is one of those passionate yaps where it's like, I feel like my childhood's being ripped away from me.
20
Okay.
21
Now, before we kick off this whole Go apocalypse that I'm going to be yapping about, I do want to kind of give you my first introduction to Go.
22
I think it was right around 2015, 2016.
23
I started writing Go a little bit more seriously.
24
And of course, I became so kind of go pilled
25
or go brained that there are certain phrases that I couldn't understand about other languages.
26
If you said it to me, like I wouldn't land on me.
27
A good example is I was at Facebook interviewing.
28
Yes, I interviewed for the performance team.
29
And during that time, they asked me a simple question, which was, hey, how do you return multiple values in JavaScript?
30
Now me personally, I'm in go land.
31
And I'm like, bro you can't do
32
that okay go has multiple return values javascript doesn't have multiple what the hell are you talking about
33
and of course then the person's they thought i was an idiot
34
because they're like you return an object to dummy or an array
35
and i'm like but that's one value and i just remember being
36
so offended by that that was just
37
so go pilled i couldn't hear what he was trying to say you get the idea i failed the interview
38
so massively on such a stupid thing anywho so my go days have been long.
39
I've really enjoyed it.
40
I've used it for quite a few years.
41
And I'd have to say, it's been one of my favorites.
42
Now, before we begin, I'd like to say thank you to the sponsor and a quick word.
43
Hey, do you like waiting?
44
Yeah, neither do I.
45
With Blacksmith, you get speed, 2x faster hardware, 4x faster cache downloads, and 40 times faster Docker builds.
46
So stop waiting around.
47
Use their migration wizard to easily transition your repos onto Blacksmith today.
48
Thank you, Blacksmith, for sponsoring this video, and you, check out the links down below.
49
All right, so welcome back.
50
It turns out that now go and go 1.27.
51
You can do generics even on method receivers.
52
For those that don't know, for a long time and go, you could only do it in functions.
53
If you don't know what a method receiver is, effectively, you can create a struct and something that looks like a function hanging off the struct would be a method receiver.
54
It'd actually be a function that's associated with some data, just like an object or a class.
55
And you could never do generics on that.
56
You can only just do it on freeform functions and that's it.
57
But now in our new world that we live in, you can now do it on everything.
58
So you can actually see right here, here's a result object, right?
59
And it can have a value V or an error error.
60
And I have an is okay function like, hey, are you okay if the error equals nil?
61
Yes, you are.
62
Okay, awesome.
63
You're okay.
64
And this is generic over the value V, which means I can also do things like this.
65
I can return a result of type foo, which means it has an error.
66
And then I can go in here and do all of this beautiful code where now I have a results object, which means I can write code that looks a bit more like this, I can convert a read operation into a result,
67
I can then string a fight from bytes, and then I can parse it, unwrap it and print it right here.
68
If my file contains an error, it's going to let me know, hey, there's an error in whatever you're attempting to parse.
69
If I jump back over here, go in here, jump this thing and say, turn it into 69.
70
Nice.
71
Rerun this thing.
72
You'll see right here.
73
Hello, 69.
74
Everything parsed fine.
75
So I know at this point, people are looking at this and going, hey, I kind of like that style of code.
76
This would be nice code for me to work on with going.
77
I do hear you.
78
This is generally nice code, but you have to kind of take a step back and understand go from the very beginning.
79
The very mantra of goes that there's one way to do anything.
80
Do you think that this is going to lead to one way to do something?
81
Or now you're going to have a cornucopia of different ways in which you're going to do stuff, you're going to jump into code bases and have no idea how they work, you're going to have to go through layers of abstraction
82
and whole new ways in which to express things in
83
which is just going to be like every other language just without all the conveniences.
84
A good example of that is if you wanted to do a you can't do like a generic convert function, where I can convert any function with any length of arguments into a result type.
85
So instead you have like convert one, convert zero, convert two, convert three.
86
I've tried many times to get some version of this working
87
and I could not seem to get this version of this thing working right here.
88
Whereas something like this in TypeScript, very easy to do, right?
89
Like, okay, there you go.
90
You can convert any amount of arguments into this.
91
And so it's like the actual genericism that Golang is providing is in fact not that good, but then on top of it,
92
It's just gonna make every code base completely different.
93
And this was the entire argument, by the way, as to why they were not going to do error handling.
94
Error handling has historically always been the butt of a joke for when it comes to Go, because if you wanted to do something like this,
95
print some you'd have to take the two strings coming in convert the first string into a number
96
which could result in an error because that makes sense right
97
if i try to convert hello into a number well it's not a number it's an error actually and
98
so there we go we have an area i convert b
99
that's into an error then i can finally print it then i can finally return
100
so that means this is air handling code air handling code air handling code
101
that means there are one two three lines of actual code,
102
whereas there's one, four, seven lines of code dedicated to air handling.
103
And this has always been the big problem.
104
Now, I personally have enjoyed this kind of air handling because that means every single time I do something that could air,
105
I know it and I have to explicitly handle it.
106
Now, granted, there could be some more ergonomics around it.
107
But nonetheless, I've actually really appreciated that about Go.
108
And the reason why they said no, hey, we're not doing fancy air handling, Okay, we're not going to be throwing in tries.
109
We're not going to be throwing in some sort of extra error capture up here.
110
No, we're not going to be throwing in little question marks like we're Rust.
111
Okay, we're not doing any of that shit, brother.
112
Okay, we're going to keep go, go, the end.
113
And honestly, you may not like that.
114
But to me, that is okay.
115
Because that is one thing I've appreciated about it.
116
Every code base is the same.
117
Now we have a whole new set of problems.
118
We now have iterator.
119
So now you're hiding what's actually happening.
120
Again, another thing I loved about Go.
121
everything you did, you understood the cost.
122
When you need to iterate over a list, you could understand what's happening.
123
Now, all sorts of stuff could be hidden from you due to iterators.
124
We now also have generics.
125
And in fact, this has led to a very good article called Go's evolving in the wrong direction because here's the deal.
126
If you want a fancy type system, don't use Go.
127
So now that they're adding all these features, you still get all the crappy type system of Go
128
that was good because of the way it was an unabashed procedural language, right?
129
It is purely imperative.
130
Nothing about it was fancy.
131
But instead, it's like you get Rust Lite.
132
You get kind of like the worst version of Rust or the worst version of TypeScript Brother.
133
If I wanted those, I should just go and use those other languages.
134
They have significantly better items to offer if this is what I was going for.
135
I used Go for what it was, not so that it could look like every other language just with the new set of syntax.
136
This is the thing that really bothers me about Go.
137
Go knew what it was.
138
And that's one thing that was very special about Go.
139
A strong standard library, a very simple language.
140
Now, yes, could they have made error handling better?
141
Absolutely.
142
Could they have made enums of any kind?
143
Absolutely.
144
And I think that would have dramatically made people's life better.
145
But they didn't.
146
They have chosen to actually add to the language ways in which make it so that
147
every code base is going to be so bespoke now and so much different.
148
It's going to be so much more frustrating than it used to be.
149
Go is no longer the language I like.
150
I don't want to use Go anymore.
151
In fact, I kind of found its spiritual successor.
152
So Odin right here, the language that you see right behind me, this thing I've actually really enjoyed because it reminds me so much of Go.
153
It has package level or directory level packages.
154
So everything inside a directory now shares all the types.
155
I really prefer that over file level modules.
156
I like package level modules or package level directories.
157
Oh, so much better.
158
It also has explicit overloading.
159
I really, really like that it does do some polymorphism, parametric polymorphism and all that.
160
But honestly, I rarely even feel like I need that.
161
I just program the problem.
162
And it works.
163
The language looks good.
164
It gives you complete control over allocations and how memory works.
165
And it's just so straightforward.
166
Absolutely lovely to work with.
167
And that's because Odin knows what it wants to be.
168
It's an unabashed, simple, C-like programming language designed and geared towards games and graphics and that kind of nature.
169
Go used to be the same thing.
170
It was a simple kind of system level, server level language that was designed to sit in this intersection.
171
Instead of being like complicated Java land, you would have something super simple.
172
The build tool, the formatting tool, the how you run it, all into one.
173
It was a self-contained, self-packaged language with a very minimal package management system built into it such
174
that you didn't actually overrun your project.
175
Like it knew what it was.
176
But now for the first time, I feel like Go is having its spiritual crisis.
177
It doesn't know what it wants to be.
178
Now apparently it wants to be Rust.
179
It wants to like, okay, I guess we have C++ Lite now.
180
Fantastic.
181
That's all I've ever wanted in life, right?
182
I just wanted another thing in which I can have massive abstractions
183
and find myself tight masturbating all day instead of actually solving the problem at hand.
184
Thanks, go.
185
Anyways, I say all this because I'm just getting all fired up
186
because it's like one of the languages that I found very appealing due to how different it was from everything else.
187
Like I knew that when I used it, I was solving a specific problem.
188
And it was like the best tool for the job.
189
Like it had this very nice kind of one to one reach.
190
And now like Odin, it feels like that too.
191
It's a very, it has this very defined purpose.
192
And I feel like I can just reach for it when I need to solve a certain problem.
193
I don't feel that anymore with Go.
194
And it just makes me feel a little bit funny.
195
I don't know.
196
Well, hey, you know, I'm supposed to do this as a YouTuber.
197
Yo, hey, bro.
198
Hey, what's your opinion on this?
199
Honestly, I'll read them.
200
Lay me down some opinions.
201
Maybe smash that like button in the subscribe or something like that.
202
I haven't asked for this in a long time, okay?
203
I haven't asked for this in over 130,000 subs.
204
So why don't you just do it?
205
For old time's sake, okay?
206
Me and you, we're going to feel better together.
207
The name is The Primogen.

Скачать приложение

ИИ-оценка каждого произнесённого вами предложения

Сканировать для скачивания
Сканировать для скачивания
TRENDING

Популярные

Контекст и фон

В этом видео автор делится своими переживаниями о языке программирования Go. Он рассказывает о своем опыте работы с Go, начиная с 2015-2016 годов, и о том, как язык стал для него полезным инструментом. Автор также упоминает некоторые свои забавные ошибки, которые произошли из-за глубокой привязанности к Go, особенно когда речь касалась других языков программирования. Это создает контекст для обсуждения языков программирования и их особенностей, что может быть интересно не только для программистов, но и для изучающих английский язык в техническом контексте.

Топ-5 фраз для повседневного общения

  • “You go into any Go project, pretty quickly you can feel at home.” - Это выражение подчеркивает, что работа с языком Go предоставляет чувство комфорта и уверенности.
  • “Everyone uses the same formatter.” - Эта фраза указывает на единообразие в коде, что может быть актуально и для не технических обсуждений.
  • “I failed the interview so massively on such a stupid thing.” - Отличный пример того, как делиться ошибками и стрессовыми моментами.
  • “How do you return multiple values?” - Это вопрос, который может пригодиться в различных контекстах, не только в программировании.
  • “You can’t do that; Go has multiple return values.” - Эта фраза демонстрирует отстаивание своей точки зрения, даже если она не совсем правильная.

Пошаговое руководство по шадоу-серфингу

Для того чтобы эффективно использовать shadow speech в этом видео, следуйте этому пошаговому руководству:

  1. Слушайте внимательно: Сначала просто послушайте видео, чтобы уловить общий смысл. Обратите внимание на интонацию и произношение.
  2. Повторяйте за автором: Включите функцию паузы и пытайтесь повторить каждую фразу сразу после автора. Это поможет вам уловить ритм и мелодику английской речи.
  3. Записывайте произношение: Используйте свой телефон или диктофон, чтобы записать себя. Это поможет вам отслеживать прогресс и замечать ошибки.
  4. Изучайте идиомы и выражения: Обратите внимание на фразы, которые могут быть вам не знакомы, и постарайтесь найти их перевод и использование в других контекстах.
  5. Практикуйтесь регулярно: Возвращайтесь к этому видео и повторяйте его через несколько дней. Регулярная практика — ключ к успеху в shadowing английский.

Следуя этому плану, вы улучшите свои навыки shadow speak и сможете увереннее общаться на английском языке. Также рекомендуем следовать shadowspeaks практике, чтобы углубить свои знания.

Что такое техника Shadowing?

Shadowing — это научно обоснованная техника изучения языка, изначально разработанная для подготовки профессиональных переводчиков и популяризированная полиглотом доктором Александром Аргуэльесом. Метод прост, но эффективен: вы слушаете аудио на английском от носителей языка и немедленно повторяете вслух — как тень, следующая за говорящим с задержкой в 1–2 секунды. В отличие от пассивного прослушивания или грамматических упражнений, Shadowing заставляет мозг и мышцы рта одновременно обрабатывать и воспроизводить реальные речевые паттерны. Исследования показывают, что это значительно улучшает точность произношения, интонацию, ритм, связную речь, понимание на слух и беглость речи — что делает его одним из самых эффективных методов для подготовки к IELTS Speaking и реального общения на английском.

Угостите нас кофе