background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "16. CS50 на русском: Лекция #16 [Гарвард, Основы программирования, осень 2015 год]"

input logo icon
Similar videos from our catalog
|

Similar videos from our catalog

2. CS50 на русском: Лекция #2 [Гарвард, Основы программирования, осень 2015 год]
1:04:15

2. CS50 на русском: Лекция #2 [Гарвард, Основы программирования, осень 2015 год]

Channel: JavaRush
18. CS50 на русском: Лекция #18 [Гарвард, Основы программирования, осень 2015 год]
50:49

18. CS50 на русском: Лекция #18 [Гарвард, Основы программирования, осень 2015 год]

Channel: JavaRush
7. CS50 на русском: Лекция #7 [Гарвард, Основы программирования, осень 2015 год]
48:00

7. CS50 на русском: Лекция #7 [Гарвард, Основы программирования, осень 2015 год]

Channel: JavaRush
6. CS50 на русском: Лекция #6 [Гарвард, Основы программирования, осень 2015 год]
44:35

6. CS50 на русском: Лекция #6 [Гарвард, Основы программирования, осень 2015 год]

Channel: JavaRush
14. CS50 на русском: Лекция #14 [Гарвард, Основы программирования, осень 2015 год]
52:58

14. CS50 на русском: Лекция #14 [Гарвард, Основы программирования, осень 2015 год]

Channel: JavaRush
3. CS50 на русском: Лекция #3 [Гарвард, Основы программирования, осень 2015 год]
50:17

3. CS50 на русском: Лекция #3 [Гарвард, Основы программирования, осень 2015 год]

Channel: JavaRush
8. CS50 на русском: Лекция #8 [Гарвард, Основы программирования, осень 2015 год]
38:22

8. CS50 на русском: Лекция #8 [Гарвард, Основы программирования, осень 2015 год]

Channel: JavaRush
5. CS50 на русском: Лекция #5 [Гарвард, Основы программирования, осень 2015 год]
50:23

5. CS50 на русском: Лекция #5 [Гарвард, Основы программирования, осень 2015 год]

Channel: JavaRush
20. CS50 на русском: Лекция #20 [Гарвард, Основы программирования, осень 2015 год]
50:17

20. CS50 на русском: Лекция #20 [Гарвард, Основы программирования, осень 2015 год]

Channel: JavaRush
15. CS50 на русском: Лекция #15 [Гарвард, Основы программирования, осень 2015 год]
54:13

15. CS50 на русском: Лекция #15 [Гарвард, Основы программирования, осень 2015 год]

Channel: JavaRush
Video tags
|

Video tags

