0:00:24
what is going on guys welcome back to
0:00:26
another session of buildbreaking fix you
0:00:29
guessed it we are back again uh as rule
0:00:32
coders me and finish today every
0:00:38
welcome back finish how you do
0:00:40
how you feeling today
0:00:43
yeah good to be back then um yeah
0:00:44
feeling really good uh pumped time to
0:00:47
get on it and uh yeah good quality
0:00:50
fantastic really good to hear
0:00:53
um so just to give a bit of a brief
0:00:56
recap what we did yesterday was um
0:01:00
as in we managed to
0:01:04
board names in the front end
0:01:08
um we were on the track um me and kartik
0:01:14
as in compare the inputted board name
0:01:18
uh to the board names in the array as in
0:01:25
without showing the users or the board
0:01:27
and board names as
0:01:29
cardiff also mentioned that it would be
0:01:32
kind of a security
0:01:34
thing if uh users can see other users
0:01:46
that is how much we did yes today but we
0:01:51
we were nearly there and we will be
0:01:54
continuing on that part and hopefully we
0:01:57
will get to working today
0:02:03
i would just do the acknowledgement of
0:02:07
and we can take it from there
0:02:09
all right here we go
0:02:19
that was my fault i've got to change
0:02:22
the screen and everything
0:02:26
how did i do it i forgot
0:02:56
this doesn't sound right
0:02:58
could you hear it or not
0:03:00
no i couldn't hear it
0:03:03
that's interesting
0:03:04
what happened to this
0:03:06
i'm pretty uh streaming back
0:03:12
that's interesting
0:03:14
we're trying to fix it
0:03:17
yes we're trying to fix their weapons to
0:03:23
ah okay right there we go
0:03:29
okay and this should be good to go now
0:03:35
your mic sounds different by the way
0:03:43
hey in what sense the sound difference
0:03:47
it's something different to when you
0:03:48
first started the stream
0:03:52
oh because i basically switched the
0:03:54
microphone and the headphones
0:03:59
instead of the max
0:04:02
so i'm just gonna give the
0:04:04
acknowledgement another try and see how
0:04:11
right that was my fault um so
0:04:15
i'll explain it after uh i'll explain
0:04:18
what happened afterwards
0:04:20
so here goes the acknowledgement of the
0:04:24
i begin today by acknowledging the
0:04:26
traditional custodians of the land on
0:04:28
which we gathered today and pay my
0:04:30
respects to the elders past present and
0:04:33
future i extend their respect to
0:04:36
aboriginal and torres strait islander
0:04:41
that is fantastic um so basically weapon
0:04:49
a background so i accidentally
0:04:52
clicked the background
0:04:54
thinking it's a video clip
0:04:56
yeah okay make sense
0:04:59
cool um so do you want to share your
0:05:06
take it from there
0:05:12
need to have a look at what you guys did
0:05:14
first i think but yeah
0:05:19
get pulled so we have actually made a
0:05:22
branch and we have also as in
0:05:26
incorporated the stack as in the cloud
0:05:30
the cloud from the cloud formation stack
0:05:34
the new aws account
0:05:49
do you want to hydrate
0:06:05
i'll share my screen in a second
0:06:28
saying you're jesse here we go
0:06:32
you just welcome good to have you
0:06:42
pretty much she must be the only fan
0:06:44
i've gone in this entire world
0:06:57
was it supposed to come
0:07:00
as in i didn't hear anything from tory
0:07:05
but i can still text him
0:07:27
say in order to get the new branch we
0:07:29
need to have a look at what it is on
0:07:33
um you should just be able to do the
0:07:38
pool and you should pull all the
0:07:46
try that already up to date
0:07:50
because i'm on the inside new notes new
0:07:58
front end isn't it
0:08:02
yes it's on the front and i'm pretty
0:08:06
unless i've actually mistaken myself um
0:08:12
yes sorry um it is then in certain notes
0:08:17
no new branch i should have created a
0:08:31
this one and finish this functionality
0:08:34
and then we can do it do the other one
0:08:39
um i'll just message tory
0:09:29
what's actually happening
0:09:32
it will probably give you
0:09:33
undefined at the moment because it's
0:10:01
it wasn't meant to come
0:10:16
okay yes see how it's coming
0:10:23
now if you go back
0:10:26
and i'll tell you um if you wanna
0:10:44
oh um no console comment
0:10:51
comment and if you want to go down to a
0:10:54
method called get bored names
0:10:59
in the definition of it
0:11:08
names if you wanna
0:11:12
board names on line 99 so board names
0:11:28
so basically we're just gonna insert all
0:11:30
the items in the board names array
0:11:34
so board names dot push
0:11:38
no no no no no no no no no no um
0:11:47
it says borden board names on 99
0:11:52
okay after board names
0:12:01
yep and then remove
0:12:08
okay okay and then yep
0:12:12
basically that's just inserting all the
0:12:19
in the board names array
0:12:22
let me just have a look at this array so
0:12:24
i get an understanding
0:12:32
all right you guys defined it outside
0:13:09
finish if you can't think out loud
0:13:13
that that will actually
0:13:15
really improve yours in kind of a deaf
0:13:19
true yeah okay uh yeah i'm just trying
0:13:23
um what you guys are doing in terms of
0:13:27
array and the function
0:13:29
okay so i'll explain
0:13:32
you there so basically what we're doing
0:13:36
is we are getting all the board names
0:13:42
endpoint which is the
0:13:50
response ex uh if the await request is
0:13:54
successful as in the
0:13:56
yeah request is um
0:13:59
why am i saying if the fetch request is
0:14:01
successful uh then it will give the
0:14:05
response as a text
0:14:20
inserting them in the board names array
0:14:25
okay yeah actually that's much clearer
0:14:27
does it make sense now yeah thanks for
0:14:29
the explanation actually
0:14:35
okay so all i want to
0:14:37
show you first step is to just check how
0:14:42
coming in in the front end
0:14:45
we have done this um now if you want to
0:14:50
and it should show
0:14:54
how the array actually comes up then you
0:15:00
do you want to do a hard refresh
0:15:12
oh positive mind shift ah
0:15:23
go back i think i must have
0:15:26
messed up somewhere online 99
0:15:34
the problem is there
0:15:38
jason part that's fine items okay go
0:15:56
for the board names on line three
0:16:00
initialize it with an empty array
0:16:19
okay and now expand that
0:16:23
um the top um the second one them t ray
0:16:28
okay here we go see all the board names
0:16:42
oh right right right have you got the
0:16:50
maybe no yeah i probably got the old one
0:16:54
try changing the endpoint i'll sanity
0:16:58
because we uh actually
0:17:09
um you send it to me right in private
0:17:13
i'm just opening my postman to get the
0:17:19
but this is this is correct anyways
0:17:23
no it's not correct so all we wanted
0:17:25
were the board name
0:17:30
that's all did you guys add a sub back
0:17:40
we're clearly being spammed again
0:17:48
yeah because these were in the the many
0:17:56
not in the new account but i'll just
0:18:00
thing hang on a minute
0:18:06
okay here we go um
0:18:09
try to stop sharing your screen and then
0:18:30
who spams us by the way is it these guys
0:18:36
i wouldn't go down that route
0:18:43
because it can't be
0:18:45
found as in who spams us
0:18:51
i'll rather use those actions
0:18:55
to implement as my skills as possible
0:19:11
yeah i think it's okay i'll just uh
0:19:13
saturate my screen again
0:19:27
oh sorry i've got to add it in
0:19:39
probably hard refresh it
0:20:03
go and pull the back end code as well
0:20:12
uh what would i need the backing code
0:20:15
um just to check if you have the
0:20:18
latest want one but
0:20:20
no shouldn't really matter
0:20:23
that you wouldn't need a backing
0:20:27
because that's deployed
0:20:34
oh hang on a minute um
0:20:37
i'm just trying to think
0:20:40
so it's scanning everything isn't
0:20:49
just going into your code for a sec
0:20:53
um i want to check something
0:20:59
so board names is that one
0:21:10
go on the away board
0:21:18
yeah that that is exactly the one
0:21:22
i'm just checking the url
0:21:30
um can you send me the url that that
0:21:34
you're using at the moment
0:21:37
because i'm pretty sure it's the url
0:21:41
causing a bit of a problem here
0:21:44
uh sure thing but i mean it's just the
0:21:46
one that you presented the private chat
0:21:51
i should have done this before
0:22:01
board right at the end
0:22:03
yep yep i've done that as well so oh
0:22:16
then probably go back to your um
0:22:19
thing your your your
0:22:36
you know where you have online 96
0:23:06
you mind if i just try it on so i'll try
0:23:09
yeah just on the url just um on the
0:23:17
seems right i will try that
0:23:38
hard refresh maybe
0:24:15
there you go okay so
0:24:18
that's basically how it's appearing
0:24:24
as in in the front and
0:24:28
in the background and we know
0:24:31
gonna show any of these to the
0:24:34
users so now that you know how it looks
0:24:39
if you go back in the code
0:24:48
you know at the start
0:24:51
the lines that i told you to comment
0:24:57
so basically what we're trying to do
0:25:01
from line 17 to 19
0:25:12
if the board name that we want to make
0:25:19
in the board named array
0:25:24
yep makes sense okay
0:25:28
trying to do that but um we weren't
0:25:31
successful until until now
0:25:36
try and do that one now
0:25:46
so it would come as undefined yeah
0:26:52
it won't show because um the second
0:26:56
console.log statement is already
0:26:59
throwing undefined
0:27:24
born board names and then
0:27:28
open and close square brackets
0:27:34
so onlines and i guess so my fault um
0:27:46
where it says born
0:27:50
born names on line 17
0:27:54
at the end of board
0:27:58
yes and then do zero
0:28:08
console.log statement on 18.
0:28:27
so it doesn't even show anymore
0:28:39
uh it says uncle improving cannot read
0:28:41
properties of undefined reading find
0:28:46
so you can't read the properties of
0:28:50
um do you want to expand the
0:28:55
where's the board names
0:29:01
oh oh wait where are the board names i
0:29:04
can't see any board names now
0:29:16
oh yeah what happened
0:29:35
from there you want to check if it does
0:29:52
there was a problem okay
0:29:54
cool that's fine um so we would need
0:29:59
names so that is happening on the
0:30:05
okay so we have an other array on
0:30:19
okay that makes sense
0:30:24
can't we just then
0:30:28
we don't want let me just have because
0:30:30
we don't really want to narrate an array
0:30:33
so what are you gonna
0:30:36
i'm just saying like yeah
0:30:44
we don't really want that nested array
0:30:46
right we want it just to be
0:30:50
is that correct like
0:30:53
we have a nested right here
0:31:05
yeah sorry is it gone actually go
0:31:08
and go back to the code
0:31:12
we might try is not store
0:31:16
an array that's already been
0:31:18
returned into another array
0:31:22
so go to get name get bored names
0:31:30
and you know basis push as in boarding
0:31:35
board names don't push
0:31:38
probably get rid of that and see what
0:31:40
happens i'm not entirely sure if it
0:31:53
get rid of the equals and the board name
0:32:06
i'm not entirely sure it would work but
0:32:19
hard hard refresh maybe
0:32:44
remove the console that's on the top in
0:32:51
then can i just have a look at something
0:32:54
yeah have a look at
0:33:01
how this comes out i mean yeah
0:33:10
that that will probably give you
0:33:13
the objects itself
0:33:18
this comes out as an array
0:33:21
so what you guys did before didn't work
0:33:24
like um so what we did was just
0:33:27
basically store the array
0:33:31
in a variable but that didn't seem to
0:33:58
probably check how to
0:34:57
well why don't we just um
0:35:06
i'm thinking why don't we
0:35:16
to just use the array though is being
0:35:22
to compare rod rather than storing it in
0:35:26
an other array again
0:35:31
does that make sense
0:35:39
so you mean to the the logic in the get
0:35:50
you know how if we
0:35:53
just console dollar json pass
0:36:01
and actually gives us
0:36:06
brazil what we want
0:36:12
make this work without storing it in a
0:36:26
if you remove the board and board names
0:36:29
equals and the brackets as well
0:36:35
and at the end as well
0:36:37
practice at the end
0:36:48
oh oh okay all right i think i
0:36:51
got kind of an idea i'm
0:37:14
put put this whole request into
0:37:36
and then right at the end
0:37:41
return board names
0:37:59
maybe you would have to store it here
0:38:01
like if you know what i mean like
0:38:08
actually no like um
0:38:10
you get what i mean like
0:38:18
basically the same thing
0:38:23
but your approach is a lot more
0:38:29
you would need both anyways oh no you
0:38:37
we could have we could keep the return
0:38:41
and then store that here exactly
0:38:44
okay yeah so if you go with your
0:38:48
that's a lot cleaner
0:38:56
let's see if this works
0:39:00
remove all the extra
0:39:04
logs we don't need at this stage
0:39:14
we still need to see this
0:39:25
try this one this should get rid of the
0:39:32
before hard refresh
0:39:37
and trying not to as in
0:39:40
any board name okay
0:39:56
and do as in board
0:40:08
in in stream because i just want to be
0:40:10
able to make sure that this is the
0:40:13
console door lock statement that we're
0:40:25
go back in the code
0:40:28
board names and then plus
0:40:35
is in the variable
0:40:41
and then do a kind of arrow here cool
0:41:02
and okay it's coming undefined isn't it
0:41:17
and do it with my approach
0:41:34
we are mixing both approaches
0:41:40
we need to do a return
0:41:46
get rid of the board names
0:41:59
try not to put the board name yeah
0:42:02
i'm just so used to it you know
0:42:04
i know he can happen as on a
0:42:07
subconscious level
0:42:08
yeah just practice practice okay so that
0:42:11
doesn't work either
0:42:13
have we done a hard refresh
0:42:16
okay so that one has to be
0:42:30
just thinking how to
0:42:56
okay the sink away get names
0:43:01
i might just take the i don't know it
0:43:03
won't really make a difference but
0:43:55
are you going to run it
0:43:57
yep i thought you had to add this one no
0:45:01
so the eyes okay yeah we try to do in
0:45:05
that way but that didn't really work for
0:45:13
go down to the answers
0:45:19
you know it's all about callbacks and
0:45:20
functions so all you need to do is
0:45:23
create a function and call it
0:45:26
when you've got your data
0:45:32
so we need a tweets function
0:45:36
ah so basically he just
0:45:43
as well in the tweet function as well
0:45:58
in the the cartel variable and just
0:46:05
is essentially just consoled on flogging
0:46:10
which we're already done
0:46:12
but we don't want to do that
0:46:17
we want to be able to compare
0:46:26
i want to use a hair
0:46:30
consider this is logical
0:46:33
request is synchronous if you want if
0:46:35
you want to write something let's go in
0:46:37
this way you should
0:46:38
very many api there it says a promise
0:46:52
go to the second one
0:47:12
search you do that as well
0:47:24
interrupt with response
0:47:59
no this is not the one i need
0:48:02
here's the most probably to make an http
0:48:14
okay how about if we um
0:48:18
if we include the logic
0:48:27
names in one function
0:48:31
let me try this same actually first
0:48:42
it feels like it's just at the tip of
0:48:45
you know like tip of my tongue you know
0:48:58
what are you trying to do now
0:49:00
i'm putting the return here instead
0:49:13
yeah you you know what i mean so we're
0:49:23
hopefully it works
0:49:39
okay how about if we um
0:49:42
include too two logics in
0:49:51
i guess yeah i guess we could do that
0:49:56
well i'm actually trying to point out
0:50:04
validate board name
0:50:07
and then include the get board
0:50:16
logic in there as well as
0:50:18
comparing the board names as well
0:50:33
what's on your mind
0:50:35
i just uh like it's
0:50:37
yeah i don't want to keep dwelling on
0:50:39
this but it definitely feels very close
0:50:43
oh we're missing something
0:50:45
don't you think like of course of course
0:50:47
just we are missing something yeah
0:51:04
are you trying to store the res object
0:51:06
from a fetch request
0:51:09
we are tory and because we've uh so the
0:51:12
res object is returning
0:51:15
as in an array and we want to be able to
0:51:20
array and then interac i mean
0:51:24
array outside the function
0:51:40
uh we can do this we can do this
0:51:42
yeah yeah board names
0:51:45
because you know we've done this plenty
0:51:50
like it's just enough maybe maybe the
0:52:01
and then return board names like this
0:52:04
instead i don't know
0:52:36
lovely all right cool this is looking
0:52:39
really promising now um
0:52:45
and go to the board
0:52:48
names and basically just
0:52:51
jason stringify it
0:52:55
um so do before the um
0:52:58
after the return do
0:53:02
dot stringify as in after the return
0:53:09
jason stringify and then in brackets um
0:53:29
sexy i like it now
0:53:35
all right well done
0:53:40
let's go on the top and do this
0:53:49
all right so we've got we're getting the
0:53:51
board names here yeah
0:53:54
um should do the comparing after right
0:54:24
just a bit of a gentle reminder that
0:54:27
trying not to you use
0:54:29
copy pasting too much
0:54:31
okay yeah i just um
0:54:35
yeah just got in the zone
0:54:54
we can get rid of this zero on
0:54:59
no longer an array within an array
0:55:04
try now basically and see what happens
0:55:09
and now we need to
0:55:11
give the board name
0:55:23
board name start fine it's not a
0:55:27
porn i'm still fine
0:55:44
what names to find
0:55:50
i don't think we can use
0:55:52
find here on board names anymore
0:55:56
because board names
0:55:59
is basically not an array anymore
0:56:03
it's just a response
0:56:08
it's it's still an array
0:56:17
saying that um born names define which
0:56:24
because fine can only be used in an
0:56:28
i think so as far as i can remember
0:56:36
let me um i might be wrong here but
0:56:57
yeah tori says find us an array
0:57:00
iterator that is correct
0:57:10
wrong there that is not really a
0:57:13
so it's a response but in the array
0:57:17
a function of current value index
0:57:20
are we using it correctly
0:57:23
uh that's what i'm checking because it
0:57:25
does say a rate of find
0:57:29
find returns the first
0:57:33
fine method returns the value of the
0:57:36
first element that passes a test
0:57:46
execute a function for array element
0:57:50
the method if no elements are found
0:58:08
are we because it's coming as a
0:58:11
js as in it's called objects
0:58:20
oh but have a look at this thing
0:58:31
what it's doing is
0:58:34
use our function and destructing okay
0:58:41
yeah that's exactly what we have
0:58:43
so basically we need to give it the key
0:58:46
that we want to locate and if that if
0:58:50
any of the keys matches
0:58:54
okay yeah we can try and um
0:59:08
this would be the board name
0:59:22
norm in round brackets
0:59:31
page it also says to include the
0:59:37
catch that okay cool
0:59:44
um right before you
0:59:50
go to the front end and check how
0:59:53
as in uh because the keys are
0:59:58
and if we have any lower case or
1:00:02
uppercase incorrect then it won't work
1:00:09
so what did you want me to check so
1:00:12
if you if you go to front end
1:00:20
showing us right as in um
1:00:28
print out the array
1:00:35
okay so it says board
1:00:37
name with an uppercase
1:00:43
so we need to use that
1:00:45
okay yeah make sense
1:00:58
right try this one now
1:01:12
inside the curly bracelet
1:01:22
okay all right let's see this so
1:01:28
undefined if it doesn't work if it works
1:01:34
because if it can't find the board name
1:01:44
do undefined but if it does
1:01:46
find it then it should give you the
1:01:54
name don't find it's not a function
1:01:59
done a hard refresh
1:02:03
think so i'll try again
1:02:09
we'll just uh just do anything first
1:02:13
putting himself in a function
1:02:33
type off and then in brackets board
1:02:45
i just wanna check first first type of
1:03:12
yeah that makes sense
1:03:16
save that's a string
1:03:29
oh because the string advice right
1:03:45
let's come back to it
1:03:49
it feels very very close like maybe
1:03:53
it's just something to convert it from
1:03:56
straight central rail
1:04:00
would be a bit for um converting
1:04:04
i think uh we're strictifying that
1:04:14
uh because it's coming up as object
1:04:19
so stringify allows us to
1:04:26
instead of pass with this stringify
1:04:41
i think curry means we can do
1:04:43
we can do pass here
1:04:45
so what i think maybe that's what he
1:05:00
how about if you do
1:05:04
items only on that line
1:05:12
uh item and then in the return
1:05:15
you can do passing
1:05:25
so what do you mean
1:05:28
pause the board names here properly
1:05:31
and see if this works
1:05:34
see the problem roll i said one line
1:05:39
where did we mess up
1:05:44
sorry saying line 101.
1:05:54
so instead of a text we need
1:06:06
and then keep this as it is i assume
1:06:13
no none of this yeah
1:06:19
yeah yeah that's fine
1:06:38
to the code i need to
1:06:40
look at the code again oh um we
1:06:44
because we are already game
1:06:47
the response in json
1:06:50
we don't need to pass it on
1:06:54
i think that might be the problem
1:07:06
tourists said as well
1:07:25
okay we need to your stringify now
1:07:35
yeah because it's not it's not coming up
1:07:39
what what is true right that's
1:07:43
and why have we got
1:07:53
what do you suggest sorry by the way
1:07:59
return that reason
1:08:01
that's what we did and it's giving us
1:08:08
wanna scream return that
1:08:22
okay yeah um i'm thinking that's
1:08:43
because they're already
1:08:56
you're not returned
1:09:12
when we started this stream
1:09:37
are you still yeah we're still getting
1:09:43
i'm sure there's an easy conversion like
1:09:45
string to array or something we could
1:09:48
have just kept it you know what i mean
1:09:53
or we could use the split method for
1:09:57
he's saying now go to the function and
1:10:00
remove string if i
1:10:03
will not even even string you
1:10:25
like we could use the split function oh
1:10:27
okay you're doing that this was the
1:10:40
but now everything um
1:10:42
but now it's coming as undefined
1:10:52
board name it's got
1:10:58
i'm just i just followed what that
1:11:06
i'll show you right
1:11:21
zoom in a bit because i can't see
1:11:36
we need to do a triple equals probably
1:11:42
but maybe we just i don't know
1:11:44
um i reckon we keep the stringify
1:12:05
your problem is that it's a promise
1:12:09
it's not good practice to the stringify
1:12:11
i don't know no i don't think it is too
1:12:29
i haven't even had my dinner yet
1:12:47
cool sorry if you can do that that'd be
1:12:51
fabulous but um the whole
1:12:55
basis of this is to
1:13:02
name that we will we want to have is
1:13:04
already present in that array or not
1:13:14
if you're using find
1:13:21
if you're using find then if the board
1:13:25
name is present it would actually write
1:13:28
the borden name out to us but if it's
1:13:32
not present then it should give
1:13:41
on that as well now
1:13:44
or stream what's that data type of their
1:13:50
i think it's a string
1:13:53
oh um after you have changed it i'm
1:13:58
or object i would say
1:14:09
right guys um do you wanna
1:14:13
oh yeah i was thinking saying like you
1:14:15
know we'll see we could
1:14:16
i was thinking maybe a way we could fix
1:14:20
jason dot string if i know maybe i don't
1:14:22
know maybe that's a better way and then
1:14:24
just do dot split like um
1:14:31
you know just split the objects and make
1:14:32
it an array like the dot split function
1:14:36
yes so you're basically
1:14:39
essentially saying it to
1:14:46
destructing it and then making it
1:14:52
yeah that would probably be the
1:14:57
that we know because that's too much
1:15:02
i don't want to go
1:15:07
that road but i'm pretty sure that there
1:15:17
it will be just basically a tiny one
1:15:34
perfect guys um so
1:15:37
do you want to do the
1:15:39
closing off nash yep sounds good uh
1:15:42
thanks for joining us everyone on
1:15:44
another episode of bill breaking fakes
1:15:49
were working on trying to get the board
1:15:52
the back end and then
1:15:57
just to get the board names and then you
1:15:59
know from there work on the logic
1:16:03
what we did what we did get working is
1:16:05
the actual retrieving of it but um where
1:16:09
where we need to work on is um
1:16:14
actually storing that in an array and
1:16:16
you know having that you know functional
1:16:18
array rather than appear in a string so
1:16:21
yeah that's where we'll be coming back
1:16:23
in the in the next episode
1:16:26
um so yeah thank you for joining
1:16:28
everyone we'll see you
1:16:31
tomorrow same time
1:16:39
all right perfect guys
1:16:44
we'll see you then
1:16:46
bye for now see you guys