Because I amhopingtofocusmyenergyandeffortstowardsthesecondeditionofthenatureofCodebook, which I hopetofinishbytheendofAugustandthenbebackfullsteam, livestreaminginthefallandmakingvideosthat a companyin a seconddishofthebook.
That's kindofthepoint.
Soletmejust a mutemyselffor a secondherewhile I blowmynose.
What's happening?
I'm suretodaysponsorBrilliantHotorGEisthrilledtobesponsoring a YouTuberwhoismeetingtheirmicrophoneandblowingtheirnose.
But I dowanttothankBrookedotorGE.
I'm excitedaboutlookingatbillydotorg's a bittodaybecause I won't talkaboutthenatureofcodebook, and I lookedthismorningatbladedotorg's DailyChallenge.
Take a lookatitnowsignupitforfreeandbrilliantdotorg's slashcoatingtrain.
TheDailychallengefromtodayrelatestoexamplesfromChaptertwoofthenatureofcode, so I'm gonnalookatthatchallengeandsolveitwithyouatthethirdstopoftoday's trade.
Allright, butletmegostraight.
I havenotmovedtomynewstudio.
Asksfor J uh, letmemovefirsttothefirststop.
SothisismyThisismyschedulefortoday.
I amnow, unfortunately, behindby 30 minutes.
I havetwoand 1/2 hours.
I hadtwoand 1/2 hours.
Notonlyhavetwohours, I probablyshouldskipthis 1st 1 but I always I'm puttingthethingsthat I alwaysskipfirstandputtingthethingsthat I don't usuallyskiplast.
Sowe'llseehowthisgoes.
Sohopefullythisisgonnabe a quickone.
I'm gonnajustmovefullsteamahead, because, um, I lostallthattime, so I willskiptheusualpleasantries.
Um, uh, and I'm goingtogotogethotdotcomslashcoatingtrainslashwebsites, and I'm gonnagohere.
Uh, so I needAllright.
Okay.
Um, andlet's letmefixthis.
Okay?
Right.
Allright.
Sothefirstthingthat I wanttodotodayisactuallywalkthroughthestepstomake a communitycontributiontothecodingtraingotcalm, especiallyif I won't belivestreamingforawhile.
Soif I clickheretouphere, I'm gonnajustclicktocoatingchallenges.
Andnow I'm onthepagewithallofthecodingchallenges.
Somaybeyouhappentomake a projectbasedononeofthese, Let's find 10 print.
So I thinkthisparticularcodingchallengehasthemostcommunitycontributionsthatbroketherecord, whichwhatevertherecordis.
Butyouknowwhat?
Let's try a littleexperimenthere.
This I shouldn't dothisonmylifestreams, but I'm goingtoanyway, I'm goingtorecordthiswiththegreenbehindmeandMatt, youSointhenewstudiothat I'm planningtosetup I'm gonnabe.
You'llfind a pagethereforthatchallengethathasthevideoitselflinkstothesourcecodeinwith P fiveGSwithprocessingwithpeople I justWebeditor, justtherawsourcecodeonGetupallofthosethings, aswellasanylinkstoothersupplementalmaterial I referredtointhevideoitself.
I makemyownlittletwistonit, changedthecode, andthensubmitmyownversionofit.
Okay, soletmegobacktohere.
Hopefullythatexplanationmadesense.
I don't thinkthisstreamisreallyworking, but, uh, yetthisisonYouTube's end.
Thisisnotmyproblem.
Uh, allright.
Okay.
Allright.
Youknow, interestinglyenough, I wasstreamingbecauseofalltheproblemsearlier, I wasstreamingtoYouTube's backupingestserver, and I justswitcheditbacktotheprimaryone.
Sohopefullythatthisisgoingtoresolvethatissue.
I reallythink I couldbewrong, but I'vehadissueslikethisbefore, whichwereproblemsonmyend, intermsof a computerfreezingorhaving a poorInternetconnection.
Thatisnotwhat's happeningrightnow.
Allofthechecksandteststhat I'velookedatmyonmyend.
Thedataismovingoutvery, veryfast.
There's nobottleneck.
Nothingiscrashingorfreezing, and I'm gettingairmessagesfromYouTubeitselfso I couldbewrongaboutthat.
I justreally, reallydon't thinkthisisonmyendthistime.
Uh, So, umandsoletmegetthechatbackup, soatleast I canseeit.
Justbearwithmefor a second.
Um, and I'm gonnamoveon.
Thisisletmegettheshotbackup.
But I'm hopingthat I havenowresolvedalltheissuesbyswitchingbacktoYouTube's primaryserver.
Sohere I am, inthe 10 printcookhere I amontheSohere I amonthe 10 printcodingchallenge.
Paigeand I wanttoaddmyownversionshouldnotethat I canjustclickthislinkandfollowtheseinstructions, but I'm gonnawalkyouthroughthatrightnow.
Sothefirstthingthat I wanttodoismakemyownversion.
I'm gonnagotoreviewcodeandclickWebeditor, and I'm gonnaplayitandquicklyjustmakesomechanges.
Oh, sicknessesbad.
So, Matthew, thiswillgetspedup.
Let's makemyownversionofthis, uh, ellipsemode, cornerlips, spacing, spacing, No, nostroke.
WaitthisPhil, I'm justgonnamakeitblackorwait.
Okay.
Andwhatitlook?
Sopicksilly.
I don't reallycareaboutthat, I guess.
Umallright.
Oh, shoot.
I forgot.
I'm loggedinasthecodingtrained.
I totallyjustoverwrotethechallenge.
Youholdup, getitback.
Okay.
Fileduplicateimprint, variation.
Okay.
I mademyownbeautifulvariationofthe 10 printchallenge.
Whereinsteadofdrawing a lineforwardorbackward, I'm drawing a circlewith a whitePhilor a blackPhil.
They'rebeautiful, right?
Sothisisthelinktomysketch.
I actuallywannagohereanddoshare.
I wantto.
I wanttogetthis.
Weneedtotakethat.
Sothereyougo.
Thisismyvariationofthe 10 printcodingchallengewhereinsteadofdrawing a lineforwardorbackward, I'vedrawn a circle, and I havefilleditwhiteorfilleditblack.
Sonowthat I'vemadethisproject, I saveit.
I'vegotthelinktoit.
I'm gonnagooverheretocodingtrain, and I'm gonnaclickonaddyourownversion.
So I'm gonnaclickonthat.
It's gonnatakemetothestrangepage.
SoWhat's thedealwiththispage?
Oh, newmember.
Hello, Justin.
Amongstinterest.
Welcome.
Thankyou.
Yeah, e shouldnotbelivestreamingwhen I'm gettingover a cold.
However, thesestepswillonlyworkifyouhave a gethubaccount.
Soifyoudon't alreadyhave a goodhumpaccountwillneedtosignupandbeloggedinforthistowork.
Soonceyou'vedonethat, I'm gonnagodownhere.
I'm gonnaaddmine.
Let's changethetitleto, uh, umcoatingtrain.
Democontribution.
Theauthorisme, DanielSheafmon.
Andthenonnowit's timeforthegirls.
So I'm goingtoconsider I'm gonnagoundershare.
I'm gonnaconsideringitagain.
Yoursmightnotbe a p fiveWebeditorsketchmightjustbe a website.
Itmightbe a gitrepositories.
Itcouldbeanything, butyoujustneed a linktoyourdocumentationoftheproject.
So I'm gonnapickthisfullscreen, onelips, whichisthisand I amgoingtoWherewas I?
I'm goingtopacethatinhere.
Then I amgoingtogobackhere, and I'm justgonnadotheeditorofyou, Whichisthat, And I'm gonnapacethatinhere, andthatonething I'm gonnadois I'm goingtoautomaticallymake a mistakebecauseit's verycommonthatyou'llmesssomethingup.
So, forexample, whatIf I forgetthequoteshere, I'm gonnamakeanothermistake.
I'm gonnaadd, like, a coupleofextraspaceshere, and I'm gonnahavethishavingextraspacehere.
Yeah, I guessit's justbecausenoisthegotofileschangeandclickon.
Uh, maybe I shouldactuallyshowthoseerrors.
Holdon.
I don't knowif I'm showinganything.
Let's see.
Well, thisworkforotherpeoplewhoarelookingatthiswhoaren't membersofthecoatingtrain, um, goherescrollingallthewaydownthroughallthetests, wecangettotheend, and I canzoomin.
Probablyhiresomebodytocreateah, lotofandanimationsforthelifestreamthat I canplayfordifferentsegments.
Andalso I'm taking a breakandbeforeitstartsandendsthatkindofthing.
Umokay, sowe'regonnaopenuptheclips.
Whereisthis?
Letmetrytime.
Thatbetter?
Ah, I got a betteridea.
We'regonnamakethisworklaunchtooquickly.
Okay.
GoodEnoughwaswrittenwith a newerversionofproductandbeincompatiblethisversion.
Whyam I holdingupmyopening?
Anolderversionof a cupspacksin.
Noway.
Whydon't openupthisoldversionofclips?
Thatwasweird.
No, no, noexit.
Yeah, Thisoneiswhat I want.
Holdon.
I getanotherchance.
Hold a room.
No, I wantthisversion.
Okay.
Did I everfigureouthowtochangethegeneralviewtomakethefontsofallthesethingsbigger?
Oh, boy.
Editorpreferences.
Well, I cannot.
I think I justgottozoom.
Allright, Allright.
Sowhere I lastleftoff.
So, unfortunately, ifyoudidn't tuneintothepreviouslivestream, you'llmostlikelybequitelostbecause I'm doing a lotofsortofobscuremedievalstuffwithbuilding a javalibrary.
Butjust a quicklyrecapitgotthelibrarytobuildbuthaven't actuallyimplementedinthesourcecodeyet.
I'm gonnagotorefactorandclickrename, andthen I'm gonnacomehereand I gottapick a nameforit.
Let's callitnoiseOpensimplex.
Hey, no, let's callitalgorithmsdotnoise.
Ultimately, I thinkwhatcouldbeexcitingaboutthislibraryistoimplement a bunchofdifferentnoisealgorithms, opensimplexnoise, fractalnoise, GradyandnoiseWehrlinoise.
So I don't thinkwitheverysinglechangeyoumakewhileyou'rebuildinglibrarygoingtorestartprocessing.
Butthatcertainlyissomething I havetodofromtimetotime.
Uh, okay.
Soletmedothis.
Wemakethisbigger, Okay?
Healthhadfunsize a littlebitbigger.
Oneofthethings I liketodowhendesigninganopensourcelibraryisactuallyright.
Theexample.
Firstinthewaythat I imaginethatitmightbeso.
Eventhough I haven't builtanyofthefunctionalityofthelibraryitself.
What I wantwhat I wanttodois I wanttotake, like, a simple, processingPerlinnoiseexamplethatusesjustthebuiltinoriginalPerlanoiseforthe 19 eightiesalgorithmandthenchangethatexampletouseopensimplexnoise.
Soif I gotoexamplesmath, that's what I'm lookingfor.
Basicsunderbasicsundermath.
Let's justtakenoise.
One d andlet's lookatthisexamplethisisassigningthe X valueofthisparticularcircletothewithpearl a noise.
Thisisassigningthe X valueofthisparticularcirclewithnoise.
Thenoisealgorithm.
I amSoitandsosadtobelikeinmyheadtheangstofallofthediscussionsofwhichversionofPerlinnoisesnotreallypronoisesitinwaysthattheproblemlies.
Thefragmentislikegoingonandon.
Letmejusttakethatagain.
Thisnoise, thisnoise, one D exampleismappingthe X locationofthiscircle.
It's drawingtothenoiseimplementationinprocessing.
So I'm gonnagraballthiscodecopyit, closethisoutandpasteitinhere, and I'm gonnaimaginewhat I mightdo.
So I mightdosomethinglikeopensimplexnoise, uh, noise.
Andthen I'm gonnasaynoiseis a newopensimplexnoise.
Maybe I want a namethatjustopensimplexbecausebydefinitionistheonewhoknows.
But I wanttocreate a newinstanceofit.
Maybeoptionallytherecouldbelike a seedthatgoesinherebecause I couldberandomlyseedingthenoise.
Andthenwhat I woulddoissaysoLetmecallitsomethingdifferentformetobelessconfusion.
LetmecallOSnoiseforopensimplexnoise.
Andthenprobablywhat I wouldwanttodoissay o s noisedotMaybevaluepassitthisexoffset.
Andactually, that's itisreallythisissuch a likeyouknow, theopen, opensimplexalwaysalbumthisquitecomplex.
I justwantonefunctionthatgivesmethenoisevaluebackand I'llcallthatvalue.
Or I couldhavecalleditnoise.
I don't knowwhattocallit.
Excuseme, butagain, thesetypesofnamingand a P I designdecisions, whileincrediblyimportant, I'm gonnamake a tacklelaterandthroughusertestinganddiscussionandarelesscrucialrightnowintermsofthenutsandboltsofhowtobuildyourlibraryhowtohowtothinkaboutmaking a opensourcelibrary.
It's soimportant.
Butrightnow, I couldkindofjustpicksomething.
Let's pickvalue.
I'm gonnagobacktothelibrary.
I'm goingtothisissoUhoh, boy.
Oh, somuchboilerplate.
I don't likeboilerplate.
Mythroathurtsmine.
Oi, nosessnuffling.
Letmegobacktothelibrarycodeand I'm gonnaadd a function.
Now, I'm gonnaadd a functioncalledpublicvalue, andit's goingtoreceiveonargumentlikeexoffsetsexoff, and I'm goingtosayreturnnegativefive.
So I justwanttotestoutthisidea.
I wanttoadd a functioncalledOh, thisshouldbepublicfloatvaluebecauseit's a job, a functionofreturnsafloat, itreceivesafloat.
Soagain, thisisnottheopensimplexnoisealgorithm, But I amjustgoingtohaveitreturnedNegativefivetoseeifitworks.
Well, actually, noiseshouldreturn a valuebetweenzeroandone, orinthiscase, maybebetweennegativeoneandone.
Solet's actuallymakeitnegative.
0.5.
AndinJava, if I wantedtobeafloat, I'veactuallygottaaddthat f toindicatefloat.
Soonceagain, I amgoingtobuildthelibraryand I freeze.
Youknow, I thoughtitwasfrozen.
Justbestandingstill.
Yeah, I'llhavetoget.
SimonandDavidarebothdiscussingthat.
Actually, theopensimplexnoisealbumdoesn't supportonedimension, Butwecouldjustfixtheseconddimension, so I willhandlethatlater.
Umallright, Sowherewas I?
Thelibrary's rebuilt.
Let's gobacktothecode.
Now.
It's stillgivingmethiserrormessagebecause I think I probablytorestartprocessingagain, Butlet's justseeifitworks.
YouOh.
Oh, okay.
I justhadtorunit, actually.
Okay.
Oh, wait.
I'm gettinganerror.
Theconstructoropenedsimplexnoises.
Undefined.
Whyam I gettingthaterror?
Because I have a constructorOpensimplexnoise.
Oh, needsthisthing, pea.
AppleitTheparents, huh?
Whatthisisandhowthisworks, p aplittheparentisprobablysomething I shouldtackleoraddressandmaybe 1/3 partorfourthparttothisSeriousbecause I don't thinkthat I needitforthisparticularopensimplexnoiselibrary.
Butwhatthatis, it's actually a referencetothesketch.