9.19: Prototypes in Javascript - p5.js Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ต.ค. 2024

ความคิดเห็น • 446

  • @AnnyMus-rc2zh
    @AnnyMus-rc2zh 5 ปีที่แล้ว +90

    whenever I have a hard time understanding a concept in JS, I check if you have made a video on it. You explain things so well and really help me visualise what is happening under the hood. Thank you!

  • @simpleprogramming4671
    @simpleprogramming4671 5 ปีที่แล้ว +244

    holy moly! I've never seen such an energetic programmer like him. :))

    • @andredesantana2188
      @andredesantana2188 4 ปีที่แล้ว +1

      Watch David Malan from Harvard's CS50 then!!! hahahaha

    • @conorwood
      @conorwood 4 ปีที่แล้ว +3

      Especially when viewing in 2x speed

    • @aryany5737
      @aryany5737 4 ปีที่แล้ว +1

      you said it!

    • @migueltejeda3869
      @migueltejeda3869 3 ปีที่แล้ว

      I honestly love Daniel so much because I relate to his personality! Hahah

    • @isaacnewtonaranas3770
      @isaacnewtonaranas3770 3 ปีที่แล้ว +1

      damn I agree! I love this guy!

  • @armaandhanji2112
    @armaandhanji2112 7 ปีที่แล้ว +126

    this is the first time I ever understood what the heck a prototype is. brilliant teacher. can't wait for next video on inheritance

    • @TheCodingTrain
      @TheCodingTrain  7 ปีที่แล้ว +21

      Thanks for the nice feedback!

  • @jamesjones2212
    @jamesjones2212 3 ปีที่แล้ว +29

    As a programmer with ADHD who after 10 years still struggles much harder than your avg programmer this guy is awesome! :)

  • @mattsmith6828
    @mattsmith6828 ปีที่แล้ว +1

    There might be faster ways of learning coding, but this guy makes me feel like WE are on an adventure! LOL love it.

  • @metalslug97
    @metalslug97 4 ปีที่แล้ว +6

    I love this format of teaching. going through the ad-lib struggle of exploring new concepts and trying to make sense of the missing pieces only makes me more curious to learn. You sir are an amazing teacher.

  • @climbers1376
    @climbers1376 6 ปีที่แล้ว +21

    7:42-9:00, "prototype chain"
    --15:33-16:43, "hasOwnProperty()" investigates "prototype chain"
    3:44-7:32, I. object property list
    10:45-11:20, II. prototype property list/13:17-13:22, "_proto_"/XXX.prototype
    --11:37-12:23, how to add functions to property list/_proto_
    13:2314:13, III. object prototype property list/"Object.prototype"

  • @danielluna7648
    @danielluna7648 3 ปีที่แล้ว +2

    Please don't delete these, as suggested at minute 18! This video just made everything click into place for me. So helpful. Thank you!

  • @syeda.k.2934
    @syeda.k.2934 3 ปีที่แล้ว

    Never ever ever delete ur videos... what u teach in the moment from the top of ur head is gold.

  • @karjedav
    @karjedav 4 ปีที่แล้ว +4

    This man's enthusiasm is all I need in my life right now.

  • @darerihter5685
    @darerihter5685 2 ปีที่แล้ว +1

    Amazing energy and great skill to explain. Rarely in my 30 yrs from programming to managing complex architectures (CDO) seen such density of information delivery. Bravo, maestro.

  • @nekoresOfficial
    @nekoresOfficial 4 ปีที่แล้ว

    Lovely! much energetic and informative. Who watches this in 2x speed, try it. The man is dancing while delivering lovely information. Thumbs up!

  • @jaredsmith8003
    @jaredsmith8003 6 ปีที่แล้ว +3

    Finally an explanation that made sense to me. Switching between code and whiteboard made it all finally click. Then entire presentation was fun and interesting and actually really clear, even though on the surface it seemed to jump all over. Amazing job. I'll definitely be subscribing so I can watch more. These are great! Thanks for making it so much fun to watch a programming tutorial.

    • @TheCodingTrain
      @TheCodingTrain  6 ปีที่แล้ว

      This is such nice feedback, thank you!

  • @MajidFouladpour
    @MajidFouladpour 3 ปีที่แล้ว +2

    You are the Bob Ross of programming!

  • @yevheniiherasymchuk
    @yevheniiherasymchuk 7 ปีที่แล้ว +9

    I think we should share this channel in all tutorials for beginners. Information is so useful. I'm happy that I can learn it with you. Thank you!))

  • @setupdraw7642
    @setupdraw7642 7 ปีที่แล้ว +13

    This was very, very interesting for me, better understanding how Javascript works. Thank you!
    P.S. Please, never ever delete your vids, I would feel quite lost.

  • @jrdn129
    @jrdn129 7 ปีที่แล้ว

    this is the teacher we need. makes boring subject very interesting

  • @markroberts6574
    @markroberts6574 5 ปีที่แล้ว +1

    Every now and then I come across your videos randomly. You are by far the best at explaining dry, overly- complex topics. I'm an experienced full-stack developer. I learn something every time time I watch one of your videos. I've taken university courses, professional development training, online subscriptions to e-learning sites. Your approach blows them all out of the water. Clear, fun and to the point. Thank you. I pick up more from you in 20 minutes than I do from a day of reading MDN documentation. Anyone disagrees, I suggest reading developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Object_prototypes, and then watching this video. Cheers.

  • @jithinkg9865
    @jithinkg9865 7 ปีที่แล้ว

    sometimes your videos awaken me out of my sleep in the late nights.love your your attitude and humour

  • @goofyrice
    @goofyrice 7 ปีที่แล้ว

    Honestly, learning how to find every function that is built into a certain object might be the most important thing we've learned from you. Not sure how to do something to a vector? Just create a vector and then go to the console. Fantastic.

  • @RatanSingh-wv8ht
    @RatanSingh-wv8ht 6 ปีที่แล้ว

    What you explained on the white board helped me understand Prototype better. Thanks.

  • @PabloBassil
    @PabloBassil 7 ปีที่แล้ว

    You are awesone, i wish that all teachers had the same passion to teach as you. Grettings from Barranquilla, Colombia.

  • @TheEmperorXavier
    @TheEmperorXavier 2 ปีที่แล้ว

    I came from MDN documentation and ended up here.
    I am soo grateful that I clicked on this video, thanks soo much for the great work

  • @MisterNorthernCanuck
    @MisterNorthernCanuck 7 ปีที่แล้ว

    I've been "fortunate" enough that my web teacher as shown us the class syntax from the get-go... I put that in quotes because when it comes to ANY external library that's out there such as jQuery, Howler, etc, I needed the prototype syntax knowledge to figure their contents out. Thank you!

  • @gamestv4875
    @gamestv4875 5 ปีที่แล้ว

    The passion of coding shows in your attitude.
    To the point and very energetic .. lol
    Love your tutorials. Keep em coming.

  • @yckieh568
    @yckieh568 5 ปีที่แล้ว +2

    My teacher discussed this for 2 hours and I was so lost. I watched your video bam! I get it! Amazing!

    • @yckieh568
      @yckieh568 5 ปีที่แล้ว

      @Amy White yes and I don't really like people who ask for another person's sexuality on a youtube comment about Javascript. no judgement.

  • @mehmeterkan9193
    @mehmeterkan9193 5 ปีที่แล้ว +1

    Even if you have no clue about JavaScript. In this video you will understand prototyping. Great video !!!

  • @michaelthomas-op6zi
    @michaelthomas-op6zi 6 ปีที่แล้ว

    You are very good at getting across the construct. Relevance, explanation and example all help to give context to the construct. Thank you

  • @SuperSamsosa
    @SuperSamsosa 5 ปีที่แล้ว

    7 min in and its already way better explanation than the rest of what if seen

  • @Lee14G
    @Lee14G 4 ปีที่แล้ว +3

    Thank you so much! I literally have paid for Udemy courses on JS that haven't explained it this well. I sat here with a notebook taking notes. I understand the topic of Prototypes much better now!

  • @vineetbramhankar8099
    @vineetbramhankar8099 4 ปีที่แล้ว +1

    Extremely energetic video and no need to mention what a brilliant way to teach

  • @shahvirat1990
    @shahvirat1990 4 ปีที่แล้ว

    You're so entertaining to watch. You take the BORING out of CODING.

  • @codybui6252
    @codybui6252 2 ปีที่แล้ว

    Finally I understand what prototype is. Thank you very much.

  • @iamsoorena
    @iamsoorena 7 ปีที่แล้ว

    this guy is the funniest person in the javascript(and probably the whole programming) world. I LOVE HIM

  • @iamworstgamer
    @iamworstgamer 4 ปีที่แล้ว

    today is the day i understood prototype. after 6 years
    thank you man.

  • @stivemangala2215
    @stivemangala2215 5 ปีที่แล้ว

    Your understanding of programming is amazing.

  • @100marocain2
    @100marocain2 3 ปีที่แล้ว +1

    this video wasnt a desaster but it was so useful, thanks bro so much

  • @PakArchives
    @PakArchives 4 ปีที่แล้ว

    The way you teach programming is commendable. Thank you for such an awesome tutorial.

  • @bjarkesporring9859
    @bjarkesporring9859 7 ปีที่แล้ว

    I fucking love your style of teaching.
    Thanks for not being boring!

  • @thangha8289
    @thangha8289 3 ปีที่แล้ว

    Dude, I love the way you talk, and the knowledges you teach, this is really useful with me, thank you so much!

  • @ugarz
    @ugarz 7 ปีที่แล้ว

    I wish u were my teacher when I used to learn at school. U're fantastic !
    Prototypes has no secrets for me now !

  • @michaelpimenteljr3530
    @michaelpimenteljr3530 7 ปีที่แล้ว

    You are brilliant! I have struggled with understanding prototypes and now I do ! I learn so much from your videos. Thank you so much

  • @EpicGamerNC
    @EpicGamerNC 7 ปีที่แล้ว +1

    Great video! I learn a little more from each new video. Can't wait for the one on "this".

  • @mahmoudhammmad8089
    @mahmoudhammmad8089 6 ปีที่แล้ว +1

    i was about 1 week moving from book /video to an other to understand it >>>but finally i understanded it due to you
    "thank you "

  • @moltobene1528
    @moltobene1528 7 ปีที่แล้ว

    Don't delete this video it's GREAT! :) Thank you!

  • @The12West
    @The12West 7 ปีที่แล้ว

    Im currently learning vanilla js, but I just love how easy the concepts in your videos are to digest. Thank you very much for doing these :)

  • @gsrcreations108
    @gsrcreations108 5 ปีที่แล้ว

    If some one have ever learn java or c++, then it is fun fun fun to understand all other languages....
    And for compliment you're amazing.... this channel provides knowledge with fun .....

  • @TheMarrouane
    @TheMarrouane 4 ปีที่แล้ว

    This guy is a legend ! You can't explain it better

  • @donothinggarden
    @donothinggarden 3 ปีที่แล้ว

    Thank you so much for the subtitle. English is not my native language .The subtitle help me a lot .

  • @sergioangel8362
    @sergioangel8362 7 ปีที่แล้ว +1

    Really appreciate your teaching style and how you make learning fun. Thank you for taking the time to make these videos.

  • @programandocomputadorescom5215
    @programandocomputadorescom5215 7 ปีที่แล้ว +36

    You are fantastic!
    Thanks!

  • @chrisoleary8401
    @chrisoleary8401 4 ปีที่แล้ว

    You're lessons are terrific, mate. Really helping me to understand these tricky areas of JS.

  • @UstedTubo187
    @UstedTubo187 6 ปีที่แล้ว

    Telling me not to watch the video in the first 30 seconds earned you an automatic like! I love it!

  • @aniekutmfonekere740
    @aniekutmfonekere740 3 ปีที่แล้ว

    your way of teaching is awesome

  • @Kirshach
    @Kirshach 4 ปีที่แล้ว

    Easily the best explanation I've seen, thank you

  • @CherPsKy
    @CherPsKy 7 ปีที่แล้ว

    I'm a newbie web programmer and I find this sooo interesting...

  • @XboneAus
    @XboneAus 5 ปีที่แล้ว

    I looked all over MDN and repeated parts of my Udemy course but no one explained object prototype better than this guy. I had the biggest "AHHA moment" and to top it all off he's so charismatic, he had my undivided attention throughout the video. Excellent Work ^_^

  • @beastcode8596
    @beastcode8596 2 ปีที่แล้ว +1

    This video is a GEMMMM

  • @plusme3000
    @plusme3000 7 ปีที่แล้ว

    Finally someone could explain me clearly what this is for... thank you!!

  • @typicallucas4164
    @typicallucas4164 7 ปีที่แล้ว

    Thank you very much for taking the time to make this topic accessible to us.

  • @abeechr
    @abeechr 7 ปีที่แล้ว

    Yet another gem. I too can't wait for the inheritance follow-up. thanks Dan!

  • @alishreef6249
    @alishreef6249 4 ปีที่แล้ว

    i wish i can give you hundreds of like for the way you explain the things .
    thank you sooooooooooooooooooooooooooooooooooooo much

  • @shifter65
    @shifter65 3 ปีที่แล้ว

    Oh! Always wondered why there were different ways to declare "member" functions

  • @athenkosinkonyeni1472
    @athenkosinkonyeni1472 4 ปีที่แล้ว

    I love this guy's energy

  • @climbers1376
    @climbers1376 6 ปีที่แล้ว

    Sir. You are a master of your trade

  • @MasterZiomekPL
    @MasterZiomekPL 5 ปีที่แล้ว +4

    Best teacher I've ever seen

  • @yogeshbhatt3806
    @yogeshbhatt3806 5 ปีที่แล้ว

    i was always looking for such a teacher who can teach in funny way ...lol ,keep it up man..

  • @wesselpoldervaart4658
    @wesselpoldervaart4658 7 ปีที่แล้ว +2

    I don't think I got it completely but most off it ill be sure to check out this video again if I come across a scenario to possibly use it! But hey if I can even almost understand it after just short of half a year of JavaScript class, I think i am doing pretty well so far. :D

    • @hammer158
      @hammer158 7 ปีที่แล้ว

      There's no scenario, you should always use that!

  • @Smongo412
    @Smongo412 7 ปีที่แล้ว

    passion makes a great teacher

  • @jakmerejim575
    @jakmerejim575 6 ปีที่แล้ว +1

    How did createVector() reference the p5.vector() prototype? I can see the chainlink between p5 and object.prototype, but i cant see how createVector() has access to the double() you added to p5. What did i miss?

  • @xen0076
    @xen0076 ปีที่แล้ว

    i am watching this in 2023 and my god what an excillent teacher, i will never forget this concept again

  • @fuckyeahnigge
    @fuckyeahnigge 7 ปีที่แล้ว +23

    Dude, you are a legend, beyond, fucking MEASURE!

  • @rosgarcia6999
    @rosgarcia6999 5 ปีที่แล้ว

    You are so passionate at teaching codes and I like your way of teaching! You gained my sub sir! Thank you so much for letting me understand prototypes. Now I can go with the challenges I encountered in my online course

  • @nickspringham9989
    @nickspringham9989 6 ปีที่แล้ว

    You are an inspirational teacher. As soon as i get a job in which i can afford to donate i will visit your patreon! Take it easy!

  • @BananaKimchiPie
    @BananaKimchiPie 7 ปีที่แล้ว

    FINALLY. Thanks for the informative video. Finally figured out prototypes.

  • @RedEyedJedi
    @RedEyedJedi 5 ปีที่แล้ว

    I don't think anyone else on the planet explains, programming concepts and techniques as well as Dan.

  • @DeadGodMetal
    @DeadGodMetal 2 ปีที่แล้ว

    I love the way you teach and your amazing passion for teaching! Thank you so much :)

  • @Ben........
    @Ben........ 7 ปีที่แล้ว +8

    Correct me if I'm wrong but the main difference between member properties and prototype properties (besides inheritance) is that member ones are all independant copies while prototyped ones are all pointers to a single unique object in memory. I think this was not explained in this video and it's a major argument in effectively choosing how to design your objects. Running a simulation of 1000 particles that all share e.g. a single function takes way less memory and executes faster than 1000 particles that are all having an indenpendant copy of that function in memory, no?

    • @michalbotor
      @michalbotor 6 ปีที่แล้ว +2

      he kind of does between 5:59 and 6:41.

    • @rick_from_yr
      @rick_from_yr 5 ปีที่แล้ว

      That's right, but notice that he mentioned in the video

  • @kobe248ryant
    @kobe248ryant 4 ปีที่แล้ว

    Thanks for making me understand prototype, thank you!

  • @darkfafi
    @darkfafi 7 ปีที่แล้ว

    You are the best teacher a programmer could wish for

  • @btcls
    @btcls 6 ปีที่แล้ว

    The best moment on the video 18:04. The best part!!!

  • @Mohit-cn2us
    @Mohit-cn2us 4 ปีที่แล้ว +1

    *this guy is naturally high, great content :-)*

  • @FromRootsToRadicals_INTP
    @FromRootsToRadicals_INTP ปีที่แล้ว

    You have a good knack for teaching. Many will benefit. Thanks again!

  • @kerimtim
    @kerimtim 6 ปีที่แล้ว

    Hi The Coding Train. If someone logged into a website built on firebase using login and pass, how would you redirect that user to another page?

  • @claudiusrauter
    @claudiusrauter 7 ปีที่แล้ว

    oh man, i really love your videos, please never stop!

  • @sandstorm_lp
    @sandstorm_lp 5 ปีที่แล้ว

    Very good video and a nice way of explaining the basic concept of Prototype. Thank you.

  • @motivationalstory17
    @motivationalstory17 6 ปีที่แล้ว

    Thanks for the tutorial. One request please create video in core Javascript. Because we don't want to use p5 js. But we do want to learn the core concepts

  • @Ark-ju2gt
    @Ark-ju2gt 7 ปีที่แล้ว

    Thank's a lot I couldn't understand the matter with the .prototype when I searched for inheritance in js

  • @deepwaterDW
    @deepwaterDW 5 ปีที่แล้ว

    why would doing p2.x++ also increase p1's value? They're both different objects with different pointers

  • @bryanfortnum3355
    @bryanfortnum3355 7 ปีที่แล้ว

    great work , very clear to follow for me

  • @scotthofbauer5448
    @scotthofbauer5448 5 ปีที่แล้ว

    Damn, you make some great videos! Very clear and concise and I appreciate you putting all the code on Github, makes it really easy to follow along!

  • @63montywilliams50
    @63montywilliams50 2 ปีที่แล้ว

    Idc what anybody says i like this guys energy!

  • @brotokolol9621
    @brotokolol9621 7 ปีที่แล้ว +4

    I need that Inheritance video! Please do it asap

  • @davidpower2054
    @davidpower2054 6 ปีที่แล้ว +10

    This is guy makes code non boring, you should teach angular damn

  • @chrisveal391
    @chrisveal391 5 ปีที่แล้ว

    bro your awesome keep it up make learning fun and hold my attention hard to find when it comes to this topic!

  • @nikitamalpani8602
    @nikitamalpani8602 6 ปีที่แล้ว +1

    Awesome and helpful as always..I really love your teaching...thank you for explaining in such an easy way..

  • @mugi1726
    @mugi1726 7 ปีที่แล้ว

    i love whiteboard session. i immediately understand what you said

  • @nikoscuatro7251
    @nikoscuatro7251 3 ปีที่แล้ว

    love the drums before starting ;-)

  • @akumasdeception
    @akumasdeception 5 ปีที่แล้ว

    Fellow NYU alum here, great video by the way.

  • @cmcdonough2
    @cmcdonough2 7 ปีที่แล้ว

    Thanks man. Your videos are so funny and educational. I've learned so much and I really appreciate it.