Vswe's Summer Courses | You're not logged in. Sign up or log in | Server time: | Donate
One can now see other persons' badge hunts. Simply head over to their profiles to access them.

Go back to sub forum page

General forum

Non-course related subjects

3. Programming help

trying to understand

  • 2013-10-10 20:40:11
    Hello :)

    Lets say, sokeone just got THE idea for a mod, and needs to learn how to move mountains....

    Nope just kidding about those mountains, but however i do need to learn how to make more customized mountains and stuff (i already did biomes, they couldnt do it), but trying to look at the mountain code is the same as looking into all the StevesCarts parts. ONE BIG MESS ;). No variable has a proper name. That way i cant understand it.

    So finnaly the question here: does anyone have tips on how to understand such mathmatical, unclear and terrible code?

    Byeeeeeee, mielle
  • 2013-10-10 20:43:49

    To-Do: finish and hand in assignments
  • 2013-10-11 09:18:39
    Steve's Carts is not open source, you're not supposed to read it.

    If you want to understand weird code: clean it up, rename variables and methods, add comments and split it up in smaller methods.
  • 2013-10-11 13:58:55
    Deobfuscated and decompiled code is not particularly readable and not really helpful for all but very confident and well-practiced coders. It is much easier to understand methods that look like "int addThreeNumbers(int first, int second, int third);" than it is to decipher "int func_20312a(int par1, int par2, int par3):" -- and that's only just looking at the name of the method.

    Looking at someone else's code (particularly if it's open sourced and/or allowed) can be helpful, but only so much. At some point all you're doing is copying examples without really understanding WHY you're doing what you are. The exercises provided may be tempting to skip, especially if you're eager to get to "the good stuff" later on. But skipping or skimming over those exercises now will really haunt you later when you're trying to understand the more advanced lectures.

    Trust me. Learning loops, control flow and passing parameters around between methods is nothing compared to implementing multiple interfaces on subclasses that are extended from classes that themselves extended from a base class.

    ...and even THAT is easy compared to the knowledge required to implement all of the great ideas people like you have that are just dying to become real Minecraft mods.

    Be tenacious. Stick to the exercises and work at them. Ask questions here if you're really stumped. But persistence does pay off and when a concept finally "clicks" for you, the whole thing becomes MUCH easier to do. Those great ideas of yours will come that much closer to becoming real mods.

    Best of luck to you!
  • 2013-10-11 14:01:21
    Here's a cookie for everyone that picked up on the fact that I accidentally used a : instead of a ; in one of my example lines. :)
  • 2013-10-11 19:56:26
    It was a sarcastic joke. I didnt not look into steves carts, i was saying such code was as difficult as al steve carts parts
  • 2013-10-11 19:59:55
    And also, who said i didnt do excersizes?
  • 2013-10-12 01:57:01
    I meant the "you" and "yours" in the generic sense, for the general reader, not attempting to imply that YOU - specifically - are guilty of such things.

    I myself have been impatient in my younger years so what I was relating was based on my own personal experience. As a course of work in my prior profession, I have had to decompile code where the original source was long lost or corrupted and the original consulting company that provided the code was no longer in business. To maintain it I needed to decompile the class files to see what assumptions and logic the original coders used. It wasn't fun.

    I also have an extensive library (but dated) library of books of varying usefulness on different programming languages, methodologies and APIs. In some, I tried to learn by copying the examples from the books. While this helped somewhat as I explained in my original post, most of the books of this type didn't really encourage the reader to try much outside of what was provided in the text. You pretty much got an explanation of what the author wrote and not much else.

    I'm happy with Vswe's material thus far because the exercises he suggests at the end of each lecture aren't direct cut & paste copies lifted directly from the lectures. The concepts are there, and the topic of the exercises are similar, but they encourage the reader to do some thinking on their own. Sure, you can look to the bottom of the exercises page to see possible solutions if you're really stuck on how to proceed, but copying the solution isn't really going to provide as much benefit as working it out on your own. Based on my own experience, I found this to be what works for me in building my skills as a mod developer.

    Again, to be clear, I'm using the generic 'you', not you specifically. I've PERSONALLY been guilty of finding myself making these mistakes when I was younger, and was merely offering advice to be taken or left as desired. :)
  • 2013-10-12 13:40:11
    Have youever written a book, if no, you should, you are a good writer O.o
  • Log in or sign up to reply to this thread