Practice English Speaking&Listening with: The Joy of Coding - Episode 1

Normal
(0)
Difficulty: 0

all right hello everybody ah my name is mika

welcome to the first episode of the Joy of Coding is what I'm calling

for now um where I'm going to be like a king on some real sarfoxsbugs

and you can kind of watch me do what I do I'm so there is not

much more preamble than that I'm I think I'm just going to get a to

I'm gonna do this for about an hour and a half and and see how far we get

but I should remind you that none of the suscriptudorplaneii I kind of know what I want to work

bndeabe whether or not its actually going to work out I have no idea thats kind of part of the fun

to watch me yeah get in to to trouble and hopefully get out of trouble again so

well see how it goes right so I am going to face me at secencymorm

my screen hopefully

seeing more of myscrenow um so lets see

here the plan is I want to look at bug one of nine

for three nine ah so thats a amelooktethat first and

well I got a guess will probably take the majority of our time ah

for this episode but if we end up having extra time then theres some things I should probably

to day so we could get to that but this is the bugganinterestedin um

see here yeah this is the idea of the bug at sea was

ah here is a frtwarthewasa

this one printing a calls from the child of the parenishoprogressichoerendile

should not be sink so I will actually that that might just sound like a bunch of gibberish I me

straight the problem so recently relatively recently I got print

king ah ah ah in eatendeswindowselectrolesas windows

m for firefox onlinox I had had it working for windows

like a month or so ago ometimefoigethald aysandisitsworingonosexlinnixswas the last

on patches are currently a pr view but one of the problems is that when

the content process requests that the print dilo

needs to come up mumaritsasokayshow the princeetingstalovsattheusercan

now choose their settings and and say how they want to print something ah that blocks

the content process so let me show you what I mean so this is a neatenasswindow you can tell

that did he as I can I'm getting messages from people as super

or even with seven twenty pe setting apparently you cant

the everything is very blurry a I apologize for the blur hopefully

a dozen rendered this episode completely useless ill try and pump up the fan size

everything if I can but ill talk through what I'm doing a anyways um

any recommendations for how I might be able to improve ah

resolution dropping to hashlivephacking and let me know and a and we can work on

okay so let me demistrythe problem ah if I

bring job from any to this window I then ive got the stop

ok coming up but this dialogue being up has actually blocking the content process meaning

I have another eat of us went over here using the same content process but it is no longer

in any the events its the the content process is completely blocked and

if you wait long off if you block the contemtproses longenif I think something called and its terminator

come round and just like kill the content process so I believe its possible

that if you have this dialogue open long enough your content process will just die

and were thats not great I we dont want to do that what we so

do instead is a make it but the content process is

not blocked or rather here I let me bring up the bug and describe

were thinking as a solution

I will come up the text I'm sorry if this is all blurry people

telling me its blurry and I hope I hope its not unreadable but basically

this is the bog one of nine o four three nine if you want to read up on the history of the bug one

I know for three nine ah what were gonna do our

heres kind of mytentitive plan so let me actually write the so well I'm doing it I like

take notes while working on bugs and so this is a great opportunity to do a and I will write

notes and superbigfitsyyucanseedhemso hopefullyyoucansee

okay I'm the plan of

red is as such I want to make it so that

when the content process request

the dialogue be open we want the

the message a message to go to the parent

to actually open the dialogue but the

age should be a sink instead of sink however we dont like

but the function inseyhulemishurysomecodheremm

that esxcuemeas actually at bringing up these dialogues

yeah thats what happens when were you canceslifprinchofrightnow

as and ah for some reason I just govteryalydirected to

which of I had read it open and it was I finally reacted to my click eventstetswhathavpened

flemesherisancoat um lets see

that all central um

where is it that I want a compon'sprintingand ill pump up the fonsies whatever

to the code I see an ass prank

okay so um and

the ponies when it crank it

to that hopefully thats better okay

um eltgodadmiangodeleatthatumthissis

the proxy on the child processside the contenproseside

heres that somebody wants to open up a a print dialogue so

there is some stuff in her to make sure that a we get a sense of which window

belong to and and like were it were making you recollect enough information that we can tell the parent

what to show how to show it um and to do it properly

dwycerialize a whole bunch of things to go up to the parent and tendecyrialized at whenever comes

and then theres this function ah this method right here I should say

method called senchioprindilogu and this is am is

sinernussowenthis returns ah the parent has dismissed

dialogue because what happens whenever a we shouperindialoges on windows and

I and I think its the case roissecas well is that we actually like the the dial

xpinsittownaventloop its a its a kind of a mortal dialogue that spends its own events

so its blocking um let me show you what I mean so this is the

ah that sat senchoberendoulthat's the method that tells the

a show the printdilog and be responding

ah a printinnparentthere's

a method in her call receive choerindialaugusiswhate

receives it on the parent side and we do a whole bunch of work here to deserealize

so the child sent up and figure at which window were trying to open a ialoaginn

and then we eventually get to this function calledchofrintdilou which tad

see doing the job hoping the dialog in the parent side because I and you probably wanting why are we

doing all this work just to show the dialogue on the parents idelienly open it in and the child

and the reason for that is that the a child process does not have the ability to open

dialogue it doesnt have the ability to end motaldialoguesitreallyhesthe only thing I can

control is whats with in the content the web content thats a deliberate choice

and so whenever we need to do things like a mock about with the browser

crown or open windows or something you have to talk to the parent order to do it

thats a intentional and I think its a its a good security

