0:00:26
what is going on guys welcome back to
0:00:28
another session of build break and fix
0:00:32
yours truly the raw coders yeah you
0:00:39
dinesh is back as well as
0:00:49
just um so this is our
0:00:54
and it's all because of you all as in
0:00:58
thank you very much for your support
0:01:01
once again it's been really helpful and
0:01:05
uh please continue to support us
0:01:09
we are on the way of our second muscle
0:01:12
which is the second century yes you
0:01:15
guessed it 200 episode
0:01:17
and the mission starts which will be fun
0:01:23
just to give a bit of a recap
0:01:27
on the last episode we had uh our
0:01:32
guest matthew coles
0:01:36
works as a principal uh technical
0:01:38
account account manager at aws really
0:01:47
good chat which was fun
0:01:53
talking about the technical bits now so
0:01:58
just to read it what we
0:02:02
what we are working on so it's and
0:02:06
so we are create um
0:02:09
not creating but enhancing and existing
0:02:14
kanban online kanban board
0:02:23
we are basically just uh introducing
0:02:26
persistent storage in that so that
0:02:30
taking in into corporation then dynamodb
0:02:36
and also moving the entire web app
0:02:44
reduce the cost as much as possible and
0:02:47
increase the efficiency as well and um
0:02:52
yeah in the pre uh in the episode
0:02:56
previous to the last one our task was
0:03:04
from the database uh to
0:03:09
index.html which is the board
0:03:14
and we managed to get
0:03:18
gay working in the console but um
0:03:23
we were kind of stuck on to as in
0:03:28
name pair as a value on the board
0:03:35
donation do you want to add on to that
0:03:42
yeah that's where we were at and then
0:03:45
something i wanted to share zayn is um i
0:03:49
yeah i used i was just working on it a
0:03:51
little bit before and i found that uh
0:03:54
you know how we can display the board
0:03:56
name so i'd like to um i think we can
0:04:00
that's phenomenal job man i think that
0:04:06
made my day as in sensational sunday i
0:04:13
yeah um would be really curious to
0:04:17
how did you manage to do it and um with
0:04:21
that said we can dive into
0:04:24
code um do you want to change your
0:04:36
good to have you yeah jesus we are on it
0:04:40
we are the geezer gang yeah
0:04:46
all right here we go
0:04:51
yeah this is what you guys added last
0:05:00
um so what i did was i
0:05:03
ideally we should you know add this into
0:05:05
our stool front end or another
0:05:10
added this async function and then added
0:05:13
the await here so basically this will
0:05:15
allow us to return the promise that we
0:05:18
were returning the promise but this one
0:05:20
it returns the um the treatment as the
0:05:30
don't oh we we need this to run the
0:05:36
i don't need this either
0:05:41
yeah so i'll just show you
0:06:10
yeah do you see that
0:06:17
yeah that's phenomenal
0:06:22
good job yeah for that one
0:06:35
made it look really easy bam bam bam
0:06:37
boom done simple move on
0:06:42
i think yeah i think we were over
0:06:43
complicating it a little bit before
0:06:49
yeah because i i was actually working on
0:06:54
and um i got the results and uh
0:06:57
everything but for me i don't um
0:07:00
what i was actually doing was you know
0:07:03
how you have inserted the essence
0:07:09
index.h demo file itself
0:07:14
i particularly didn't really want to do
0:07:17
so i know this was an approach that we
0:07:22
get working not a problem at all but
0:07:26
best practices in on this
0:07:31
why we wanted to keep all the javascript
0:07:34
into one file and call everything from
0:07:37
there into index.html
0:07:41
i mean we could uh you know could we
0:07:44
maybe we could add this to
0:07:48
uh to the javascript file and then
0:07:51
yes so what we can
0:07:54
answer and just call this function from
0:07:58
yes that would be the plan now um
0:08:04
what we can do is hang on did you get
0:08:08
as in did you get pulled because i did
0:08:11
work on it on friday
0:08:23
i was just messing about trust me i
0:08:26
didn't really as mean as the best
0:08:30
best friend practices
0:08:31
because i think if we follow all the
0:08:33
best practices then um
0:08:36
it will take a lot longer a lot longer
0:08:40
yeah all right um coming back to the
0:08:44
so do you wanna um
0:08:47
what are you gonna do now
0:08:50
i was just gonna say um
0:08:53
i think we should maybe
0:08:54
yeah you know this is just hard-coded
0:08:56
obviously you've just got the board yeah
0:08:59
maybe the first thing we should do is
0:09:04
retrieve the board id
0:09:08
or um i'm thinking that
0:09:13
can we uh put this function in the still
0:09:18
and then call it from there
0:09:20
if that can work in that way
0:09:23
okay let's try that first here let's try
0:09:27
let's remove this let's just test
0:10:21
yeah maybe we should just um
0:10:56
yeah this works because okay
0:11:00
so this works here because
0:11:03
i've added this in here um in the html i
0:11:06
don't know if it will translate uh we'll
0:11:17
you know what i mean like i will say
0:11:19
we'll see it should i think but yeah
0:11:37
and we don't have to return it but i
0:11:50
q underscore jesse welcome
0:12:04
let me just comment this up
0:12:11
we'll just put the
0:12:12
this board i just hardcoded in for now
0:12:50
god reference get born it's not defined
0:13:04
which line was again i couldn't really
0:13:07
see it sorry this one
0:13:10
can can you see my screen all right or
0:13:12
should i yes i can i can it's fine
0:13:23
so and what exactly is the arrow again
0:13:30
unquote unquote reference error yeah
0:13:33
board name is not defined ah index.html
0:13:36
right go back it's coming from
0:13:40
and saying get bored name is not defined
0:14:04
whatever as in like because it's
0:14:08
returning the result
0:14:11
which might be the reason why it needs
0:14:14
a variable to assign the result to
0:14:19
okay all right let's try that
0:14:22
just so good i'll get bored by name i
0:14:24
need maybe that's why actually but
0:14:31
um i will keep this anyways
0:14:37
all right let's try that
0:15:00
fantastic so boredom
0:15:03
name is appearing um do you wanna
0:15:08
does this have a css can you go in the
0:15:11
back uh project and see
0:15:24
actually how about if we just
0:15:28
tomorrow first thing in the morning and
0:15:31
then we both take a day off from work
0:15:34
and then be available for
0:15:39
but production support
0:15:42
that would be hilarious
0:15:52
yeah the scene is funny
0:16:00
that's looking good
0:16:03
so we have got the board name however if
0:16:08
yep sure saying do you want to do you
0:16:10
want to just work on getting retrieving
0:16:13
the board id first actually
0:16:19
of this hard coded
0:16:24
yes i was going to come back to that one
0:16:28
added but that would be skipping
0:16:32
thanks for bringing me back to as in
0:16:36
um i was i was going really ahead of
0:16:43
try and make this dynamic now
0:16:58
so um we would need
0:17:08
um can you okay so how would this work
0:17:19
give it a board name
0:17:22
we would basically press
0:17:30
name it should actually go and get the
0:17:37
you should actually go and get the id
0:17:42
uh this oh you're already in still
0:17:45
front-end isn't it
0:17:51
can you check if there's a function
0:18:21
first things first let's just uh update
0:18:25
do you wanna login to uh actually uh
0:18:30
i'll do that on my side here you just um
0:18:41
so what i'm thinking that
0:18:45
hang on let me just work out
0:18:53
give the board name and press go
0:18:56
that board name should go
0:19:00
there should be a function
0:19:08
by name which we and no yep
0:19:12
get bored by name which will we should
0:19:16
return the board id
0:19:19
okay get bored by name
0:19:26
okay i think you guys have commented it
0:19:53
names so we're passing your value
0:20:11
can you possibly console.log
0:20:13
currentboard because i didn't want to
0:20:15
check if that's returning the board
0:20:26
uh okay why do you still have us
0:20:29
sleep function because we forgot to
0:20:33
take that out when we go rid of this
0:20:36
line we will come back to then get deaf
0:21:22
um then we would wanna
0:21:38
can you go to industrial html or you're
0:21:42
there uh this is index.html yeah yeah um
0:21:49
do you wanna go to
0:22:00
um i just want the line where we are
0:22:07
where we are detecting the board name
0:22:15
no it's not that one i'm go
0:22:23
no that's a title that's my bad i think
0:22:34
is it going check place
0:22:38
no you would have say
0:22:43
would be assigned to a value as in
0:22:56
still front end maybe
0:23:04
so what we can do is um
0:23:09
this is still front-end and we want the
0:23:11
value to be available in index.html
0:23:20
no why would we want it to be
0:23:23
available in in industrial html no
0:23:28
wouldn't want it to be available there
0:23:33
just thinking about it because we're
0:23:37
appending the board name on the url can
0:23:39
we still use could we use this maybe and
0:23:42
as the has the board name yeah
0:23:53
use it okay so the according to my
0:23:56
understanding there would be two
0:24:21
we can do it either way by um that just
0:24:26
for now try to concave from local
0:24:31
an easy approach for now
0:24:36
maybe it doesn't look good but
0:24:39
we'll see if it works
0:24:47
you're done dev is saying we need to
0:24:50
remove the sleeve function which
0:24:52
obviously we're not using that's why so
0:25:00
right let's go to the console i think
0:25:02
it's already started
0:25:17
that's just nothing
0:25:20
we need to get rid of this
0:25:26
board id ah right so same board id is
0:25:36
that's coming from still front end 92
0:25:39
can you go to that line yep
0:25:43
should frontend nine to two
0:25:53
interesting zayn i don't know
0:25:56
why you would do that because i think i
0:26:00
done a debugging get
0:26:02
yeah can you get rid of that one good
0:26:07
board ids not catboard name
0:26:13
so current board id
0:26:18
oh right okay that makes sense
0:26:24
makes sense um i'll give you a board
0:26:28
an existing board name
0:26:33
need to check if we can get the existing
0:26:39
okay and in the meanwhile can you get
0:26:42
rid of this sleeve function then
0:26:46
check that pointed place
0:26:48
yeah this one right 98 to 101
0:26:56
um board get get all the boards yep
0:26:59
that's exactly what i need
0:27:10
okay i'm just gonna edit
0:27:12
a board name just to check that
0:27:21
just bear with me for a sec boredom
0:27:41
i need to get this board
0:27:54
voila all right i'll give you this
0:27:59
just um when you say actually
0:28:04
uh can you go to your go function
0:28:07
as in it would be in still front end or
0:28:15
um can you give uh can you comment out
0:28:38
in breakfast the value
0:28:44
we need to call get bored by name here
0:28:49
okay that would give us the idea affair
0:29:11
do you want to comment this up get
0:29:40
sorry i should have
0:29:42
told you hang on a minute on in that
0:29:54
board id is not defined
0:29:56
board id is invalid
0:30:02
go back to the s still
0:30:05
still frontend please
0:30:11
yep that one i think is coming from
0:30:22
did we even have that in the first place
0:30:31
get rid of console.log
0:30:35
this one this one statement on
0:30:47
get rid of just the console.log part
0:30:50
please not the entire
0:30:52
statement i should have rephrased
0:31:03
uh jason string by jason
0:31:06
yes and then we are coming out
0:31:10
console.logging the current board
0:31:15
right can you comment out the return
0:31:27
yep let's give that a go
0:31:35
cute jesse i appreciate that
0:32:07
i don't know man could be
0:32:15
but i like them i like the username
0:32:18
though cue underscore jesse it's cute
0:32:26
um okay so that's coming up hang on the
0:32:30
promise is coming as undefined now
0:32:36
that's interesting
0:32:38
is that coming from
0:32:53
right so we are not getting the
0:32:58
oh hang on hang on a minute um in line
0:33:20
maybe in i can't try this now
0:33:23
i'm not even sure if it would work
0:33:37
remembered it was our merch day today
0:33:40
oh yes sunday every sunday is most day
0:33:46
that's fine no problem at all we can um
0:33:50
probably shift that this time on to um
0:33:57
probably tomorrow the day after
0:34:03
let's just focus on this one now
0:34:11
i had interest that i've just started
0:34:17
is that two one right
0:34:27
can you probably hard refresh it or
0:34:31
it doesn't take in cash in consideration
0:34:40
i don't know maybe
0:34:42
i'll i'll do increase or just to see
0:34:48
no no don't worry about that
0:34:54
saying could we actually just try
0:34:58
could we try just the
0:35:00
the api just to see if that works
0:35:07
if it would work in
0:35:13
would you want to test
0:35:22
i just mean like run a
0:35:24
just a get request on postman or just
0:35:27
uh even here just to see the uh what
0:35:30
format it's returning the
0:35:35
uh board id yeah what i did
0:35:40
um so like this just run this really
0:35:42
that's what i'm trying to say
0:35:48
you know what i mean
0:35:52
that just just here
0:36:01
i know exactly what you're trying to say
0:36:13
if you run that one
0:36:22
work at all because the backhand is set
0:36:32
so for example in the if you want to get
0:36:42
any kind of board or even notes you have
0:36:51
it doesn't work with a name
0:36:59
yeah that makes sense
0:37:05
aren't we trying it with the with the
0:37:09
yes so you know how it says get bored by
0:37:14
yep and then we're passing a value
0:37:18
i just wanted to see that if that
0:37:23
current board actually returns us there
0:37:40
actually i just found
0:37:43
was the issue by explaining
0:37:51
you know how it says um on line a4 that
0:37:55
we need to pass in this url and then
0:37:58
this slash and then the value
0:38:02
basically be then be the name
0:38:08
it's looking for an id
0:38:21
get bored by names so if we are passing
0:38:26
no no no no hang on hang on a minute
0:38:29
uh get bored but so if if we want to get
0:38:33
a board we need the id of it first
0:38:36
so if we do get bored by name and pass
0:38:39
it a value which is the name itself
0:38:56
so they can give us the id back
0:39:02
hang on i'm just gonna check what
0:39:08
back end yeah sure
0:39:16
that just shame my screen
0:39:20
let's stop sharing
0:39:34
have you done anything interesting so
0:39:36
uh yeah yeah definitely um
0:39:39
just doing the project has been been
0:39:41
really good actually with zayn and
0:39:45
you know learning new things
0:39:48
i totally forgot to share my shame
0:39:50
share my screen i was i was studying the
0:39:56
well all right here we go
0:40:04
uh wasted amazing piece code
0:40:08
don't need you go away
0:40:12
i was gonna say that
0:40:14
like in like i said uni level you don't
0:40:17
really understand how uh
0:40:19
like how the front end and back end like
0:40:22
work together and i think doing this
0:40:25
project is like you know it really helps
0:40:27
you to understand how the parts connect
0:40:30
exactly i think that's the biggest thing
0:40:32
i've learned from this project
0:40:39
okay get a particular board okay cool so
0:40:44
taking in the id so basically what we
0:40:56
sorry that would definitely tell me off
0:40:59
on this one oh before we need in our
0:41:12
um you can share your screen back finish
0:41:18
he's saying a good tech lead yeah he's a
0:41:27
really kind of you man i'm just as in
0:41:33
but learning every day as well
0:41:39
he seems like a good strong master from
0:41:41
seeing him into it
0:41:50
yeah i've still got a lot to learn and a
0:42:00
so the the back end is taking only the
0:42:03
get board ids so what we need to
0:42:08
get bored by id id to get
0:42:17
there is i think a bit of a gap here
0:42:19
between the front end and
0:42:28
gap it is and if you can
0:42:30
tell me if that makes
0:42:35
initially um the discussion that i had
0:42:40
was that you know how
0:42:50
it goes and inserts the record in in
0:42:56
and then it creates three records as in
0:43:00
within the object it creates three
0:43:03
records so there's a board id
0:43:12
so because we didn't really wanna
0:43:15
have too much interaction with the db
0:43:19
what we decided on that we would um
0:43:23
when the board is posted
0:43:27
insert the board in in the database but
0:43:38
just for posting the board
0:43:41
is that making sense so far
0:43:46
so i think that mechanism
0:43:49
needs to be done for
0:44:01
right right okay what's going on
0:44:05
133 can you have a look
0:44:10
it smells like a switch
0:44:16
he doesn't hold back there
0:44:20
when did that happen and who did this
0:44:24
i don't i haven't done it for sure
0:44:33
actually um um give blame please oh here
0:44:44
i was about to say objective in flash as
0:44:47
in in your command line do you want to
0:44:53
how do you do that
0:44:56
is it is it actually a command
0:45:05
press ctrl okay that's fine keep blame
0:45:16
used for i don't i haven't heard about
0:45:23
are documented and
0:45:26
sure blames serious we find them
0:45:29
incremental how do we do this
0:45:38
they just not get off uh
0:45:44
can you uh do a comment on the
0:45:59
i just don't want to forget that
0:46:13
who was a coma see
0:46:17
who was a comet by
0:46:19
because i don't really want to touch
0:46:22
anyone else's code then
0:46:24
they must have it for a reason there
0:46:40
didn't you say you're funny
0:46:45
objective which is why we are not um as
0:46:48
in deleting the whole
0:46:51
code um i wanna first find out
0:46:57
who coded it and what was their reason
0:47:00
behind it and then
0:47:02
i wanna take action
0:47:18
just thinking at the moment um because
0:47:22
in order to accomplish that
0:47:31
go to pause um post board
0:47:42
at the moment we're not retrieving any
0:47:44
notes for the boards
0:47:55
into retrieving is that they're they're
0:47:58
attached to a board
0:48:00
when the person gets a board
0:48:05
the notes ultimate ultima automatically
0:48:13
does that make sense
0:48:19
okay i don't know if i'm missing
0:48:22
if that's the case then um
0:48:24
shouldn't we be able to
0:48:28
shouldn't we just be able to so
0:48:31
okay is that board with an existing with
0:48:33
existing nodes right now i just want to
0:48:35
just want to have stopped quickly
0:48:37
i have got a minute i will
0:48:40
tell you which board to get
0:48:57
no single note and one
0:49:13
okay you can get zt
0:49:24
let me just what did we do we this one
0:49:29
yeah but what are you trying to do
0:49:37
i want to see like how the notes are
0:49:39
being retrieved if possible like
0:49:51
they're not gonna come yet
0:49:54
because we haven't got any placeholder
0:49:57
to put them on at the moment
0:50:08
you should you wanna elaborate your
0:50:12
question a bit more
0:50:14
sorry isn't it just uh
0:50:18
oh yeah yeah yeah okay no i was i was
0:50:21
just gonna say that the name came up but
0:50:38
one oh yeah we're trying to get it from
0:50:41
the board id yeah no sorry about that
0:50:48
so my question was mainly
0:50:54
how would we be getting the post um the
0:50:59
if we're using the board id sorry
0:51:05
i was just what has that been
0:51:06
implemented or is that something that is
0:51:11
okay so their home mechanism is already
0:51:14
being implemented so i'll just give you
0:51:17
a really as in bird's eye overview how
0:51:20
how has that been done
0:51:22
so you know how every board will have
0:51:28
zero to many notes
0:51:34
all many notes will belong to one board
0:51:42
it's working is that
0:51:45
notes are associated to that particular
0:51:49
which in turn is the whole object
0:51:53
so i think it may be a good idea if i
0:51:57
an example hang on
0:52:01
just share my screen review and um
0:52:07
here we'll just see yes you are see
0:52:12
this is there so i'll get all the boards
0:52:25
so this is how is uh this is how this
0:52:28
structure works so
0:52:31
this whole thing here
0:52:38
okay yeah so that has a board id a board
0:52:49
yep okay yeah i get what you mean
0:52:53
does that make sense now yeah yeah yeah
0:52:55
that makes sense now
0:53:02
good to keep everyone on this
0:53:09
do you wanna add your screen back in
0:53:36
place another function
0:53:44
so the function that's getting um
0:53:53
there's call they get bored by name we
0:54:00
return us the board id
0:54:04
which brings me to my other point where
0:54:10
a discussion with kartik that'll i don't
0:54:14
want to be be doing too many trips to
0:54:17
the database because that would just
0:54:19
cause performance issues and
0:54:24
um don't you already have a board name
0:54:31
we do have a board and then board name
0:54:33
in local storage cagdef the issue here
0:54:40
when we want to get a board
0:54:49
ids instead of name so
0:54:54
i'm just trying to figure out how
0:54:59
give it a board name and then
0:55:04
from it without hitting the database
0:55:21
um but that will still um hit the
0:55:25
database because the api
0:55:28
will have to ask the database to give it
0:55:32
of that particular board
0:55:38
yeah yeah that makes sense which
0:55:44
more trips we do to the database going
0:55:46
to my understanding and get dev
0:55:49
you know a lot more than me and corrects
0:55:54
the more trips we do to
0:55:58
slower the application becomes as in
0:56:01
efficiency and performance wise
0:56:07
and account balance will fulfill flies
0:56:19
actually that's a brilliant idea
0:56:25
uh finish can you possibly check on um
0:56:30
are they hiring any drivers because i'm
0:56:32
a really bad chef i won't be able to do
0:56:37
you could you could be a dev there
0:56:40
then i'll definitely be sacked
0:56:50
it's yeah i think uber
0:57:02
would you reckon finish
0:57:04
true work work at your own time
0:57:11
flexible hours yeah
0:57:18
hopefully we'll come back tomorrow
0:57:20
because he had his um
0:57:24
assignments apparently
0:57:29
hoped to see him back in tomorrow he
0:57:32
much more exciting for the viewers yeah
0:57:36
true true i agree with you completely
0:57:41
right um in this case let's just call it
0:57:56
just make sure they you join the right
0:58:11
there you go you're a fast learner man
0:58:19
give him meaningful name
0:58:26
probably saying go up board id and
0:58:34
goreboard name but trying to get the
0:58:39
id from from the board name
0:59:14
fantastic so that is
0:59:26
brilliant that's about time
0:59:32
very punctual as well
0:59:39
yeah how did you find
0:59:45
yeah really good really good um getting
0:59:47
closer every time i think
0:59:49
yeah i think we're on track
0:59:54
closer every day every minute so which
1:00:02
joining been a pleasure having you all
1:00:09
join us tomorrow tomorrow when our
1:00:12
special k will be here as well
1:00:16
will be the three royal calderarians oh
1:00:20
i just made that up nice
1:00:27
denise you know the
1:00:34
cool perfect so thanks guys um join us
1:00:39
same time same place
1:00:43
and a different task
1:00:45
oh yeah all right guys have a
1:00:48
good night cheers bye so good night