cs50
основы программирования
cs50 на русском
cs50 лекция 16
Week 8
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:17
welcome to harvard for the seo course
00:00:21
swifty
00:00:24
is ses fifty and we are starting the eighth
00:00:28
week and he has returned to us and we are glad to
00:00:30
welcome him to us alcohol ramon
00:00:32
galvan and our almost graduate
00:00:34
who has spent the last few
00:00:36
months since july in los angeles in
00:00:39
hollywood working on the new
00:00:41
sci-fi television series
00:00:43
Colony, the creator of which, by the way, is
00:00:46
also a Harvard graduate, sit down,
00:00:48
look forward to the premiere of the series in
00:00:51
January, don’t miss it and watch Ramona
00:00:53
in a few weeks,
00:00:54
well, the end is near, that is, we have
00:00:57
very few left of all fifty, as
00:00:59
sad as it is, only three problem books
00:01:01
Problem book number 6, which you are working with
00:01:03
now or will soon begin, is like a
00:01:05
bridge between the world of the command line in
00:01:07
which we spent most of our
00:01:09
time and the world of web programming,
00:01:12
you will come across many ideas
00:01:13
borrowed from the command
00:01:15
line system, as well as many interesting ideas that are
00:01:18
directly related to mobile
00:01:20
applications and in general technologies
00:01:21
that you guys are well
00:01:23
familiar with today thanks to your laptop phone and
00:01:25
other devices, you will
00:01:27
not have to implement a web page or a website
00:01:29
as such, but the
00:01:30
web server itself, you will need to write down the
00:01:33
rest of the web server that is currently
00:01:35
written in the essence it turns out that
00:01:37
http requests and virtual packets
00:01:39
that we talk about so much are answered
00:01:42
either with some static content,
00:01:44
such as a .
00:01:45
html or . cap or other or
00:01:48
php files in this case your web server
00:01:50
will decipher the php code and display the results
00:01:53
we have provided you with general schemes for
00:01:55
working the distribution kit 6 problem books contain
00:01:58
more than a thousand lines of code, although many of
00:02:00
them are comments and this is a very good
00:02:02
opportunity to immerse yourself in a
00:02:04
really serious project
00:02:05
every element of which we have carefully
00:02:07
thought out so that when you complete the Swifty course,
00:02:10
go out into the real world of programming
00:02:11
and want to take on some projects,
00:02:14
you feel comfortable
00:02:15
encountering source codes and open
00:02:18
projects on the Internet, immersing yourself in it all and
00:02:21
making your own amendments, problem book
00:02:23
number seven is dedicated to how make
00:02:24
your own web application using
00:02:26
dynamic input and output of data as
00:02:29
on the site and trud.com and the like, and the
00:02:31
8th problem book contains exercises in
00:02:34
another language called java script, in
00:02:37
general, the final project is just around the corner,
00:02:39
and the so-called pre-project will be necessary
00:02:41
handing in a pre-project in a week
00:02:43
according to the glossary in all aspects is
00:02:45
simply an opportunity to send a short
00:02:47
letter to your supervisor to tell
00:02:49
him or her about your thoughts, to confer, and at the
00:02:51
same time check whether you have gone too far
00:02:54
or, on the contrary, will not bother yourself, or maybe
00:02:57
you have no thoughts at all and you
00:02:59
want it discuss
00:03:01
next is the development of the project and a report
00:03:03
on the success of the sea of ​​fifty hackathon in
00:03:05
Cambridge for Harvard and Yale students,
00:03:08
then the final implementation of the project and
00:03:11
finally the fair with fifty
00:03:13
1 here in Cambridge and 2 in New Haven,
00:03:15
details on our website but
00:03:17
really interesting with With a cool
00:03:19
head and a warm heart, immerse yourself in
00:03:21
topics tools and techniques that
00:03:23
are additional in the course program
00:03:25
but nevertheless very useful; excellent
00:03:28
building blocks for truly cool
00:03:30
projects that will go beyond
00:03:31
what was in the problem books and in
00:03:34
lectures, beware, I have a list
00:03:36
all seminars if you haven’t
00:03:38
registered yet, nothing come in and
00:03:40
register calmly and we will
00:03:42
post everything online as the day and time are
00:03:44
indicated on the website everything will be recorded and
00:03:46
posted online if you can’t
00:03:48
join on a specific day and what
00:03:50
else we have coming up is of course a hackathon with
00:03:53
fifty remember this photo from week zero
00:03:56
it was taken at about 4 am a few
00:03:58
years ago if the ses fifty fair which
00:04:00
will be held in both cities
00:04:01
well and for the future although we still have a
00:04:04
whole month left in the semester
00:04:05
but if you want to join the
00:04:07
teaching team with fifty if
00:04:09
you are you thinking about becoming an
00:04:11
assistant or curator please keep in mind
00:04:13
that we will be discussing this in more detail at
00:04:15
the end of the semester in the picture most of
00:04:17
this year's team and so
00:04:18
php I was so upset last week
00:04:21
that Alice tried to provide on with these
00:04:23
wonderful props and I didn't have time for them
00:04:25
use it, but it really
00:04:27
turned out stupid that we wasted the whole Wednesday here with a
00:04:30
shovel and a small spoon, but with this
00:04:32
metaphor I just wanted to explain
00:04:33
why we are moving from the C language to a
00:04:36
language like stoves, the same can be
00:04:38
said about any other language java python
00:04:40
ruby ​​and others while in writing a
00:04:42
program it looks like we are taking a
00:04:45
small spoon and dripping a hole in the ground
00:04:46
sand or mud poking allows you
00:04:49
to deal with the task much faster
00:04:51
by writing much shorter
00:04:53
code art using fewer
00:04:55
tools thanks to its serious
00:04:57
functionality background for greater
00:04:59
clarity you can It would be good to dig
00:05:02
something here, well, and God bless him, another
00:05:04
metaphor about which we resorted
00:05:06
is a wrench into which you can hammer
00:05:09
a nail, although of course the more appropriate
00:05:12
tool here would be not so much the language of the
00:05:14
sex help, I seem to have ruined everything,
00:05:17
I hope Sanders is subordinated to live arcade
00:05:20
the right tool will often be
00:05:22
for me this low level language again in
00:05:24
general and
00:05:25
this is not a language that most of
00:05:27
you will or should use
00:05:29
in general a little secret I mainly
00:05:31
work in C only from September to December
00:05:33
every fall semester this is because we
00:05:36
use everything in mainly for teaching the
00:05:38
basics of programming and the basics of
00:05:40
computer science,
00:05:41
data structure, algorithms and all
00:05:44
that, but very soon you will see that
00:05:46
the syntax and ideas of the C language are perfectly
00:05:49
transferred to higher-level
00:05:50
languages ​​such as stove concrete and pearl java in the
00:05:54
whole object, although the whole object is not quite
00:05:57
Swift yet, it’s more modern languages ​​in
00:06:01
which many of you will write the
00:06:03
final project, although without too much
00:06:05
fuss, let's use the stove to
00:06:08
solve problems. You remember last
00:06:10
week in food and the lucky ones, we wrote an
00:06:13
elegant little program that
00:06:16
output hallow
00:06:17
then did not save the robe in the file. bake
00:06:20
spots
00:06:21
and then asked this command and why was it in
00:06:23
simple words, what does this mean, what
00:06:26
did I do, yes, in such a command, yes, there is such a
00:06:28
stove function that reads
00:06:31
and understands what is there when there is a certain
00:06:33
function from the stove, and more precisely, there is a program
00:06:35
called stove,
00:06:36
which is also an interpreter understands the
00:06:38
contents of the clap and interprets it
00:06:41
from top to bottom from left to right and do what
00:06:43
these commands say into the commands in the stove,
00:06:46
this is of course just the source code of the function
00:06:48
and variable loops and the like,
00:06:50
which we ourselves started writing, stuffed with it,
00:06:53
unlike C, which compiles the code
00:06:55
on the stove, you just write and run there is
00:06:57
no need for an intermediate step with conversion to
00:06:59
zeros and ones, we immediately run the program
00:07:02
and what is the advantage here, why are we
00:07:04
skipping a step? this is not why most
00:07:06
modern languages ​​tend to
00:07:08
skip this step, which is a plus, well, it’s
00:07:16
intuitive, even if we have
00:07:18
written a little on the stove so far what is the advantage of the fact
00:07:20
that the cat does not compile, what do you
00:07:22
think, I can’t risk it, I just
00:07:24
scratched my head more dynamics, what do you
00:07:29
mean if there is a lot of input data, it
00:07:31
takes a lot of time every time, yes,
00:07:35
good, so you don’t have to
00:07:37
compile the program every time after the
00:07:38
new year, that’s it that's all, what's the point of
00:07:41
constantly compiling code, it's just a step that
00:07:43
needs to be done as over the
00:07:44
past weeks there have been twice as many steps
00:07:46
compared to simply running
00:07:48
the program, now it's useful to
00:07:49
see any errors and so on, but
00:07:51
it's just an extra step and one day
00:07:53
the programmer was asked The question is why
00:07:54
not start inventing languages ​​in which there
00:07:56
will not be such an overtly mechanical
00:07:58
step, in which you can simply write code
00:08:01
and run it, well, what price did you have to
00:08:03
pay, as we saw last
00:08:05
week in a specific example of speed, the
00:08:07
speed of the interpreter is slightly
00:08:08
slow, the computer understands zeros and ones
00:08:11
quickly because that the
00:08:12
Intel or any other central processor simply
00:08:14
understands what is happening with all these
00:08:16
bits, but the interpreter
00:08:18
is a program that has to read the
00:08:20
source code of the ask that you wrote and
00:08:22
convert it, so to speak,
00:08:24
guess how it would be converted
00:08:27
into zeros and ones so it has a little
00:08:29
effect in terms of performance, this is the
00:08:31
price, let’s look at this with an example.
00:08:33
Now I’ll write a program here, files,
00:08:36
go here a
00:08:38
new file, saving it again as a fleet.
00:08:41
oven we take colleagues and then write print
00:08:43
hello will allow a rating
00:08:46
and remember I can use print they
00:08:48
need a printer now below I write oven and
00:08:51
Achilles. stoves,
00:08:53
but it looks like I interpreted what I did
00:08:57
wrong, yes, we need angle brackets
00:09:01
on top at first, it’s a little annoying, but
00:09:03
you’ll quickly get used to it. If I write code on the
00:09:06
stove, I have to tell the program to the
00:09:08
php interpreter, here’s the stove code, and
00:09:11
to top it off, I have to close the brackets, but
00:09:14
not the same but with only one question mark
00:09:17
now at the bottom, if I run the program,
00:09:19
I will get the desired result. I’m angry,
00:09:21
but let’s optimize a little like we
00:09:23
did before. It’s slightly annoying that when
00:09:25
you start you have to write estrus space holo.
00:09:28
. because before I could just write in .
00:09:30
I hear the name of the program and it was convenient, it
00:09:32
saved the user time from the stove and
00:09:35
this can be done in Thai,
00:09:37
use this hieroglyph
00:09:40
here at the top which is called Yeshe
00:09:43
path bank consists of a hash and an
00:09:45
exclamation mark for everyone and this is the path to the
00:09:47
program in a typical Linux system
00:09:49
which is called environment in warm on
00:09:51
wings of and this line, in short,
00:09:54
line number one simply says she and the
00:09:56
computer find me a stove interpreter
00:09:59
in this environment, that is, find it in your
00:10:01
memory and the good thing is that if now
00:10:05
I write at the bottom of the emotions. hear hello
00:10:09
. nail files low dabka or and permission
00:10:13
is denied you will often encounter something like this in the
00:10:15
seventh problem books if permission has not already been given,
00:10:18
it turns out I need to
00:10:20
execute this command than I could change the
00:10:22
mode and plus x hello dot php
00:10:26
I need this extra step to
00:10:28
tell my computer to make a robe.
00:10:31
php executable file
00:10:33
and now look. heard. the stove
00:10:35
starts up anymore, I don’t need to
00:10:37
designate the interpreter,
00:10:39
you can make it even more beautiful by renaming
00:10:41
this
00:10:42
temporary robe. stove just hollow
00:10:44
look boldly at the top the name of the program is
00:10:46
now just hello that is, I can
00:10:48
make it look like a program
00:10:50
even though it’s PHP or in any other language
00:10:53
just a slight optimization no
00:10:55
functional difference
00:10:56
but what’s interesting is now you can write
00:10:58
programs in any language and the user
00:11:00
does not it is necessary to know which one
00:11:02
and now let's take a look at a more
00:11:05
interesting example that I sketched out
00:11:07
in advance the program is called kao lak
00:11:08
dot php
00:11:09
it is available on the net it is quite
00:11:11
short but it is a console program and
00:11:13
it will look for me stock prices
00:11:15
about very similar to what you will meet in
00:11:17
problem book number seven, let's see
00:11:19
where oh no at the very top the brackets
00:11:21
open? oven and then I have a line
00:11:24
where I request a file called
00:11:25
functions.php, we will look at this
00:11:28
in more detail, but in general this is an analogue of the lattice in the cloud,
00:11:30
everything is when you want to include
00:11:32
another php file in the code for this there are
00:11:34
arecave designs, although the
00:11:36
renclod function is also included in it he
00:11:38
wrote the functions.php file in advance before the
00:11:40
lesson, I put it in the same directory
00:11:42
because I wanted to bracket some
00:11:44
code that we can use somewhere else,
00:11:46
in general, you can probably
00:11:48
guess what’s going on here is a little
00:11:50
different from C, but what do I have in view of
00:11:53
making sure the correct use
00:11:54
translate this into a more technical language
00:11:56
under what circumstances do I terminate
00:11:58
or exit the program before when I do
00:12:03
not have two command line arguments
00:12:05
remember that one of these arguments is or the
00:12:07
program itself
00:12:08
and the second is another word that I write
00:12:10
after the prompt, that is, like and that’s it, I’m
00:12:12
checking whether the user is executing the
00:12:14
program as intended
00:12:15
and now there’s something new compared
00:12:17
to firstly there’s a dollar sign and that the
00:12:19
dollar sign means the stove is
00:12:22
just a variable and everything is just a
00:12:24
variable and these signs are followed by its
00:12:26
name, please pay attention my the stove
00:12:27
program is missing something compared
00:12:29
to and like last week that these are
00:12:32
types yes but something else you tell me something
00:12:38
related to the functions of the main function there
00:12:41
is no main function here
00:12:43
you start writing code without worrying about the
00:12:45
absolutely conditional spent calling a
00:12:47
certain standard the function main
00:12:48
arxi is just a global variable
00:12:51
that the interpreter
00:12:53
does not provide, but then the interesting thing is
00:12:55
the search itself, the dollar sign on the left, the drain
00:12:58
is my variable on the right, obviously
00:12:59
a function that in the oven is called
00:13:01
lookup search which I pass my
00:13:03
last command line argument
00:13:05
some word in a minute we’ll see
00:13:07
how it works and finally the program
00:13:09
reports the price, gives out 1 share of so-and-so and
00:13:13
remember that in the oven there is a special
00:13:15
way when you no longer need to write a
00:13:18
dollar sign with it, but you can simply
00:13:20
indicate a variable in curly brackets and the same
00:13:22
sprinter, it is not necessary for their word when
00:13:24
you place variable in double quotes
00:13:25
like here you are using a complex technique
00:13:28
called variable interpolation
00:13:30
it simply means inserting a variable
00:13:31
here change by the way who came to us with
00:13:34
experience in programming in other languages
00:13:36
remember you cannot use
00:13:38
single quotes for these purposes with a string
00:13:40
inside
00:13:41
to interpolate variables needs
00:13:42
double quotes a otherwise you
00:13:44
will literally see those same curly braces
00:13:47
and finally let's run our
00:13:48
program I'll
00:13:49
enlarge the terminal window but I
00:13:52
'll run it inside the directory anyway ok here you go
00:13:57
source 8th coat oven pequod dot php and
00:14:01
I'm also something called [ __ ] this
00:14:04
sticker stock code google so 1 share
00:14:07
already under the new name lgd.int costs
00:14:09
717 dollars today if we launch it again, can
00:14:12
anyone tell me another stock code
00:14:14
that you want to look for Maykop
00:14:18
microsoft seems like this msft
00:14:20
53 dollars and Yahoo probably has this but
00:14:25
Facebook and so what does this
00:14:28
program seem to do this function lookup
00:14:30
has some kind of magic, let's
00:14:31
see, it looks like it's not built into the stove,
00:14:34
but is taken from spunk chance. stoves, we won’t
00:14:37
go into too much detail, but pay
00:14:38
attention to this keyword in line
00:14:40
6 of the functions.php file, because I literally
00:14:43
say function, I denote the name of my
00:14:45
functions, then denote all the arguments
00:14:47
or parameters that I want this
00:14:49
function to accept, no types, and then
00:14:51
execute and and we won’t stop
00:14:54
working now to this level, we’ll
00:14:56
get to this level in a week in problem book number
00:14:58
seven, this can now be erased,
00:15:01
I also included in today’s code a version of the
00:15:04
cvut file that does not have a
00:15:06
stove extension because it is pre-designated
00:15:09
at the very top of the program called k
00:15:11
here that same so-called bank is a
00:15:13
real crypto graphical symbol
00:15:15
that says find the stoves and run
00:15:18
it in my code so we come to
00:15:21
where we left off last time only
00:15:23
with more complex examples there are questions
00:15:25
about php or what we did here no
00:15:29
good yes inside the file html is also
00:15:33
used by she bank or you can simply
00:15:35
raise a good question in the web context
00:15:39
which we will come to shortly and the so-
00:15:41
called shaman is not used at the
00:15:44
beginning of the code because web servers
00:15:46
for example apache or microsoft
00:15:48
oh oh with the Internet informations server or
00:15:50
any other web server know that when
00:15:53
they encounter a . stoves need
00:15:56
to run an interpreter for it
00:15:57
they don’t look at the first line
00:15:59
the trick the first line is only needed
00:16:01
when we write programs with the command
00:16:03
line
00:16:04
and we won’t do this often we
00:16:07
connect our examples in this way you with
00:16:09
php
00:16:10
well let’s build a bridge between the
00:16:13
world of the command line and the network as
00:16:16
follows I will now draw something here
00:16:21
we have a web server or better yet my
00:16:24
laptop I will draw it like this and here we have the Internet like
00:16:29
this and here is the server in the building this is how the
00:16:31
Internet works here there is a
00:16:34
server
00:16:35
g a lot of light bulbs what is happening
00:16:38
between with these three elements in this
00:16:41
building, a web server is just a computer
00:16:43
on which a certain operating
00:16:45
system runs, it can be free and the patch
00:16:47
that runs aldi
00:16:49
has disappeared fifty so it can be
00:16:51
imagined as the building where go
00:16:53
and seas fifty is located, this is where all
00:16:55
your profiles are stored all your
00:16:58
own servers work here, all
00:17:00
your unique url addresses are collected here, which we
00:17:02
started talking about, which you will still
00:17:04
meet with problem books number 6, but my
00:17:06
laptop is somewhere else on the
00:17:09
Internet and when I go to my url,
00:17:11
Internet traffic goes through the server the server
00:17:13
receives an http request in the form of get index
00:17:16
dot html and responds to this web page,
00:17:18
this is the general scheme and everything up until
00:17:21
today happened only within the
00:17:22
boundaries of this building and used my
00:17:25
laptop window connected to the ID disappeared fifty that
00:17:28
is, all the programs that I launched you
00:17:30
were on this very server
00:17:32
but now let's use php
00:17:34
in a different way to write real
00:17:37
programs that will be served by a
00:17:39
web server it or let me give
00:17:41
you a few I'll give you a lot of
00:17:43
examples that will illustrate this
00:17:45
idea here is a fairly clear way to
00:17:47
describe the programming scheme in
00:17:50
reality when you're done course with fifty
00:17:53
or you will work on the final
00:17:55
project or continue your studies
00:17:57
you will begin to understand that the world especially those
00:17:59
who are accustomed to such low level languages
00:18:02
as C you will understand that there are better
00:18:04
ways to write programs there are
00:18:06
certain patterns that you can
00:18:08
use special ways of organizing
00:18:10
files anti function names in short
00:18:13
speaking the world is full of all sorts of different
00:18:16
acronyms of ways of programming it's
00:18:19
just a technique that you can
00:18:21
use one of them is called m
00:18:23
visi control view model and in
00:18:26
our case it's just a more ornate
00:18:28
way of saying how you should
00:18:30
set up a website on the stove
00:18:32
that is how you organize your
00:18:34
file and build your own logic, all this
00:18:36
makes it somewhat easier to write more
00:18:38
complex websites.
00:18:39
By the way, you will encounter this in the seventh
00:18:42
problem book, and so on the mvc diagram you will see
00:18:45
that your code can be generally
00:18:47
characterized either as a cat model
00:18:49
or as a cat controller or as presentation code to
00:18:52
put it simply, the controller is the
00:18:55
brains of your program, this is where
00:18:56
all the interesting
00:18:58
logic is implemented, everything that we have written so far in the
00:19:00
class is a kind of controller code, it
00:19:03
controls your program, your loops, your
00:19:04
conditions, your functions, variables and
00:19:06
other representations become more
00:19:08
important in programming. about
00:19:11
presentation, the view is the aesthetics of your
00:19:14
site, this is what the user sees
00:19:16
in the table html, html tags and the
00:19:19
like 10 subtle aesthetics, which is
00:19:22
not difficult to write, how
00:19:24
your site is presented, its appearance, aesthetics, and the
00:19:26
model is a kind of database, what
00:19:28
we will begin to dive into the environment juice is not so
00:19:32
controller is logic representation is
00:19:34
aesthetics and model is the place where we
00:19:36
store the actual data gossips let's
00:19:39
look at everything in more detail using the following
00:19:41
example I go to my directory of
00:19:43
today's source code it is available
00:19:45
online I
00:19:46
go to version 0 and what we see is the entire
00:19:51
let's call this version 0 web -the site of the axis with
00:19:54
fifty there is not much to look at here it is a
00:19:57
very simple web page that
00:19:59
uses some ideas honor l
00:20:02
try to guess from the examples which
00:20:04
one is another possible for this bold
00:20:06
heading of this seas fifty logo
00:20:08
at the top and which ones are still before the
00:20:11
bulleted list then there are t p o l and
00:20:14
maybe tags
00:20:15
oh he’s from logan it’s not scary if you forgot
00:20:17
there are many elements from the topic that are
00:20:19
easy to find and which you will
00:20:21
often return to and we’d better
00:20:23
focus on more interesting
00:20:24
programming tasks let’s quickly
00:20:26
look at the html if I open it to
00:20:28
look source code then we will see what is
00:20:30
happening here like this y.l. inside
00:20:34
it are two volumes and then I
00:20:37
borrowed the viorel of the real course from the
00:20:39
lectures file. oven and another
00:20:43
dynamically created page in which
00:20:46
a 2 1 week lectures 0 and 1 week let's
00:20:49
look at them look at the source code,
00:20:51
too, everything is simple
00:20:52
these files lead to two pages of wiki 0 and
00:20:57
ovens and Vicodin ovens
00:20:59
because look what happens when I
00:21:01
click
00:21:02
forever 0 hp my laptop
00:21:05
requests in the spring php the babies
00:21:09
web server aka aide disappeared fifty
00:21:11
receives a virtual envelope
00:21:13
it perceives the message as getting
00:21:15
view 0.5 and then it interprets the file
00:21:18
from top to bottom left to right a file
00:21:21
called view 0 php and produces the result
00:21:24
that is inside this file wiki 0 hp
00:21:26
there must be a logical controller
00:21:28
that generates this html,
00:21:30
we'll see it soon, but for now we click
00:21:32
forever 0 that we have Wednesday and Friday and
00:21:35
the slides are loading slowly with 0 see
00:21:37
weeks
00:21:38
do maybe you remember them this is
00:21:42
what this website does
00:21:44
let's see how it does it I
00:21:46
return to the source code
00:21:48
in the ses fichte editor and open the index
00:21:50
. stoves
00:21:51
at the top of this file there are a lot of comments
00:21:53
and in the middle there seems to be no baking
00:21:55
pic code in the stove because if you don’t have a
00:21:57
tag stove with brackets and a question mark
00:21:59
about then you just write in html this
00:22:03
Porechkina because what will the php interpreter do when
00:22:06
it reads
00:22:07
this file from above down from left to right it
00:22:09
will only interpret the code
00:22:11
that it finds between these angle
00:22:13
brackets with a question mark and everything that it
00:22:15
does not recognize as an oven and it just
00:22:17
outputs and html it also outputs
00:22:20
along with other things so this file could be
00:22:22
called index dot html but I
00:22:24
I call everything. stoves at this stage
00:22:26
lectures. stoves are also the most ordinary
00:22:29
html file in the spring. stoves are also some kind of
00:22:33
html,
00:22:34
but let's imagine ourselves as real
00:22:36
engineers and think about how we can
00:22:38
optimize this, it's not very difficult, but you
00:22:41
'll have to go down to copy-paste if you
00:22:44
remember the second week, guess what
00:22:46
I'm going to do, I'm going to go
00:22:48
to the wiki file from
00:22:49
php and select and copy everything and
00:22:52
paste into a new file called VIC
00:22:54
2 points oven and correct both the
00:22:56
URL addresses and voila, based on the fact that we
00:22:58
know the axes,
00:22:59
this option should not be the best for you
00:23:01
about a copy of the paste in general rarely
00:23:03
becomes a good solution, what should we
00:23:05
do in this way correct the
00:23:08
structure of the program in the
00:23:10
eighth week of classes, the
00:23:12
decision
00:23:15
to change the font of each page or the
00:23:16
structure of the template seems all the more strange, so how did you
00:23:19
give it to us yesterday and cope with the
00:23:21
structure of the program,
00:23:26
let's see what all these files have in common
00:23:28
here is Vicodin here is Vic 0 here are
00:23:31
lectures.php here is windex for a pretty penny what,
00:23:36
roughly speaking, do all these files have in
00:23:38
common and how do they differ? Yes, they have
00:23:44
common content; the
00:23:51
lectures differ only in numbers
00:23:53
12 to well, so there is a general scheme,
00:23:58
every time I select one of the
00:24:01
lectures, almost
00:24:02
identical pages open up and I can probably
00:24:05
take advantage of the fact that we
00:24:06
prudently numbered the lectures
00:24:08
if you expand your answer the only thing
00:24:11
that actually distinguishes the files is wiki 1 and
00:24:14
let me scroll so that they are
00:24:15
approximately at the same level, look here
00:24:18
week 0 on top of week 1 week 0 weeks
00:24:23
1 week 0 in general even if you don’t know at all
00:24:28
what a program is, then you can
00:24:30
say that it’s like a game, find
00:24:31
the differences, where is the difference, and when
00:24:35
the name of the titan changes, although it’s not noticeable, it
00:24:37
changes to the same unit in the
00:24:39
h1 tag, and it’s even more difficult for us to notice
00:24:42
because the url is long you, but
00:24:44
they also change a little, at the same time,
00:24:46
I dare to assume that the contents of the page do not change at all,
00:24:50
so the html is exactly the same, at least exactly the
00:24:53
same title, almost the same, it seems like the same thing,
00:24:56
and almost everything else is unchanged
00:24:58
except for small amendments, what should we
00:25:00
do with all this, I’ll show you on the next one
00:25:02
example,
00:25:03
this version 1 here are exactly the same files
00:25:05
plus a couple of new ones
00:25:07
here Yandex. stoves and not even if you have never
00:25:10
seen them before.
00:25:12
you can guess what I'm doing and Mike
00:25:15
to solve this problem based on
00:25:19
what you see
00:25:25
endo want to try no poison
00:25:28
please I
00:25:40
speak please a little bit louder
00:25:50
okay okay and I couldn't hear you very
00:25:53
well but I think you were trying to
00:25:55
say that tags characteristic of the bottom
00:25:58
are taken out do not kill the brackets or are
00:26:01
collected in some common files from files
00:26:05
header. oven peak and footer. stoves and
00:26:09
we will correct something to deal with
00:26:11
your questions about the changing
00:26:13
numbers, if I heard you correctly,
00:26:14
this is the whole point, if we have
00:26:17
excess at the top of the page and at the bottom of the page there is
00:26:19
something to remove, let's just select and
00:26:22
cut out these pieces and put them in a separate
00:26:24
file a similar principle was used in
00:26:26
css where we also removed this from brackets,
00:26:28
placing them in a separate
00:26:30
file,
00:26:31
used a Rick Vaio design
00:26:32
similar to in cloud, all this is the same
00:26:34
as saying, take the contents of the
00:26:37
header.php file, copy and paste it here, but
00:26:40
what is the result now to Yandex. stoves
00:26:43
I have these two lines in lectures.
00:26:46
stoves I have the same two lines of this
00:26:48
century but also. stoves
00:26:49
fresh two lines and now if I want to
00:26:53
correct the names of all my pages or
00:26:55
change the basic structure then I can
00:26:57
do it in one place or rather in
00:26:59
two header and footer respectively
00:27:01
mclaren now the code starts to look
00:27:03
less clear yes but if you think about what is
00:27:05
happening here if I I request VIC
00:27:08
but also . stoves like in this picture when
00:27:12
the view is requested 0.55 what does this mean
00:27:15
literally the browser requests this file the
00:27:18
web server aka dcs fichte takes this
00:27:20
file in the spring dot php and reads it
00:27:23
from top to bottom from left to right in line 1
00:27:25
immediately encounters an open parenthesis
00:27:27
question mark php
00:27:28
rick vaio fedor. oven and go and what
00:27:32
does the oven interpreter do, which is a
00:27:33
built-in web server for your convenience,
00:27:35
it automatically goes to the header.php file and
00:27:38
copies the contents and pastes it here
00:27:40
and then the interpreter comes across ?
00:27:43
and a closed parenthesis and understands that everything
00:27:45
is done further, he blindly outputs the lines
00:27:47
from the second
00:27:48
well, and because this is pure html,
00:27:49
go to line number 8 and perform the
00:27:52
same magical actions, opens the file,
00:27:54
takes the contents and includes it, that is,
00:27:56
inserts it where you need to smoke what
00:27:58
sticks but I I mentioned bugs that need
00:28:00
adjustments, let’s go back a little if
00:28:02
you look at the header. singers, I can
00:28:05
say I took the simple route, which I
00:28:07
sacrificed for the sake of this dubious
00:28:08
improvement of the structure to the structure, yes, let’s
00:28:13
say I sacrificed an important point,
00:28:15
you noted that we had previously changed the
00:28:18
number in the title and the number in another one, I
00:28:21
decided let’s just rename
00:28:23
the page about the problem itself and leave it so,
00:28:25
without a doubt, this is a partial step back,
00:28:28
but it should be noted that on the other hand,
00:28:30
my action took the common
00:28:32
elements out of brackets, and in footer.php,
00:28:34
please note that I also got rid of, although to a
00:28:36
lesser extent, the suad of repetitions
00:28:38
of the same data, so now I
00:28:42
need to do something step forward and
00:28:43
fix all these problems with the title May
00:28:45
let's do that for 4 let's go to the
00:28:49
second version
00:28:50
in which the same files except for one
00:28:52
innovation it's a little more complex but
00:28:54
let's see if we can untangle
00:28:56
what's going on here instead of
00:28:58
asking for header.php and footer.php
00:28:59
senti looks like I'm asking for only one
00:29:02
file which is called the obvious
00:29:03
helpers.php
00:29:04
and I want to note that the helpers.php file is
00:29:07
just a set of functions I wrote to drink
00:29:10
as before, I just called it
00:29:11
helpers.php you see that in lines 3 and 10
00:29:15
I call two functions render
00:29:17
header and renderfooter, they are not out of the box, I wrote
00:29:20
them myself and placed helpers. php
00:29:23
we have already seen this syntax but
00:29:25
did not go into detail, it is obvious that
00:29:27
this is an argument to the render function Fedor as I
00:29:29
understood it one because here is the closing
00:29:32
bracket and here are the opening cats just like
00:29:35
everything everything inside the brackets is the input
00:29:37
data or function argument and what is the type of
00:29:39
this argument if look at the
00:29:41
highlighted piece and what do these
00:29:43
square brackets mean that we parsed
00:29:44
last week yes this is an array, namely an
00:29:47
associative array aka this syntax is
00:29:49
admittedly a little abstruse but it just
00:29:52
passes a key value pair the key is the
00:29:54
title in quotes and the id value is
00:29:56
now fifty if we wrote the code
00:30:00
would all look so simple ses fifty
00:30:03
in quotes
00:30:04
or in curly braces or something like that
00:30:07
in general the key would be 0 and the value would be this
00:30:10
swifty but still, although the syntax of the stove
00:30:13
seems strange, it allows you to connect
00:30:15
numbers using words
00:30:16
keys and values ​​and so what does
00:30:19
this all mean, let's go to helpers.php and
00:30:21
look at this render feeder function.
00:30:25
speech in front of or rather render xygr here is my
00:30:27
function and I know this thanks to the
00:30:30
keyword in punk tire here is everything and this is the
00:30:32
difference from theater to the function takes
00:30:35
an argument yes this I can call it
00:30:37
anything but I called it yes this is for
00:30:40
clarity try to guess especially
00:30:42
if you have programmed before in
00:30:44
high level languages ​​on you 6 what
00:30:46
does equals square brackets mean or what
00:30:49
could it mean he
00:30:51
didn't have that yes it means that if the user
00:30:56
doesn't call the render headers argument
00:30:59
I will still have the delta argument
00:31:01
but its default value there will be an
00:31:03
empty array, this is very convenient, I don’t
00:31:06
have to swear at the user or
00:31:08
say there’s an error in using the function,
00:31:10
I can just give the user
00:31:12
default values ​​if it doesn’t matter to me that they
00:31:16
sorted out my function, and this extract
00:31:18
import function allows us to pass these
00:31:20
variables to data in header.php is
00:31:22
as follows, perhaps this is the last
00:31:25
piece of unusual syntax,
00:31:27
this is a new version of my hodor. . before
00:31:30
it was just a title in brackets
00:31:31
disappeared fifty the same thing with speech alone
00:31:34
now here is something quite strange
00:31:36
let’s simplify it for a minute as follows
00:31:39
apples and here’s how I changed my name
00:31:42
but somehow these
00:31:45
constant opening brackets matches don’t look very good and
00:31:47
then the print function ends up in the
00:31:49
oven, this can be made simpler with
00:31:51
just an equal sign, which is technically a
00:31:53
function f
00:31:54
that can be used instead of prints,
00:31:56
but in reality it’s the same thing, but it looks
00:31:58
better and it’s a kind of syntactically
00:32:01
bonus, if you like, which
00:32:02
improves my cat a little, but also we
00:32:05
will see this soon we need to call this
00:32:07
terribly long function called
00:32:09
html in a hurry and since it
00:32:12
turns out there is such input data
00:32:13
that a user or users can give us
00:32:16
data that can
00:32:18
break our site but we will see this
00:32:21
next week with the java-script language
00:32:23
for now just know that the header.php file
00:32:26
just takes the title that I
00:32:28
passed in, makes sure that it is safe and
00:32:30
can be inserted into a web page and
00:32:32
gives it out as a title and h-1 so
00:32:35
if I go to this version now,
00:32:37
see the title of the lecture is displayed, the
00:32:40
title is displayed, the week number is displayed zero
00:32:42
and note the html that I am
00:32:45
developing is identical to my first
00:32:46
version except for the spaces because I started
00:32:49
formatting my code a little
00:32:50
differently but all the code that was needed is
00:32:53
ready let's stop for a minute
00:32:55
in case anyone has questions
00:32:56
regarding what I wrote well
00:33:00
then let's turn it even tighter to
00:33:03
see how we didn't take
00:33:05
anything else here to improve all hell pier.
00:33:07
there was another function called
00:33:09
renderfooter what is remarkable about
00:33:12
render header and renderfooter
00:33:14
by the way keep in mind that
00:33:17
today the function is extract and just my
00:33:19
way to pass arguments to header.php and
00:33:23
footer.php
00:33:25
then yes I just change the line with the
00:33:30
river and that is and I again went down to
00:33:32
copy-paste, of course there are not a lot of lines here, but
00:33:34
listen, if I just copy and
00:33:36
paste, changing just one single
00:33:38
word and this one word as noted and
00:33:42
here is the footer from here the header everything else is
00:33:44
identical except of course the names of the functions 40
00:33:47
what can we improve let's open
00:33:50
this version where helpers.php why do
00:33:53
n't I make it smarter here write a little
00:33:55
more complex code but call it
00:33:58
display enders that fundamentally
00:34:00
changed it now accepts an argument
00:34:03
or rather two arguments d&d as before
00:34:05
and what could the first word mean
00:34:07
judging by the fact that you see here even
00:34:10
if the syntax here is unfamiliar what
00:34:13
is a dollar sign template
00:34:16
yes and fedor or futa that is, I decided that
00:34:20
if the only thing that changes is
00:34:22
the template that I want to print and by
00:34:25
template I mean the template of the code
00:34:27
that I want to output by adding some
00:34:29
values ​​of these now if it's just a header
00:34:32
or footer why don't I generalize and
00:34:35
call the argument dollar sign
00:34:36
template
00:34:37
and this tricky syntax allows
00:34:39
me to create a variable path path
00:34:42
dollar sign by this variable what does this
00:34:44
syntax mean who knows.
00:34:50
if template header is in quotes or if
00:34:52
template future is in quotes yes then this is a
00:34:54
highlighted line line number eight
00:34:57
simply takes this is exactly an example of a header
00:34:59
and connects it to the stove point since there
00:35:01
was no such operator this operator.
00:35:04
amazing thing.
00:35:06
if you are familiar with java script or java, then you
00:35:09
can use
00:35:10
the + sign to connect, this is a complete headache and
00:35:14
I’m very sorry, but with sixth problem books you
00:35:16
will have to suffer to do this to
00:35:18
connect the lines, why because if
00:35:20
you have one line of this length and the other one
00:35:22
you have you won't be able to just
00:35:23
connect them that instead you will have
00:35:25
to do everything yes I you will have to allocate
00:35:28
memory or use an array of stacks and
00:35:30
you will have to make the array
00:35:31
large enough to hold
00:35:33
this and even a backslash zero then
00:35:35
connect them together using a stern kit
00:35:37
or manually with a for loop
00:35:39
or apply some other technique with a
00:35:41
couple of them, we introduce you in the
00:35:43
problem book number 6 and also a headache, that’s
00:35:45
what I mean when I compare
00:35:47
this and and to see pea spire
00:35:49
you get so many
00:35:51
functional things for free that you can ideally
00:35:52
focus on the most interesting
00:35:54
part of the work on the problem that you want to
00:35:57
solve is at low-level
00:35:58
Alikhanov, these are how
00:36:00
header.php and footer.php are created here
00:36:03
depending on what I call and if
00:36:05
I open the
00:36:06
index dot php pay attention to the
00:36:08
changes instead of calling rows of cores or
00:36:10
render footer whose calling render and
00:36:12
then the name of the template that I want to apply, you will
00:36:15
also see this in the seventh problem book
00:36:17
where we give you the opportunity to use the
00:36:19
same function to create many different
00:36:21
web pages, okay, instead of
00:36:24
endlessly sorting out the details of which you
00:36:25
will meet again in problem book number 7,
00:36:27
let's take a look to start solving a
00:36:30
more interesting problem tass so far
00:36:32
nothing we've done
00:36:34
has saved data, in fact the
00:36:36
only time we
00:36:37
saved anything in lecture was when we had a
00:36:40
very simple haze not too long ago where we
00:36:42
used file I/O all
00:36:44
axes in my opinion, I entered my name, the name of Hana
00:36:47
Yanamari or Andy, and then we saved
00:36:51
this csv file and cone thieves here in Vilnius,
00:36:53
this designation is separated by commas and we
00:36:55
used of a pen i seem to be f print
00:36:57
ef as far as I remember and saved the file
00:36:59
crumpled, well this is the simplest view
00:37:01
database if you are going to make a website
00:37:03
for the freshman competition program
00:37:04
where beginners can
00:37:06
register to participate in what
00:37:08
sport are you you will no doubt want
00:37:09
to operate with this data last
00:37:11
week we did not do anything with the data we
00:37:13
just confirmed you are registered
00:37:15
or maybe I also reported the
00:37:17
freshman curator has everything, but it would be great
00:37:19
if I could give them everything with a vip-file
00:37:21
tipo xl
00:37:22
and even better if I could save these
00:37:24
usernames and their data in
00:37:26
some database until I
00:37:27
want to delete them on a database that
00:37:30
allows you to query information, that is,
00:37:32
in a regular database, today and
00:37:34
next week
00:37:35
we will get acquainted with a technology
00:37:37
called a sequel to a
00:37:38
structured query language, another language
00:37:41
is essentially a programming language, but for
00:37:43
databases from today, the
00:37:45
database should be perceived as
00:37:47
more a complex version of microsoft excel or
00:37:50
google spreadsheets or apple numbers in general
00:37:53
this is a program that allows you to store a
00:37:54
lot of data in rows and columns
00:37:57
just like in excel but what’s great
00:37:59
especially if you are not an excel person is that the
00:38:02
sequel allows you to query
00:38:04
this information using lines of code
00:38:06
thanks to which you can, even if there are a
00:38:09
million rows in your database, find
00:38:11
information very quickly excel is not very
00:38:13
good when it comes to a large amount of
00:38:15
data traction, in fact, until
00:38:17
recently, the pixel allowed
00:38:19
storing only 65535 rows of data, it sounds
00:38:23
like it’s not bad, but I remember how in my
00:38:25
last year I stumbled on this
00:38:27
because I created
00:38:28
all my files for my research and I needed to
00:38:31
quickly analyze them simply
00:38:32
by opening them in Excel and of course my computer
00:38:34
froze because I had more than
00:38:37
65,000 rows, but why exactly 65535, which
00:38:41
apparently made Microsoft darker
00:38:44
effect g like with degrees,
00:38:46
yes, they use a 16-bit value
00:38:50
for the line number and 2 in the sixteenth is
00:38:52
exactly 65536 5 minus 1 because if you
00:38:56
count from zero, then this is the maximum
00:38:58
possible number and it was just
00:39:01
structural decisions
00:39:02
saving 16 bits I was allocated 60 thousand
00:39:06
lines instead of a possible 4 billion dad
00:39:09
now let's imagine this in a network
00:39:11
context what else is good in the sequel again
00:39:13
despite the fact that it is quite powerful
00:39:15
and complex but it comes down to four key
00:39:18
operations four key functions if
00:39:20
you want a choice for searching and retrieving data deletion
00:39:23
for deleting data insertion for
00:39:26
adding from the
00:39:27
database and updating if you have ever
00:39:30
used google spreadsheets and
00:39:32
ambrosia microsoft excel, you probably
00:39:34
performed all these operations yourself
00:39:36
using the keyboard and mouse, inserted
00:39:38
data with your eyes, searched for and selected data,
00:39:41
updated or deleted them, what does this
00:39:44
mean in and actions with fifty installed
00:39:46
program mo sequel is a free
00:39:48
free database very popular
00:39:50
for example facebook uses it to
00:39:52
this day along with
00:39:53
its other tools and many other
00:39:55
very popular sites
00:39:57
widely use it because it is
00:39:59
fast and free although there are
00:40:01
alternatives some of you can
00:40:03
work with them when preparing the
00:40:05
final projects, for example, a screenshot
00:40:07
in an application called oven directly
00:40:09
admin, a simple coincidence that the data from the
00:40:11
web application is also written in the
00:40:13
oven spot language, it is assumed that it
00:40:15
allows you to create a database with its
00:40:17
interface because historically
00:40:19
it has developed that the norm is that a sequel can
00:40:21
only be worked through command
00:40:23
line and it would be inconvenient and difficult to
00:40:25
type a text command to select
00:40:27
data insert data delete data
00:40:28
so someone on the Internet wrote a
00:40:30
program for the network that allows us
00:40:32
to manage the data in our database,
00:40:34
it’s like double clicking on the excel icon it
00:40:36
just launches in the version and you will
00:40:38
use it next week not in the
00:40:40
sixth problem book, but to develop the
00:40:42
so-called everything from the fiv tag fine and in
00:40:44
which there will be a database of users
00:40:46
with their names, passwords and the number of
00:40:48
dollars in their bank accounts, there should
00:40:50
be a database where the
00:40:51
symbols and the number of shares that
00:40:53
the user has bought will be stored with the virtual
00:40:55
dollars that you give them, it
00:40:57
should also allow users
00:40:59
to register on the site so that even
00:41:00
your friends can go to the site,
00:41:02
register, log in and
00:41:04
have fun trying to find errors in
00:41:06
your code and bugs on the website, they
00:41:08
will be able to register, it will simply be
00:41:10
added thanks to the code that you
00:41:11
write for your database, for
00:41:13
example, here is a screenshot of the database,
00:41:15
which can roughly turn out to be an example
00:41:17
from previous years, similar to a mini
00:41:19
excel file stored in our database.
00:41:22
May sequel she is life
00:41:25
and on the left obviously and assigned each
00:41:27
user a unique number in the second
00:41:29
column the name a username by the way is here and
00:41:31
mine she on the right they are assigned a certain
00:41:34
hash actually this is sometimes but not a simple
00:41:38
text password it is encrypted if
00:41:40
you want or hashed sometimes we also
00:41:42
let's get back to this but if you've ever
00:41:44
read an article about how
00:41:46
bank passwords or
00:41:48
website passwords are hacked then you know that this
00:41:50
happens in two ways
00:41:51
here we have a sample of six
00:41:53
users all you can now
00:41:55
find out by window or by hacking the system
00:41:58
what passwords are these six users
00:42:00
and if you have ever received a
00:42:02
warning from a company or website
00:42:05
that said sorry our
00:42:07
database has been hacked please change
00:42:08
your password what does this mean
00:42:10
but one possibility is that this company is
00:42:12
so stupid that they stored your password in
00:42:14
such a columns in unencrypted form,
00:42:16
this means that an attacker who
00:42:18
hacked the database and now knows your
00:42:20
username and password is the worst of the
00:42:22
options, and as you will see in problem book
00:42:24
number seven, it’s so easy for you to avoid there is
00:42:26
no justification for such
00:42:28
stupidity on today’s
00:42:29
Internet,
00:42:30
but we will find articles in which we will see that
00:42:32
similar ones nevertheless still
00:42:33
happen the second option perhaps
00:42:35
an attacker stole such a version of the
00:42:38
database, this is also bad because now
00:42:40
they know that I have six clients
00:42:41
know exactly 6 users knows the
00:42:44
encrypted versions or hash codes of the
00:42:45
passwords of these six users sex
00:42:48
watch any of you who worked on the
00:42:50
second for hacker's summer residents where you need to
00:42:52
crack a password or just saw
00:42:54
this task there, tell me why it's also not
00:42:58
very good if the attacker
00:43:00
got the password hash correctly,
00:43:10
the attacker can write code like
00:43:12
what you wrote for the hacker
00:43:13
problem book in which they go through all the
00:43:15
words from the dictionary or all possible
00:43:17
combinations from a to z
00:43:18
and this is what we need 9 it seems that this is a
00:43:20
lot and this is so le camp
00:43:22
second. it’s fast and in general, that
00:43:24
was the point of that problem book, to take similar
00:43:26
material and get to the bottom of its original
00:43:28
hidden values, so we’ll figure out
00:43:30
how to store data as efficiently as possible.
00:43:32
Fortunately, it turns out that in the mass of kvoll
00:43:34
there are data types and one of the most
00:43:36
interesting tasks when creating a
00:43:37
database To be honest, it's deciding how
00:43:39
best to represent the data,
00:43:41
whether phone numbers are represented as a whole big
00:43:42
whole or Lanka maybe as a
00:43:44
sequence of characters
00:43:45
and such a decision can turn out to be
00:43:47
very important there is one old funny
00:43:49
story on this topic when Mark Zuckerberg
00:43:51
created Facebook so he wrote it on the
00:43:53
Facebook singers before so far, for the most
00:43:55
part, it has been written to bake a picket, one of the
00:43:57
difficulties that they immediately
00:43:58
encountered was scaling when
00:44:00
they added a school, another school, and another,
00:44:03
as far as I know, one of the first
00:44:04
decisions was beyond the means of copying
00:44:06
and pasting some databases,
00:44:08
some codes for the gorvat to work on
00:44:10
its server, MIT on
00:44:11
its own, and that’s why some of you
00:44:14
may remember you couldn’t add
00:44:15
people from other networks as friends,
00:44:17
maybe 10 years ago you didn’t have
00:44:19
friends at MIT or
00:44:20
Harvard, well, you couldn’t cover all of these,
00:44:22
partly for this reason, serious The
00:44:24
carrot challenge for companies like
00:44:26
Facebook is processing hundreds of thousands of
00:44:28
millions of requests per second, so what
00:44:30
we're going to talk about this week has a
00:44:31
lot to do with creating good
00:44:33
software, their well-
00:44:35
known and effective tool
00:44:37
that most users can use,
00:44:38
we'll look at
00:44:40
things like indexing and search. for today
00:44:42
that's all see you on Wednesday
00:44:43
translated and voiced by vert
00:44:47
diver studio commissioned by java rush
00:44:49
[music]
00:44:52
you can add or subtract and you don’t
00:44:54
have to stick to the
00:44:56
allocated amount of memory once and for all what is it
00:44:58
called what’s going on you what is
00:45:02
he giving a lecture about you can use the
00:45:04
chalk highlight function memory,
00:45:06
why don’t they move in their hands, well, it’s
00:45:10
normal to sleep, they just hang like
00:45:13
two big sausages, that’s normal, yes, I
00:45:19
think he just accidentally mixed up
00:45:21
the deodorant with super glue

