0:00:05
yes welcome back to um
0:00:09
build break and fix apparently i got it
0:00:11
wrong that was my bad
0:00:12
i totally didn't mean it it's build
0:00:14
break and fix and totally not build
0:00:17
but anyway um welcome back we
0:00:21
did a lot of stuff yesterday we made
0:00:25
deleting a node was working am i right
0:00:31
yes it was yeah cool so yeah so we made
0:00:35
a lot of accomplishments yesterday that
0:00:39
that was a big one um as it was a bit of
0:00:43
but today's a new day so what um is the
0:00:46
goal for today is it
0:00:48
um the goal for today would be
0:00:52
updating a note updating our notes
0:00:56
uh we've already created a node deleted
0:01:01
yeah uh updating our notes
0:01:04
right and then um when as soon as
0:01:08
we do that we need to start looking at
0:01:11
dyno tv then yeah for sure that'd be
0:01:15
that sounds fun all right
0:01:20
oh man busy day today how's your day
0:01:24
um same actually no uni but uni is going
0:01:27
to start soon soon
0:01:30
i have to back back on track now
0:01:33
mm-hmm right right busy because of work
0:01:40
yeah and some others other stuff as well
0:01:44
why is this not doing i wanted to open
0:01:48
vs code as in the app not in that way
0:01:55
visual studio code yeah i want to open
0:02:39
all right let's open up our postman as
0:02:59
and i'm going to click quit my whatsapp
0:03:05
me do actually i'll just make it silent
0:03:13
i'm thinking shall we pour a bit of
0:03:15
music in the background
0:03:17
yeah we can actually do that um not bad
0:03:21
um do you want me to do it uh
0:03:25
you know how to yeah i think i just
0:03:28
literally play some
0:03:39
you know what you're
0:03:42
a chilled cow yeah
0:03:50
um can you hear it yeah okay
0:04:03
how does that sound yeah yeah
0:04:06
that's um the first one
0:04:10
you mean lower a bit lower
0:04:20
yeah there you go oh sorry
0:04:24
it's a bit hard um okay
0:04:32
yeah i think that would do it because
0:04:35
of it i can try harder just give me one
0:05:05
um i can't hear it now
0:05:20
that's too loud okay
0:05:24
how about this um which
0:05:27
yeah perfect perfect perfect
0:05:34
all right so we're gonna be updating
0:05:41
we will start the code update code
0:05:45
yes ah no did we already get a specific
0:05:53
so there would be two
0:05:56
things getting a specific note and
0:06:11
we'll work on updating a note first
0:06:13
because that i think
0:06:18
yes too um i'll just give you access as
0:06:22
i don't know if you already have it
0:06:46
let's go little text from that he's a
0:06:48
bit busy he's gonna combine
0:06:54
attacks you john what's up yep
0:07:10
so update to specific now called that
0:07:12
one's there that one's there that was
0:07:15
this one so i'm gonna get rid of all of
0:07:23
do you send me a link
0:07:30
don't think so but it's fine no i didn't
0:07:34
invite this copy link
0:07:37
send it in writing copied
0:07:41
and i'll send you in a private chat
0:07:51
ah right i see i've
0:07:54
i don't is there a oh
0:07:58
to open private chat no wonder why this
0:08:01
so my other keyboard uh
0:08:04
he was barry died and i'm just
0:08:08
using a windows one no wonder why it's
0:08:14
properly all right cool i'm gonna have
0:08:21
this time so get the invite link and
0:08:38
so we are doing update note first right
0:08:41
uh yes update i know first
0:08:48
so we don't need all this
0:08:52
just comment it out
0:08:57
probably this part yeah
0:09:20
board and deathcarp
0:09:26
and then we need a new statement
0:09:35
if particular board
0:09:45
sorry i was just thinking was something
0:09:53
um for if the current board id
0:10:08
board id put in the school id
0:10:12
if that is the board then we want to
0:10:18
get the noodle in we want to
0:10:22
go in the notes array
0:10:25
so there will be latin note
0:10:39
a particular board boards borders called
0:10:51
and then we want to check if that one is
0:11:10
order is going out
0:11:18
um what underscore
0:11:22
bracket open bracket close no
0:11:32
the note id that we passed in
0:11:36
if that does equal then we want to
0:11:43
update the text only
0:11:47
so that would mean
0:11:54
um single note but i'm
0:11:57
trying to think that
0:12:02
ah okay cool here we go um
0:12:11
um is it possible to minimize the
0:12:16
background noise please contact oh yes
0:12:20
sorry but find it hard to as in think
0:12:23
and code in the noise
0:12:26
yep sorry my man ah
0:12:29
deathcorp so i need the board note
0:12:33
yeah and then i need that
0:12:37
particular note and then i wanna
0:12:44
i wanna set the the talking
0:12:48
only yep the topic i'm gonna
0:13:09
ah okay that's what it did
0:13:13
is the bracket no well not mine
0:13:18
open and pasted everything as in the
0:13:26
okay cool so that's if
0:13:33
first problem here bracket
0:13:41
um there's one extra
0:13:45
closing current this is this one yeah
0:13:55
i think i need a bigger screen than this
0:14:03
um i can't see the code your cursor's on
0:14:06
there all right cool
0:14:12
okay cool all right
0:14:16
so we have replaced that text with
0:14:19
that one and now we just simply
0:14:40
so we need that note
0:14:44
actually let's just send status
0:14:48
first if it happens yep
0:14:55
don't you wanna see the note though like
0:15:04
oh you're gonna send this all right
0:15:07
yeah actually we should actually send
0:15:11
note yeah because we might want to see
0:15:14
if it works or not yeah
0:15:21
a centos stringify oh
0:15:25
cool hi alexa how's it going
0:15:32
geez uh what's happening
0:15:37
geezer coding tonight
0:15:46
okay and then i want to just return that
0:16:16
actually i think this is
0:16:22
you're looking no i'm not entirely sure
0:16:25
about this but if we do
0:16:27
this then it would just give us the
0:16:34
the note didn't we do this uh
0:16:37
when i quoted yesterday i think in the
0:16:42
what did i do in that i'm not sure but
0:16:44
it returned the note
0:16:48
oh yeah we can simply use that one
0:16:53
delia particular note
0:17:05
yeah actually come down
0:17:08
ah here we go you've returned all
0:17:12
the notes yeah um no specific
0:17:24
rather than the for loop being local you
0:17:27
can make them global
0:17:29
like you can let them outside
0:17:46
he's about to go now giza
0:18:04
okay how does that look
0:18:10
so you're saying that
0:18:15
if borderline then break
0:18:20
and then yeah that sounds
0:18:25
good but i'm still not entirely sure if
0:18:27
we will return the
0:18:29
note but let's see i could be wrong
0:18:32
let's figure it out um
0:18:38
wrong here come on
0:18:44
the colors don't match
0:18:50
there's something wrong here rest is
0:18:56
where is it expecting a comma
0:19:04
the tripod says that comma expected
0:19:24
let's try this yeah
0:19:30
i'm not sharing the terminal with you am
0:19:34
no please don't run that command
0:19:46
i'll go on hunting for you
0:19:51
classics send the police to
0:19:55
you the british air force to you
0:20:03
okay here we go cool so
0:20:06
we need to go in folder deeper
0:20:27
why does alexa want me to go all the
0:20:31
here we go shawna code
0:20:34
yes sir i mean the leg yeah that's from
0:20:37
also e7 it says that nice heads and
0:20:40
looks professional
0:20:42
i know by saying professionals he's
0:20:53
this is my kind of
0:20:56
new coding hat because i've got
0:20:59
fantastic hairstyles that
0:21:01
i don't want to show let's keep it
0:21:07
yeah true okay i've got js
0:21:11
and there we go let's see
0:21:15
where have i messed up
0:21:18
eastern twitch is asking do we have our
0:21:23
ah right um but the merchandise
0:21:26
uh you will be ready on the online
0:21:30
store this weekend because
0:21:34
yeah so i was working on um
0:21:41
but um i've got that design now
0:21:46
so what does it say though like
0:21:50
uh i'll show you offline okay
0:21:53
yeah i don't i don't want us for
0:21:56
the surprise here nice
0:22:00
that's pretty good and i think it might
0:22:04
now because you're on
0:22:07
a part of this show as well so
0:22:11
come up with a slightly different one
0:22:14
at least i have a hint it has face in it
0:22:21
it's failed wait why did it fail
0:22:37
ah unexpected token as well
0:22:41
on which one is line 3 44
0:22:46
have you that you have you go that much
0:22:57
unexpected token that's fine
0:23:01
344 is this text for no thing
0:23:04
yeah but it shouldn't really show that
0:23:09
but do you think like single note is
0:23:13
single now what do you mean he's here
0:23:17
um wait one second
0:23:32
i don't think single note is defined
0:23:34
here in this function
0:23:36
i feel like we need to which one
0:23:41
the word single note yeah
0:23:45
is it in this function at all
0:23:49
oh it will be in the body so
0:23:56
function it'll be it'll be coming from
0:24:05
let's see if i'm right
0:24:09
here right i'm not right apparently
0:24:17
showing around 401
0:24:23
yeah here we go so where did we mess up
0:24:30
just declaration where was this
0:24:34
hang on actually one need to do
0:24:38
is make the window a bit bigger because
0:24:41
really hard to see ah
0:24:45
right okay so he's
0:24:48
not supposed to have this hair
0:24:52
there's some there's a bracket missing
0:25:13
what am i doing here i need to go
0:25:16
to the update one this one is asking
0:25:20
that do we have a name for
0:25:22
the team yet he suggests the dream team
0:25:26
and alexa says there are the push-ups
0:25:34
wait for something i talking about i
0:25:37
i did promise that suffering from
0:25:40
from the last seven days i don't
0:25:47
i mean i'm just saying last time we
0:25:51
said that the code works we'll give them
0:25:54
yeah yeah you have an extra follow from
0:26:00
okay cool so you do 2.5
0:26:04
karthik and i did 2.5 as well come on
0:26:08
all right it's following my capacity
0:26:11
the light on it's dark how about now
0:26:17
how's it like now i don't
0:26:20
really have a good lighting in there
0:26:23
all right i'm going to do a bit of a
0:26:28
2.5 push-ups for right now
0:26:31
is it happening right yeah yeah oh
0:26:34
just okay okay over with can you see me
0:26:39
yes you should be able to i'll tell you
0:26:41
if we can see you and you tell me if you
0:26:44
so i'm telling you i can see you just
0:26:46
give me one second
0:26:51
okay you probably can't see right but
0:26:55
okay then could you see me yeah i can
0:26:59
all right cool ready go
0:27:07
okay i did three so i did free as well
0:27:12
all right that's that's um
0:27:17
yeah that's what's what's up five each
0:27:21
no no she's the deal
0:27:28
push-ups for a follower and
0:27:32
we we're two people so which means
0:27:35
2.5 and 2.5 but we did three each
0:27:42
so what did that team will get a
0:27:46
donate function and i'll donate your
0:27:49
okay cool sounds good i will
0:27:53
arrange that um when we finish this
0:27:58
target probably have to happen tomorrow
0:28:02
right so back on the thing
0:28:05
yep so that way it goes there
0:28:12
um there's still one editor on try
0:28:15
i know um i'm just figuring out
0:28:19
where's this block coming from all right
0:28:22
is a classic example of when
0:28:27
you don't have the right format
0:28:30
code i think there's a shortcut too for
0:28:36
yes let me google it yeah that'll be
0:28:43
ah here we go cool you did it
0:28:47
i got the culprit yeah
0:28:54
there was a extras um
0:28:57
curly bracket there and what i need to
0:29:04
command shift i says
0:29:10
oh come on shift i um
0:29:14
let me see one second
0:29:23
it's a shift alt f
0:29:28
shift alt f shift alt
0:29:33
f there are multiple formats for
0:29:42
code formatter okay
0:29:51
nice so it does the shifting for us
0:29:57
no this is ugly really
0:30:03
okay then try come on all right
0:30:07
that's fine classic i don't really want
0:30:13
time in that all right cool so this is
0:30:17
done that one that one
0:30:18
perfect let's run that
0:30:22
because we have a goal to achieve
0:30:26
so i just want to for have you
0:30:29
guys used 4-h or map
0:30:34
we have um e70 we have used
0:30:37
for loop so neither the ones you said
0:30:41
we have used a full as in 4 in
0:30:50
would clean up that
0:30:53
logic a lot around 3 30
0:31:01
yeah i plan to do that is as well but
0:31:04
i first want to make sure that
0:31:08
um it's working and then come back to
0:31:12
cleaning up the logic
0:31:18
right so base and filter
0:31:22
right right right i see
0:31:29
is it working shall we
0:31:34
clean up the logic first
0:31:37
and then just say all shall we test and
0:31:40
clean up the logic i mean it's already
0:31:42
built let's just test this thing first
0:32:00
so this is updating the note right uh
0:32:04
yes bro first i need to set up the board
0:32:07
get the note in there and then do that
0:32:22
so in a particular board
0:32:26
that would be that
0:32:40
oh wait nevermind you're right
0:32:43
yeah hang on didn't uh we didn't do
0:32:47
yeah just without the sorry
0:32:54
so that one goes there and we
0:32:57
need to actually update this
0:33:00
note so i would do test one
0:33:05
so which would mean that it
0:33:08
it will that no will still remain
0:33:11
the same but only the topic would change
0:33:20
let's see if it really does
0:33:24
okay where did we mess up
0:33:35
yeah can i post ah okay cool
0:33:38
that's fine my fault what was it
0:33:42
oh yeah yeah right
0:33:53
the same no it is the same i just want
0:33:57
308 2308 to perfect so
0:34:01
updating i know is working um
0:34:04
shall we clean the logic up now yes
0:34:08
we should we really should this is a lot
0:34:11
i don't i don't like that yeah
0:34:18
let's use a filter probably
0:34:22
and fill to have you guys just clean the
0:34:26
logic as in you want to format the good
0:34:28
oh as in free factory and
0:34:31
use the functions that
0:34:35
use them to suggest it as in
0:34:39
for each or map and then filter
0:34:42
okay let's do that because i haven't
0:34:47
used as in it's been a
0:34:51
long time i've done these functions
0:34:54
so i really want to refresh my memory as
0:34:57
yeah let me google
0:35:42
which function map map
0:35:50
okay it's a method
0:35:54
yeah i mean um oh really
0:35:59
yes so map is a method that can be
0:36:02
applied on a data structure
0:36:05
all right so the map method creates a
0:36:08
new array populated with results
0:36:11
of calling a provided function on every
0:36:15
in the calling array okay that makes
0:36:20
so it's like um if you have an array one
0:36:23
two three four and you map
0:36:26
into 2 then you'll have 2 4 6 8.
0:36:42
right now for sure or do we oh no we
0:37:06
oh um i just heard
0:37:09
my partner um drops
0:37:14
something so just making sure that
0:37:17
she was all right right myself
0:37:25
i'm just saying like we can't really use
0:37:29
um because we're not actually assigning
0:37:33
something to any array we're just
0:37:42
so when you say assigning that means
0:37:46
adding um yeah like i'm just giving an
0:37:51
how a map function works um like let's
0:37:54
say you have an array of one two three
0:37:57
and you map yeah the array to
0:38:00
multiply every element by two so
0:38:04
it'll just give me all right
0:38:14
pretty much like mathematical mapping
0:38:16
like how we used to map in functions
0:38:24
you're signing on 3 34
0:38:35
um twitch um i'm not sure
0:38:39
what's the issue with that
0:38:45
you are signing on 334
0:38:51
uh i think it means that we are signing
0:38:55
a string to a property
0:38:58
of an object but not to every element of
0:39:04
can't see make this called larger ah
0:39:08
the only thing is if i make this
0:39:12
larger then it would just come into my
0:39:15
face which is a bit
0:39:19
all right how about now
0:39:23
i mean it looks good to me but um
0:39:28
my my screen is but yeah he needs to say
0:39:34
so i'm just looking at
0:39:39
the updates the attribute with a map
0:39:43
function let's check
0:39:46
uh so okay so this is what i'm
0:39:50
looking at what's up
0:39:56
i'm trying to cover below is one trend
0:40:00
let's have an array of objects yeah we
0:40:05
and now i want to find function code
0:40:07
that is cool which will take in free
0:40:12
or name and then okay yeah that's
0:40:15
exactly what we need
0:40:23
all right it copy then the private chat
0:40:29
okay it's on twitch centers the node um
0:40:58
and understand this code
0:41:02
can i try can i have a go and
0:41:05
for using no brackets okay okay
0:41:08
cool understood and yes you can config
0:41:11
okay i'll just give you the control
0:41:15
now um i do have other controls i'm just
0:41:24
black code is the best code okay
0:41:28
cool understood now i see it's
0:41:34
is 70 you're saying by flacco
0:41:48
i'm just like code without loops and
0:41:52
no nested okay cool right right right
0:41:56
no nested loops i say yeah
0:42:00
right are you having a go coffee yeah
0:42:04
all right cool okay
0:42:10
fine okay so he's doing
0:42:15
uh depth of finding from every board id
0:42:20
comparing the board id is equal to that
0:42:24
and then note i did that one and then
0:42:30
what he's doing right
0:42:33
yeah that's a lot easier to understand
0:42:37
and less code as well
0:42:52
these who would be the
0:42:56
variables so you can
0:43:03
it doesn't matter yeah i was just trying
0:43:06
name it properly really okay cool yeah
0:43:10
i'm just looking at an example online
0:43:12
just give me one second
0:43:25
yeah so what i think he did was his
0:43:32
every board which is the b
0:43:36
and checking if that ball if that be
0:43:40
if the current board id which is b
0:43:43
dot board id equals to
0:43:46
the board and the square id that we are
0:43:50
yeah and it's doing the same for the
0:43:54
if the current note
0:44:00
note id equals to the
0:44:04
no id we're passed in and then he just
0:44:07
taking the particular
0:44:09
note and then updating his name
0:44:13
which in our case would be the topic
0:44:56
cause i think the board on this uh board
0:44:59
dot it won't work really
0:45:14
because that's the index isn't it
0:45:18
no so now we have the board in it like
0:45:23
we don't have the index in it
0:45:27
ah okay i didn't see the
0:45:32
that that code that's my fault
0:45:39
important notes fine so we
0:45:54
um you might want to do triple equals
0:45:58
not a sec single equal no so
0:46:01
um the format of that thing is this only
0:46:05
um it's just a one comparison operator
0:46:09
um i'll still check it online
0:46:19
twitch removes the new lines by the way
0:46:23
yeah yeah that's yeah um he
0:46:28
i would have thought the same as in his
0:46:30
three separate lines
0:46:33
okay no you're right it's triple equals
0:46:38
i think what e7 twitch has
0:46:41
given us is just a guideline so
0:46:47
consider that from our goal
0:46:52
i can't really so see
0:47:01
um is equal to like
0:47:22
yeah that should be fine and just um
0:47:26
our fracking uh gives
0:47:29
some space between those arrows
0:47:33
once again do we need to assign this
0:47:44
i don't think we need to sign this board
0:47:47
but this is the one which we assumed
0:47:49
inlet can you see my
0:47:50
uh cursor yeah uh-huh so this is the one
0:47:54
which we assumed right
0:47:57
yeah so just return the board
0:48:01
that's all itself because the board has
0:48:06
as in array now which is
0:48:10
a part of the board now radio
0:48:22
let's try this yeah go for it
0:48:27
um can you compile why do we have uh
0:48:32
do we need a semicolon here
0:48:37
um yeah there we go um
0:48:40
can you compile it i'm going a minute
0:48:44
did you that's my error
0:48:49
did you just add this yeah
0:48:52
okay cool all right let's do that
0:49:00
getting too excited
0:49:07
that's actually a really good point a
0:49:11
i mean the code looks way more
0:49:12
professional now anyway because
0:49:15
that's exactly what my boss says is
0:49:20
well the less the code that can achieve
0:49:24
same thing that's called performance
0:49:27
not so good i learned a new thing today
0:49:31
all right cool so do that and
0:49:34
let's test it again forward
0:50:15
at least it's not breaking anything till
0:50:58
thanks a lot for that efficient code
0:51:01
is he's seven to each i can finally
0:51:06
realized how much code that
0:51:09
we have done here is just ridiculous
0:51:13
yeah i think we should drop what was the
0:51:18
i'm deleting a note or yeah
0:51:21
yeah it's half 10 so i think this is
0:51:24
so good progress yeah if you want we can
0:51:28
make some changes on the for loops but
0:51:30
we can do that tomorrow
0:51:32
yeah yeah we can do that tomorrow
0:51:36
i need to do some other stuff as well
0:51:40
right okay yeah sure um
0:51:47
um i'll just deploy it and then yeah
0:51:57
maybe just do a um get it oh yeah yeah
0:52:01
is that the one yeah comment
0:52:07
oh really okay i'll try that e7 twitch
0:52:10
e7 it says that try command shift p
0:52:13
to format if you prick once you create
0:52:19
i think for us it'll be i mean he says
0:52:22
ctrl shift p but for us it'll be command
0:52:27
format document oh here you go
0:52:30
okay cool nice that's brilliant
0:52:36
cheers for the tip he's on twitter
0:52:39
yeah this crap at the moment yeah i'd
0:53:05
there we go brilliant
0:53:09
all right that code is committed um
0:53:13
let's leave it ahead for today
0:53:19
thanks like east seventies and all the
0:53:22
viewers um for tuning in
0:53:26
tuning in really appreciate it and
0:53:29
for your amazing producing and encoding
0:53:32
skills coffee as well
0:53:35
thanks you soon twitch i'll see you guys
0:53:39
uh have a good night guys cheers bye