Skip to content

Commit 453f023

Browse files
authored
Merge pull request talkpython#96 from manikanta-hitunik-com/patch-96
411-things-i-wish.txt--updated--latest
2 parents f66bff1 + 0fd4713 commit 453f023

File tree

1 file changed

+35
-36
lines changed

1 file changed

+35
-36
lines changed

transcripts/411-things-i-wish.txt

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
00:01:11 It really helps support the show.
3030

31-
00:01:14 Jason, welcome to Talk Python and me.
31+
00:01:14 Jason, welcome to Talk Python to me.
3232

3333
00:01:16 Thank you for having me.
3434

@@ -60,7 +60,7 @@
6060

6161
00:02:05 Oh, so went from 4.0 straight A student, college level reading in high school to failing pre-game material, two extra years to climb back up where I was academically a bit longer after that for other things.
6262

63-
00:02:19 But somewhere along the way, I discovered that I had a natural inclination towards an attack for coding and got into that because I wanted to make games.
63+
00:02:19 But somewhere along the way, I discovered that I had a natural inclination towards an enact for coding and got into that because I wanted to make games.
6464

6565
00:02:28 I wanted to make educational games.
6666

@@ -70,15 +70,15 @@
7070

7171
00:02:31 So I learned how to code.
7272

73-
00:02:33 And so I taught myself VB.net and then felt very constrained by the.net ecosystem and broke out into Python.
73+
00:02:33 And so I taught myself VB.net and then felt very constrained by the .net ecosystem and broke out into Python.
7474

7575
00:02:42 found my home, stayed put until I wound up going to a bunch of other languages.
7676

7777
00:02:47 I used Flash for quite some time.
7878

7979
00:02:49 I've used C++.
8080

81-
00:02:50 I muck about in whatever Sandy, but Python is definitely near to dear to my heart.
81+
00:02:50 I muck about in whatever handy, but Python is definitely near to dear to my heart.
8282

8383
00:02:55 Yeah, absolutely.
8484

@@ -132,7 +132,7 @@
132132

133133
00:04:06 And then you go all the way to the ever extreme and it's something like super complicated and I'll understand any of it.
134134

135-
00:04:10 And nobody sat in Brett and wrote down, here's how you structure a multi-Python project in a way that's going to, at least when I started, that wasn't documented anywhere, like no one had ever written it down.
135+
00:04:10 And nobody sat and wrote down, here's how you structure a multi-Python project in a way that's going to, at least when I started, that wasn't documented anywhere, like no one had ever written it down.
136136

137137
00:04:20 So it was just like, what do I do now?
138138

@@ -156,7 +156,7 @@
156156

157157
00:04:52 Oh yeah, exactly.
158158

159-
00:04:54 It's it's the example of given is that there's two types of books slash articles slash tutorial out there.
159+
00:04:54 It's it's the example of given is that there's two types of books/articles/tutorial out there.
160160

161161
00:04:59 There's here's basics of variables, boys and girls.
162162

@@ -250,7 +250,7 @@
250250

251251
00:08:22 It's like, well, it's interesting, but it's just a bit early.
252252

253-
00:08:26 And the early adopters have a lot of egg they're still trying to wash off their face in the last six pads.
253+
00:08:26 And the early adopters have a lot of egg they're still trying to wash off their face in the last six fads.
254254

255255
00:08:30 So it's like, let's see what happens.
256256

@@ -378,7 +378,7 @@
378378

379379
00:12:10 You look into it, it's like, that looks really complicated.
380380

381-
00:12:12 What, you know, how is this A6 supposed to work?
381+
00:12:12 What, you know, how is this Async supposed to work?
382382

383383
00:12:14 And then you look back and go, oh, that's all.
384384

@@ -414,7 +414,7 @@
414414

415415
00:13:30 Let's go all the way down into the internals and how this actually works under the hood.
416416

417-
00:13:37 So by the time you get to the for loop, the web statements, the meta class or whatever, you're like, "Oh, I understand what this is, why it's there, how it's used, and when not to use it." >> Yeah, that's a great service.
417+
00:13:37 So by the time you get to the for loop, the web statements, the meta class or whatever, you're like, "Oh, I understand what this is, why it's there, how it's used, and when not to use it." Yeah, that's a great service.
418418

419419
00:13:48 So you're saying if I create a class called like, user factory and it implemented I user factory, and then I would use dependency injection, I might be doing that wrong?
420420

@@ -446,7 +446,7 @@
446446

447447
00:15:14 Sentry has taken a different approach, building the most affordable APM solution in the market.
448448

