0:00:23
all right welcome back everyone welcome
0:00:27
another episode of break and fix
0:00:30
of course with everyone new here we are
0:00:34
uh which means we're the team of three
0:00:35
developers from melbourne australia
0:00:38
and we've been working on a project
0:00:40
which leads to adding persistent storage
0:00:43
to a current operations project
0:00:45
which is called scrambler ca
0:00:48
and if you're curious
0:00:50
um our backend is built upon express.js
0:00:54
um we've been using aws cloud as our
0:00:58
preferred cloud vendor um to provision
0:01:03
and right now we've been working on our
0:01:06
front end which is purely based upon
0:01:08
html css and vanilla gs
0:01:11
so how are you feeling today is it
0:01:16
it's a great day intro okay um thank you
0:01:19
yeah really good um so it's been a few i
0:01:22
think it's been a while since we last
0:01:25
it would be good to get a recap i think
0:01:28
even give the audience a recap even
0:01:30
myself to be honest and uh yeah yeah
0:01:32
really keen to get into it
0:01:35
um to anyone who is wondering why we
0:01:37
weren't streaming um
0:01:41
had a quick emergency um
0:01:44
um some stuff uh which is personal to
0:01:49
uh yeah that was really unfortunate and
0:01:52
we both feel really sorry for that
0:01:56
thought that we need to take a step back
0:01:59
um let this all sink in
0:02:01
and it come back next week
0:02:04
so yeah that was the reason why we
0:02:06
didn't stream for like um the last four
0:02:09
or five days i think
0:02:13
before we begin i'll just do the call
0:02:15
acknowledgement of country
0:02:17
so just bear with me for a second so
0:02:34
okay there you go i'll do the
0:02:35
acknowledgement now
0:02:38
i begin today by acknowledging the
0:02:40
traditional custodians of the land on
0:02:42
which we gathered today and pay my
0:02:44
respects to the elders past present and
0:02:47
future i extend their respect to
0:02:49
aboriginal and torres strait islander
0:02:56
easy so yeah if you're wondering that
0:03:03
yeah i'm really glad i had the recording
0:03:08
okay cool so if we want to get back i
0:03:10
think the best place to start would be
0:03:13
um how about we have a look at that
0:03:16
yeah sure should i share my screen
0:03:58
we're just looking at the in hey exactly
0:04:10
just trying to think if it's all updated
0:04:13
or not or if you want you can just have
0:04:15
a look at the app um itself
0:04:17
yeah and you have to see what's working
0:04:20
i'll just play a bit a little bit of
0:04:23
yeah sure thing just for the sake of it
0:04:28
oh so just showed the
0:04:32
i just shot the back end api for a
0:04:34
second so that's all good
0:04:48
oh sorry that was too loud
0:05:00
maybe it can go a bit uh
0:05:02
a bit higher it's a bit soft i think
0:05:07
yeah that's good actually yeah of course
0:05:10
let me know if it's too long
0:05:19
yeah yeah i was gonna say like that
0:05:21
seems like me i don't know what's you
0:05:25
no before it was like um
0:05:30
it's a music like the the youtube ones
0:05:33
the what's it called lo-fi lopez yes
0:05:37
this better i'm pretty sure this is
0:06:17
i think these were all working okay
0:06:20
is there insertion working i think
0:06:22
soldiers i think instructions work
0:06:26
you know there's a bit of a problem
0:06:32
we don't have access to zens from uh aws
0:06:40
don't you have did he give you that
0:06:43
i don't have admin
0:06:48
that's fine um i'll figure it out with
0:06:53
if we want to redeploy today
0:06:55
that's not gonna happen
0:07:01
or actually it might happen
0:07:02
yeah actually it might happen yeah
0:07:11
what are you thinking why could you want
0:07:12
to make your own account is it
0:07:14
i mean we're gonna make a recorders
0:07:17
account anyway but like right now it's
0:07:18
deployed on zen so that's fine um
0:07:22
pretty sure you can deploy just two
0:07:26
that's not a problem but is it working
0:07:29
i believe so i tested it earlier um let
0:07:41
stop sharing for a second
0:08:15
things for your right as well
0:08:17
i mean we're gonna do it anyway so
0:08:20
yeah might as well just go down
0:08:25
i'm just curious how much of react do
0:08:30
uh not that much to be honest
0:08:33
like if we just like do this and react
0:08:35
and just surprise them like
0:08:39
i mean like i really don't
0:08:41
mind doing that but i mean of course
0:08:44
need to talk to him first but
0:08:48
i mean at the end of his
0:08:50
um mission for sure
0:08:53
it'll be a nice surprise for sure
0:08:56
it's like zen comes back in like 30 days
0:08:59
a day oh yeah you didn't react casually
0:09:04
yeah i really want to but
0:09:08
i think to be honest how can i agree
0:09:10
with him there like we should finish it
0:09:12
first and then yeah
0:09:35
yeah insertion's all good
0:09:38
there's a bit of a thing with the
0:09:41
this node inserted should only print
0:09:43
when you get a status 200 right now it's
0:09:46
just printing you know what i mean
0:09:53
oh you mean like it shouldn't print if
0:09:55
uh if it's like um
0:10:00
yeah is this in the loop like it'll
0:10:02
print every time you click the button
0:10:04
not when you get a cs200
0:10:08
that might be something worth looking
0:10:09
into or we maybe can work on the further
0:10:18
yeah be good to look into that i think
0:10:25
yeah the other thing is have you guys
0:10:28
how we're gonna get the notes retrieve
0:10:31
the notes and then display it as well
0:10:33
yeah so i think that would be a
0:10:39
in the previous page
0:10:43
like yeah in home.html
0:10:49
yeah you just put the board name and
0:11:00
not right now but like um
0:11:03
so either we can do like two different
0:11:08
what do you call text boxes or we can
0:11:12
if it's not there we insert if it's
0:11:14
there we display it
0:11:22
um all right let's have a look at that
0:11:23
thing first uh yeah um yeah fix this one
0:11:54
do you know what this is okay this one
0:11:58
this is uh this is relating to um
0:12:06
click on the kt one yeah this thing
0:12:11
coming in the first line
0:12:16
it says unchecked run time got locked
0:12:19
closed google response was received oh
0:12:22
wait never mind something with the api
0:12:26
do you know google that's him
0:13:02
sorry okay the music's a bit
0:13:07
i think this is the variation in the
0:13:18
let me try safari actually
0:13:32
i got a plant for my desk
0:13:37
what plan do you know
0:13:41
actually my partner got it
0:13:48
it's called clover hill no wait what's
0:13:53
i just know it's an indoor plant so it
0:13:54
doesn't need sunlight like you need some
0:14:03
let's have a look here
0:14:06
let's have a look at the plan
0:14:08
yeah cool there you go can you see
0:14:10
oh yeah that's pretty cool
0:14:12
yeah nice it's like one or two cups per
0:14:24
um do you know inspect element in uh
0:14:28
oh yeah yeah go dev mode on
0:14:38
one second how to enable f mode in
0:14:50
so you go in when you and you go on
0:14:51
preferences click on safari in the
0:15:10
menu and last one last one
0:15:14
oh okay here we go oh you can see in
0:15:16
developer click on hello
0:15:18
yeah now if you right click i think
0:15:21
option to inspect element oh nice cool
0:15:45
well let's text him
0:15:49
by the way you're right um
0:15:53
no i don't think so we talked about this
0:16:22
yep seems like a chrome issue okay so
0:16:25
let's maybe just leave it for now okay
0:16:30
come back to fix it maybe
0:16:32
you know we know what might be a good
0:16:34
idea i don't know what do you think of
0:16:38
if we create another another issue here
0:16:44
everything that we kind of think that we
0:16:46
need to come back to like this one
0:16:51
yeah maybe using liquid bugs
0:16:54
added to it you know what i mean
0:16:56
yeah yeah so you can create bug issues
0:16:59
um yeah no no if you click on the click
0:17:04
on create issue i'll tell you what to do
0:17:10
if you click on yeah this drop down yep
0:17:14
yeah now you can mark it as bug
0:18:17
what i'll do is i'll stop sharing for a
0:18:19
second yep sure um yep
0:18:30
we just comment out the the url um
0:18:35
the backend api and then we can have a
0:18:37
look at the what you're saying okay
0:19:34
you're talking about this one right okay
0:19:46
okay so now that air is not coming right
0:19:51
yeah that air is not coming now i've
0:20:02
so that's probably why as well there is
0:20:04
not coming i would say
0:20:09
but this is what you're talking about
0:20:12
yeah so this should not
0:20:13
say it might include
0:20:15
even the confirmation
0:20:17
should not say bored and not say itself
0:20:22
like the main confirmation on the page
0:20:25
oh okay yeah that's true that's true
0:20:28
so maybe we can just do like oh yeah if
0:20:35
so response.status
0:20:40
print these things
0:20:48
we should do that for um
0:20:51
we should also do that for
0:20:54
yeah when you are tagging the notes as
0:21:03
all right so we'll let's do it for this
0:21:13
did you have a small sucker headphones
0:21:27
that kind of didn't work
0:21:36
let's get that comment
0:22:36
this is only printing because it's uh
0:22:38
it's outside right actually like if we
0:22:48
thing which says oh yeah boards and note
0:22:56
this is kind of really neat to see
0:23:00
in the post note we need to do like a
0:23:10
so if you see the response object in
0:23:14
you see the den response so this
0:23:16
response object also has an attribute
0:23:18
called response.status
0:23:20
so if you return that somewhere this is
0:23:23
return response or status
0:23:28
think so here outside
0:23:37
um maybe you need to assign it to
0:23:43
after line 114 create
0:23:58
by default maybe assign it
0:24:21
yeah it says return a string
0:24:25
yes if you go ahead and assign status is
0:24:29
um response to status
0:24:35
and then you return status
0:24:38
or yeah console.login
0:24:55
we need to do one more point well let's
0:25:00
i think uh the assignment is after a
0:25:03
return statement so it's not gonna
0:25:09
if you know what i mean
0:25:11
just do it before the return
0:25:14
uh line one to nine sorry no not that
0:25:22
no no no not there
0:25:23
you mean you mean here like yeah yes
0:25:58
just do save yeah let's see what happens
0:26:06
that's still not good
0:26:10
oh it's because you commented the yeah
0:26:12
yeah yeah yeah it's commented the url
0:26:16
maybe let's uncomment it
0:26:20
um i'll take off your screen one sec
0:26:23
um yeah it's off now
0:26:57
yeah looking good okay
0:26:59
easy that's pretty good so maybe just go
0:27:02
ahead and return the status
0:27:07
we can just check it at the end so line
0:27:11
there's a return status that's all
0:27:22
yeah so now whenever you call it
0:27:26
if you go on the index file where we are
0:27:32
oh sorry script file my bad i'm so sorry
0:27:35
wherever we are calling post note
0:27:38
yeah go up i think it was there
0:27:44
yep so just check if
0:27:50
store the return maybe it's gonna return
0:27:53
um store it somewhere
0:27:57
i'll just check it directly
0:28:00
whatever gets the job done
0:28:04
yeah yeah i think uh maybe
0:28:08
yeah maybe you check it first
0:28:13
you know what will be cool
0:28:15
if we just put a question mark after the
0:28:22
on line 201 just put a question mark and
0:28:24
do like a ternary operator thing
0:28:39
oh i think you need to put a condition
0:28:41
first like triple equal to 200 question
0:28:47
and what equals to three to 200 sorry
0:28:52
remove the question mark
0:28:54
oh you need to um avenue yes yes so do
0:28:57
do triple equal to after this
0:29:01
yep and then 200 after this space 200.
0:29:10
um we need to see what to do
0:29:18
where is that print happening
0:29:28
hold on let me just uh just take this
0:30:00
go back on the code
0:30:03
and just after the
0:30:06
do the question mark thing again and
0:30:08
just do a console.log really just do
0:30:12
200 question mark and do console.log
0:30:18
um something unique which will stand
0:30:26
a random character
0:30:33
that's not nice um
0:30:37
i'll just put here so i know it's not
0:30:40
yep and then do a column
0:30:45
yep and then do console.log not here
0:30:58
and also maybe give that 200 a little
0:31:02
double quotes like sorry single quotes
0:31:09
yeah it's fine it's a triple equal to so
0:31:17
geckdev to give a for this but
0:31:23
oh that's not gonna happen anytime soon
0:31:39
not here this is good as well
0:31:44
enough uh why is this a 404
0:31:50
these are questions i don't know
0:32:03
the thing where is the id right
0:32:41
why does that happen okay
0:32:50
print out what we are getting in return
0:33:01
maybe it's a good idea to store it
0:33:02
somewhere first not here in scriptures
0:33:13
um copy the whole statement of it
0:33:22
ctrl exit or whatever oh no no you that
0:33:24
that should happen there only not
0:33:27
that should happen there only but do a
0:33:30
current status yeah whatever you want to
0:33:42
then just print it
0:33:44
print cards there is there one
0:33:47
um you won't be able to print it here
0:33:49
because it's outside the scope
0:33:54
wait i'm just spinning there
0:33:59
let's see what we got here current
0:34:28
i think it's just the way we are
0:34:29
comparing it really
0:34:38
how do we check the do you want to check
0:34:39
the type of the of this as well of the
0:34:44
do you want to check yeah you can do
0:34:46
that you can do that um so the way you
0:34:49
check type i think it's called type off
0:34:52
so if you do type off in front of it no
0:34:55
just right type off before current
0:35:03
don't even i don't think so it's a
0:35:05
function you just write type off in
0:35:08
uh let me just confirm
0:35:14
yeah yeah yeah just type off in space
0:35:18
so it's a js constant
0:35:25
are you a c hashtag dev as well mr
0:35:28
t uh no captive just like a i guess a
0:35:32
more like all-rounder but i've just been
0:35:35
working with a lot of infra at the
0:35:41
traditional coding skills are not up to
0:35:44
scratch because they should be
0:35:46
do you even code a little
0:35:50
yeah but more like you know terraform
0:35:54
you know more like bash scripts not so
0:35:58
not so much like these kind of
0:36:01
languages if you get what i mean
0:36:05
look what you mean
0:36:42
oh yeah number so that's right
0:37:06
so we don't need this okay as well
0:37:32
let's just try this again yeah
0:38:13
yeah that's pretty good
0:38:19
now when it says node is inserted it's
0:38:23
actually i mean we still need to enforce
0:38:25
the display of that thingy
0:38:28
um the actual message
0:38:32
so we need to see how to
0:38:34
only display it when we get a 200.
0:38:37
where is it being called
0:38:39
or that thing is just just being called
0:38:46
just before we do that okay
0:39:02
no that's right that's right um
0:39:04
there's a being called it's um
0:39:13
it's an index right um
0:39:15
i mean the thing is an index but
0:39:20
is it just like an on click thingy
0:39:32
what you can do is just on click
0:39:37
that's not gonna work
0:39:39
wait where is the save button can we
0:39:42
navigate to the save button
0:39:52
just also about save in this file
0:40:00
so it's this one right
0:40:04
save button return update already
0:40:08
where is that thingy it says
0:40:10
saved successfully and stuff
0:40:16
yeah but this is just the card that we
0:40:26
oh it calls its close alert function can
0:40:29
we look at the close alert function
0:40:38
leave that's in the script it's good
0:40:52
so maybe we can just like create another
0:40:55
function that open alert
0:40:57
and then do the display style to
0:41:00
what's the opposite of none again
0:41:42
what's the opposite of display now
0:41:58
well i think it's inline i think so
0:42:20
hold on we can have a look what do we do
0:42:22
in the css if we added anything
0:42:24
yeah i think it's in line um but yeah
0:42:27
let me have a look for sure
0:42:32
yeah yeah pretty sure this is
0:42:51
confirmation pro do we had any
0:42:54
maybe we didn't css4
0:43:16
here's the update everything
0:43:30
yeah so i'm just trying to think through
0:43:38
when we click save here
0:43:41
we're calling that
0:43:45
on this track with go up for a second on
0:43:56
right okay one second
0:43:59
it's calling update hooray
0:44:04
go down a little the next one in the
0:44:09
wait go down actually go down
0:44:16
go down yeah keep going
0:44:19
until the next save comes up you have to
0:44:23
oh so it's above it
0:44:26
oh it's inside there
0:44:29
but how is it making sure
0:44:41
how is it displaying right now this is
0:44:45
i didn't go on the update already
0:44:49
that's the this function right that you
0:44:54
yeah on the bottom yeah oh this one okay
0:44:58
got this thing cut it
0:45:17
yeah i i i know what you mean i copied
0:45:18
it all right yeah yeah so now create
0:45:20
another function function open alert
0:45:27
okay i know what you're getting yeah i
0:45:31
yep and just paste that thing
0:45:37
oh yeah we do need stairs
0:45:39
or maybe we don't we can just call the
0:45:41
function after checking status
0:45:51
now let's go back up
0:45:54
if we get 200 we call this function
0:45:57
if we don't we don't call this function
0:46:08
we put it after right for did we do that
0:46:12
we don't need this remove this thing
0:46:15
line remove line to it two on it sorry
0:46:18
yeah so just on 204 instead of
0:46:21
console.log yeah just call the
0:46:27
no we need to yeah yeah yeah yes
0:46:31
uh yep and do alert instead
0:46:34
just for the sake of it
0:46:37
i laugh because um
0:46:42
did you see the uh curry is like
0:46:47
the thing tori made
0:46:52
he made that uh like the i can't
0:46:55
remember what it was like that twitch
0:46:56
thing that shows the clips
0:46:58
and then all right yeah yeah yeah
0:47:07
um can you alert the status quo instead
0:47:16
oh it's current status
0:47:23
looks like someone misses story
0:47:32
school everyone's cool
0:47:34
yeah they're both cool
0:47:37
sorry we were just talking about your
0:47:39
the webpage you created hello
0:47:42
finally got my message
0:47:57
um so this schedule
0:48:03
do you wanna tell the schedule crash
0:48:16
an issue where it's like showing note
0:48:18
inserted multiple times
0:48:20
not not inserted but not inserted um
0:48:23
even when there's uh a four four or
0:48:28
yeah um so we're just trying to fix that
0:48:38
this is so true man
0:48:41
wait can you tell us the schedule now
0:48:43
till what what days will we stream
0:48:47
oh yeah um so we're planning to do
0:48:51
tuesday and thursday
0:48:53
for the time being
0:49:06
um okay that's working okay um what i'll
0:49:14
stop sharing for a sec
0:49:18
what's so funny about the scheduled
0:49:22
it's nothing fun man it's just um yeah
0:49:26
what's that money on monday tuesday
0:49:29
nothing at all it's uh
0:49:31
these guys are just funny you know but
0:49:35
funny like literally like you have have
0:49:38
you seen that name like no one punished
0:49:45
are you gonna do the show more
0:49:54
more than once a week oh okay yeah since
0:50:00
should i just be involved
0:50:02
oh you know give me one second i'm gonna
0:50:04
take up the url to test it
0:50:24
case the technique now okay are you the
0:50:26
technology now i don't think so
0:50:34
i mean no one's a lead he's doing the
0:50:41
thank you sorry i really appreciate that
0:50:49
url on still front end
0:50:52
something mess up there
0:50:54
that's right yeah that's good um i
0:51:00
that's why it's showing this
0:51:02
oh yeah okay yeah yeah
0:51:08
it's called the promo code um yeah it's
0:51:11
fine we can't access the instagram it's
0:51:12
fine next time we face a problem we'll
0:51:14
just deploy it to a new account
0:51:18
um so we're gonna create a recorder's
0:51:21
aws account i'm just going to put in
0:51:27
but like there are services which are
0:51:28
not free so that'll obviously come to
0:51:32
yes thanks story um it means a lot
0:51:36
so for a bit of context
0:51:38
um tori gave us a 25 aws credit
0:51:43
from a quality card that's really good
0:51:45
thanks sorry um yeah i saw that as well
0:51:50
yeah it's really generous okay
0:52:00
uh yeah that works okay by the way
0:52:08
that's very good okay
0:52:12
we have five more minutes what can we do
0:52:14
in like five minutes i was just gonna
0:52:17
say um we should fix this as well like
0:52:19
you shouldn't say inserted right um
0:52:24
oh yeah that's true
0:52:28
oh nice did you attend the
0:52:30
innovate um sessions
0:53:33
um i think we do something like this
0:53:43
open bracket here and then
0:53:45
do these two things
0:53:52
you know what i mean
0:53:54
because yeah anytime
0:53:56
like that i don't think so
0:54:00
um i'm pretty sure like i did i don't
0:54:02
know about js but i mean i did um yeah
0:54:04
when i was playing around react like
0:54:06
last year you could definitely do
0:54:08
something like this so
0:54:12
i don't think that that's a thing in
0:54:14
ternary operators you can just do a if
0:54:17
um really if you're keen to do that just
0:54:19
do it if if it's 200 then
0:54:22
to that also you are posting it twice
0:54:28
you're posting online two or three and
0:54:30
two or four oh yeah
0:54:33
true i think we need two or three
0:54:56
which one's better practice i don't know
0:54:59
you're gonna switch
0:55:01
everyone likes the chair
0:55:08
i haven't really used
0:55:11
i don't know if you have seen that have
0:55:12
you seen that mean like
0:55:14
corporate wants you to find the
0:55:16
difference between these two
0:55:20
that's like for me it's like switch nf
0:55:23
i don't know what's the point but like
0:55:24
everyone's just like
0:55:29
have you seen the name
0:55:46
this show the office
0:55:51
and then the person like they are the
0:55:57
have you watched that show
0:56:02
yeah yeah great show man
0:56:17
that sure is like highly
0:56:23
just like if someone likes it they just
0:56:25
like oh yeah i'm just like the biggest
0:56:30
they don't oh they haven't watched it
0:56:34
if you have time i i do recommend
0:56:39
i have all the time in the world
0:56:42
i actually do for some reason these days
0:56:51
so i'm doing part-time one job but
0:56:55
next year is like my internship here so
0:56:58
i'm just gonna start full time
0:57:05
yeah perfect yeah basically for one
0:57:07
month i'm just gonna do part-time
0:57:08
there's no point finding another protein
0:57:15
yeah that makes sense
0:57:17
you already found the internship and
0:57:33
so when i applied for the job like when
0:57:39
on like what's this what's that and in
0:57:43
oh yeah what do you do in your free time
0:57:47
oh that looks cool like it was like i
0:57:50
was like a 10 year old kid like oh yeah
0:57:52
what's that if statement
0:57:59
so the stakes were really low in the
0:58:04
i guess it's different right like
0:58:06
internships are like targeted towards
0:58:10
i think that all they want to see is
0:58:12
that if you're keen or not um
0:58:22
when are you gonna leave that story
0:58:24
oh i thought the biggest scam today okay
0:58:32
let me see if i can find it again
0:58:35
so there's this company
0:58:37
it's a melbourne based company
0:58:41
like everyone hang out
0:58:42
the job description says that they want
0:58:46
html css and preferably react which is
0:58:50
optional like it's clearly mentioned
0:58:53
but let me actually find it like it'll
0:58:55
be hard to believe me
0:58:58
oh yeah html and css
0:59:02
for a junior dev role
0:59:06
guess how much they are like paying
0:59:10
like high or low i would assume though
0:59:20
but you're like yeah
0:59:27
tipping hundred k per year for someone
0:59:30
who knows experiences
0:59:34
i'll send you guys the link
0:59:40
it's just like kind of proves that how
0:59:42
desperate um some employers are but i
0:59:47
but i feel like that should not be the
0:59:50
case just because people who are already
0:59:52
working since like three four years
0:59:57
they're getting left out or something
1:00:00
yeah i don't know i i didn't like it but
1:00:06
by the way okay it's uh it's good now so
1:00:09
i switched one yeah
1:00:17
cool um that's a wrap
1:00:20
let's come back tomorrow
1:00:23
thanks guys um i think we
1:00:27
got done i think we fixed a big
1:00:31
like issue in in the logic sense that
1:00:35
um this needed to be fixed because the
1:00:37
way things were being called around was
1:00:42
i'm pretty happy with it now
1:00:46
yeah let's come back tomorrow and
1:00:48
smash some zero tickets out
1:00:52
yes so i think we're gonna stream
1:00:53
tomorrow and we're gonna stream on
1:00:57
so don't forget to book that in with you
1:00:59
guys um do you have anything else to add
1:01:03
no no sounds good uh yeah can you come
1:01:05
back to this tomorrow um
1:01:07
yeah made some good progress today after
1:01:13
nice do you wanna create like our own
1:01:20
place same time thing
1:01:22
uh maybe we can talk about it offline
1:01:25
but uh yeah yeah today
1:01:31
all right guys let's come back tomorrow
1:01:33
same time same place and
1:01:36
and a different task very nice
1:01:40
cool good night guys