terestigaoneofthe things that we want to be able to do eventually is to sandbox the content process to prove

from doing a any sort of communication direct communication with like the

ring system or the pilesystem and to go directly through the parent for most

things um we haven't we have a really weak sand box for windows prepared but we

don'tave any other sand box and just yet the thats a goal for some point we want to see

as the contemprusess anyways uh I got distracted so there is this functionerechowpri

dialogue that actually shows the dialogue and this is also

id of singernesswhen I say sinernas I mean like its its a blocking

method call so that whenever we get to hear when were insuring success of the return value

checking return value the dialog has been closed and

thats because the dialogue is a but in the noniestonesscase

blocking other windows from trot from processing and the reason were doing as because the dialog

spinning the eve and used a venlopsowreblocking the main of it loop but its been

estedofvanluopnondnessteodaevedlopsare generally a bad idea but I mean I

as a kind of a another level of complexity things um

but in this case its its been working for us its the only solution

I think I am for this particular problem ah so were going to go

spending in a vantlop so like her in me let me get my solution ran out here

now that you know that stuff when the controvrserequestofdthedolarbyvnewanta parent actually open a dog

the mestershtolbeacingetstolofsink the child should then spin

love and these of enlod

and a to do

apparently the font size still needs to be larger

hmm thats what can do a

that I max it my fate side I can try and maxitdot even

this is crazy I wont be able to function if its a if if its much larger than

like that thats about as maxes its going to get I dont know

has anything else we can deuda to improve the size of things

oh hopefully you can read my nose as well if this does end up working

like this I should point out havent really like ive been doing these pilots on you to live

and a lower the resolution as someone in irsy

resolution I really hope this doesnt end up being like a a um

a deep but my resolution or debut my my screen

cash on instead of a accession but lets give it a shot lets see what happens a resolute

so but isscaleet led spring it down some

on mitstryitus

is that better

is let me know in irseeifthasbetteral

was better for now I dont want to waste too much more time so I mean I keep going um

child should spend in a nesiofeatleop and I

wait for a message from the parent ah with

the states of wit

turn value in essolhosaywrhthereturn value of

having opened the printing gilock

so well actually a toenectedovevatlupstas kinda crazy but were in a have a net

eventlopinthe child waiting for a message back from thee ah

missus back from the parent saying that the dialog closed and telling us how it closed meanwhile

apparently it opens the printing dialogue its going to spend in anesttatofvatluop

to actually show the dialogue um thats something that I dont need a write um

the at least for the ulinexversion which is on a most familiar right now

we just use a gdikadialogand we tell it to run and it blocks and spins

and love and ah and I dont really have to to worry about doing it I have to work

but ah writing these spending eventlupany child process and then waiting for

no from the parent so heres the game plan lets try this

just added a little a check boxhopflyo can see that I like to have these like little check

boxes and I ever note so that I know how I am progressing and I can cleaerthings

lestrokingthings off as I a as I proceed so lets lets ratsome

plane down hum the first thing I want to do is make the call to

what was it a so

hard to read a bit harder for you folktereetwower watching him sorry but that

now choprindilalanthcalledtesaneshow

in dialogue he

instead of sink so thats a matter of altering the printing

I pedeeltthat'sgoanibreakawhole bunch of stuff

ah and thats also going to take a little while to it that that idea

a little bit of a challenge to kind of regicg things to be a like

changed some of the like method a definitions and one

cliraionsbutwellseeweregoinntalterthat and then we are going to what

ntepahafter the

here my foniestruckinkinafter

a cominvuldtogetherieveanen forty a fund after

the am message goes to the parents

to open the dialogue spin and eventlo I

and a vhantlope there are a couple of examples of us spinning aside

and parzifgeccoi'lljust find one and andkinerusasattemplet

I should be pretty straightforward the next step after that is we need to wait for a message

apparent lit I havent actually tested whether not this is going to work

I'm pretty sure that because were spinningannestedtafbataluwil still service messages from the parent so like me

is that come in to say hey ah your um

to know that that will totally work id like this that should work the whole I

it evenlepusto allow masters to come in from the pactsowuworgad but what we need to do

is make it so we need add a message listener probably nacsini

I think has to be because coming for the parent and in a sink m me

a message methocawhataveryouanecallit from

and to signal when the dialogue has

close and pass the status

he returned oh say returned rare

um and then what will do it

stash it like whenever the handler for that

age in the child should then

stash those values within

a proxy instance and

I think that will be safe pretty sure that a

I I assume that like if the service were gonna be holding like this state from

one dialogue I think its pretty rare to be opening a whole bunch of printing dialogs all the same time

um is trying to think of is going to be a problem here

ah like suppose I have two windows

and perontdilogusind both and I canceone and then cancel

the or if I cancsebotetathe same time the messages will come

in a particular order nested of at loop

so ive I'veskipedtastep here ah passtreturnedvaluethe

the very important step as knowing how to escape the nesodeventlope um

have the

a proxy noticed that

he aint message from parent

and sent and egxitannasitof had live now a little bit worried

as I just thought about this its an edge case but we do have to worry about the case like this is were

tlbugscancomeinif you just assume that a user is ollganna ave a single printdilogu

and I mean invariably we have like what have a billion users on fire

or somebodys going to have mutableprintdiloges open at some point um

what a hangaseannickinliehackingsi

shighverydbodysorrydustjoingdtlashinwhii sthevidyoresolutionsaloweven at ashtymaxon

settings out on my side I dont know I