449-
00:15:19 They've removed the noise and extract the maximum value out of your performance data while passing the savings directly onto you, especially for TalkBython listeners who use the code TalkBython.
449+
00:15:19 They've removed the noise and extract the maximum value out of your performance data while passing the savings directly onto you, especially for Talk Python listeners who use the code TalkBython.
450450

451451
00:15:30 So get started at talkpython.fm/sentry and be sure to use their code, talkpython, all lowercase, so you let them know that you heard about them from us.
452452

@@ -500,7 +500,7 @@
500500

501501
00:17:01 - Yeah, yeah.
502502

503-
00:17:01 - And I thought I was being super clever and I wasn't, but eventually someone explained to me, I think it was actually Ned Batchelder, someone gave me the link to Ned Batchelder's talk on this, is that Python's variables work very differently than other languages, so much so that some smart alecks like to say, well, Python doesn't really have variables.
503+
00:17:01 - And I thought I was being super clever and I wasn't, but eventually someone explained to me, I think it was actually Ned Batchelder, someone gave me the link to Ned Batchelder's talk on this, is that Python's variables work very differently than other languages, so much so that some smart alex like to say, well, Python doesn't really have variables.
504504

505505
00:17:18 Yes, it does, but they're variables in a different sense.
506506

@@ -568,7 +568,7 @@
568568

569569
00:20:18 That's a bit of a mental thing.
570570

571-
00:20:20 People got to get used to just like how much, because when you come from a language like C plus plus or something, pointers and these reference type type of ideas are like right in your face.
571+
00:20:20 People got to get used to just like how much, because when you come from a language like C++ or something, pointers and these reference type type of ideas are like right in your face.
572572

573573
00:20:30 Right?
574574

@@ -640,7 +640,7 @@
640640

641641
00:23:12 There's global level, there's module level, and there's I need to back.
642642

643-
00:23:18 It's a little pedantic.
643+
00:23:18 It's a little pydantic.
644644

645645
00:23:20 And then you have function level classes are not their own scope.
646646

@@ -776,15 +776,15 @@
776776

777777
00:28:41 And then you get generator methods with the yield keyword and yield from and like all sorts of stuff.
778778

779-
00:28:46 You, you get PyTest fixtures that allow you to set up and tear down without actually writing try finally blocks and all these things.
779+
00:28:46 You, you get Py Test fixtures that allow you to set up and tear down without actually writing try finally blocks and all these things.
780780

781781
00:28:55 A lot, a lot of interesting places.
782782

783783
00:28:57 While I was thinking about this conversation and this topic in particular, I ran across an article called static duck typing in Python with protocols.
784784

785785
00:29:05 How's that to like crash two ideas together?
786786

787-
00:29:08 Yeah, it's well, and it's, well, when we look at data types, it's like the way Python even does its data types is yeah, you can say that you want to say, okay, this is a list and you can type it as a list, but you can also just actually type it as a neverable and basically tell Python what you care about.
787+
00:29:08 Yeah, it's well, and it's, well, when we look at data types, it's like the way Python even does its data types is yeah, you can say that you want to say, okay, this is a list and you can type it as a list, but you can also just actually type it as a iterable and basically tell Python what you care about.
788788

789789
00:29:27 Do you really care that it's a list?
790790

@@ -882,7 +882,7 @@
882882

883883
00:32:09 And using a CDN to make your Python apps faster is way easier than you think.
884884

885-
00:32:14 So if you've got a Python web app and you would like to have it scaled out globally, If you'd like to have your users have a much better experience and maybe even save some money on server hosting and bandwidth, check out this course over at talk, python.fm/courses.
885+
00:32:14 So if you've got a Python web app and you would like to have it scaled out globally, If you'd like to have your users have a much better experience and maybe even save some money on server hosting and bandwidth, check out this course over at talkpython.fm/courses.
886886

887887
00:32:30 It'll be right up there at the top.
888888

@@ -894,13 +894,13 @@
894894

895895
00:32:38 I'm back to the show.
896896

897-
00:32:39 Iteration, iterables, iterators, Lubin.
897+
00:32:39 Iteration, iterables, iterators, Looping.
898898

899899
00:32:45 Yes.
900900

901-
00:32:46 So I was working in some code last year and I came across something that just, I, I, I was, I cringed and then I laughed out loud because this was written.
901+
00:32:46 So I was working in some code last year and I came across something that just, I, was, I cringed and then I laughed out loud because this was written.
902902

903-
00:32:55 So this code was written by who I best guess university data scientists.
903+
00:32:55 So this code was written by who I best guests university data scientists.
904904

