Dismiss Notice
Wynncraft, the Minecraft MMORPG. Play it now on your Minecraft client at (IP): play.wynncraft.com. No mods required! Click here for more info...

How Do I Learn Programming?

Discussion in 'Nemract's Bar' started by Kulfyr3, Jan 6, 2016.

Thread Status:
Not open for further replies.
  1. Kulfyr3

    Kulfyr3 Well-Known Adventurer

    Messages:
    65
    Likes Received:
    34
    Trophy Points:
    49
    Guild:
    Minecraft:
    What is OOP and PHP?! :coldsweat:
     
  2. Ascended Kitten

    Ascended Kitten The Greatest HERO

    Messages:
    3,173
    Likes Received:
    14,382
    Trophy Points:
    217
    Guild:
    Minecraft:
    Don't be my teacher >^<
    ________________________________
    OOP is object oriented programming, e.g split your code on more than one class, document it...
     
  3. Semx11

    Semx11 Well-Known Adventurer

    Messages:
    92
    Likes Received:
    35
    Trophy Points:
    49
    Minecraft:
    That's not what OOP is :p
    The name already says it, it's programming oriented around 'Objects'.
    A good example of how you could use that:
    [​IMG]
    Tip: If you want to learn something, read through this very carefully. If I made a mistake, @Jumla can correct me.

    In this example, there is a class called 'Contact'. A class is a blueprint for how a data structure should function. The 'Contact' class has 3 different parameters: 'name', 'address' and 'phoneNumber' (which is logical for a contact).
    There are two sub-classes, namely 'Customer' and 'SalesAgent'. These classes use inheritance, which means that they both have the same data structure as 'Contact'.
    On top of the 'name', 'address' and 'phoneNumber', Customer also has the parameters 'shippingAddress' and 'creditCardNumber' (which is logical for a Customer, but not always for a regular contact).
    Other than having parameters, a class can also contain methods. Methods are functions that are part of a class, and can also be inherited (not in this example).
    As you can see, the Customer class contains one method, "PrintShippingLabel()", which would logically print a shipping label.

    "But I haven't read anything about objects in this explanation yet, while it's called OOP!"
    Remember that I said that a class is a blueprint? Well, you can create an instance of a class, which we call an object. You can create any amount of objects, all with different data, but the same data structure (or blueprint).

    This is what OOP means (in a nutshell). Basically the basics of OOP.

    There are some other important aspects of OOP that I didn't cover, since I was told:
    A good way to implement OOP in Java, in Minecraft, is using a 'Player' class. For example, there are 100 players on a server, and they all have the same 'blueprint': coins, name, UUID, rank, etc. But they all have different data. That's how you can use it :)

    I hope you learned something from it :D

    - Semx


     
    Kulfyr3 likes this.
  4. Ascended Kitten

    Ascended Kitten The Greatest HERO

    Messages:
    3,173
    Likes Received:
    14,382
    Trophy Points:
    217
    Guild:
    Minecraft:
    Although most of this is true, my definition also wasn't wrong ^_^
     
  5. Semx11

    Semx11 Well-Known Adventurer

    Messages:
    92
    Likes Received:
    35
    Trophy Points:
    49
    Minecraft:
    It is the definition of a proper Java Plugin for Bukkit/Spigot, yes. Not a definition of OOP, really. It's a bit more complex than that :p
     
  6. Mishapen Ladel

    Mishapen Ladel Giving Criticism were its due.

    Messages:
    636
    Likes Received:
    380
    Trophy Points:
    97
    watch some tutorials, mess around, think of something you could do, do it.
     
  7. Kulfyr3

    Kulfyr3 Well-Known Adventurer

    Messages:
    65
    Likes Received:
    34
    Trophy Points:
    49
    Guild:
    Minecraft:
    So i think i understood a bit, but as i didn't even know what OOP was, this is a little too complicated for me, you use all these technical terms i'm not familiar with. If you have the time, could you try to explain it a little easier? :P
     
    Ascended Kitten likes this.
  8. XDdrummer

    XDdrummer I really drum VIP+

    Messages:
    12
    Likes Received:
    14
    Trophy Points:
    48
    Minecraft:
    I'm gonna give the most organized answer here...

    Here's some of the most common languages:
    • HTML & CSS - This is what's needed if you want to make a basic website. The best place to learn this is codeacademy.com.
    • JavaScript (Different from Java) - This is used for websites as well, usually to make them more interactive. I also recommend codeacademy for this.
    • Java - This is what Minecraft was coded in. This is what you should learn if you want to make mods or plugins for Minecraft. However, it is not recommended that you code games using this - not sure why Notch did. This is also used for Android applications. The best way to learn this is YouTube tutorials.
    • C, C++, and C# - These languages are just general programming languages that can do a lot. You can make games, apps, basically anything.
    Most other programming languages probably won't be of much use to you right now. Even if they are, these are some of the easier languages anyway. Python, Ruby, PHP, SQL, etc... are also options, however.

    I'd say you should just choose one and go for it. You'll learn as you go. Once you learn one programming language, the next becomes easier to learn.

    Programmers like to show off. That's why you got no helpful answers, just a bunch of people throwing around technical terms.
     
    Last edited: Jan 7, 2016
    Flames_Mage and Ascended Kitten like this.
  9. Saiden

    Saiden Lua Coder

    Messages:
    23
    Likes Received:
    16
    Trophy Points:
    10
    To be completely honest the best way to learn to code is start looking at already made codes and going from there. Trial and error helps a lot. And tutorials are helpful for some people but not all. I learned how to lua code in about 2 months. From reading through other peoples codes and seeing what happens when I changed things. But bear in mind whatever coding you learn first, can make all the others hard to learn. Going from Lua -> Java is extremely confusing and hard (for me).
    Going from C# or C++ to anything else Is extremely easy. C++ and C# are the most basic coding languages you can learn and will help you through out all coding languages.
     
    XDdrummer likes this.
  10. Flames_Mage

    Flames_Mage Mystic Mage

    Messages:
    15
    Likes Received:
    8
    Trophy Points:
    9
    Guild:
    Youtube TheNewBoston. :D He might help ya (Helps me ;))
     
    XDdrummer likes this.
Thread Status:
Not open for further replies.