wish this were looking better for you people all trylouring my resolution yet again

all ill bring it down one more notch I dont know

if there is anything else I can do on my end

I mean just try one or two more things hold on to trying

I have ive pumped up the fat so much is becoming kind of unusable

um maybe theres something in my settings to

a video besqualityamsentingthe best cow best resolution

ill try best resolution

okay so hopefully this is better of

you can see this hopefully you can see this um

I dont think theyre okay imelssas its better great

tidieariodum so maybe I can actually

opprtunitytta shrink some this found down then um because its kind of ridiculous

and its its difficult for me to to read my ridsitethamadiineedobealere

plan

okay so

thats the plan of record I'm just thinking now about the problem of multiple print

and how were going to deal with that my

yes

what will happen so it let me think through what happens because I

need of vent love we could end a we could end in a priest

situation where we have like a whole set of nested

like an nestadeevatlobeorruningtimthenes tedievalopewet service a message

parent ah or from sorry from the child that puts us in a nest

lo while were still in that first nesteeevitlioteandthenah we are

kind of in bad shape that doesnt sound great

um at tacolokat what we currently do cause

ah again this the spontsiyesis ridiculous

go to bring it down hopefully now because my resolution is so much hire ah I can do this

out too much as it still to a

oh no thats not one I wanted

no its also not what I want and where was I before profile prifencesyeas

it is what I want okayothiglikethat this is more

like what I used to go gulokiso lets

something and going to I go back to my a instance of firfoxhere

I think I just have the one window and um

to open us in an open up to nanytenaswindos

its a debugbildsotsginatakehemamainevery thing'is gonna be a

oh I do monty that didnt want to resise my viam

I I want to recite the window

cmongripywersthecriptyeandneetamagrippy

I need them agrippywhere come out

lemigrip bank you

so at one and then I want the other

I really apologize about the stream resolution richard is there anything else we can do like

I ive done everything I think I can on my end um

is are a setting I can do and video that I havent thought of to help in creimprove the resolution

I'm in a play with a little bit from the hand and am

any wants on the stream if it falls just to a paid refresh little

to be I may have to interrupt it to get some of these changes to take in any of that

recording and were making is higher resolution and so when we post a recording it should

pray nicsrecharbrihardnelesska everybody

the guys atom okay so what I wanted to test was what happens whenever we have

a print a dialogues sees me open in

a note tess like do we allow that it looks like we do

so this is running in us to do an love this is also running in us to do in love

and we seem to be okay with that

its just a matter madbeitsjust a matter of remembering

some unique characteristic like what I'm worried about

is accidentally in this case of having multiple windows being opened

I'm having me returned values from the window the confused

two different instances of ah the dialogs being open

at something I'm a little something in word but I dont actually know whether or not

its worth worrying about but it is something that my in my spiersensesortingling

so maybe we should think about that for a little bit

um but let me finish writing out what I was riding at handle for that message in choldge

satle'sdviys within the proxy instance and when the event

o exits um

these values should be returned to the original call

right because there is somebody on

child side that said show me the print dialogue and that speak

turdthalookboutsthe collar that we need to be sending this information too that we gathered

from the pan process at the end

so I mean I kind of stew on this whole handling the

multiple dialogue window case as in the mean time I can deaf

I do this first bit lets do that right now which

close steepbagbilld

zemeossasa looks great so richard wraveyour doing

it lets its its working so thank you

so what I want to do here I want to alter

closprintineipechepintingipeda

um to chain

an so these two there is actually to theres like

this show progress um

show progress method that also sink I'm actually going to work

this one and then keep this one in the back of my head hopefully that the solution that I come

this can be generalized in such a way that other duplicate a too much code

and so that for the show progress case as well because the show progress is used at like pretty

chiedately after you start a print job firefoxwill show a progress like a little window comes up

and it shows you like how progresses proceeding in terms of

tracing the layodandtendandblasing ogtiorprinter um

fun fact fun fact I found out there s a cancelbutonon that progress dialogue

that canclbuton straight up does not work it has an not wore in years

apparently and theres a but on that but if you ever start a print job and firefox and like can

a lot in a castle that some like if you can let in the

still I should say thats a a surprising result I filodthebaggonit I will hope

so once I am I am once I am

done with the stuff okay so lets make shoprindilogue

a sin that easy I can do that um

ecllyasanithink it might be that easy I think it changes

no I think it might just be that easy shoperndowleyea

lets lets see how much she too and I oh

so this was something I was sitting before um if you

but this crash o was sitting out this is what I was wrestling with lasttweek this crash

is actually an assertion failure because of something thats going on in cairo ah

and this is something that I will see every time

hutdownmygtebugbuild um after having open the printing dialogue

and thats just the way its been since like firefox for or maybe in longer although

someone says oh I think I dont remember who said in in the bagreyfile about it but

it might be that I just have an out of a version of cairo are the cirolibraries on my system or

or maybe its two new version of the car liveries basically a its not a big

so dont worry but the fact of him crashing on a rash down tryanignoredthat

I'm out do

so lets lets try and build what I just did

I am a keep doing it with the debugandirllednow

changed hemsmypedeelahavetorbuild this directory ips I pedal

its kind of ludothere's like this adiwansavodobutr

multiple levels of things that you need to rebuild onaveyouchangeanipedatpressur eoneofthemth

I see I be and I think you also want to build the directory

o of directories of anything thats like consuming that I pedal

some sense so I gave you that and I say do what I do