Description:

Доп. материалы и задачи к лекции - https://javarush.com/quests/lectures?quest=QUEST_HARVARD_CS50&level=8 Весь курс CS50 - https://javarush.com/quests/QUEST_HARVARD_CS50 Больше практики по программированию — https://javarush.com/user/track/a?jrm_source=youtube.com&jrm_medium=link_under_video&out=jrmain CS50, или Computer Science 50 — это курс Гарвардского университета, посвящённый основам программирования. Шестнадцатая серия цикла продолжает рассматривать язык PHP, теперь для разработки веб-приложений, а также знакомит с базами данных и MySQL. Впервые в истории студенты двух учебных заведений — Гарварда и Йеля — при помощи современных технологий параллельно проходят обучение на курсе.

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "16. CS50 на русском: Лекция #16 [Гарвард, Основы программирования, осень 2015 год]" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "16. CS50 на русском: Лекция #16 [Гарвард, Основы программирования, осень 2015 год]" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "16. CS50 на русском: Лекция #16 [Гарвард, Основы программирования, осень 2015 год]" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "16. CS50 на русском: Лекция #16 [Гарвард, Основы программирования, осень 2015 год]" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "16. CS50 на русском: Лекция #16 [Гарвард, Основы программирования, осень 2015 год]"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "16. CS50 на русском: Лекция #16 [Гарвард, Основы программирования, осень 2015 год]"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.