905905
00:33:01 So, you know, a, to their favor, this is not a software engineer.
906906

@@ -966,7 +966,7 @@
966966

967967
00:35:16 - Yeah.
968968

969-
00:35:17 - If you talk SQLAlchemy, right?
969+
00:35:17 - If you talk SQL Alchemy, right?
970970

971971
00:35:18 I'm gonna do a query, I could call the all method and turn it into an in-memory list, or I could, if I don't need that, I could just loop over it, right?
972972

@@ -1192,19 +1192,19 @@
11921192

11931193
00:45:06 So in Unix systems like Linux and Mac, there's a bin folder.
11941194

1195-
00:45:10 So them slash bin slash and then whatever Python by whatever Python executable you want to run.
1195+
00:45:10 So them/bin/ and then whatever Python by whatever Python executable you want to run.
11961196

11971197
00:45:16 It could be Python, it could be pip, it could be your own package.
11981198

11991199
00:45:19 You can actually just navigate into that bin folder.
12001200

1201-
00:45:22 And so I can say them bin pip, and I've got the pip and that knows to only work within its virtual environment.
1201+
00:45:22 And so I can say them venv pip, and I've got the pip and that knows to only work within its virtual environment.
12021202

12031203
00:45:29 It's not going to break out of that container.
12041204

12051205
00:45:30 Once you understand that, here's where the activate script is.
12061206

1207-
00:45:33 Them bin activate.
1207+
00:45:33 Then bin activate.
12081208

12091209
00:45:35 It lives in the bin file.
12101210

@@ -1232,7 +1232,7 @@
12321232

12331233
00:46:34 I just have a short version, so I know it's something slightly different, but it'll go run the virtual environment and it'll always remember to add --prompt=.
12341234

1235-
00:46:42 which will make the virtual environment not just be called VE and V, but it'll be called the name of the project that it's in.
1235+
00:46:42 which will make the virtual environment not just be called VENV, but it'll be called the name of the project that it's in.
12361236

12371237
00:46:48 So for example, if it's in like Talk Python, like the virtual environment, when I activate it, it will say it's the virtual environment Talk Python, right?
12381238

@@ -1252,7 +1252,7 @@
12521252

12531253
00:47:24 Why don't we fix that?
12541254

1255-
00:47:24 So my alias then says, pip install -upip, setup tools, wheels, pip-tools, et cetera, and just ditches that output.
1255+
00:47:24 So my alias then says, pip install -upip, setup tools, wheels, pip-tools, etcetera, and just ditches that output.
12561256

12571257
00:47:31 So like, right, immediately, like I have, when I create a virtual environment, it's immediately active and it's immediately named the project and it's immediately up to date.
12581258

@@ -1300,7 +1300,7 @@
13001300

13011301
00:48:58 I was very happy with myself.
13021302

1303-
00:49:00 And then I spent the next two years trying to package the dark peg.
1303+
00:49:00 And then I spent the next two years trying to package the dark thing
13041304

13051305
00:49:03 Turned out it was impossible to package because of certain assumptions that one of the libraries I was using made.
13061306

@@ -1344,9 +1344,9 @@
13441344

13451345
00:50:34 Yeah.
13461346

1347-
00:50:35 Currency.
1347+
00:50:35 Concurrency.
13481348

1349-
00:50:35 Currency.
1349+
00:50:35 Concurrency.
13501350

13511351
00:50:36 Yes.
13521352

@@ -1372,13 +1372,13 @@
13721372

13731373
00:51:16 You're not really multitasking, you're just changing your focus fast enough that no one ever notices the difference. That's concurrency. So you have one CPU or potentially, potentially multiple remote this where people get confused. Python's nice because you're locked the one CPU for concurrency. So it's I'm gonna work on this, then I'll work on this and work on this, then work on this, it doesn't make your code faster.
13741374

