Learning bukkit / Java - How hard is it?

Discussion in 'Bukkit Discussion' started by redcanoe, May 16, 2014.

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

    Bobit

    If you're going to code a plugin for your server, then you're going to have to update your plugin later, and will probably do other plugins, so you probably want to learn java, even if it is basic coding right now.
     
  2. Offline

    tommyhoogstra

    Learning Java is one thing, but then learning the bukkit API is another.

    I started with Visual Basic and slowly moved into C/c#. From there it was kind of easy but still rusty on the bukkit API, configs, etc.
     
  3. Offline

    Smerfa

    eeem...
    If you asking how hard is it... then it's not for you.
    You must love programming (in Java), and love learning it...

    And you must have some ideas/target, when I started... I only had one idea "If there is no good warn plugin on bukkit.... I want learn Java, and write own plugin!" That was big project for newbie like me then :D But after 3/4 weeks of learning (without any knowledge about Java and programming, maybe small console calculator in c++ year ago :p)
    I created first version, and it's works!
    Code was horrible... :D but works! http://dev.bukkit.org/media/files/689/730/ProfessionalWarns-1.0.jar (from bukkit dev so it's safe, but I removed project :p)

    Then... I just want more, and more, and more...
    So I created more, because that was funny, I always wanted to learn programming... but that always was boring - creating console calculator etc....
    In Bukkit... I can create everything fast and easy (and fun) :>

    And after 1 year and 3/4 months I still learning, but now I know much more and I can write normal plugins :p
    But if you don't like that, then that will be very hard to learn something... and learning only from tutorials it's bad way, you will only learn how to copy code :<
    In all my life I only read small tutorial about Java - classes, variables/fields, methods - what is that and how to use them. and very small tutorial about bukkit - how to create "Hello World" command.
    What about rest? I just playing with code - every IDE show list of method when you start write so you can just test every of it. (and method have name, so "getPlayer" don't sound like method to create cake on center of map)
    And forums... like this, you can just ask :p


    So if you like it - it's easy and fun (maybe not always...)
    But if you don't like it - it's hard and boring.

    And learning Java only for bukkit? There is so many options to play with it! Own Android applications, own LWJGL games, own programs!



    // Sorry for horrible English :p I hope that you can read that :>
     
    Bobit and RawCode like this.
  4. Offline

    FerusGrim


    How, exactly, does one love programming/learning a language before they've ever attempted to use it, before? He's asking how difficult it would be to get into (which is a question you'll hear a lot in the workplace), which doesn't invalidate his ability to do it. It's simply a feeler question, aimed at more experienced people than he.

    As far as the question goes, I'd say that you should definitely hop right in. Don't even bother learning Java first.

    I know that I'm contradicting what the majority of the people here are saying, but that's how it worked for me. I didn't learn Java because it was fun. I learned Java because I wanted to make Bukkit plugins, and I started out doing that, immediately.

    I'd like to say that I've learned quite a bit, and I've quite literally never left the Bukkit API. Does this mean I'm ready for production work outside of Bukkit? No. But programming for Bukkit has given me the motivation and made me enjoy a hobby which, before, I had no inclination to actually learn.

    I enjoy programming Java. And I started with Bukkit.
     
    gorbb and Smerfa like this.
  5. Offline

    Smerfa

    So he must try, you can't ask question like:
    "I never eat strawberry, I will like it?" - nobody know answer for that question.

    fun/enjoy it's this same for me, if I enjoy something - then it's fun for me :). fun - that don't must mean laughing to the screen and screaming "HaHaHa". You are just happy doing that - so you enjoy it :>

    IMHO programming it's like art: If you don't like painting or playing guitar - you will never doing it right.
     
    RawCode likes this.
  6. Offline

    FerusGrim


    I've literally asked people, before trying a new food, if I'll enjoy it. I'm not asking them to divine whether or not my future-self will enjoy the food. The real question is "Do you like strawberries, and do you think I'll like the strawberry?"

    Which, in this scenario, you imply his question to be, "Do you like programming Java, and do you think I'll enjoy it?"

    Also, it's entirely possible to both be good at something you don't enjoy doing, as well as be bad at something you do enjoy doing. Most people who have jobs fall into one of those categories, actually.

    The same goes for painting, or playing a guitar.
     
    Rocoty likes this.
  7. Offline

    Rocoty

    Smerfa So this is what we do on the Bukkit forums? Discourage people from learning?
     
  8. Offline

    Smerfa

    ? o.o
    I don't discourage...
    I only want say that you must try - and if you like it - do it.
     
  9. Offline

    Rocoty

    Smerfa Oh. I must have misinterpreted that then. Sorry.
     
  10. Offline

    Smerfa

    Or I just write it wrong :p My English isn't good :>
     
  11. Offline

    Bobit

    He's also kind've saying "If you like a challenge, coding is fun. But if you just want it to get done, that could be a problem."
     
    Smerfa likes this.
  12. Offline

    Wingzzz

    Smerfa
    Although I see where you're coming from, it can be either or. If someone asks about something before they try it- it doesn't mean they can't do it or won't like it, it simply implies (just an implication because we don't actually know their intent yet unless explicitly stated) that they're curious about whatever "it" may be. In this case someone was interested in knowing whether or not it would be hard to learn Java. Which at its core is a simple yet difficult question to answer. I won't give the difficult answer because I'm sure other experienced developers know it would be a very long drawn out answer covering multiple topics that I would spend quite some time writing and would still not fully answer the question.

    So, instead the short answer is yes, and no. It entirely depends on how you as a person learn, your motivation, determination, reasoning, enjoyment, and what/who you're learning from. It's an answer that differs per-instance and has many factors effecting its out-come.

    So that's why I feel being part of a community that is centred around Java programming with the Bukkit API this couldn't be a more fitting place for a beginner, nor could it be a more fitting place to see your efforts in action via the Bukkit API. Now, it's up to you whether you apply your knowledge of Java with the Bukkit API (aka: learning Java whilst also learning the Bukkit API). I say this because you'll get nay sayers, you'll get optimists. Both say it's good or bad. Although this can never be set in stone advice. It's 100% dependent on the person learning and we can not say for sure whether it'd be a good or bad experience. I myself learned Java initially from wanting to make plugins.

    I rambled a bit, forgive me- but I feel the only way the OP can get their full answer is from both all the positive and negative comments. Although just to put it into perspective, regardless of what we say- you are you and we cannot predict whether you'll be good at programming with Java, whether you'll enjoy yourself, find the knowledge invaluable, and many more. It will be a journey where you find out for yourself, but first trying to gather some information and advice about embarking on such a journey is completely plausible and wouldn't encourage someone to just blindly believe it's a good idea to start. So my opinion about this being a good question will remain.
     
    CaptainBern likes this.
  13. Offline

    moe097

    To me, I like programming and the learning process of it to. Even if it can be frustrating at times.
    I would recommend you lean java, it will probably be difficult at times; in the end it is worth it.
    Programming allows you to do so many things like: Bukkit Plugins, Video Games, Useful Programs, Minecraft Mods, etc.

    Computers are changing, they are the future of the world. We need people who know how to use our
    technology. So learn to program. Java is a very good starting language. I personally learned c++ first, than java, then html, javascript, and I am currently learning Objective C. Even though I learned c++ first, If I could go back I wish I would have started with java.

    Learning from other peoples plugins would be good, as long as you know what does what, and what is the right way to do things, and the wrong way. However, this may only teach you to do things the way the author of the plugin does things.

    Good Luck!
     
  14. Offline

    es359

  15. Offline

    Konkz

    My god Wingz, a tear went down my face! :'(
     
  16. Offline

    RawCode

    Wingzzz

    Majority of this forum "visitors" ask before trying or ask before reading.
    Such people dislike when someone (me) ask them to provide proof of work, just because they can't and this expose their lack of ability to code.
    Such people hate when someone (me) tell them to read javadocs or javaspecs, they explain such question with " you already know, and i dont want to waste my time".

    Both points are invalid, if you going to code but think that original research is waste of time - there is no hope for you, you will never code anything on your own without asking for help or eve dropping on other's source code.

    This thread about exactly same thing - topic starter without reading any javadocs, any books, any articles without trying to code ever simple plugin asked "can i code?"

    Coding plugins is "art" ( you can read what art is on wiki http://en.wikipedia.org/wiki/Art ) asking someone "can i code" just like asking "can i sing or can i compose music" such questions are invalid by nature without any proof or any explanation.
    Nobody can answer such question.

    In case of not art activity, it's possible to tell how activity hard to skilled specialist, but not for random human.

    Learning to code from outdated youtube videos is fun.@es359
     
    Smerfa likes this.
  17. Offline

    Bobit

    First half makes sense. People should figure out how to read the javadocs themselves, because they need to figure out how to do it later, and chances are there will be a "later".
    But you can't really call coding art, because in coding, there are things that are decisively better. Calling something art doesn't give that impression at all.
    Finally, it's worth a shot for this guy to ask. A lot of people are having fun answering.
     
  18. Offline

    RawCode

    "Art" and "Game" are two words that describe activity without any result required.
    It does not matter how game passed - you enjoy process, same to coding plugins.

    Generic coding is not art, you must solve specific issue as developer, it does not matter do you enjoy process of not, it's your work.

    Many people having fun answering questions, unlike them i teach to solve questions.
    This is not fun, majority of visitors want or demand spoonfeeding, but i still try to teach them.
     
  19. Offline

    Wingzzz

    RawCode
    I agree. If someone is looking to code professionally or more seriously then they should be able to do their own research in order to have something to work off of when they go to ask for help and not just assume people will hand out answers or code like candy. I feel as if that does not apply in this scenario in my opinion because for one, they do not know Java (and I'm going to assume neither do they know much about programming in general) and as such it is completely valid to go onto a community forum in which prides itself on helping beginners, hobbyist, and experts work with the Bukkit API (which I would once again assume, is why the OP is posting about Java as they're most likely interested in making plugins- an assumption of course and as such I could be completely wrong, but since we don't know if I'm right, neither am I wrong- yet).

    Any ways I'm glad you're sharing what you think the OP should have done before asking on here, although do we really even know if they have done any prior research? Who's to say... Personally I'm not one to brush someone off simply because they don't meet my expectations and don't strive to be the best programmer they possibly can be, before- they even start.

    Also, just to mention- when we say "art" or "craft" we are using this in a metaphorical sense and not in a literal sense. Hope that clears things up :)
     
    xTigerRebornx and RawCode like this.
  20. Offline

    es359


    Are you being sarcastic?
     
  21. Offline

    Garris0n

    The bad practices can extend into the very concepts. Like if somebody made a logger plugin that used "Logger.getLogger("Minecraft")".
     
  22. Offline

    Rocoty

    I totally agree on that.

    That's not true. I agree there is no way you're gonna learn to produce decent code if you keep the mindset that research is a waste of time. But people can change, so saying they will never ever code anything on their own is preposterous.

    Actually, the way I see it. The OP is asking "Is it worth learning?" rather than "Can I learn it?". I hope you will try and see that.
     
  23. Offline

    garbagemule

    Sure. The paragraph you quoted that sentence from pretty much covers that. An even worse example would be if someone looked into the source code of a plugin that uses NMS and got the ridiculous idea that programming directly to an ever-changing implementation is good practice, or heck, if a not so insignificant portion of the regulars in the community actually encouraged it ;)

    I think the biggest problem with learning from communities like this is that bad practices are all over the place because it's such an isolated, sandboxed environment where peer review is limited to that of other beginners, who have absolutely no clue about what good and bad practices are (and why they are important). The "if it works, it must be good practice, if it breaks often, I just need to be quicker with updates"-mentality is contagious, and the server owners are the ones that suffer in the long run. At the end of the day, though, someone who learned too many bad practices will eventually hit a brick wall, and what separates the wheat from the chaff is, among other traits, the determination to keep learning.
     
    Wingzzz and Rocoty like this.
  24. Offline

    Garris0n

    Well it's not like there's an alternative. We're modding a game. The game changes. There's nothing we can do about that. The Bukkit API attempts to put a shield in front of the game to save us some trouble, but it's not a perfect shield. There are some things that are so expansive or change so much that they can't create a reliable API for them, and those are the things that, if you are able to keep up with the game's changes, you can code directly into yourself. It's not really "bad practice" in the sense that there is a better practice.
     
  25. Offline

    garbagemule

    Garris0n
    I understand where you're coming from, and I'm perfectly aware that some things are very difficult to create low-maintenance API-side implementations of, but it almost seems like the people who understand the obfuscated code base very well aren't even trying - some of the "tips" I've seen around the forums would require very, very little Craftbukkit-side work to get implemented in Bukkit. My point is that in the general case, it is bad practice, and for very good reasons, yet people seem to be much more lenient about it here, and some even directly encourage it without any explanation other than "just put craftbukkit on your classpath". There is a better practice, which is to try to contribute to the Bukkit project - if that doesn't work, revert to plan B of brittle NMS plugins. Programming directly to an ever-changing implementation is a bad practice, but for some, it's become the norm instead of the alternative. On the other hand, if the only thing you ever want to do is write a Bukkit plugin and maintain it only while you're using it yourself, go ahead and hack something horrible up and #yoloswag :p
     
  26. Offline

    Garris0n

    garbagemule Well, for one, it's a bit of a pain to get a PR into Bukkit. Just recently there were PRs that had been sitting around for years that finally got accepted.

    And when you think about it, all you're doing by adding it to CB is saying "here, you guys update this for me".
     
  27. Offline

    Smerfa

    In my fully private project I using NMS, sometimes it's just easier... why so many options from NMS aren't in API :<
    In NMS you can just "select" region and get all entities from it, in API you must check all mobs on map.

    And sometime you just need use NMS :p creating mobs, or override some minecraft function - and then you can make everything.
    Bukkit API is limited... very limited, without reflections and NMS most of my ideas are impossible or you must create super-laggy code with many 1 tick tasks :<

    But like you said... if you can do that using API, then use only that API.
     
  28. Offline

    garbagemule

    Which is the entire purpose of an API like this! Move the implementation-specific code up into the actual implementation and have plugins use the API for robustness, maintainability, and in the case of an obfuscated implementation, readability. This is also why PRs can sometimes take a long time to get accepted - if it involves too much Craftbukkit-side code, it means it's going to be high maintenance, and it has to be decided if the added maintenance costs are worth the change (sometimes decided based on feedback from the community). Furthermore, if a PR doesn't get enough (constructive) attention and support, it probably means it's not going to benefit enough developers to be worth it - in the end, all of this just boils down to community-mentality vs. whatever reason someone may have for not wanting to share (be it laziness, pride, or perhaps a not-so-negative trait). If everyone submitted (quality) pull requests first, and programmed up against the implementation second (as a fallback until the pull request is accepted or rejected - perfectly fine to do so), I guarantee you we would have a much bigger feature set than we do now. Based on the intersection between people who submit pull requests and people who submit NMS "tips" in the forums, I'd say "NMS-evangelism" is a real thing, and it is far from constructive (on the contrary, it slows progress).

    Smerfa
    And how many pull requests to the Bukkit project have you made to try to get these things into the Bukkit API so you don't have to use NMS? :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  29. Offline

    Garris0n

    garbagemule Out of curiosity, do you have any examples of this? I'm curious as to what exactly you mean.
     
  30. Offline

    garbagemule

    Garris0n
    Yeah, I'll dig around and get back with a couple of links :)
     
    Garris0n likes this.
Thread Status:
Not open for further replies.

Share This Page