cause it all kind of talks so we that bill

lets think about this so that is

progress spinning in a annestidevetluple t'sactuallygettatsanothereasy

I do right away ah I a reset my

one is there and lets find nestedofvetluops pretty sure of seen as before

where did I see it I think I saw them like anosezulwindow

if you notice I must

exireinstad of emmaxire its the best inmitenon

again mister a a loop think I did it and my god to

level window creep top of all cretewinocreakcromwindow

on top of a window is ive seen it whenever I was dealing with like new

no stuff so ah here it is

and as process next event this is a spinning in a vent

m lat'sitsfi

another example

he asked globlwendow

I see yeah and as process next even

ill we we we call we create a while loop while

some condition is true we call anasprostess next event we passed some arguments to it

I'm not sure what those arguments do I should probably find out so

I am to the definition I pass

thread and may wait it may we

mainweihtbanywaietomewaitprosess nextdeventmanwei

we may this some documentation on this iconryet

yes

he and fried

oh no thats just a stack

sunralatid

mm hmm

hmm well I dont actually know what I

to a may wait all that I mean I as a theadowith waiting clearly

m in the context of spinning the eventlope

um but I dont actually know whether

he waited

curious I need a now the stuff I nedoknowieaudoknow okay

process next to vent well

I define process next to me

find the definition I think thats not her

its on a the red is that at its on a thread

process next event it is a method on a thread a thread

as I thread so

as is nexttavanharyaperioab

nfrander that of true indicates of the method may block a calling thread twas

even right process an extent

no pending events than the smith may wait the pendingonevaleuthemeiwyprandter

tell if an event is dispatchedthesreadthasmethodis reentrangfor may only be called if the thread is the

red re entrance so maybe my nestedevetle

said so bad umipliamprameterth

true indicates that the method may block the calling thread to wait for a pending event

oh I understand um I guess that doesnt really matter if

while love because were just gentikeep calling this thing um

and I and

think it matters if what other people do

and as what was a ennesprosessnexttofen

where other people tend to be

these true some people dont even pass a thing

some people say false shes a m

this is me cargocallding or trying to ah

do people do this some people dont pass anything may be that something

can be addressed in coerviewal take a note

to do find out if I I

in the event live with and as

process next event where there are not leave want to pass true

falls for a man weight gain

we dont forget whats next twistnextsanalleahad

has this finish building I freaked out so a singoness message

returned ales right so I screwed up I screwed up people

um thats what its all about showing you how I

so this a sink method to not return

stuff that is not what we want to be able to like it doesnt make any sense and a sink

ah doesnt get a return value it doesnt get any information from the parent right away

so we need to a

suffout the modified setting though thats like what we want to get back once the

dialogue closes on the parent light there there will be a

um a way to contact the child to say like

but come and I will call it um

I I dont know

naming hard especially in public

the press seas

pretty bad umnolpeplasto

right cuobordasthene

I am I put that there for now

I myself but I will commentedoand there

this thing is now on returning values ah thats going to break

other things how my fee the bits of cold where we

say deal with the stuff that those that message returned

ah but we will get there we will get there

I really hope the quality is has improved for people

um I apologize if you been like looking forward to this and its just a

vlarymessand maybe a robot voice hopefully

worsescasecenariojust come back and watch the recorded stream when this is all done

muliatlike a perfectly htescreen scream perfectly he street

um everything will be hundory so worse cat

are come back later when the stream has been uploaded as a recorded video

ah okay so while were waiting for that to build and fail cause I'm certain this is going to fail

pretty certain I am highly certain

these are warnings that we ignore I have a feeling is going to fail

inalintingstage

and oh I'm so that

a kind a done but now we need to

alter

alter and as printing printing

prompt serve this proxy so that it

expect return values from sanshowprintdil

I wish I could draw a free people

which I could like show you a piece of paper

as he had an drawthis out a ms theyre like a drawing to win her

I think so pictures

a picture of a drawing that I take a hi'lljusttryandescri

so and I can describe what I'm thinking

but I'm probably going to change it as I go like I said I'm in a thinking on my feet here I'm thinking of

ytsingtomyvants so I'm let me just think a loud here

and he to alter the printing service proxy pretty pronpterhis proito so doesnt expect

yes from senschoprndiloguebutimediatelye astartstospininesto

love right that makes

ads and then the parent once the dialog close

and a message to the child saying here are the modified settings that these are

up in the dialogue heres this um that actually

well I mean if these are cancels out of the dialogue were still sevingtamessagho

chiltoyeggsoftheumthenesedofvatlope I guess will return

states code for the for the dialagugaeit and

potentially modified settings am as possible that the setting'sworet changed that these just cant

I just had okay and thats fine and I think that

he owe did fail told jack

and that was not unexpected

heres crawling up in vibe

I care its complaining because

hi

seveshaperndialogue right right because it yeah

its expecting um

he was hit

ritual bull was hit on is just a warning

if its probably related forspedyacare

caatpolcadeanabtrtofbatsrectybe printing parent because

yathers something I havent implemented one of the functions properly changed the function

signature and it exists inside the like

the haters and stuff that I be as librarysspitsoutbut I havent inplomen

to properly but I will get there

I will get there so after

turndinisecondambutididnwanlwaseioeetran pfathere so

what I want to find out was whats the information that we sent back de

a morfihdsangs sucsass

I think in this case we care about the

the status code

were kind of endanger here if the no no

I dont know if the parent dies or speinginesadafvantlope

the main threat is not blocked would here about the parent dying we would

