0:00:24
alrighty welcome back everyone welcome
0:00:27
another episode of break and fix
0:00:30
to everyone who's new here of course we
0:00:34
that means we're a team of two
0:00:37
actually three now um from
0:00:39
melbourne australia and we're working on
0:00:43
currently which um relates to adding
0:00:46
um persistent stories to your current
0:00:48
open source projects called scrum last
0:00:52
if you thinking what to expect here well
0:00:55
a lot of stacks um just languages
0:01:00
um expressions aws
0:01:02
um we do things with
0:01:04
apis but we are right now doing
0:01:07
everything and anything revolving around
0:01:10
front end which is pure js and pure
0:01:15
with mixed with some html and
0:01:18
some very intuitive css so
0:01:21
yeah um how are you feeling to listen
0:01:24
we're feeling pretty good pretty good um
0:01:28
yeah so just to give uh
0:01:33
weapon yes just today we
0:01:36
managed to figure out um why the url was
0:01:39
coming up as undefined
0:01:43
url path so that was because
0:01:48
it was picking up the localhost in
0:01:54
so we figured that one
0:01:59
yeah but before we move on i'll just
0:02:02
display a slide uh to
0:02:06
acknowledge the country
0:02:09
restart the actual
0:02:11
text so here we go
0:02:17
um i think you did it in the
0:02:19
background banner not a screen share
0:02:26
meant to do it there hang on
0:03:10
now that that acknowledgement is
0:03:13
did it have any audio though
0:03:19
i know because when you took off the
0:03:22
took yourself off the stream you we
0:03:28
right right right okay so that probably
0:03:31
wouldn't work now because yeah
0:03:37
do it by myself you just serial screen
0:03:40
if you want and then
0:03:41
really yeah okay um
0:03:53
i know how to do it now
0:04:09
okay and this is the screenshot coming
0:04:21
um so the acknowledgement the
0:04:27
meant it was supposed to be the
0:04:30
acknowledgement of the country uh i
0:04:33
begin today by acknowledging the
0:04:36
traditional custodians of the land on
0:04:38
which we gather today
0:04:41
and pay my respects to the elders past
0:04:45
i extend that respect to aboriginal and
0:04:48
torres strait islander
0:05:07
do the things now um yeah
0:05:11
i can change the past and present to
0:05:15
past present and emerging
0:05:18
yes definitely get there i will do that
0:05:23
you'll be hearing a proper slide with a
0:05:28
with the proper vocabulary um
0:05:33
yeah maybe we can have one with like our
0:05:34
logo on the top as well
0:05:37
ah that's a pretty good idea
0:05:42
i'll uh i'll work on that
0:05:48
now that that's sword i'll just um
0:05:53
um better you code today because it'll
0:05:58
all right cool that's fine
0:06:05
no i don't want the stream blog
0:06:10
and that was that one
0:06:18
as i was gonna show you just bear with
0:06:24
um ganesh pushed the code as well but i
0:06:27
just need to make sure
0:06:35
oh yeah that's fine and get pulled
0:06:46
um so this was the change we made
0:06:51
to get that working and now
0:06:55
why does it do this
0:07:01
what did he do local server is it
0:07:07
local server nothing you need to npm
0:07:11
oh you're not in the client are you
0:07:14
no no that's a good one you
0:07:19
know called server was it
0:07:22
so is equal to what
0:07:30
now i'll just keep on using ours
0:07:49
pulse and now if we
0:08:07
so we don't get the url error anymore
0:08:11
promises fulfilled now we just have to
0:08:18
which is still coming as a promise
0:08:23
i believe we need to
0:08:25
jason stringify isn't it
0:08:27
right yeah it could be
0:08:52
let's see if this works
0:09:05
all right let's try this
0:09:15
uh i really funny thing happened
0:09:30
tell you in a bit um
0:09:33
i need to so that's not picking up
0:09:48
result is undefined
0:10:07
that shouldn't really be this should it
0:10:09
because that's the whole one
0:10:14
should have been this way
0:10:19
that this whole thing is coming under
0:10:23
what do you mean by one
0:10:27
you know before this bracket was
0:10:30
over here which means that the fat is
0:10:32
actually ending here
0:10:34
yeah it should end there
0:10:40
uh i must be wrong then
0:10:44
to do whatever it feels right i guess
0:10:52
just do what we have been doing till now
0:10:59
so what have we been trying to learn i
0:11:01
need to recall myself okay
0:11:04
yeah it's in that way
0:11:06
don't worry about that please hydrate
0:11:11
even uh gekko's curious about the story
0:11:25
ashley what happened
0:11:31
because there was a really funny thing
0:11:39
i think it was related to
0:11:49
let me ask my partner
0:11:51
okay hang on a minute
0:12:12
okay this is our story
0:12:27
um i think she forgot as well
0:12:30
but and no no i will come back to you
0:12:38
i just have to recall my
0:12:42
separate for my memory yeah that's all
0:12:44
good but what was it about lake
0:12:47
was the thing it was an outdoor indoor
0:12:50
it was indoor and something was really
0:12:55
as in from a common sense perspective
0:12:58
when i came across it
0:13:01
i pointed it out in a really funny
0:13:04
way because i thought you were
0:13:06
it's in that it should be done in that
0:13:15
if you even give anyone
0:13:19
sort of a thing that would be the common
0:13:22
sense to do in that way but it wasn't
0:13:25
it wasn't for me so
0:13:27
that i will come back to you yeah sure
0:13:30
we'll come back to you
0:13:34
gekko says funny and memorable
0:13:43
no no because it was
0:13:46
really funny because we wouldn't stop
0:13:49
loving at least until five minutes
0:13:54
it wasn't that funny but but yeah
0:13:57
let me recall it and um
0:14:00
i'll come back to you right um
0:14:03
so the promise isn't coming up
0:14:08
the results of wait
0:14:11
hang on if that's that
0:14:17
shouldn't we do a promise here
0:14:22
aren't we doing away
0:14:24
because all right here is fin
0:14:33
right okay yeah we can try that yeah
0:14:42
using that we can't use promise
0:14:49
hang on let me just check
0:14:57
promise result is undefined
0:15:05
it's all coming as on
0:15:15
change to prime or fight value undefined
0:15:21
uh that one promise
0:15:25
oh so we need to do a new promise
0:15:30
okay right make sense
0:15:32
why is data undefined
0:15:38
because no promise or the values
0:15:47
if we don't get any promise returned
0:15:50
from this then and change the promise
0:16:01
returns a new promise object
0:16:04
the solution is to return a value
0:16:07
or other function call which returns a
0:16:10
value or promise from them
0:16:15
all right so we need but we are
0:16:20
actually yeah just
0:16:40
return you promise
0:16:44
so i'll basically do
0:16:48
if we not make this essence function
0:16:58
oh you can remove that
0:17:22
no what am i doing
0:17:24
that's not supposed to be the way
0:17:35
this is being returned
0:17:46
actually help if i get rid of this
0:17:53
see what does this do
0:18:08
i was working on something else and i
0:18:12
googling that from the history
0:18:21
the promise is fulfilled but the result
0:18:26
i just promise as a result of undefined
0:18:33
how to get promised results are to
0:18:44
then which is corner i think where which
0:18:46
force is the current thread of
0:18:48
exclusion to wait for the promise to
0:19:02
for the fundamental principle problem is
0:19:04
that it's handled synchronously yeah of
0:19:07
course this means that you cannot create
0:19:10
a promise and then immediately use it
0:19:13
use this really synchronizing code
0:19:17
it's not possible to return the results
0:19:21
the promise from within the function
0:19:26
so that's not gonna happen
0:19:29
we can't return the result of promise
0:19:33
within the function that initiates the
0:19:42
yeah i get what you mean
0:19:44
are you sure oh no
0:19:47
just trying to think i was trying to
0:19:48
google something else along this
0:19:52
because i i was looking at it today and
0:19:56
um stack of lance i was trying to find
0:20:04
have no i was just
0:20:08
thinking that all the things that
0:20:11
we've done about this as long as we have
0:20:16
and it's given as long as we're using a
0:20:20
promise it won't work apparently
0:20:26
likely want to do instead is to pretend
0:20:28
the entire promise itself
0:20:31
then whatever function needs its result
0:20:36
uh so we can return the entire promise
0:20:41
what do you mean by return line that i
0:20:46
reading the answer on
0:20:49
overflow there's where it says even i
0:20:52
don't know what it means my entire
0:21:00
i don't like choosing a function
0:21:08
here you have to return a promise
0:21:12
a variable so in your function
0:21:18
and is this specifically for
0:21:26
our stats you mean
0:21:28
yeah wait is this a fetch api answer or
0:21:34
uh fetch it so we have working on the
0:21:38
fetch api so i'm just trying to
0:21:41
find out how to return a pro how to get
0:21:43
a promise result in javascript
0:21:50
the return value of a promise object
0:21:56
to be honest i really have to
0:22:04
it's really important okay i promise it
0:22:07
instead of general representative or
0:22:11
the promise can be so
0:22:13
our promise is actually fulfilled
0:22:16
which is the thing
0:22:20
one of the wide examples of instrument
0:22:22
functions is fetch api the fetch method
0:22:29
assume that fetch someday they'll be
0:22:32
fashion data breaker for this blog post
0:22:35
uh i'll jason please hold up fake
0:22:48
simple and most obvious
0:23:06
uncomment this are you just gonna
0:23:08
control that login
0:23:12
i'm thinking at the moment
0:23:23
okay then response is
0:23:29
i think i might know where i went wrong
0:23:45
and then of course i don't need that
0:24:01
and then user so in our case it can be
0:24:10
actually just use that one at the moment
0:24:16
don't need all this for now
0:24:25
don't need that as well
0:24:33
console.log this one
0:24:54
this would probably be
0:25:08
and then i would access the board name
0:25:12
from that response
0:25:17
his best way shown over here
0:25:27
me see what what this gives us
0:25:35
yeah surely that'll be fun
0:25:37
hey can you please um meet your
0:25:40
notifications if you don't want to
0:25:43
close the applications
0:25:45
yeah that was my phone sorry yes
0:25:58
hopefully we should get
0:26:07
okay so this is coming up
0:26:21
to return probably
0:26:26
no that won't work that won't work that
0:26:31
there's a function
0:26:37
oh yeah that makes sense
0:26:39
oh that looks promising
0:26:45
we'll be born until we find out so let's
0:26:50
was this works huh
0:26:55
oh okay right because that's it
0:26:57
promising and we're waiting for a
0:27:01
ah yeah i get it now that looks
0:27:03
promising all right syntax here
0:27:34
why is the result undefined
0:27:39
we are not even console logging it so
0:27:42
can you console log it just before
0:27:44
return just to console.log response.name
0:27:52
no like do return that's fine
0:28:06
i think you need to do sorry that's fine
0:28:09
that's fine yeah here we go
0:28:15
could you remind me about all the best
0:28:19
practices because when
0:28:21
i don't know if you know it's simple
0:28:23
when you're as in really trying to get
0:28:26
something working um yeah
0:28:29
i tend to forget the best practice i
0:28:32
just want to get it working first
0:28:37
for you coming in is really helpful as
0:28:42
same focus best practices
0:28:47
yeah that makes sense
0:28:51
so it does console log it which is
0:28:55
fine but we basically want to return it
0:28:59
it console logs the board name
0:29:08
what if we put it in a variable and just
0:29:21
put it in a global variable like
0:29:28
declare a variable above it
0:30:05
take out the return from here
0:30:09
just take it out like the whole line
0:30:14
and put it at line number 152
0:30:36
hey dad what's that welcome back
0:31:02
so we actually gained the board name as
0:31:05
a result now as well
0:31:07
so all these can go
0:31:16
cool so now that's working
0:31:20
what we need to basically do now is
0:31:26
display this in the board
0:31:35
which is in the index.html
0:31:40
script don't want to do it here
0:31:48
gentleman born body
0:31:55
let's check if this works
0:31:59
board heading here cool
0:32:30
okay so we somehow need to
0:32:35
get that one oh hang on a minute
0:32:38
i should refresh it completely
0:33:01
so it's coming over there as object
0:33:08
probably into google that one let's see
0:33:19
still front end is there
0:33:21
how to get value from
0:33:29
uh what can we google how to get a value
0:33:37
javascript to html javascript files
0:34:02
very nice to the body
0:34:13
um so this is that
0:34:20
that one get everyone by
0:34:27
and this one comes over here
0:34:37
yeah that makes sense
0:34:51
so if you want to display that one in
0:34:59
right this results very
0:35:13
welcome back god thank you sorry
0:35:16
my dog woke me up at 3 a.m last night
0:35:19
had a skin infection had to be up all
0:35:21
night until 10 a.m
0:35:23
oh do you have a dog
0:35:28
wait what happened to it like what kind
0:35:30
of skin infection i doubt that will be
0:35:36
i think he said skin infection
0:35:53
so if we do this as in
0:36:02
from still front end
0:36:05
it's called the hotspot it's called
0:36:11
let me go with that
0:36:14
fixed your front end
0:37:38
simply deprive your belt get name
0:37:47
simply use say telling us to use jquery
0:37:52
call me in the first so i did
0:37:54
i did this using jquery
0:37:58
i had to call me function
0:38:03
it seems we might need to use jquery
0:38:13
yeah jquery is pretty cool
0:38:16
i'm not gonna lie like it's not like
0:38:20
whole another language to run
0:38:25
i mean this but you get my point
0:38:31
it's a more of a concept
0:38:41
i know exactly what you
0:38:44
mean and you shouldn't really be hard at
0:38:47
just thinking um is there any other way
0:38:53
link that just file in your headers
0:38:55
using script we've already done that
0:39:05
actually this is a problem in some
0:39:07
places in bulgaria understood indonesia
0:39:10
bali have actually four hundred thousand
0:39:16
that's a lot of dogs
0:39:26
okay i'm gonna just do it with
0:39:32
yeah like honestly just do it um like
0:39:36
already it'll be interesting
0:39:38
we're using it anyway
0:39:41
so i can just shoot using with that one
0:39:47
that's before i search that's like
0:39:50
um before even big bang is though
0:40:03
in there i would probably do
0:40:11
i would want to do it over here
0:40:30
document don't get bored
0:40:35
no document don't get ready
0:40:40
i know just crumbler
0:40:42
originally used jquery because at the
0:40:45
made since like 2010 yeah
0:40:55
when we have made this it'll be really
0:41:00
make it in react for sure
0:41:06
so much more easier and we can like i
0:41:09
don't know things like hooks
0:41:20
why am i doing that this
0:41:23
i don't even need that
0:41:27
give it a board name
0:41:52
but now we have es6
0:41:55
syntax and js i don't think it's coming
0:41:59
for new code bases anymore
0:42:02
um that's uh yeah that's true fusing
0:42:06
doing something wrong
0:42:10
yeah i think the chat has a good point
0:42:12
though like you don't
0:42:13
shouldn't be needing to use
0:42:17
um but it's fine if you're going to give
0:42:18
it a try give it a try bro
0:42:21
don't worry about that
0:42:24
i'm just trying to
0:42:27
like the woman by her go by crook
0:42:35
motivation at the moment to get it
0:42:51
if this even works in the first place
0:42:55
i highly doubt to be honest it will work
0:43:09
is that how you're supposed to be done i
0:43:12
do have hashes in jquery
0:43:16
i think they do isn't it
0:43:20
i'm not sure either
0:43:23
i haven't ever done jquery honestly
0:43:45
not defined right okay
0:43:48
obviously won't work
0:43:50
because no one defined
0:43:53
i thought because it's importing your
0:43:55
hair you should autumn also
0:44:14
right okay so that's not gonna kill it
0:44:23
function in there as well
0:44:33
okay that's not gonna do it for us all
0:44:36
right you can install jquery 12 npm
0:44:40
those nasty script tags
0:44:42
um yeah then you could bundle it up into
0:44:44
something like webpack for extra
0:44:47
i think you're going to jquery and
0:44:49
browser dev tools console is that
0:44:54
i am not sure i have never ever
0:44:57
um done anything with jquery
0:45:13
you used to use jquery or you told me
0:45:23
query button that was really
0:45:29
all right yeah that was really ages ago
0:45:32
i don't think anyone actually chooses it
0:45:37
you return from joshua function
0:45:44
and screen function in another page
0:45:54
in another how to return about the
0:45:58
how to lead whenever you put from
0:46:00
another from another page
0:46:04
javascript invocation
0:46:12
how to call downstream function in
0:46:18
right so this is only for when we when
0:46:21
the function is in the same page
0:46:45
form another javascript
0:46:49
so all we are trying to do is basically
0:46:53
javascript functions return value in
0:46:57
index.html that's all
0:47:03
uh called javascript function from html
0:47:07
that might be something we can use
0:47:10
uh so they all have actually
0:47:13
done a in the same file
0:47:35
this method way to find
0:47:41
a little bit of decoratory i remember
0:47:46
like this library called paper.js
0:47:50
um it's basically like a canvas library
0:47:55
that was really fun
0:48:01
so say yeah that's fine
0:48:14
right right right right right
0:48:22
so we need to use it as
0:48:30
but to display the file okay so just
0:48:34
using that way as well
0:48:56
that's there which is fine
0:48:59
and then in the heading
0:49:19
i'll stay fellas for a minute oh okay
0:49:24
i think the demand from the viewers took
0:49:27
probably um then we've been down for
0:49:30
like a minute but now we're up
0:49:42
are you an error of complex system
0:49:49
probably just between keyboard and chair
0:49:51
oh i didn't know what that
0:49:55
problem exists between keyboard and
0:49:58
basically a human error
0:50:02
how to improve your card
0:50:10
of calling functions
0:50:13
problem solving with python oh this is
0:50:15
python i don't need you
0:50:19
call the function in a javascript file
0:50:22
from another javascript file
0:50:30
display heading from
0:50:44
javascript function
0:50:49
document quantum heading
0:50:55
don't need this one
0:51:03
so changing this real quantity is really
0:51:05
what if i do anybody html
0:51:13
get this source somehow
0:51:21
i don't know how to display text in
0:51:23
browser you're using
0:51:35
my message body my message
0:51:39
you can call documentary method and pass
0:51:41
the message you want to to display
0:51:52
message for us would be
0:52:18
thoughts on this care
0:52:23
i have never ever worked with
0:52:28
if we're doing it with jquery um we're
0:52:30
not doing a rejection research
0:52:36
do you wanna try making it making a
0:52:40
not returning just make a global global
0:52:42
variable and see if it comes
0:53:08
hair yeah yeah try making it
0:53:22
you know when you're doing get bored by
0:53:25
on line 11 do a console.log there like
0:53:28
put that whole thing in console.log
0:54:00
now you probably wanna stop it from
0:54:01
going to the next page
0:54:12
do you really think
0:54:14
that's the problem as in
0:54:16
um i just want to see what's the return
0:54:18
when we do this thing
0:54:39
okay so the whole thing is returning
0:54:44
no no it is the first one go on the
0:54:47
the promised one so the whole promise
0:54:51
the promise result can you see how you
0:54:52
can access the promised result
0:54:59
just google how to access promise result
0:55:24
the idea of a promise
0:55:33
promise a stand function returns a new
0:55:35
promise we need those i mean immediately
0:55:39
after promises resolved
0:55:43
let's get rid of the value of money and
0:55:46
resolved x and the value based on in the
0:55:49
same way we access the promises
0:56:17
our raptors would probably say you're
0:56:21
and you can work with directly however
0:56:23
weight can only be used inside an s
0:56:30
functions such as similar
0:56:37
no that doesn't answer our question
0:56:41
using promising promise resolve
0:56:53
resolving an array
0:56:56
obviously it's an array
0:57:16
i think several objects
0:57:23
example promised result that my promise
0:57:45
promised results of this action so we
0:57:47
probably have to do in this way
0:57:50
resolve and reject the left face could
0:57:55
his own performance result
0:58:01
now you wouldn't be there it's just the
0:58:18
how does the previous problem solve
0:58:39
this isn't just for promising
0:58:44
i'm pretty sure this is something
0:58:54
yes is that not getting there honestly
0:59:07
so beyond getting the promise
0:59:11
and it's been fulfilled but we
0:59:52
i'll wait for just to stringify that
0:59:58
after most of this oh wait
1:00:00
what are you guys talking about yeah
1:00:02
maybe you can um signify that yeah
1:00:31
navigate to the next part
1:00:39
yeah board id i think we should call it
1:01:12
my brain has stopped breaking
1:01:15
say yes yeah it's going right
1:01:18
don't worry about that too much i guess
1:01:27
worry about because if we don't
1:01:32
won't finish this so i'm gonna put in a
1:01:35
bit extra time in this one yes
1:01:47
actually some minus or
1:01:50
a hyphen failure still i hope
1:01:57
i love your sarcasm jack dab
1:02:13
it actually says not
1:02:20
well when did he want to see his t-shirt
1:02:27
did you show your teacher the whole
1:02:32
i think he knows this t-shirt from ages
1:02:37
it's called this v-neck
1:02:48
that's true gecko but um
1:02:51
doesn't happen without failures though
1:02:57
thousand failures or even
1:02:59
more than that every
1:03:03
overcome that's one step closer to
1:03:17
joining in as always really a pleasure
1:03:20
having all the entert
1:03:26
from you all as well
1:03:31
um yeah so if you want to
1:03:35
tomorrow feel free to come along same
1:03:41
major episode is about to come so if
1:03:44
you're really curious what we're
1:03:46
planning or what we're up to
1:03:50
come and check it out
1:03:59
all right guys um thank you yeah thanks
1:04:03
we'll see you guys as far as
1:04:12
cool have a good guys