Why Can't I Understand Any of this Code?

Discussion in 'Bukkit Discussion' started by Lanuk, Feb 7, 2013.

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


    I am a newbie programmer, currently in AP Computer Science (pretty much advanced java). I have written some small bukkit plugins, but nothing large. When I look at source code from larger plugins I am overwhelmed with all this code I cannot understand at all.

    Even plugins I would know how to code myself are just written in such a different manner I can seldom comprehend what is going on in them :p. Why is this? Would you recommend me to read up some more advanced java tutorials, or bukkit tutorials? I have watched/read a lot of bukkit tutorials, but can usually understand what is going on in them, as they are all beginner tutorials.

    Sorry for the rather "broad" question, but if anyone can relate, I would really appreciate advice on how you became a better Bukkit developer. Thanks!
  2. Offline


    Well, I actually think the answer is pretty simple and is in your post: if you are a newbie programmer (I don't say so: you do :) ) it is pretty logic that you can't really understand big/complex code. No offense at all: don't get me wrong. And in your post you actually already mentioned your solution: when you know the "beginning" than you can go further with tutorials, javadocs etc.
    Oh and another tip: a challenge is good but when you start a new project make sure it's possible with your current skills. Otherwise things may not work or you get stuck and have to copy code you don't understand...
  3. Offline


    I also got started with Java in AP Comp Sci and I've been developing Bukkit plugins for a little less than a year now. The one thing I've learned so far that you won't pick up in AP Comp Sci is good OOP architecture. To elaborate: you've learned the basics of the language, and some of the more sophisticated concepts, but you probably haven't had any training in how to (for instance) decide what classes it takes to accomplish a given goal, and you certainly haven't built anything large or complicated enough yet that you understand the need for encapsulation or abstraction.

    At this point I'd encourage you to do two things: read everything you can about object-oriented design patterns, and build lots and lots of stuff yourself. Most of my experience comes from looking at a problem and attempting to apply different patterns and architectures to solve it in different ways, time and time again, until I have a better understanding both of the problem and of the tools I used to solve it. My first plugins were horribly sloppy (everyone's are) but you sort of need to suffer through the sloppiness at some point to understand why the architecture of the whole system matters.
    bitWolfy and Double0negative like this.
  4. Offline


    Alright guys, thanks!
  5. Offline


    Another (minor?) point: There is no guarantee that bigger plugins are coded in an understandable way, same goes for the documentation :).
    tyzoid likes this.
  6. Offline


    You're lucky to have an AP Computer Science course at your high school. Wish I had one before college.
  7. Offline


  8. Offline



    It is much easier to understand the code that you wrote the the code that someone else wrote. You should not expect to know what any code does just by looking at it - sometimes, the developers' minds work in mysterious ways.


    I took AP Computer Science in High School. The teacher hated every single one of us, taught me virtually nothing, and had only one goal in mind: make us pass the AP Exam. I had an A+ through diligently completing every single little thing she requested, but she hated my guts, and said that she was "happy to get rid of me" at the end of the year.

    I will not speak for all schools, but my experience with the class in my school was a gigantic waste of time.
Thread Status:
Not open for further replies.

Share This Page