down the process or a gay okay

art

so

thats all to the codes that doesnt expect values wait

and before we can take I really wanted finally I want to like feel good about the

my worry is that a printing dialogue on the parents

closes we sent a message down to the child which states it into the printing service proxy

proxy service is the message to receive the message

to to receive or settingsadsatesinsaidtheprocy and then immediately

send those values to the collar

if two windows were open at the same time what would happen if two

like say closed at the same time the user has somehow magically hit

okay on both windows its not going to happen at exactly the same time but very close together what will happen

I dont think there is a race here or is there race here try to fit a rate

people um my get says that there might be a rat

her feels racy um

tiancal close dialogabllclotse valogubell close

dialogue a because its um

whichever one is on the hats interest

mister deventlo

which every one close as first will be the one to send the message to the child

mesgestafsentin order

second dilog closes and other message comes in saying I'm done

the vested to doublenessetofvorlups

the whichever one received

like benesterdaveluthefirstwhantehgadthi nkabautitsthinktingtitingi

which ever on receives

the message first its the same to the problem is that is the same

oxiytheandhisprinting prompter is proxy if the service theres only one of them

entire a child process whereas there

I mean its reentring you might enter the ah that choperndialoginga

times without it having exited because like you have a whole bunch of people pen

enloosoouehadahave turtles all the way down with me

elupsanistryhicuyou service a message saying of got result

that loop

which live which wovply

deep it loop is the one that will service the message

a true

oh boy um

I guess I just have to build it and find out like I'm I'm worried about stuff

actually be a problem and trying to like simulate it in my brain and of having a

our time um multiple messed of that lubesircausing

baindamout so lets just try building it ah

and screit lets see what happens but I gonna take note down

I mean a taken note to make sure and investigate

potentiality for race conditions

with mothpole dialogue windows closing

mpomnestedoventlopes and setting

being dispatched to the wrong color

okay

no taken so we will get there

lets go back to what we were doing before why is this not building

how is the problem so I'vecopleofwaysasslutiontoatrilleal

a couple ways as solving this ah clearly I'm not implementing something properly

am ive changed the signature by changing from since he had to sink

I know exactly remember with that means in terms of the names of methods

but am a crepe on playing pryfastenlose with methods and function

I guess that thats me being kind of half a javasfripdeveloperindha

fseeplusspostevolprnow

or whats looking here

I'm and what did I call it it was shoprindo

gshowpraindiala

no choverindialoguprin prince diealo

received chifrind dialogue should return

in and what are we doing we are plans

you I I see printtanparentthat

ah yeah okay that

the problem we are always supposed to take settings

was passed these like pointers that it was supposed to fill with its return values which

cant do any more because we cant return result singrnesly any more thats the problem

am I in a see printingmparentassee

shofrdialogueyeahdownher

these two values returned value in success

doesnt make any sense any more so where you go

oh this is not on me

censtomymoresucphessiclsfawls

we vows another thing that I had mocked about with

but for

lets just get rid of these for now

um and say like this is

ah the child has been spinningnd

ive who waiting to hear back

to her results here bout

we return the results

message which frees the child

as from its used a eli

ilidadthatkindofdocumentation more for myself as I'm working on something

my checedou before I finally put up a patch but that helps me figure out where things are

and what whats going to happen so um

that might build now

oh you know it no its not going to because the other end of the pipe um en

fawsprintingiesenousprintingispromtservi ceproxcythisthingis

really is very much expecting to

be able to get modified settings back

so

for now it so

now the waiting game

parent process should be showing

printing dialogue soon in the mean time we need to spend

I rested a banealope

while we wait for her

so the dialave to be returned to us

so thats where will spend it and then well get like

a success and modified setting stuff back from that message um but

no its just have success ah this will be false by the fault but

return failure ah and a sarafarefailure so I think I fankthissubuil

its not a work but I its gonna build there is a difference be

piling and working like if it compiles um

thougt'suninitializedyea

I think itd be false to false the worry about it

I just want to make sure that I'm on the right track here I want to like

the very first step is making sure it builds in my mind am and then I work on correct

is but just getting it so that I can test the correctness thats I mean that seems obvious

it is obvious

while thats doing its thing alterswodisrespexpectrturn

is okay spinninginestedevenloesowetsthatlookl

I started to it I found some example code we are looking at it earlier it looks like this

like wow something

something you do and its process

next event then you pass it

put this tisfellaspassingknowlandwithtat

so that I mean

be balled um if not thread

as the current read of a makesense

okay

so say a pointer use the current thread

I should probably I shouldnt be ever

the main thread whenever this runs

I should be safe okay he and his process nexteventinwhataoido true false

tufalseidnnowispersonalrehereded true I dont know what the difference is really

I went in

we were in an event loop here its going to keep hitting it like

they are not we block forecintheseiiresinapassdtrouofornow

thats what I saw here I dont know if its right but

I will actually figure it whether or not the right thing whenever I get on the stuff later

so thats what its going to look like he built

successfullthotworddempt so now its about spending in a bentloop

so this is where we spend money we go wow

something some

and asked process next

and all pointerandtruesa

this is in a break um

lets just do an experiment

as us maksurehat the child process

continues to like well end up fee print dialogue

we should end up still showing the prondilagandtapparent were not going to react properly to whatever results

its but I am pretty sure that be with this code um

and after you know I my as ages do while true

pretty sure that the content process

continued to am like allow me to scroll and separate windows and stuff

