0:00:24
what is going on guys welcome back to
0:00:26
another session of buildbreaking
0:00:30
yours amazing raw coders and today we
0:00:34
have flash how we finish finish
0:00:37
hey thanks for the introduction
0:00:39
yeah feeling good as always
0:00:45
yeah i love you background by the way
0:00:49
you're softly dreamed up now
0:00:56
all right and here we have the geezers
0:00:59
i get them welcome good to have you as
0:01:07
do the acknowledgement uh first and
0:01:10
foremost and then we can get cracking
0:01:15
i begin today by acknowledging the
0:01:17
traditional custodians of the land on
0:01:19
which we gather today and pay my
0:01:22
respects to the elders past present and
0:01:24
future i extend their respect to
0:01:27
aboriginal and torres strait islander
0:01:32
fantastic so that was smoothly done uh
0:01:38
will be uh updating in the near future
0:01:42
um didn't really get a chance to do that
0:01:50
how's your day been finished
0:01:53
yeah pretty good zen what slides is he
0:01:55
talking about just wondering
0:02:00
he he proposed a really good idea as in
0:02:04
include the aboriginals in uh
0:02:08
aboriginals or bali as well
0:02:15
the stream goes um
0:02:20
aboriginals of that
0:02:23
then we all pay respects to
0:02:29
so that's where he was coming from
0:02:33
nice okay that makes
0:02:37
i'll just close this because that will
0:02:40
reduce a bit for background noise
0:02:43
all right hey tory good to have you mate
0:02:58
so what we did today
0:03:09
but when the user enters the passcode
0:03:13
but um at that moment it was only for
0:03:17
the sake of the ui so the functionality
0:03:21
wasn't implemented but now uh i guess
0:03:27
me and tori were going
0:03:29
through implementing the functionality
0:03:32
so it actually compares the passcode
0:03:37
whenever a user presses save
0:03:44
we wanted to do it is because we only
0:03:48
want to allow admin to
0:03:51
save nor all the users that have access
0:04:02
does that make sense
0:04:04
uh briefly but yeah it's all right like
0:04:07
once we get into it um i think um yeah
0:04:14
yeah so i'll probably give you an
0:04:16
example say i've created a board
0:04:22
i've entered my password while actually
0:04:25
creating it all right and then i give
0:04:28
you you the url to access it and we both
0:04:32
get connected to websocket
0:04:36
and say you want to save the board as a
0:04:51
obviously ask you for the passcode
0:04:54
but you wouldn't know the passcode
0:05:00
yes make sense i haven't shared the
0:05:02
passcode that i've created so if you
0:05:06
want to save the board um
0:05:09
then what's gonna happen is that
0:05:13
be able to even though if you try to
0:05:17
enter random passcodes
0:05:20
it won't work because it would
0:05:24
verify the passcode and just return
0:05:27
false and it won't allow you huge sample
0:05:30
because i know the passcode and if i
0:05:34
want to save it i'll enter the passcode
0:05:36
it will return true and i will be able
0:05:40
yeah yeah that makes sense um
0:05:42
that's that's what we've been working on
0:05:45
yeah all the while right
0:05:53
why not just allow all users to change
0:05:56
board like scrum letters but oh so
0:06:00
i should probably rephrase
0:06:03
then get that uh i think what you mean
0:06:06
it just on this on the screen so
0:06:09
by adding everyone would be able to add
0:06:15
uh everything which would be fantastic
0:06:18
but it will the passcode will only apply
0:06:22
if you want to save to the database
0:06:27
if that makes sense
0:06:28
and he will go have a go
0:06:39
without a password
0:06:46
it may be stupid from this one you
0:06:49
choose which user's perspective but if
0:06:51
you see who's gonna handle the cost of
0:06:56
the uh that they attended
0:06:59
dynamo db he will be really impressed
0:07:04
idea that yeah i don't want to let
0:07:07
everyone just say it will cost me
0:07:13
yeah true true cost um
0:07:16
a bit too expensive i guess to get
0:07:18
everyone to save yeah um
0:07:21
because every right would cost
0:07:26
let's remove that feature why
0:07:30
why would we want to remove that feature
0:07:36
it's been sarcastic
0:07:42
free execution seconds
0:07:50
when you say 400k does that mean the
0:07:55
or four hundred thousand free
0:08:03
is free up to 25 pre-provision rights
0:08:06
because if you know that's not going to
0:08:38
it has been a while not gonna lie
0:08:43
yes um so we can allow everyone
0:08:48
allow everyone to just say but then you
0:08:52
you would have to be a subscription
0:08:54
based model where the admin pays a
0:08:58
monthly sub and then we just
0:09:02
give him everything yeah go nuts
0:09:04
but at the moment because um
0:09:09
it's all on raw coders personal account
0:09:16
and we are not all rich at all so we
0:09:21
these these kind of boundaries for
0:09:28
it's insane's credit card
0:09:31
tell me about that they're calling me
0:09:34
pretty much every day now
0:09:39
like you said there's a free tear and
0:09:44
we're gonna go faster
0:09:49
of course we will go faster definitely
0:09:55
anyway um let's get into um some action
0:10:00
show you how far we have been up to if i
0:10:05
shame my screen still
0:10:09
i was having that issue the other day as
0:10:14
yeah i can't seem to share my screen
0:10:17
the browser can't access your screen
0:10:21
you might be due to the
0:10:29
uh skill t thing that we
0:10:35
security and privacy
0:11:00
okay i might need to go
0:11:04
out and then come back in because it's
0:11:06
asking me to quit and reopen all right
0:11:09
truly cool i'll be back
0:12:08
and if this is full code is
0:12:10
no limits and api gateway could have it
0:12:26
try and share my screen now and
0:12:28
hopefully it works
0:12:33
yay it works it's working nice cool
0:12:44
were on a backhand
0:12:46
refactoring some code with tory
0:12:48
i'll just open that one
0:12:52
you got more functionality
0:13:09
yeah it was gonna get more functionality
0:13:13
what we basically planned
0:13:18
we wanted to make this function a global
0:13:24
wherever we need to use this we can just
0:13:26
call the function instead
0:13:33
make sense does that make sense
0:13:36
cool so for example we need a hair so
0:13:44
can't stress our boy
0:13:55
yes and don't worry about it
0:13:58
okay so when pressing save
0:14:02
which would be on the
0:14:07
post and patch notes
0:14:17
yeah what we want to do
0:14:22
yeah yeah i get the idea now yeah
0:14:27
create a note for a specific board now
0:15:13
so basically what's gonna happen
0:15:19
actually let's start with the first one
0:15:26
when we press save
0:15:29
can you possibly have a look at the
0:15:31
front end as in when we press a which
0:15:35
method with what um endpoint is being
0:16:17
oh i forgot to play
0:16:27
all right i guess it's my turn today to
0:16:29
play it and then choose a letter
0:16:38
do you want to do the count for me
0:17:44
did you manage to find out
0:17:49
still having a little i think
0:17:54
this is the one that um
0:17:57
that tori and i worked on right the
0:18:53
that would be post patch notes unsafe
0:19:21
for which end point is according
0:19:27
we don't even need
0:19:34
just do a check here
0:19:39
here basically play as in add a function
0:20:01
verified and the result is true
0:20:04
then called this function otherwise
0:20:10
tell the user we can't help him
0:20:23
we need to call um
0:20:50
now there you go so we need something
0:21:15
yeah this one you get the results for us
0:21:32
i think um yeah tori was saying the
0:21:37
to handle it in the back end makes
0:21:40
it's probably more secure
0:21:43
yes um that's exactly what we're doing
0:21:46
here we are handling in the back end
0:21:55
we are handling it
0:22:05
we want to call this method
0:22:23
we probably want to call this method
0:22:24
from the front end and if this results
0:22:32
we go on that other one
0:22:43
actually what we can do is put this
0:22:46
method into postpants save
0:23:05
okay i got this i bought this
0:23:11
see should you know how we call in
0:23:20
here wanna click off the button
0:23:30
and if that's calling that
0:23:45
because this is calling the
0:23:53
do you have to know the new code
0:24:03
tori and i worked on on monday
0:24:08
on which branch was that
0:24:12
prompt pin code unsafe
0:24:15
no i wouldn't have that this is
0:24:24
did i don't know if um tori informed you
0:24:27
on monday yesterday or not but
0:24:30
basically we were thinking that um
0:24:33
instead of having this functionality
0:24:37
where we are doing inserted and not
0:24:40
we would just send all the notes
0:24:43
every time the user click save
0:24:47
so basically it would be
0:24:53
if you told me about that as in rather
0:25:03
the notes and and send them all in one
0:25:09
he told me about that
0:25:12
so here he brought up like the
0:25:15
the code for it already um so that's the
0:25:18
one that's on the new branch
0:25:22
oh okay cool so in that case
0:25:52
i wasn't expecting this
0:26:33
yeah it's too hard
0:26:44
because i've done this change
0:27:04
disregard this as well probably
0:27:07
you might not work but
0:27:22
okay so which was the code
0:27:25
populate board notes map is there
0:27:31
a prompt pin code unsafe i'll just put
0:27:36
oh no um the code not the branch
0:27:42
uh the code is in pause patch not
0:27:55
yeah it's just this one
0:27:58
no it's right there
0:28:02
so here basically what we're doing is
0:28:49
no because the back end is not it's not
0:28:53
yeah i was gonna say that
0:29:00
wow so okay now we're doing refactoring
0:29:09
this is the only concern i've gone now
0:29:12
is a this might delay the project
0:29:26
so that would mean that we would have to
0:29:30
how notice semi at the moment the entire
0:29:33
functionality in the back end
0:29:43
am i right we have to refactor a little
0:29:45
bit yeah i guess so yeah yeah that's
0:30:05
nothing needs to be done it's perfect
0:30:08
yeah let's go live in three two one we
0:30:20
in this in the speed of 500
0:30:31
this is fetching the url board id and
0:30:39
what id in the note
0:30:51
so we would have to
0:30:54
a separate request
0:31:06
create another specific board we can
0:31:08
just alter this one
0:31:20
yeah and then note
0:31:27
function that already exists
0:31:39
board is here and then this is the input
0:31:44
yeah you can just alter this
0:32:02
yeah yeah we can we can and then just
0:32:06
like for it to accept um
0:32:10
the other other stuff that we're giving
0:32:13
advising it the passcode and the board
0:32:22
is in is annoying the parent then this
0:32:27
then we need this one
0:32:30
and what whether the params
0:32:37
passcode and board name isn't it
0:32:40
we wouldn't really need
0:32:46
just a password isn't it
0:32:54
in order to save we have to make sure
0:32:57
that the passcode is valid
0:33:02
and in order to save the board we need
0:33:05
to make sure that we have the board id
0:33:07
which would come from the
0:33:12
as in from the params
0:33:18
i'm just trying to think because we
0:33:22
might need the board name
0:33:29
i mean it doesn't hurt right to add the
0:33:32
board name anyways
0:33:39
if you add it as another
0:33:46
let's just add that
0:33:50
this one okay we would have to do that
0:34:18
object how is the params being passed
0:34:25
pass code spell test
0:34:33
capital p and then
0:34:40
this comes from the
0:34:42
params board name passcode okay we have
0:34:46
so now what we want to do is no data
0:35:12
let me check how is the
0:35:17
the board actually coming uh how is the
0:35:20
notes actually coming from this
0:35:28
notes uh where's this
0:35:32
this one is here okay
0:35:34
get bored no it's alright again it's i
0:35:46
because then we can just simply
0:35:50
properties of that ray
0:35:56
no not the properties of the already um
0:36:00
actual indexes where the
0:36:03
where the notes are
0:36:50
all right cool so if we
0:36:58
i'm going to show you that
0:37:32
now we want to do we need to we want to
0:37:59
so how is this being done
0:38:02
is you know why i place
0:38:06
consortium log over there
0:38:11
it was because i wanted to check which
0:38:14
um as in the array
0:38:24
tell it that the data in the back end
0:38:28
data is contained in that part
0:38:43
see this is one note this is the second
0:38:45
note this is the third fourth
0:38:49
okay so these are all the notes
0:38:52
and this is the array
0:38:55
oh okay so we can basically just send
0:38:58
the entire array that's all
0:39:01
yeah yeah that's what i'm
0:39:03
thinking as well um
0:39:12
so in here basically
0:39:15
what we're gonna do is
0:39:21
no data we won't probably need this
0:39:27
and this one for now is no valid so
0:39:31
we're not even checking if
0:39:39
then now this means that we need to do
0:39:43
all of this for all the notes in one go
0:39:55
do you know what me
0:39:59
just give me a sec to think about it um
0:40:09
sorry is kind of my habit now to them
0:40:12
think out loud oh okay fair enough that
0:40:14
means that yeah i'm thinking while i'm
0:40:17
talking as well or i'm talking while i'm
0:40:22
jeff feel free to ignore me but i'm just
0:40:27
out loud that's all yeah we'll go do it
0:40:32
from what i can see basically is because
0:40:36
this until now was being done
0:40:42
which means the individual notes
0:40:46
go and check whether the
0:40:53
and i'm i mean the data and then check
0:40:56
if it's a valid note so it's doing all
0:41:03
but now that we have got
0:41:10
we are getting all the
0:41:12
all the notes in one go
0:41:15
we would basically have to go through
0:41:25
is that making sense
0:41:27
or yeah yeah yeah yeah i understand
0:41:31
because that that only handles one one
0:41:34
note right and now we have the list so
0:41:36
we have to handle the whole list at one
0:41:38
goal yes yes precisely
0:41:44
will be a fun ride
0:41:51
well i'm thinking that
0:41:53
this whole code has to be reflected
0:41:58
well not refactored but
0:42:00
changed to incorporate
0:42:09
um i was just thinking could we use the
0:42:14
sort of like a map or something you know
0:42:19
or just you know a 4e 4h is maybe
0:42:23
maybe not ideal but maybe a map or
0:42:25
something like that to
0:42:27
just go through the notes
0:42:34
it's easier said than done to be honest
0:42:41
as in that's basically exactly what
0:42:43
we're going to do as you use a map which
0:42:55
but i'm just as in kind of thinking in
0:43:02
gonna do it in one go
0:43:10
so say for example
0:43:19
i'll just write some pseudo code
0:43:25
um by the way feel free to interrupt
0:43:29
me of course something just say because
0:43:35
out loud all the time
0:43:37
yeah very not all good um
0:43:49
that was gonna happen
0:43:52
is we will be going through
0:44:21
we will basically do something along
0:44:32
so we don't have to do anything with the
0:44:35
board id that is fine
0:44:40
we need to start from here so if
0:44:59
so we're checking if the
0:45:04
oh no no no no no no no
0:45:07
so in this if we do it in this way then
0:45:10
that would mean that we won't be able to
0:45:13
validate each node's
0:45:28
where's the data text oh okay we can
0:45:30
basically do that so we will basically
0:45:33
do that we would access data and text
0:45:37
so we would do data
0:45:56
this is my kind of coding as
0:46:09
so data okay so first of all we would
0:46:13
have to make sure that um
0:46:21
so in that way we can possibly do as in
0:46:38
so you're gonna say something finished
0:46:45
i was just thinking like um
0:46:48
so since we have all this this code
0:46:53
basically can't we like use the map
0:47:06
when it's going through each of the
0:47:08
notes have it treated as no data and
0:47:10
then it can we can essentially use this
0:47:14
without changing anything
0:47:19
i get what you say like yeah i get what
0:47:21
you're trying to do here but what if we
0:47:25
essentially the same thing but we just
0:47:29
like name the variable
0:47:31
node data and then it would use this
0:47:33
existing code already right
0:47:36
so basically what you're
0:47:39
trying to say is that we can just
0:47:44
basically do a map and then
0:47:48
do a map based on each note and then
0:47:53
when it comes to doing certain things
0:47:57
we just point it to all this code in
0:48:01
kind of a function or something like
0:48:03
yeah is that interesting exactly yeah
0:48:11
i don't know if this worked yet but you
0:48:14
you would have the
0:48:17
like kind of what you're doing right now
0:48:24
instead of x it would be like no data
0:48:28
um open bracket and then
0:48:30
the close bracket at the end of the at
0:48:33
the end of everything that we've done
0:48:37
um the only thing with that is that
0:48:42
there are multiple data there
0:48:49
yeah yeah i understand
0:48:51
yeah that by what i mean it's like
0:48:54
because that right now can handle a
0:48:58
that code that we hit the backend called
0:49:02
basically what if we had like the
0:49:06
because it can handle a single note
0:49:08
can't we just like
0:49:10
uh make it so that uh
0:49:13
when if you're using the map then it
0:49:17
basically is trading each each of the
0:49:21
the notes separately you know what i
0:49:27
yeah i know exactly what you're talking
0:49:33
how we can do that um
0:49:47
basically what you mean
0:49:59
that entire thing into
0:50:03
and then just basically
0:50:10
we can call the function
0:50:14
yeah yeah or just make it a callback as
0:50:16
well i either one i think would be okay
0:50:20
like a arrow function i mean or call
0:50:22
back i don't know what's it called but
0:50:26
okay um so this would be
0:50:30
so we already have the array coming
0:50:37
uh we didn't get the notes
0:50:40
i just wanna check something
0:50:45
we didn't get the notes interesting
0:50:49
so how is the notes coming
0:50:58
create a new function for that as well
0:51:00
i'll say like because
0:51:05
like just looking at the
0:51:08
the front end you know we might need to
0:51:10
use that function again some other time
0:51:13
if we create a new one specifically for
0:51:16
not maybe that's a better
0:51:19
way to go about it not sure
0:51:29
going step by step but you're looking at
0:51:33
the future picture as well just bear
0:51:40
what we mean to say
0:52:01
then we will just call the function on
0:52:07
yeah yeah that's essentially what was
0:52:10
what wasn't gonna do but yeah
0:52:15
you picked up on thinking i'll be loud
0:52:22
um so if we forget this
0:52:28
i don't really wanna
0:52:39
but they also the other thing i was
0:52:41
going to say then is um
0:52:43
in the front end code right there's
0:52:46
we're using that um that other function
0:52:55
i don't know if you're using it exactly
0:52:57
but yeah it's definitely
0:53:00
referencing we might reference that
0:53:02
that particular backend function so i
0:53:07
in this code why not if we
0:53:12
specifically from taking in notes and
0:53:14
then keep this existing
0:53:16
functionality as it is as well so
0:53:20
um we can do it later but i'm just
0:53:24
if we do that as well because um you
0:53:26
know we might want to save a single note
0:53:31
in the future and then we could just use
0:53:34
this function instead of
0:53:37
yeah you get what i mean
0:53:40
yes i understand completely what you
0:53:43
mean it and that's exactly what i was
0:53:46
oh okay okay yeah yes yeah okay okay
0:53:50
but it's really good to see how you also
0:53:54
actually try to think out loud as well
0:54:26
okay and then we can do one with
0:55:09
we are basically degressed from our
0:55:20
we'll come back to this
0:55:48
and then we don't need this one at the
0:55:51
moment don't need this one
0:56:03
10 steps back what's that
0:56:09
the key is they has
0:56:14
stab which establishes
0:56:16
forward because all of our progress
0:56:34
leave this as it is
0:56:37
and then we can just
0:56:48
guess report okay cool
0:56:51
say here we go we have gold this to work
0:57:09
save all notes okay cool now what we
0:57:13
need to do is basically we're gonna call
0:57:44
i'm gonna have to amend this
0:57:47
whole function meditating
0:57:49
onto the melody now
0:58:03
so if basically it would be
0:58:09
step one step step yeah
0:58:13
okay so cool save one note okay cool so
0:58:19
the board ids there
0:58:22
and we probably have to pass all these
0:58:27
actually not the board id but
0:58:33
do we need to pass the board id
0:58:42
oh that's a good question
0:58:55
so we'll need to pass the board id board
0:58:58
name and the passcode in that function
0:59:01
we probably don't need the passcode
0:59:04
or do are we saving the
0:59:07
no we're not saving the past good we
0:59:11
just have to as in
0:59:15
the passcode before calling this
0:59:22
does that make sense
0:59:24
yeah yeah that makes sense
0:59:28
we need the board name as well
0:59:44
save one more city but never used okay
0:59:47
fine i'll use you here
0:59:50
to get rid of the squiggly lines
1:00:16
declare it at the top
1:00:34
oh wow the time it's gone
1:00:40
i'd actually carry on but of course some
1:00:42
other things i need to get done as well
1:00:59
what did we learn today to have fun um
1:01:04
too many things to remember
1:01:18
top three i'll just go with the top one
1:01:22
think uh thinking out loud
1:01:27
i'll give another one
1:01:31
yeah just i guess the the idea of
1:01:35
uh to a function so
1:01:37
mapping the radio function i think we've
1:01:39
done that before but you know it's good
1:01:41
to good to recap anyways
1:01:44
fantastic that was pretty good
1:01:48
do you want to do the honors
1:01:51
uh yeah sure thing so
1:01:53
in today's episode
1:01:58
basically we want to save
1:02:03
to the back end uh
1:02:05
tori and i got started on that uh by
1:02:08
in the front end the other day and now
1:02:11
we're just working on the back end code
1:02:14
i think yeah pretty close overall we're
1:02:16
just gonna add the map
1:02:18
function to um to save all the nodes at
1:02:21
once which yeah which should do the
1:02:24
i think they'll be done and we'll be
1:02:27
on our way to launching so
1:02:31
um on the way to launching by internal
1:02:35
internal testing class yes of course
1:02:41
yeah thanks for joining us everyone and
1:02:45
yeah we'll catch you next time fantastic
1:02:56
actually it was the same task isn't it
1:03:02
all right guys have a good night and
1:03:04
thanks for joining