1375-
00:51:38 It'll never make your code faster, just like multitasking will not make you get through your workday faster. What it's going to do is it's going to slow you down. But it doesn't look like is in some cases, it'll make your code look faster. Because while you're waiting on the user to type in their answer, this example I use the book, or you're waiting on the user to type in their answer to a question, you're doing some math in the background, your IO blocked, you're waiting on something over which you have no control, you can do some other work while you wait, that's concurrency. And you can do that with a synchrony where Python's handling that multitasking, or you can do with threading where the operating system is handling that multitasking. That's different than parallelism, which is where you're actually using different CPU cores and you're doing two things at the same time, because you have two different CPUs, two different cores working in parallel. And they're not depending on one another. Not they're not waiting. You're doing multiple tasks at once. Both of them have overhead near one is a silver bullet for performance, you're really going to have to think a lot about it. But I actually like the gill for this reason, global interpreter lock the much aligned thing that stops us from getting free multiprocess of free parallelism, free multiprocessing with every thread.
1375+
00:51:38 It'll never make your code faster, just like multitasking will not make you get through your workday faster. What it's going to do is it's going to slow you down. But it doesn't look like is in some cases, it'll make your code look faster. Because while you're waiting on the user to type in their answer, this example I use the book, or you're waiting on the user to type in their answer to a question, you're doing some math in the background, your IO blocked, you're waiting on something over which you have no control, you can do some other work while you wait, that's concurrency. And you can do that with a synchrony where Python's handling that multitasking, or you can do with threading where the operating system is handling that multitasking. That's different than parallelism, which is where you're actually using different CPU cores and you're doing two things at the same time, because you have two different CPUs, two different cores working in parallel. And they're not depending on one another. Not they're not waiting. You're doing multiple tasks at once. Both of them have overhead near one is a silver bullet for performance, you're really going to have to think a lot about it. But I actually like the GIL for this reason, global interpreter lock the much aligned thing that stops us from getting free multiprocess of free parallelism, free multiprocessing with every thread.
13761376

13771377
00:52:48 Because this forces us to actually stop and think, which thing do I need?
13781378

13791379
00:52:53 Do I need concurrency or do I need parallelism?
13801380

1381-
00:52:56 Because you can get both in Python, but the gill makes sure that you have to make a decision.
1381+
00:52:56 Because you can get both in Python, but the gil makes sure that you have to make a decision.
13821382

13831383
00:53:01 Because if you want multiprocessing, you're going to have to create different processes, spin them off, manage them separately.
13841384

@@ -1406,7 +1406,7 @@
14061406

14071407
00:53:51 Could I be doing something while I'm waiting?
14081408

1409-
00:53:53 And async and await amount, it makes it super easy to do stuff while you're waiting, but your program itself is still constrained by the gill and often with async and await, there's not even a second thread involved, right?
1409+
00:53:53 And async and await amount, it makes it super easy to do stuff while you're waiting, but your program itself is still constrained by the gil and often with async and await, there's not even a second thread involved, right?
14101410

14111411
00:54:06 It's just slicing up time, slicing up the current thread.
14121412

@@ -1502,7 +1502,7 @@
15021502

15031503
00:56:35 And I think that's one thing I wanted to say is when I was writing this book, that was the thing that was my chief delight was coming up with examples for all of the topics from the simplest, all the way to the most complicated, where I did not hold back on the relevant complexity.
15041504

1505-
00:56:49 My list comprehensions were the starliest list comprehensions you're ever going to find in this tutorial.
1505+
00:56:49 My list comprehensions were the starlist list comprehensions you're ever going to find in this tutorial.
15061506

15071507
00:56:54 You know, my, you know, I have, I go into recursion.
15081508

@@ -1572,7 +1572,7 @@
15721572

15731573
00:59:28 I guess I have two.
15741574

1575-
00:59:30 One would be, I think my favorite, and this has certainly gotten plenty of press, but I love it.
1575+
00:59:30 One would be, I think my favorite, and this has certainly got plenty of press, but I love it.
15761576

15771577
00:59:34 It's the hypothesis testing library.
15781578

@@ -1630,7 +1630,7 @@
16301630

16311631
01:01:27 Yes. So that's a book I thought is available from wherever you buy books, but especially if you go to no starch.com, you can get this comes in ebook or in physical book form.
16321632

1633-
01:01:38 And, Hey, you know what? I wrote it and I refer to it every single day because this is This is the book I wish I had had.
1633+
01:01:38 And, Hey, you know what? I wrote it and I refer to it every single day because this is the book I wish I had had.
16341634

16351635
01:01:43 And my favorite little feature of this is that I have a thing in the back with every single command for the debugger.
16361636

@@ -1640,7 +1640,7 @@
16401640

16411641
01:01:55 This is the entire core language, bar nothing, explained for the existing coder. So, check this out.
16421642

1643-
01:02:01 From nostars.com.
1643+
01:02:01 From nostarch.com.
16441644

16451645
01:02:03 Well, thanks for taking the time for being here and enjoy the chat.
16461646

@@ -1693,4 +1693,3 @@
16931693
01:03:21 Now get out there and write some Python code.
16941694

16951695
01:03:22 [MUSIC]
1696-

0 commit comments

Comments
 (0)