All language subtitles for 039-Adding a Simple Feature-git.ir

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian Download
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:01,480 --> 00:00:02,980 Our application is looking pretty good. 2 00:00:02,980 --> 00:00:05,710 And in this video I would like to start to add in a new feature. 3 00:00:05,710 --> 00:00:10,750 Let's first discuss exactly what this feature is going to be here's so we're going to try to do. 4 00:00:10,800 --> 00:00:14,100 I want to add in the idea of comment moderation. 5 00:00:14,100 --> 00:00:18,900 So in other words I want to take a look at the content of every comment that gets submitted and depending 6 00:00:18,900 --> 00:00:23,460 upon whether or not it has some very specific word we're going to flag that comment in some way and 7 00:00:23,460 --> 00:00:26,830 say hey this thing is not permitted or something like that. 8 00:00:27,020 --> 00:00:29,630 We're going to flag comments that contain the word orange. 9 00:00:29,630 --> 00:00:31,820 So it's going to be a very simple filter. 10 00:00:31,850 --> 00:00:36,220 We're going to literally say does the comment contain the word orange. 11 00:00:36,230 --> 00:00:38,990 If it does there's something wrong with this comment. 12 00:00:39,020 --> 00:00:41,110 We want to flag it in some way. 13 00:00:41,120 --> 00:00:42,940 Let me give you a little bit more detail on this feature. 14 00:00:42,950 --> 00:00:45,280 Just to clarify a couple of different things. 15 00:00:45,290 --> 00:00:50,030 So first off if we were doing some simple filtering like this and just trying to say whether or not 16 00:00:50,060 --> 00:00:53,350 a company had orange it would make a lot of sense to implement it. 17 00:00:53,360 --> 00:00:58,910 Justin the react application but let's just pretend for a second that maybe the filter laced list changes 18 00:00:58,910 --> 00:00:59,760 very frequently. 19 00:00:59,780 --> 00:01:04,220 In other words that word orange maybe in five minutes we need to change it to banana or something like 20 00:01:04,220 --> 00:01:10,020 that if that was the case we would not want to hard code any filtering logic directly inside the react 21 00:01:10,020 --> 00:01:15,300 up because then every single time we wanted to change that filter key word we would have to redeploy 22 00:01:15,300 --> 00:01:17,960 the react application. 23 00:01:18,140 --> 00:01:22,670 The next thing that we're going to assume here is that although it would be super easy to implement 24 00:01:22,670 --> 00:01:25,020 this in the existing comment service we already have. 25 00:01:25,100 --> 00:01:27,830 We're going to say that for some reason who knows what it is. 26 00:01:27,890 --> 00:01:29,800 We want to create a new service. 27 00:01:29,810 --> 00:01:35,750 So we are going to make a new service to implement this kind of filtering or moderation logic. 28 00:01:35,830 --> 00:01:40,270 The third little assumption we're going to make here is that in some scenarios you'll see a Y and a 29 00:01:40,270 --> 00:01:40,660 little bit. 30 00:01:40,690 --> 00:01:46,790 We're going to assume that it may might take a very long time for the new service to actually moderate 31 00:01:46,790 --> 00:01:47,700 a comment. 32 00:01:47,710 --> 00:01:51,070 So at the end of the day we are really just checking to see if a string contains orange. 33 00:01:51,310 --> 00:01:56,470 But we are going to assume that maybe that is going to take minutes or even hours to actually complete 34 00:01:57,730 --> 00:01:58,010 OK. 35 00:01:58,140 --> 00:02:02,820 So let me show you a mockup of what I want this app to eventually look like after you make this change. 36 00:02:02,910 --> 00:02:08,470 So we will imagine that we've got three posts right here in each of them has one comment. 37 00:02:08,470 --> 00:02:12,210 So each of these comments can be in one of three different states. 38 00:02:12,280 --> 00:02:14,280 The comment can be successfully moderated. 39 00:02:14,650 --> 00:02:18,280 So as you see right you're in the middle one this string does not contain the word orange or anything 40 00:02:18,280 --> 00:02:18,970 like that. 41 00:02:19,030 --> 00:02:21,780 So we show that come into the user the other state. 42 00:02:21,790 --> 00:02:24,590 A comment can be N is awaiting moderation. 43 00:02:24,610 --> 00:02:29,860 So this is the scenario in which maybe it takes five minutes or an hour to actually run that moderation 44 00:02:29,860 --> 00:02:30,360 logic. 45 00:02:30,400 --> 00:02:34,690 Again it's really just a simple string comparison but you'll see why we kind of have to make this assumption 46 00:02:34,690 --> 00:02:39,910 from the get go if we are waiting moderation then we should display something like this to the user 47 00:02:39,910 --> 00:02:43,120 something and says this comment is awaiting moderation. 48 00:02:43,120 --> 00:02:48,070 And then finally the third possible state is the case in which the comment contained the string orange. 49 00:02:48,400 --> 00:02:50,560 So in that scenario we want to display it to the user. 50 00:02:50,560 --> 00:02:53,770 This comment was rejected and let them know that there was a comment there. 51 00:02:53,830 --> 00:02:57,970 But for some reason we are filtering it so from the get go. 52 00:02:58,090 --> 00:03:02,860 I want to point out that there's kind of one assumption we can probably make here very easily without 53 00:03:02,860 --> 00:03:08,770 a doubt based on the mockups you're just looking at we know 100 percent that the react application needs 54 00:03:08,770 --> 00:03:13,970 to yield and tell whether a comment is awaiting moderation rejected or approved. 55 00:03:14,640 --> 00:03:19,170 Right now the react application thinks that a comment has this structure you see right here react out 56 00:03:19,170 --> 00:03:23,220 thinks that comments just have an I.D. and content and that's it. 57 00:03:23,220 --> 00:03:28,290 So to really tell the react app whether a comment is moderated rejected or approved we're going to add 58 00:03:28,290 --> 00:03:31,720 in an additional little flag to every comment. 59 00:03:31,950 --> 00:03:38,690 And that flag will be a string of approved rejected or pending as you could guests approved means that 60 00:03:38,690 --> 00:03:40,460 we've filtered this comment. 61 00:03:40,460 --> 00:03:44,150 We've made sure that it doesn't contain the string orange or whatever else. 62 00:03:44,150 --> 00:03:48,680 Rejected again as you can probably guess means that well for some reason we don't want this comment 63 00:03:48,680 --> 00:03:49,890 displayed to the user. 64 00:03:49,940 --> 00:03:53,530 So if the status is rejected we want to show that right there. 65 00:03:53,760 --> 00:03:57,570 And then finally if the comment is pending that means that we're still trying to do that filtering logic. 66 00:03:57,730 --> 00:04:02,620 And in that scenario we should display this coming as a waiting pending me awaiting moderation over 67 00:04:02,620 --> 00:04:03,850 here. 68 00:04:03,850 --> 00:04:04,300 All right. 69 00:04:04,360 --> 00:04:09,550 So in this video I've now spent about four minutes telling you about what appears to be a very simple 70 00:04:09,550 --> 00:04:15,220 and straightforward feature and I cannot stress that enough this feature looks crazy simple at first 71 00:04:15,220 --> 00:04:16,080 glance. 72 00:04:16,300 --> 00:04:21,160 But as we start to implement this you're going to see that there is some incredible hidden complexity 73 00:04:21,160 --> 00:04:21,750 here. 74 00:04:21,770 --> 00:04:27,160 There is way more going on than you would ever expect and implementing stuff like this turns out is 75 00:04:27,160 --> 00:04:33,180 a little bit more challenging than if we were in a very simple model style world. 76 00:04:33,190 --> 00:04:33,430 OK. 77 00:04:33,460 --> 00:04:35,750 So let's take a pause right here and come back next video. 78 00:04:35,830 --> 00:04:39,910 We're going to take a look at the current design of application and talk about how we can change it 79 00:04:39,910 --> 00:04:41,140 to implement this feature. 80 00:04:41,260 --> 00:04:45,800 And we're going to see some issues start to arise along the way the quick pause continue. 81 00:04:45,800 --> 00:04:46,240 Just a minute. 8534

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.