with his cod lets testthanypofices so and pilledaga

I have made changes not to the ideal but to this folder soil built here

and link that to what happens

sinking linings good

I was lincoln then linking go

thinking about drinking some water I

but a bump

dont fall while I wait for that so

spendinostadveli

we made this work its bullied but its working sorry for cursing

um like it some I the stupid loop that will never as it but

something

we have to add an asingmastafromftapparento signal when the dialog

to close and then passtereturnvaluestwe' rgrntobeattingsomethingneuetoheipedal at I had said before

now is a great time horewaydfor the stalk were done okay great sweekendustus

so the task case that the testing scenario is

open a print dialogue have two ettauswindosopen open a

ialogin one and make sure that we can stroll in the other if that works

I am

again scantikea couple

seconds for the browser to start up because a deepbugbuild

so second etenusweowcomanright

ill go to read it I so my optu

for me to plug a I read it on read it called watch people code

um thisses where you can find a whole bunch of st

as a people free like live streaming um you dont have to be a read it like

ohtocratean account but there is some useful a useful links to streams

that are going on if you are interested in this stuff and I'm guessing you are if youre watching me code

estednthestuffsofalgymy test case for scrowlingaiamanopen crontol

of rent and he

I could go get you get so were doing the right thing we are doing the right thing

I I

actually work out we had better at out of wood and on

ah

epa fail asters

so ron so haled because the

I still pro is still spending the evently that is happening

can tumpboffwenosso the child is still it is stuck in its even

I could do this like at a bunch of times and ill have this like

her a may be all it

it might not be a so why would we be showing this

thats curious

showing this printerarrosomeprinting from sialteisnotcurentlyavelle

okay I'm curious lets find out so

very given air message in echo and you dont know it where it came from her life what I tend to do I

for the string the string somewhere I used the exireumtolcforthe string her

p are not available thats the key for the string

ah lets find out where thats used ah

okay so it I think it seen as before though I its not

I'm not actually seeing it being used I'm seeing the definition but that is very mysterious

my not seeing a ah why am I not seeing it being act

used in a dialogue and I have a feeling its because we would you like some metros

short cuts and stuff as print vengenedancibubevan

her yeayeahyeahmakrowriderinteforerror

label so what was it

not available the hard out veil

not a valeblefrhirornotvillso we must have got

not all

and who fires that empseforeronotvailwon

and its error not available thats what we

fired as her not available

but not available

so not too many results whats the under pending

lets oogunder which it no

ah all right

well I use the debugaur cause I'm really curious I dont know why were showing

dialogue I know were still spittingthatiggestedavatlutdthatiy have something to do with it

I will quit I will attach you to be or to find out um

why were

I will come in

thank you

go down I am your control see you and like

five seconds for three two

yeah

if were in an as to the ventlopwand we die um maybe

sad I thats bad news

okay so lets to run and again the same undoing

s j d v to figure how we got

that her message cause I'm curious we have a mystery and I'm I'm curious now so

current mystery why did we show

from where did we fire as ron

bailawall when attempting to print again after

ingandteredthenastadofvenlopein the child

thats the mystery

I guess we are really neat

secondonno oh okay so I

print and then cancel a man we should be an a

so I love ah the child that seat for

said

I attach the method we want is

ah in an we asked prince

and

so for an arodilelog

break as pranenjaneshowpraynerrdialou

at great points at

tom

why why why why why

as doctomatviewere

called print on line three six six eight

and as doctouminviewerwhereisthatwher

as toccarherit'sunderladfaceslaefaceands tack

can veer walhoslinethreesixsuxces

if we are printing another you

tenegastattheresentlyhthakheres because this method can be called while another is still in her the pretty

his could exam for the only time the comprnty more than one job at time is the regression tests

ah

so if we attempted in the shade of print job

or more already printing we fail out

and yet as all open up a second print

g earlier today in notetteneswindowsswitswhe

o yet his printingprinti'spnt

mm

hmm

esrahtebatdownfir

a there is coming from and is printengin

no no no as pretention and as document viewer print

um

it is copies

or he lets ron

sevrdnowtwould copy the formatting

a car

curious to know why a I was able to get need

two printing dialogues ah for nantyconeswendows

so a thing to idrectiate how come we can get to

dialogues in two windows going up and none

t is but

any ties I had the us errornonofvellwle

problem okay

for that for later on tikonlet'snotgonistracted

we have twentithinkamanikeepstreaming for another twenty five minutes herself

m were actually making pretty good progress ah the next

step I dont think were at it all the way done thats not

typically like bad bad be incredible if I got this completed and like a pat

by the by one of the streaming session but were actually making a pretty decent headway here

except as to add an acting message from the parent so comes from the parent its handled by the child

the signal the dilunhasbeenclosed and a pass the return value

and that

we get well check for that stuff in here so

see this is going to like send something

I dont know what its going to send um

by

so a unused like

n a chosen printsedings

in one and chosen printsettingssa

n print dialogue results there

results result

we call result sanprintdilohu resulveimgena pass in

ah well what was I doing before

as returning

and success

f in sand be

result

and the cigrinlased

ada and options we show the print

log

so here ah okaylcacaherandas

resultladialoue result equals

shuprindirloge we dont want to insure success here

um but

diet resolved so in a pass back the dialogue resulted

the matter while we go as it might be air it might be because why are you like clothes

I'm pretty sure theres cod in her that explained it am as print

dialogue service was a is called printing prompt

so is priingnpromptserviceisone

