What is a Method? (C# vs Python)

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ส.ค. 2024
  • Thank god for Methods so that we don't have to rewrite code over & over
    Art used in this video in part made by photo3idea_studio, & freepix
    Check out more lessons in this course: • Everything You Need To...
    SUBSCRIBE FOR MORE: sefdstuff.com/s...
    SUPPORT ON PATREON: / jabrils
    Please follow me on social networks:
    twitter: sefdstuff.com/t...
    instagram: sefdstuff.com/i...
    reddit: / sefdstuff
    facebook: sefdstuff.com/f...
    REMEMBER TO ALWAYS FEED YOUR CURIOSITY

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

  • @alexillo150
    @alexillo150 5 ปีที่แล้ว +25

    TH-cam: so how many videos do you want to uploads?
    Jabrils: Yes

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

    And you can see we have our scoping issue again!

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

    These videos really helped me Jabrils ^-^
    I have purchased about 3 different lessons all within 4 years, and all of them failed me, but not you.
    Not only did you do this out of the kindness of your heart, you can also say that your efforts weren't made for nothing. I am confident that among the few thousand of people you've helped, will one day make something with a skill you gave them, to better themselves, and others, similar to what you have done.
    I can also say I would never unsub because of a 'spam' of videos, because knowledge, and information is my life blood, nothing is more valuable than your contributions towards society. Even if they were not useful to me, I would forward them to others who do need it.

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

    for i in range (4):
    print("And you can see we have our scoping issue again.")

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

    absolutely love your tutorials dude! I just found this C# | Python one today!
    It is a great idea to do these two languages together. I am actually already learning both of them together because I couldnt choose between the two lol. Big love/respect anyway, keep up the good work dude!

  • @DamanD
    @DamanD 5 ปีที่แล้ว +34

    thanks for destroying my sub box..

  • @BlazertronGames
    @BlazertronGames 5 ปีที่แล้ว +20

    I think you've got your ideas of methods and functions mixed up. Methods are just functions that are part of an object. You're making it seem like methods can't take in arguments.

    • @elirockenbeck6922
      @elirockenbeck6922 5 ปีที่แล้ว +6

      I mean the definitions of method and function are both very loose, but yeah that's true

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

      u r talking about class method don't you ?

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

    8:20 instead of all that, why bot use a "PickItem()" function, that way you generalise the code for any item and makes adding items easier.

  • @diokosa7001
    @diokosa7001 5 ปีที่แล้ว +64

    is it just me or did anyone else get sub bombed?

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

    I know and used python alot but I'm more interested about how C# works.

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

    This is a little bit confusing for the beginners... You're not using a method in Python, you're using a function. Function is an independent block of code that may take some initial arguments and return some value. Standard Method has the same functionality but it's not independent. It's a member of the class and operates on its instances... You can change any property of the instance without making it global, because main arugent of the method is an object itself, and it is returned. There is specific type of method that is called static. Static methods could be called from the class itself, without initialization of any object (there is only one initialized static object of the class). C# is a heavily object oriented language, everything you do, you're doing within a class. Functions are not represented... But Python is not...

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

    Humm, you have just flooded my subscriptions feed with videos :)

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

    lyrics be like: 19:08 and you can see we have our scoping issue again x3

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

    And you can see that we have our scoping issue again

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

    I understood everything all up methods and functions

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

    My boi too many videos in one time and you know it.

  • @Marco-vp8wl
    @Marco-vp8wl 5 ปีที่แล้ว +2

    just thought my sub box was hacked, everything blue xD

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

    are methods the same as variables then?or am I wrong?

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

    22:36 You missed a userRank variable.

    • @-jrstudio6137
      @-jrstudio6137 4 ปีที่แล้ว

      Yeah~I was thinking about it too

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

    That's a lot of uploads

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

    My main problem with code and game designing is where to start and what to do. How do you get past that

    • @Jabrils
      @Jabrils  5 ปีที่แล้ว +3

      Go work for someone. Working with others can easily take care of those issues for you.
      - Jabril

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

    Hey Jabrils will you be doing a more advanced version of this?

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

      .. Umm, you really just have to understand this so your foundation is set then you can start wondering out into the world and learn to make stuff by wanting to explore.

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

    why are your method names capitalized? Also, you're my favorite creator.
    edit* for unintentional bad taste before

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

      It's coding convention in C# to have method names capitalized. He is probably doing it in Python as well simply not to confuse audience.

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

      Danilo is right, but if he's going to do C# vs Python then part of that should be explaining the differences. Like how Python uses snake case by convention.

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

      how is this comment 1 week old

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

      @@bondziotek5627 I'm a hairy wizard, potter

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

      @@bondziotek5627 He made the playlist available on the date that the first video, "All my Life I was Told Programming is Hard" but the rest of the playlist was made public later. You can access private playlists and videos via links, while the dates on the videos now reflect the date they were published publicly.

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

    Did you really display the use of this though? If the hitboxes has the same values we might as well just use a single one.
    We need to lessen the bulk of the code while still be able to vary each part as needed.

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

    so jabrils... you're telling me the variable for a method is "void" and then you tell me but you can also use a float... I'm a bit confused rn... wouldn't it be smarter if we used a float from the beginning then? And how does *C# know that this is a method and not a normal float?

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

      It would be smart to use a float method from the start of that is what you need the method to return, but you don't always need methods to return something. Sometimes you just want a method to, for example, remove all items from an inventory, void EmptyInventory(). in this case you'd be okay to use a void because it runs a bunch of statements then terminates.
      But consider you want to use the function to empty, but also return the weight loss from all the items, for example. Then you'd use float EmptyInventory() in which it will add up the weight of all your items & return that to you, so you can use:
      float weightLoss = EmptyInventory()
      It all depends on how you want to format your code, you have the ultimate power.
      - jabril

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

    man where is @jabrils , where is the brother !!!!

  • @user-cd4bx6uq1y
    @user-cd4bx6uq1y 3 ปีที่แล้ว +1

    Void.....

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

    I HAVE SEARCHED THE ANSWER TO MY MONTH LONG PROJECT! TO USING METHOD IN IF ELSE!

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

    Seem like many noobs just unsubbed from you and I think that's a good thing. Im way below noob too at the coding stuffs, but Im still with you cause of your science videos. Keep up a good work, but next time you should unlist some of them if you want to dump post a lot of videos at once.

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

    aka function

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

    i am eating pizza while watching this

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

      Its 3:00 am for me what's your time

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

      @@rew1677 it is 4:30AM

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

    noice

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

    You have the idea of methods completely wrong. Methods are merely "functions" bound to a class. In addition, you're declaring all your methods within the Main method instead of in the actual class, even though your variables should really be instance fields and your methods private class methods. I can't say too much about the Python section, but your C# code is all messed up. Please actually understand what you're talking about before making a "tutorial" about it.

  • @nicholasn.2883
    @nicholasn.2883 5 ปีที่แล้ว

    My sub-box is dead now.

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

    My man spamming my sub feed, no problem though just try to find a way of dealing with that in the future

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

    Thanks for the sub bomb... come on.... just subbed but im going again..

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

    20 videos all within seconds of each other? That's how you lose subs. You lost almost a grand today, just wanted you to know why.

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

    19 uploads at once that's an unsubscribe

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

    Unsubbed, space out your uploads or start them unlisted.

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

      You subbed to him and you got what you deserved.

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

      tbh I I spaced out on the last one too lol, you just gotta remove distractions and learn.

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

      @@datscrazy4095 I'm a software developer, I'm not going to watch any of these 10+ videos that just flooded my subscription box.
      I subscribed because of the funny and informational videos on machine learning.
      I wouldn't have unsubscribed if I got 1 irrelevant video a day but I got so many that it affects my feed.

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

      @@CloakedC I have to respectfully say "fuck your feelings, and your sub box"
      Have a nice day.

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

    Easiest unsub of my life, stop ruining my subbox