Learning java for plugins

Discussion in 'Plugin Development' started by andrewginn, Nov 18, 2014.

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

    Burnsalan18

    Thats pretty much it :p
     
  2. Offline

    Skionz

    youtube == a terrible place to learn
     
  3. Offline

    mythbusterma



    Actually they're both pretty awful. The only reason you need to post here is the fact that you're trying to learn from them.

    If you actually went and learned Java and read the Bukkit plugin tutorial that is on the Wiki, you wouldn't need to post here at all.
     
  4. Offline

    ColonelHedgehog

    That's not necessarily true. The plugin tutorial tells you the bare minimum of what you'd need to know.
     
  5. Offline

    mythbusterma

    ColonelHedgehog

    Between those and using Google, I never had to post a help thread and I've made some pretty large plugins. So yea, if you simply use Google, you won't have to.
     
  6. Offline

    Burnsalan18

    Youtube is an excellent place to learn. Fun fact: We all learned java by example quite a few times. Otherwise we wouldnt know it.
     
  7. Offline

    Skionz

    Burnsalan18 In my opinion it is not. It taught me terrible practices which are still probably used in some of my plugins since I haven't updated them in a while. I also saw you using a bunch of these practices after decompiling one of your plugins although it could be that you just haven't updated them with new knowledge.
     
  8. Offline

    Burnsalan18

    Well, those internet tutorials are not supposed to teach you good practices. They are there to teach you the basics. Its your job to learn the good practices through experience.
     
  9. Offline

    teej107

    Good joke!

    If they don't teach you good practices then what do they teach? Seems like a bad tutorial right there.
     
  10. Offline

    Burnsalan18

    Like I said and which you quoted.
     
  11. Offline

    teej107

    But why would you even be fine with using a bad tutorial?
     
  12. Offline

    Burnsalan18

    Don't act like you didn't learn the same way. Cause we all know your a liar if you say you didn't.
     
  13. Offline

    Skionz

    Burnsalan18 We learned bad practices which slowed us down and I can honestly say that they did not help me at all. Later I realized the best place to learn was on oracles website not some youtube videos of people who think they know what they are doing.
     
  14. Offline

    Burnsalan18

    Well they do state that what they are doing is not the best way. And if they did not help you then that sounds like a you problem.

    Also, I dont see you doing much helping on the bukkit forum other than insulting how others do their code. If your so against helping then get off the development help page. If you want a tutorial that teaches all the good practices, then why dont you go make them yourself. I honestly never see you helping anyone on here.
     
  15. Offline

    Skionz

    Burnsalan18 And you think by directing people to bad tutorials it is helping them?
     
  16. Offline

    Burnsalan18

    They are helping more than you do directing them to a messy oracle tutorial.
     
  17. Offline

    mythbusterma

    Burnsalan18

    Oracle's tutorials are anything but messy. They are very straight forward and well laid out.


    I never once used those tutorials, I taught myself Java from a book I have and Oracle's tutorials, after I had been doing Java for a while, I figured I should try writing for Bukkit. I read the tutorial on the Bukkit wiki and haven't ever need to watch those god awful YouTube tutorials.

    There's no reason to learn how to program like a 4 year-old before actually going back and fixing your mistakes. It's best to learn how program properly from the beginning, hence the Java tutorial by Oracle.
     
    Skionz likes this.
  18. Offline

    Burnsalan18


    They are very messy and their website for the tutorials are lazily made.

    Also I told you not to say you didn't learn bukkit from youtube cause I already called your bluff.
     
  19. Offline

    mythbusterma


    Sorry, I don't need some 10 year-old kid to hold my hand while I make plugins, maybe I'm just not as thick as you are.

    Just because their website didn't cost thousands of dollars to design or have the best graphics, doesn't mean it's not a good source for Java, in fact it is the best. They created the specification, so why not learn it from the original source? Their tutorials are not at all lazy, they just assume you have an attention span greater than that of a fly, because that's the audience they're writing for.
     
    teej107 likes this.
  20. Offline

    Skionz

    I originally started with youtube videos and I was terrible. I had no idea what a constructor, or a parameter was and my code was extremely messy. I eventually quit and started reading a book about Java which I would say I learned Java from. Not youtube.
     
  21. Offline

    Burnsalan18


    I didn't say the tutorials were lazy or bad. But they are messy. You should not have to read a full page documentary of the history and use of an if statement. The website is what was lazily made. Nothing organized and everything is hard to find. I found in my years of programming in multiple languages that the best tutorial is example and explanation, meaning see how it can be used and know why its used like that.

    Also youtube tutorials are not really that bad, find me a difference between how someone on youtube codes and how the oracle site would do it. I bet you wont find any good differences that have any real significance.

    Its alright if you dont want to admit it. I have secrets in my closet to. ;)
    Edit: I meant the above in a non gay reference. I am not gay, I repeat, I have never been in the closet.
     
  22. Offline

    Skionz

    Burn
    Number 1: Oracle has example code and an explanation...

    Show Spoiler
    Explanation:
    [​IMG]
    Example:
    [​IMG]

    Number 2: There is a huge difference between someone who looks at oracle tutorials and people who watch youtube videos. You for example copy and paste code over and over instead of creating a method to save you 25-50 lines.
     
  23. Offline

    Burnsalan18

    Wrong, I always use methods. Copy and paste in not in my nature.
     
  24. Offline

    teej107

    Call me a liar then. I learned from the official tutorials, not from some teenager who learned Java a week ago. When I wanted to learn the Bukkit API, I went to here first.
    You only think they are messy because you aren't focusing in and reading them. Of coarse text can look messy if you just stare at it and be like "pfft TL;DR".
     
  25. Offline

    ColonelHedgehog

    I started with a game engine called "Torque." It had a Javascript/C++ crossbreed language known as "Torquescript." At that time, I had no interest in programming a single line of code. But I was forced to, because nobody was that keen on handing me complete codes. I was forced to examine the source codes and figure it out. No IDEs handled it out of box so I learned through lots of trial and error. Then I actually learned C++, and from there, Java. With Java, I just looked up the stuff I needed to know, and then learned it, but since I had past experience, it was all pretty familiar (other than "public" and "private" classes/methods/variables; that took some getting used to).

    Bukkit was easy because it's an API, not a programming language. I just read over some of the basic tutorials, googled a ton, and checked the Javadocs.

    Then again, I can pick up a lot of things very fast.

    I guess it depends on what you're making. Like, for example, I post asking what the best idea to do something would be, usually. I don't ask "How do you set a display name" or "how do you do a cooldown" because as you say, there are plenty of tutorials out there. With that said, sometimes posting on the forums can answer someone else's question, or even teach them a better way to do something.

    Example: When I first started coding Bukkit plugins, I was using nasty runnable cooldowns. Then I read through some things people were asking about and I was like, "gee, there are more efficient ways to do this!" You wouldn't know that a certain thing you're doing is inefficient until you see someone else doing a better job. Sometimes we assume we're doing everything the best way possible, when in fact we're not.
     
    teej107 likes this.
  26. Offline

    coasterman10

    Since you are going to learn Java first, you have almost all of the potential obstacles and issues taken care of.

    Once you fully understand the Java language and are comfortable working with it, reading Bukkit's Javadocs will teach you pretty much everything the API can do and and your Java experience will make it clear how to use the API. If you are ever stuck, you can always use Google which will usually quickly point you to what you're looking for, search the API for keywords and find the necessary classes, or simply ask a question on the forums.

    YouTube tutorials are borderline acceptable for learning to make a functional plugin, and okay for learning how to apply the API, but they are merely example code, and should in no we be treated as being anywhere close to the form of an actual plugin. They are meant to show you what parts of the API you need to use and how to use them, but not at all how to actually structure them into your plugin, and it seems a lot of beginners with poor-quality code try to copy in the code in the form they saw in the tutorial with bare minimum changes to do what they want, creating a mess.

    If you want to make easily maintainable, understandable, and extensible code, you will need to use your own intuition to find better ways to apply the API, which is almost always by using object-oriented programming. I cannot stress enough how important it is to have a good grasp of object-orientation, and you should start early on it. I can't really discuss an example without you knowing Java already, but I can say that if you find yourself duplicating code with ctrl-c and ctrl-v at all, or creating sprawling messes to do something simple, chances are there's a much easier and better way if you apply object-orientation.

    Best of luck in learning Java and creating Bukkit plugins!
     
    hexaan likes this.
  27. Offline

    andrewginn

  28. Offline

    hexaan

    coasterman10
    It's nice to see that some people are still providing helpful answers to people who are wanting to learn how to code!
     
Thread Status:
Not open for further replies.

Share This Page