like a unixtpttinpromperis

a dialogue print

eric and then you call show pro dialogue show

I wait to die

dohalonstutil

srihdher

oh this is using the

sort of back up the zoo dialoguha we can show it for some reason we cant get a head on the

naive dialog window so carltominson was telling me about this yesterday

saying like theres in this printing code there is like so much history so much croft in

to herself we don't no ones done a really good job of figuring out what is

use what still needs to be supported there is a lot like I was really old cold in her

I think the example I used to as like printincoadeis like busting into a

a shack in the woods and fighting shad carpet on the ground in a discoball and dusk

breverytayngindthere's a fridge its still getting power but he

in a fragesslikedthelandtattime for god I had smells really bad

thats kind of with the printingcoat'slike am anyway

but I digress so print dialoguars thats what I care about ansihprintdialogues

servisrimdialoguserviceantslikeoveracove rengineredlike crazy

um theres so many inner faces I guess thats kind of em

prinpyprompseroisbatisisg

facueriwassopedilon show

what implements this show

jump to definition shows

pddoligservicsshowefrindialg anyway this is what I want

so you I and as erroboardifthesarindicadodnotoproceed so like we return

we only return and a okay if the user head okay and chose some things

he actually returned something that does not qualify as an ex and as sue

ah if these are like cancletoutorhidax on the window or something on the prince

saonsowe have counter that case here so thats what were gathering with dialogue result

at it we dont make sure that its successful um because we still wants end the result

to send that result back to the the child and so we say

sandprintdilahdresulthavenwllpassd result tassel do

a maybe dial

a dialog harvey

now called tholadarveobenusing result to many times here

amingtarrdumla'stothat

so now we have to alter the ideal ambettingcopons printing new

you are

and what was I going to call this a its called

it sir in a sings method called

a print dialogue results

and we pass actually changed the order things were not passing balls

any more were passing

m ah heres the heres the other thing we

I have to return we cant just like return true and

this function the child is waiting we have to we have to get here

um

so we cant do our old trick of returning true in case something goes horribly wrong

we have to return result of the child

so maybe

so and success success meeting that like we got to the point where we were even able to shop

the dialogue um I guess may be icuvincotthadin

error like a as are failure or something

how did

he is

yeah

hmm

mm hmm

ah heres what I'm thinking about

I want to make it so that I dont have to like call a sand

love result every time I normally would have bailed out with like a return true returned true

it to me doesnt sound very good so what I might

and doing is creating some utility function

return to me a result

that I can pack like a dial

or that I can use

and a result that I can pack away does that make sense

sotmakecents

the atmaksenseadingamakense so

oh lets create helperfunctionisprint

parent um show

in dialogue and it will take

be the pros or parent

parent and hen caused print

data date and then it will also return

pointer who also take a pointer for for data result

the spell printing

I think that I work answered to find a bit

I think what all out of doing is calling like

show friend dialogue parent tea

and ill have like a ring on tad

at as resolved

dilogarveclosshmsithinkatl

and then no matter what if any of the screws up

we called this

yes

something like that I think thats whats gonna look

a what'strihetsomginesscowpalthes uff

to me that last bit at the end here

okay domed over here

while down here to meet this copy of stuff

I am printilousodo we had everything we need

I think so yes

returned I anytilike if not peas are failure

aeraterinerandenisarishere instead

yes sure success

um

as the tycerilization the act

showing of the heres where we actually to this pit

here we dont actually have to um and sure success because I

said before it might be

it may be a like the import case

pasentyresalts

save me

arhyclosechoprondialogue

mm

so if are

to be one or two things as okay I brush

I made I should as sure success

I should do a olrturnteaboard a hand

we wont try and serialize back

and as prodlyocar

thinghat's probably okay

a guest but I think it might be okay

so thats whats going to go on in the part

after add this so hold on

in so dialogue ourvelat's

a people putting return values in side

p o has resulted

yes they are as result is a thing we can pass back

great as a result are

I

she just call it hervysaiddilaeavy

I need to different now

okay and that will save this and then

we had a helper function to the header

pare and to printinparandthotholas that called

its called shoverendilogue

I will make it a private method

a show print dialogue

tekinofprioerepparent

okay

but see if fact compiles as compile

is half the battle a quick

about this is going to quitcklenliagan'causit'sinside that

crazy nested eventloopwhichthathfekillet

I heard her we go build

so its too twenty ive got about ten minutes to go

there is no way in a problems problems problems

now what there is no way I'm goin to get all this done

if you are interested in continuing to monitor my progress on this particular bug I'm

I'm going to actually drop a comment into this video to a live here I can

I'm able to share my notes I can like put a public link

inside the video page I'm putting a comment in

here is owing to the live

for be gononineoforthreenine

to comment there I just

comment to the video if you feel like refreshing am

or what not you cannot you can see get a link to his nose

so after I'm done like whenever the stream is done I am actually going to go back to my desk and continue doing the stuff

I just wont be thinking it loud and of my thoats getting a little sore but I will continue to hack on the stuff

cmonredormyritmym progresses I go I'm hoping to have a patch by the end of the week

made even by the end of to morrow so we shall see

a meanwhile declaration chopretillawinnotype

I have violated in that is so pro a for nine thirty eight

fortynidan thirty eight

probably never heard of print data that make sense now

I definitely told you to print data decoration with

type oh oh oh oh anyutelletwhat's returning

a rat right right of course

as result

bill bill billed stilldentligetspitslouitbat

