forked from mikeckennedy/talk-python-transcripts
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path014_Converting_Patreon.com_to_Python_3.vtt
2192 lines (1461 loc) · 69.8 KB
/
014_Converting_Patreon.com_to_Python_3.vtt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
WEBVTT
00:00:00.001 --> 00:00:04.520
Today, you'll learn how Patreon is helping people live their dreams, building amazing
00:00:04.520 --> 00:00:05.860
creations for the rest of us.
00:00:05.860 --> 00:00:07.260
It's time for Talk Python.
00:00:07.260 --> 00:00:09.200
This is show number 15.
00:00:09.200 --> 00:00:15.660
Today, our guest is Albert Hsu, and this episode is recorded Tuesday, January 2nd, 2015.
00:00:15.660 --> 00:00:45.600
Hello, and welcome to Talk Python to Me, a weekly podcast on Python.
00:00:46.040 --> 00:00:48.980
The language, the libraries, the ecosystem, and the personalities.
00:00:48.980 --> 00:00:51.200
This is your host, Michael Kennedy.
00:00:51.200 --> 00:00:55.680
Follow me on Twitter, where I'm @mkennedy, and keep up with the show and listen to past
00:00:55.680 --> 00:00:58.100
episodes at talkpythontome.com.
00:00:58.100 --> 00:01:03.760
This episode, we'll be talking with Albert Hsu from Patreon about migrating to Python.
00:01:03.760 --> 00:01:08.640
I'm really fortunate to have CodeChip and Hired sponsoring the show.
00:01:08.640 --> 00:01:11.020
Let me take just a few seconds to tell you about them.
00:01:12.140 --> 00:01:16.680
CodeChip is a platform for continuous integration and continuous delivery as a service.
00:01:16.680 --> 00:01:19.320
They encourage you to always keep shipping.
00:01:19.320 --> 00:01:24.120
Please take a moment and check them out at codeChip.com or follow them on Twitter, where
00:01:24.120 --> 00:01:25.060
they're at CodeChip.
00:01:25.060 --> 00:01:28.040
Hired wants to help you find your dream job.
00:01:28.040 --> 00:01:31.680
Hired is built specifically for developers looking for new opportunities.
00:01:31.680 --> 00:01:36.880
Check them out and get a very special offer at Hired.com slash Talk Python to Me.
00:01:36.940 --> 00:01:40.860
And you'll find them on Twitter, where they're at Hired underscore HQ.
00:01:40.860 --> 00:01:44.680
Let me tell you how we got to the show.
00:01:44.680 --> 00:01:49.780
It all started with me whining about bandwidth charges on Twitter, saying it was so expensive
00:01:49.780 --> 00:01:50.440
to run a podcast.
00:01:50.440 --> 00:01:51.460
Look at these things grow.
00:01:51.460 --> 00:01:57.780
And then Justin Spain from Chattanooga, Tennessee, who's at JWS Music on Twitter, said,
00:01:57.780 --> 00:01:59.440
why don't you start a Patreon campaign?
00:01:59.440 --> 00:02:03.160
Of course, when I read that, I thought, well, what's a Patreon campaign?
00:02:04.140 --> 00:02:05.920
Then it turns out that Justin was right.
00:02:05.920 --> 00:02:10.840
Patreon is actually perfect for things like podcasts, blogs, frequent videos, and even
00:02:10.840 --> 00:02:11.960
open source projects.
00:02:11.960 --> 00:02:17.760
Listeners, readers, and so on, pledge a small amount to each release, in my case, each episode.
00:02:17.760 --> 00:02:22.560
And when one of these episodes ships, a small amount of money is contributed back to me to
00:02:22.560 --> 00:02:23.960
help keep the podcast going.
00:02:23.960 --> 00:02:29.820
If you want to learn more about my campaign, you can find it at Patreon.com slash mkennedy.
00:02:30.520 --> 00:02:35.220
So fast forward a month, the guys at Patreon noticed my campaign and happened to be making
00:02:35.220 --> 00:02:38.820
a company-wide transition to Python 3 from PHP.
00:02:38.820 --> 00:02:43.120
So they reached out to me on Twitter, and we thought it'd be cool to talk about their port
00:02:43.120 --> 00:02:44.820
of their product to Python.
00:02:44.820 --> 00:02:46.420
And we talk about how that's going.
00:02:46.420 --> 00:02:49.820
In case you don't make it all the way through the whole show, it's going great.
00:02:50.820 --> 00:02:55.940
I also want to take a moment and say a special thank you to the 30-plus patrons who are already
00:02:55.940 --> 00:02:56.680
supporting the show.
00:02:56.680 --> 00:03:00.780
Right now, your contributions are covering a little more than the monthly bandwidth expenses
00:03:00.780 --> 00:03:01.340
for the show.
00:03:01.340 --> 00:03:05.840
This allows me to use my sponsorship money for extra benefits, such as creating searchable
00:03:05.840 --> 00:03:07.380
transcripts and things like that.
00:03:07.380 --> 00:03:12.520
But more importantly, your support has given me the confidence to push hard on making this
00:03:12.520 --> 00:03:14.040
podcast all that it can be.
00:03:14.040 --> 00:03:16.420
And of course, there's still a long way to go there.
00:03:16.480 --> 00:03:17.460
So thank you for the help.
00:03:17.460 --> 00:03:22.580
You might also be interested to hear that Patreon is hiring Python developers and data
00:03:22.580 --> 00:03:23.180
scientists.
00:03:23.180 --> 00:03:29.240
Check out patreon.com slash careers if you want to be part of a sweet team in San Francisco
00:03:29.240 --> 00:03:33.640
who are building out a business and putting a dent in the world using Python.
00:03:33.640 --> 00:03:39.600
At some point during the show, I make a statement that PHP is one of the most dreaded languages
00:03:39.600 --> 00:03:41.320
and technologies of 2015.
00:03:41.320 --> 00:03:45.140
I was quoting from the Stack Overflow 2015 developer survey.
00:03:45.440 --> 00:03:46.720
You'll find the links in the show notes.
00:03:46.720 --> 00:03:48.840
And I have a bit of a correction there.
00:03:48.840 --> 00:03:49.400
Sorry.
00:03:49.400 --> 00:03:54.580
It was Perl that was part of the most dreaded list, not PHP.
00:03:54.580 --> 00:03:57.080
PHP didn't make the top nine.
00:03:57.080 --> 00:04:02.400
However, I suspect maybe it's lingering just off stage at place 10 or 11 or 12.
00:04:02.400 --> 00:04:07.100
And in case you're wondering, what is the most dreaded technology on the list?
00:04:07.100 --> 00:04:08.140
It's Salesforce.
00:04:08.140 --> 00:04:09.920
All right.
00:04:09.920 --> 00:04:14.160
Finally, the Talk Python to Me t-shirt Kickstarter project is still running.
00:04:14.560 --> 00:04:16.340
It will be open for nine more days.
00:04:16.340 --> 00:04:20.900
So be sure to visit bit.ly slash Python shirt to reserve yours.
00:04:20.900 --> 00:04:25.380
It's a cool and comfortable cotton shirt that will tell the world about your unabashed love
00:04:25.380 --> 00:04:25.880
for Python.
00:04:25.880 --> 00:04:30.020
Now let's get to the conversation with Albert and Patreon.
00:04:30.020 --> 00:04:32.180
Albert, welcome to the show.
00:04:32.180 --> 00:04:33.060
Hi.
00:04:33.200 --> 00:04:34.120
Thanks for having me.
00:04:34.120 --> 00:04:34.680
Yeah.
00:04:34.680 --> 00:04:36.680
I'm really glad that you guys contacted me.
00:04:36.680 --> 00:04:38.960
And I'm looking forward to the conversation.
00:04:38.960 --> 00:04:45.720
We haven't really had much talk on moving from one technology into Python.
00:04:45.720 --> 00:04:47.740
And that's our main subject today.
00:04:47.740 --> 00:04:49.000
So thanks for being here.
00:04:49.860 --> 00:04:50.880
Thanks for reaching out.
00:04:50.880 --> 00:04:55.820
And we always, Patreon is a creator-first platform, and we'd always like to support our creators
00:04:55.820 --> 00:04:56.640
in any way we can.
00:04:56.640 --> 00:04:57.560
Yeah.
00:04:57.560 --> 00:05:02.680
So we'll get to Patreon in just a second and sort of how this show came into existence.
00:05:02.680 --> 00:05:08.600
But I always like to start off the show asking my guests who have achieved a lot in their
00:05:08.600 --> 00:05:08.900
careers.
00:05:08.900 --> 00:05:11.020
And how did you get started in programming?
00:05:11.200 --> 00:05:13.680
And how did you come to start using Python?
00:05:13.680 --> 00:05:17.560
So I actually got started with programming pretty early.
00:05:17.560 --> 00:05:23.880
I actually borrowed my brother's computer science A-B textbook when I was really young and just
00:05:23.880 --> 00:05:25.740
went through some of the exercises in C++.
00:05:25.740 --> 00:05:32.160
It wasn't the best way to learn things, but it got me introduced to a lot of really small
00:05:32.160 --> 00:05:35.020
things like how to print things out to a screen, how to do for loops.
00:05:35.020 --> 00:05:40.160
And back then, I was pretty entertained just by doing really simple programs like little small
00:05:40.160 --> 00:05:44.240
games where you can put your name and someone outputs your name right back at you.
00:05:44.240 --> 00:05:45.360
Yeah.
00:05:45.360 --> 00:05:48.180
I think we've all written those types of apps, and they're super fun.
00:05:48.180 --> 00:05:53.740
Just the feeling of satisfaction and accomplishment is surprising for you, right?
00:05:53.740 --> 00:05:54.480
Yeah.
00:05:54.480 --> 00:05:57.080
Especially when you're really young and your standards are lower.
00:05:57.080 --> 00:06:02.220
But as I sort of grew up, I started programming a lot more on calculators, on TI Basic.
00:06:02.220 --> 00:06:05.580
I decided to pursue programming as my major in college.
00:06:05.580 --> 00:06:08.760
And I was still pretty gung-ho about C++.
00:06:08.760 --> 00:06:10.560
I thought it was a hardcore language.
00:06:10.560 --> 00:06:13.780
I thought that all the hardcore programmers would do C++.
00:06:13.780 --> 00:06:20.060
Until freshman year, someone introduced me to Python, and I thought it was kind of a weak
00:06:20.060 --> 00:06:22.300
language because it didn't feel as hardcore.
00:06:22.300 --> 00:06:23.340
Yeah.
00:06:23.340 --> 00:06:27.660
I think that's a common feeling, or maybe misconception is a better way to say it.
00:06:27.660 --> 00:06:32.180
But a lot of people feel like the really tough guys do C++, and they're right down there in
00:06:32.180 --> 00:06:33.320
the memory and on the metal.
00:06:33.320 --> 00:06:38.780
And all you other guys are just fooling around, orchestrating our code or whatever that we write
00:06:38.780 --> 00:06:39.280
in C++.
00:06:39.280 --> 00:06:42.100
But I'm not sure that's really true or fair, is it?
00:06:42.760 --> 00:06:44.200
That was my impression at the time.
00:06:44.200 --> 00:06:49.740
And what really changed me is when I actually had to do a lot of project courses in college,
00:06:49.740 --> 00:06:54.440
I realized I could actually do things correctly and quickly.
00:06:54.440 --> 00:07:02.680
And in terms of performance or the standards of the code, much better in Python than I could
00:07:02.680 --> 00:07:03.220
in C++.
00:07:04.220 --> 00:07:08.440
And I just continued using Python whenever I could all through college.
00:07:08.440 --> 00:07:13.180
I didn't get a chance to use it professionally until about a couple years ago when I started
00:07:13.180 --> 00:07:14.200
at a company called Quora.
00:07:14.200 --> 00:07:17.900
Quora, is that the QA site?
00:07:17.900 --> 00:07:18.940
Yeah, that's right.
00:07:18.940 --> 00:07:20.700
Quora is a question and answer site.
00:07:20.700 --> 00:07:24.920
I started it pretty early and saw a lot of the really cool things that they were doing with
00:07:24.920 --> 00:07:25.400
Python.
00:07:25.400 --> 00:07:29.300
A lot of stuff with generators and with metaclasses and decorators.
00:07:29.300 --> 00:07:33.380
And it really turned me on to Python as a really serious language.
00:07:33.880 --> 00:07:39.180
And part of what I want to do at Patreon is take a lot of those more advanced Python techniques
00:07:39.180 --> 00:07:40.620
and bring it into our infrastructure.
00:07:40.620 --> 00:07:42.760
Oh, that's really cool.
00:07:42.760 --> 00:07:47.440
But when you got to Patreon, it wasn't originally in Python, was it?
00:07:47.440 --> 00:07:48.840
No, it was in PHP.
00:07:48.840 --> 00:07:53.700
It started in PHP because that was the fastest way to bring the product to life in the early
00:07:53.700 --> 00:07:54.140
stages.
00:07:54.140 --> 00:07:59.980
But as the product grew and as the engineering team grew, it started to become pretty clear
00:07:59.980 --> 00:08:03.080
that PHP wasn't going to scale with the team.
00:08:03.540 --> 00:08:09.720
Is that from a performance perspective or from an adding new features and maintainability
00:08:09.720 --> 00:08:10.220
perspective?
00:08:10.220 --> 00:08:13.480
The number one thing was maintainability.
00:08:13.480 --> 00:08:20.360
And it's not 100% like PHP's fault, but rather PHP allows you to do certain things that make
00:08:20.360 --> 00:08:25.620
the code way messier than you want your core code to be.
00:08:25.960 --> 00:08:29.060
A lot of things with PHP just allow you to do things very quickly.
00:08:29.060 --> 00:08:33.560
And when you're adding more and more engineers, when you're going from one engineer to two to
00:08:33.560 --> 00:08:39.160
three to ten, you don't necessarily want to do everything the fastest possible way.
00:08:39.980 --> 00:08:41.800
We did want to do things fast.
00:08:41.800 --> 00:08:45.940
In fact, the concept of shipping quickly is still important to our engineering culture.
00:08:45.940 --> 00:08:50.900
But we want to be able to ship quickly in a way that's maintainable and a way that uses the proper
00:08:50.900 --> 00:08:55.940
abstractions in a way that isn't copy pasting, I guess.
00:08:55.940 --> 00:08:59.220
Let's talk a little bit about what those differences are and stuff.
00:08:59.300 --> 00:09:03.360
But before we do, maybe you could tell everyone, what is Patreon?
00:09:03.360 --> 00:09:04.680
Yeah.
00:09:04.680 --> 00:09:07.640
Patreon is a subscription funding for creators.
00:09:07.640 --> 00:09:12.100
And the way it works is that patrons will pledge a set amount per release.
00:09:12.640 --> 00:09:17.580
Every time a creator publishes a new creation, so like a webcomic, a video, a blog post, a podcast,
00:09:17.580 --> 00:09:21.880
anything, funds are transferred from patrons to the creator.
00:09:21.880 --> 00:09:24.300
We launched in May of 2013.
00:09:24.300 --> 00:09:32.060
And as of summer 2014, we announced that patrons were sending over $1 million monthly to creators
00:09:32.060 --> 00:09:32.840
through Patreon.
00:09:32.840 --> 00:09:34.320
A million dollars a month.
00:09:34.320 --> 00:09:34.840
That's amazing.
00:09:34.840 --> 00:09:35.360
Yeah.
00:09:35.360 --> 00:09:36.200
And we're still growing.
00:09:36.200 --> 00:09:38.840
We just passed $2 million very recently.
00:09:38.840 --> 00:09:41.600
And the company itself is about 24 people.
00:09:42.060 --> 00:09:45.340
We're headquartered in Soma in San Francisco and actively hiring.
00:09:45.340 --> 00:09:46.300
Okay.
00:09:46.300 --> 00:09:47.840
And they're doing Python.
00:09:47.840 --> 00:09:51.700
And I suspect you'll reach a lot of intrigued Python developers out there.
00:09:51.700 --> 00:09:53.100
So that's a good message.
00:09:53.100 --> 00:09:54.120
Yeah, that's the hope.
00:09:54.120 --> 00:09:55.040
Yeah, excellent.
00:09:55.040 --> 00:09:57.400
So I'm personally using Patreon.
00:09:57.400 --> 00:10:00.240
And that's how we got to know each other.
00:10:11.480 --> 00:10:19.500
CodeChip is a hosted continuous delivery service focused on speed, security, and customizability.
00:10:19.500 --> 00:10:25.340
You can set up continuous integration in a matter of seconds and automatically deploy when your tests have passed.
00:10:25.340 --> 00:10:28.580
CodeChip supports your GitHub and Bitbucket projects.
00:10:28.880 --> 00:10:31.340
You can get started with CodeChip's free plan today.
00:10:31.340 --> 00:10:39.860
Should you decide to go with a premium plan, Talk Python listeners can save 20% off any plan for the next three months by using the code TALKPYTHON.
00:10:39.860 --> 00:10:41.560
All caps, no spaces.
00:10:41.560 --> 00:10:48.900
Check them out at CodeChip.com and tell them thanks for sponsoring the show on Twitter where they're at CodeChip.
00:10:52.900 --> 00:11:02.500
I was on Twitter complaining like I do sometimes about paying for bandwidth and stuff for my podcast because it's going up.
00:11:02.500 --> 00:11:04.040
It's kind of like doubling each month.
00:11:04.040 --> 00:11:10.440
And it's, you know, not a huge number now, but doubling a medium-sized number becomes a problem really quick, right?
00:11:10.480 --> 00:11:13.560
So I was saying, well, this is getting pretty expensive, OGs.
00:11:13.560 --> 00:11:19.840
And a guy, I believe his name is Justin on Twitter, says, hey, why don't you use Patreon?
00:11:19.840 --> 00:11:21.420
And that's the first I heard of you guys.
00:11:21.420 --> 00:11:24.920
So I'm like, wow, let me go create an account or a campaign on Patreon.
00:11:24.920 --> 00:11:26.980
I thought of other ways to kind of do this.
00:11:26.980 --> 00:11:28.680
Like maybe Kickstarter might be an answer.
00:11:28.680 --> 00:11:35.000
But to me, Kickstarter is the wrong thing because it's like you fund this thing once and there's like a big bang creation.
00:11:35.000 --> 00:11:45.600
And that doesn't really work for things like ongoing podcasts or sort of steady state stuff, like you're saying, like web comics or things like XKCD type stuff, right?
00:11:45.600 --> 00:11:46.880
Yeah, that's right.
00:11:46.880 --> 00:11:51.900
Our goal is that people who want to create things are able to make a living off those creations.
00:11:51.900 --> 00:12:05.420
And to do that requires sort of mimicking the structure that I guess like a job sort of has or mimicking the idea of having like ongoing support for your ability to create things.
00:12:05.420 --> 00:12:11.900
And I think it's a lot of the reason why I joined Patreon is because I believe in the mission.
00:12:11.900 --> 00:12:15.000
And a lot of the people who work here as well also believe in the mission.
00:12:15.000 --> 00:12:16.900
I think it's a really great mission.
00:12:16.900 --> 00:12:20.120
And it definitely makes having my podcast simpler.
00:12:20.120 --> 00:12:25.200
And I just want to say thanks to everyone out there who's contributed to my campaign so far.
00:12:25.200 --> 00:12:27.440
And I think what you guys are doing is really great.
00:12:27.440 --> 00:12:29.700
So I was super excited about it when I first heard of it.
00:12:29.700 --> 00:12:31.020
It just I hadn't heard of it before.
00:12:31.020 --> 00:12:34.100
So let's talk about PHP a little bit.
00:12:34.100 --> 00:12:35.640
So it was originally written in PHP.
00:12:35.640 --> 00:12:39.680
And to be honest, I don't have a ton of experience personally with PHP.
00:12:39.680 --> 00:12:43.580
But what are some of the pain points that you're solving with Python?
00:12:44.900 --> 00:12:47.260
A lot of organization of code.
00:12:47.260 --> 00:12:52.560
I think with namespaces, I think it's just I mean, it's a very simple feature.
00:12:52.560 --> 00:13:00.640
But being able to segment our code out into separate modules allows different teams to work on different aspects of the site.
00:13:00.640 --> 00:13:09.120
Secondly, with decorators or with like a sort of single points of entry for application.
00:13:09.700 --> 00:13:15.020
The way we're currently using Flask and the way the Flask does routing is like through decorators.
00:13:15.020 --> 00:13:30.480
And because we're doing everything through this standardized way, if we want to change something like if we want to say start recording response times and graphing that on a chart, we can just do that by modifying decorator rather than trying to input that into each individual PHP script.
00:13:31.260 --> 00:13:31.620
Right.
00:13:31.620 --> 00:13:31.680
Right.
00:13:31.680 --> 00:13:33.560
The way they do decorators with what is it?
00:13:33.560 --> 00:13:37.300
App.route as a decorator on all the methods that power the views.
00:13:37.300 --> 00:13:38.380
Yeah, that's right.
00:13:38.380 --> 00:13:39.640
Yeah, that's really cool.
00:13:39.640 --> 00:13:43.480
We just had Armin on the show for the previous show.
00:13:43.480 --> 00:13:45.020
So people hear more about him.
00:13:45.020 --> 00:13:45.960
I'm assuming it's pretty cool.
00:13:45.960 --> 00:13:47.640
But yeah, I'm a big fan of Flask.
00:13:47.640 --> 00:13:50.260
And you guys said you're doing Python 3, right?
00:13:50.980 --> 00:13:51.440
That's right.
00:13:51.440 --> 00:13:54.420
That was sort of one of the small risks that we took.
00:13:54.420 --> 00:14:01.300
Most of the other technologies that we use are pretty boring or at least like pretty standard like Flask or SQLAlchemy or Jinja 2.
00:14:01.300 --> 00:14:09.040
But we decided that we would go with Python 3 going forward because we wanted to make sure that our code base is going to be future proof.
00:14:10.420 --> 00:14:12.960
I think that's a really nice choice.
00:14:12.960 --> 00:14:15.600
And I see more and more people moving to Python 3.
00:14:15.600 --> 00:14:18.760
There's still a lot of folks doing Python 2.
00:14:18.760 --> 00:14:25.000
But it just seems a little wrong is not the word I'm looking for.
00:14:25.000 --> 00:14:32.500
But it just seems like something is out of balance where there's a lot of people working on Python 3 to push the future of Python.
00:14:32.500 --> 00:14:35.160
And then there's so many people who are actually not using it.
00:14:35.160 --> 00:14:40.220
Some of the biggest users of Python are not using kind of where the community is focusing its effort.
00:14:40.220 --> 00:14:48.500
And so I personally think any time you get a chance to use Python 3 is kind of helping the community move along, let's say.
00:14:48.500 --> 00:14:59.140
The way we went about it, actually, we took a look at the wall of superpowers and just saw what are the modules that we need to actually build our application.
00:14:59.140 --> 00:15:02.840
Most things that we needed are already implemented.
00:15:02.840 --> 00:15:05.000
The one thing that was missing was MySQL DB.
00:15:05.000 --> 00:15:08.200
And that was pretty easily replaceable by PyMySQL.
00:15:08.200 --> 00:15:11.740
And so it's been actually a really, really simple switch for us.
00:15:11.740 --> 00:15:19.740
The biggest sort of hump that we ran into is that, like, Stack Overflow or Google defaults to Python 2.7 in terms of its help.
00:15:19.740 --> 00:15:22.240
But it's been a dream for us to work with.
00:15:22.240 --> 00:15:23.900
Yeah, that's really great.
00:15:23.900 --> 00:15:25.160
So let's see.
00:15:25.160 --> 00:15:26.140
You're using Flask.
00:15:26.140 --> 00:15:28.140
It sounds like you're using MySQL.
00:15:28.140 --> 00:15:29.820
It's the back end.
00:15:29.820 --> 00:15:31.600
SQLAlchemy.
00:15:31.600 --> 00:15:33.220
SQLAlchemy is really fantastic.
00:15:33.220 --> 00:15:34.060
What else are you using?
00:15:34.280 --> 00:15:36.460
Any other cool parts of Python or libraries?
00:15:36.460 --> 00:15:42.020
Our starting point was just to mimic as much of PHP as possible.
00:15:42.020 --> 00:15:49.100
And so in terms of complicated technologies, we actively chose against using any of them.
00:15:49.800 --> 00:15:52.980
A lot of really standard modules like requests or Jinja 2.
00:15:52.980 --> 00:15:55.140
But nothing too out there yet.
00:15:55.140 --> 00:15:56.880
That makes perfect sense.
00:15:56.880 --> 00:15:59.540
Let's talk a little bit about the whole porting concept.
00:15:59.540 --> 00:16:06.860
Porting your code is basically a rewrite when it's this divergent of a technology, right?
00:16:06.860 --> 00:16:08.320
And so that's a pretty big risk.
00:16:08.320 --> 00:16:11.120
How did you guys decide that that was the path forward?
00:16:11.780 --> 00:16:13.360
Yeah, it was a pretty big risk.
00:16:13.360 --> 00:16:16.060
In fact, I've been burned by a lot of ports in the past.
00:16:16.060 --> 00:16:20.040
A previous project I've had was porting something from Python to Scala.
00:16:20.040 --> 00:16:27.760
And I think that's a much, much more difficult process to go through because you're putting basically a dynamic language into a static language.
00:16:27.960 --> 00:16:31.100
And that just adds a lot of weight to the process.
00:16:31.100 --> 00:16:38.740
We decided pretty early on that PHP wasn't going to be how we wanted to go forward with engineering.
00:16:39.780 --> 00:16:48.520
The decisions we had to make were, like, given the current PHP code base, could we refactor it into something that's more workable using, like, a modern framework?
00:16:48.520 --> 00:16:54.880
Should we port it to Python or should we port it to, like, I guess a crazier language like Scala or Java?
00:16:54.880 --> 00:17:01.840
We didn't want to, like, the ecosystem of PHP was, we found, much weaker than that of Python.
00:17:01.840 --> 00:17:10.160
I think a lot of the main consumers of PHP has mostly revolved around Facebook and a little bit around, like, the Wikimedia Foundation.
00:17:10.160 --> 00:17:12.220
But besides that, not a lot of support.
00:17:12.220 --> 00:17:17.300
Whereas Python has what feels like a more active developer community, a more active ecosystem.
00:17:17.300 --> 00:17:21.880
It lends us a lot more legitimacy for hiring engineers.
00:17:21.880 --> 00:17:24.340
It is more consistent of a language.
00:17:24.340 --> 00:17:34.480
And it was just different enough from PHP but close enough that, like, we felt comfortable doing a one-to-one translation from PHP to Python.
00:17:34.480 --> 00:17:35.260
Right.
00:17:35.260 --> 00:17:39.660
It was different, but it wasn't completely alien to make that transformation, huh?
00:17:39.660 --> 00:17:40.420
Yeah.
00:17:40.420 --> 00:17:45.820
The other option we had with Scala was just too different and, like, too many unknowns.
00:17:45.820 --> 00:17:51.620
And when it comes to ports, I think there's usually a pretty high probability that a port will fail.
00:17:52.500 --> 00:17:55.060
I've seen a lot of port projects just, like, fail in the past.
00:17:55.060 --> 00:18:02.600
And in order to prevent that from happening, I think we as a company decided we want to take as few risks as possible.
00:18:02.600 --> 00:18:04.580
Yeah, that makes a lot of sense.
00:18:04.580 --> 00:18:10.960
You'd mentioned, like, sort of developer happiness and things like that.
00:18:11.960 --> 00:18:27.760
There's a really interesting yearly developer survey by Stack Overflow that comes out, and they sort of rank technologies, what's growing, what are the jobs, what are technologies people love, and what are technologies people strongly dislike, let's say.
00:18:27.760 --> 00:18:31.080
It's a concern that they're working with it.
00:18:31.640 --> 00:18:38.540
And I think Python was on the list of the beloved technologies, and PHP might have been on the list of the ones to kind of stay away from.
00:18:38.540 --> 00:18:46.980
So you think it's easier to hire people because you can say, hey, come work on this cool Python 3 Flask project than it is to say, come work on this PHP project?
00:18:47.420 --> 00:18:58.360
When it comes to PHP, PHP has been really easy to develop new things, but it makes it extremely difficult to maintain that code after it's been developed.
00:18:59.140 --> 00:19:07.640
And I think that the gains you get with PHP are also seen a lot in Python, but the maintainability of Python is so much greater for us.
00:19:07.640 --> 00:19:16.900
Engineers, I think, rank maybe a little bit unfairly, certain languages as more hardcore than others.
00:19:16.900 --> 00:19:18.280
I think PHP ranks pretty low.
00:19:18.280 --> 00:19:28.360
I think there's a lot of unfair feelings towards PHP, especially since it's been developed and it's been actively used by companies like Facebook.
00:19:28.360 --> 00:19:30.900
Yeah, and things like WordPress, right?
00:19:30.900 --> 00:19:33.460
And there's some pretty amazing stuff out there.
00:19:33.460 --> 00:19:34.160
Yeah.
00:19:34.160 --> 00:19:51.760
But there's a lot of parts core to the language, a lot of inconsistencies, a lot of things like global namespacing, a lot of things like having to worry about security or magic quotes or PHP ionized that worked well in the past, but don't really hold up against the modern language.
00:19:51.760 --> 00:19:52.460
Sure.
00:19:52.460 --> 00:19:53.160
That makes sense.
00:19:53.160 --> 00:20:01.520
So you chose Python over the other options that you listed and obviously the ones that you didn't list as well, like over all the other possibilities.
00:20:01.520 --> 00:20:07.720
Does that mean that a lot of the people there had lots of Python experience and that's kind of what they wanted to move to?
00:20:07.720 --> 00:20:09.480
Or how did you as a group decide?
00:20:19.620 --> 00:20:22.240
This episode is brought to you by Hired.
00:20:22.240 --> 00:20:28.720
Hired is a two-sided, curated marketplace that connects the world's knowledge workers to the best opportunities.
00:20:28.720 --> 00:20:37.880
Each offer you receive has salary and equity presented right up front and you can view the offers to accept or reject them before you even talk to the company.
00:20:37.880 --> 00:20:44.240
Typically, candidates receive five or more offers in just the first week and there are no obligations ever.
00:20:44.240 --> 00:20:46.340
Sounds pretty awesome, doesn't it?
00:20:46.620 --> 00:20:48.380
Well, did I mention there's a signing bonus?
00:20:48.380 --> 00:20:52.460
Everyone who accepts a job from Hired gets a $2,000 signing bonus.
00:20:52.460 --> 00:20:56.820
And as Talk Python listeners, it gets way sweeter.
00:20:56.820 --> 00:21:04.380
Use the link Hired.com slash Talk Python To Me and Hired will double the signing bonus to $4,000.
00:21:04.380 --> 00:21:06.100
Opportunity's knocking.
00:21:06.100 --> 00:21:09.720
Visit Hired.com slash Talk Python To Me and answer the call.
00:21:09.720 --> 00:21:10.280
Yeah.
00:21:10.280 --> 00:21:23.820
As a group, we actually have a lot of really disparate skills.
00:21:23.820 --> 00:21:28.920
Some in Java, some in Ruby, some in JavaScript, and some only in PHP.
00:21:28.920 --> 00:21:34.840
There was no language that everyone was going to be really favored on.
00:21:35.640 --> 00:21:37.760
And as a result, we just had to make a decision.
00:21:37.760 --> 00:21:40.820
We chose Python because we knew it would be pretty safe.
00:21:40.820 --> 00:21:46.180
And we knew that, like, Python is a really easy language to just pick up over a weekend.
00:21:47.020 --> 00:21:53.680
Like, it's the tutorial on Python or the way that most people, like, learn Python is usually over a weekend.
00:21:53.680 --> 00:21:56.780
Getting the very basics of it are pretty easy.
00:21:56.780 --> 00:22:00.260
And getting into the depth is, like, a gradual learning curve.
00:22:00.260 --> 00:22:02.620
I think it is a super easy language to learn.
00:22:02.620 --> 00:22:08.440
Where the real work is learning all the standard libraries and all the popular packages, right?
00:22:08.520 --> 00:22:11.600
Like, really mastering things like SQLAlchemy and Flask.
00:22:11.600 --> 00:22:13.720
And, right, that's the real learning curve.
00:22:13.720 --> 00:22:15.240
But it's kind of unavoidable.