errorsmet's good am sent print dialogue resolve was not

so the scope okay thats good we um its freaking out because it

I recognize this thing and thats not unexpected because I dont rebuild

those other directories the things so

see what it thinks about that

hmm so it doesn't I might have to do the its

its a little out of order I have to maybe build the ic ipiyell directory

first ah and thats also going carrot

but then I build the embettingcompodensp rintingingnewiipesefoller

a match should work so its a theres kind of a chicken and egg problem with

changing iptyalfilesand and having the ah the headers ready for

to link to and to like importdeeryoursource

um but we do we can

yes

I am calling the series the Joy of Coding because

bob ross I dont know if you um a familiar with bobrosswherebertuningin

from if you dont know who he is I recommend you check it out if youre interested in oil

in he is quite good at it ah he was the late baroshewasquie

at it he werelanting thats surprising I didnt in would get that far

it might error out on lincoln but well see anyway if youre enetanoil

ingcheckebabrasah hes got a very sootingvoisetesaysthingsa

to a pain o happy tree here in the corner happy trees as for a little clap

there is a happy little cloud is a I aspired

as calm and cool as bob rose so maybe a ill get there

I am nothing to mention

men for distebildis ah if you are interested in this

liecoatingstuff I I linkdoitbypointeditout before but there is this like

so read it the sereadit on red it called

people code where you can watch a whole bud

people coating stuff a people building games doing stuff with a

well its greattasmelfivestufftmispersons doingseffitflask

um theres theres some really so

colsefenhere um yes so if youre if youre the

I I recmetterthere'shalso the watchpeoplecodotcalm which aggregates

a bunch of these videos and put them on to a single patient can watch them as pretty cool

I didnt like it didnt link properly that was expected

so now I will build again and I think

be more oh you know what it might not like the fact

theres no one on the childs side respond to that message that I'm sending am

that might be a problem womans printing

if ye see in his printingpromptsirviceproxcy

so this is who listens on the child side

I put it right after choprintdialogu

in which is this one

its like a a

thing roxy

receive prantdialou results I guess

is giant get and as result our v and

what it is is or can I get

tltareygannagatcaun

printedadenaathink something like that

thats not for and very nicely but thats because it was that

churthrusiamaomwayutsidethe lines here but

whatever

um sky of his function here os returned

and I am going to define it

I bettingposprintingdipseandmisprintingo mie

I oh I think I to do virtual

um

pitualbollwecallit received praindialou

resolved and its results are

has printtatededta

to go further than I thought with the liking

I have a feeling its still get a flip out it because like there is no way like

theres no way its going to accept the fact that there is nothing on the child side to receive that message

very surprised at it accepted that those conditions

yes

what I liked it unbelievable

well lets build in my implementation of that function anyways I have no idea what

bill properly um maybe there is like a default

warning virtual bull I added something

causing a warning was hidden

actually what I should do

you know I as a final test what I will do is I will make this due I'lldi something really can

m now you know its fine I wont I wont change the code

attached the burger to this method I will make sure that this receives the message even though were

and hats the deventlipeandthen I think were in pretty good shape am

that I am going to call it on this stream

oh I know I had to kill it before as cause I

the under attached

in ink listen

I kind of wish navy would say stuff what

in the linkingpasnavdewoadporitanfa

hmm

I'm almost done

ah before I like

this may or may not work I dont want to I am not even if this doesnt work if like I had

a debuggeriateteidon'tanethe breakpoint and they all kind of

part and stillgoinntocaptelezteremhereumatawa

ive either succeedeturfaildandinshowingthat and I am going to

can I am but a if you liked what youve been watching comment

o um I dont know if anyones actually there a couple of people the irs

hi I dont know if any was actually watching the stuff let me know if its interesting lemmenofthere's others stuff

cover or maybe tips on what I can do maybe some ideas and how can up

the the screen resolution more I have no idea I'm but

just to let me know what you want to see if you want to meet it

I am particular eternessbug I'm these are all I'm working on my trolesthis

fulltime jobs so thats what I'm going to be doing for the next like a bunch of episodes

doing us um so I hope youre into elicturalsis but once I get out of that I

arackingon different bugs like once alectrolesis is more or less ships which

as when I will happen but one that son I I work on mother ah bugsin

we can start expoingtoasas well

what was I going to show I was going to show that no matter what we get that

m our new method called so thats going to be in the child

posessniteneigheforforsoiinkiisstad

a cash the child process

mmhmm

okay

so I will attach to

as printing prompt service proxy what was a called

receive printdialavrslt

a what

or I not attach a amen to

brakebardon'tattach there ah does

flash of course I fat fingered the so the backlash so

oh so the test is whenever I had print

no matter what like if I a cancellouto hear do I have my break point

ah

a crash it looks like a had a mass care

shprild

as I returned false or something well thats a mystery that I mean

solve another time at so I mean a rapid up here if youre interested in

what the heck just happened like a if if youre curious to know why I may have crack

he again check out the notes that are at the bottom of this video in the comments

um because I am going to be keep out all right down the crash

eadnonalritdown explanation of things a myslutionsis

as I go through them ah I am in a cab it off here thank you so much

richard millionsskeforah basically running the show here and halimmeoutwith

solution stuff I really appreciate is how thanks everybody whos watching or will watch

um and yet I hope you all have a great rest of

ray thank you for watching ejoyoccoating I am going to capitherethankyou

like

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

ah

Subtitles by the Amara.org community

The Description of The Joy of Coding - Episode 1