Coding Leasons For Forge (Paid If Required)

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Pokefenn

New Member
Jul 29, 2019
976
0
0
Strange. I had dropped a link to Code Academy as the 3rd post in this thread, and it seems to have disappeared.

EDIT: nevermind, I was just confused. Anyway, as I said in your other thread... code academy is a good place to learn some coding basics. 95% of what you learn over there applies to any language, really.

This guy posted in both mod discussion and general ftb.
Anyways, i dont like codeacademy :3
Tried the javascript code and i just thought it was... urgh
 
  • Like
Reactions: RedBoss

KirinDave

New Member
Jul 29, 2019
3,086
0
0
My advice is to get to the point where you can build an open source mod. Then modify it a bit. Just figure out how to do ONE slightly different thing. Repeat this until you feel comfortable adding a whole new feature. These things you do don't need to be "good" or even "fun". Like make a sound play when you right click the philosopher's stone in EE3. Anything. Just setting up the build and dev environment will be a huge task and require research.

Sadly, the only good way to learn coding is to code. Pahimar has a sort of "welcome to the universe" tutorial but even that won't teach you basic java. You're going to have to walk a fair distance in your mind just to be able to change the color of something and build it. Even then, you will probably be making mods that are buggy and slow. It's the way of the discipline.

That shouldn't discourage you, though. Just realize it's going to happen.
 
  • Like
Reactions: Pokefenn

Malexion

New Member
Jul 29, 2019
263
0
0
I should probably also mention this since it often never really gets mentioned straight out.

Mod devs often have to deal with people. Now lets go into what that means.

To some this might not seem like a bad thing, but I think a casual stroll through the various mod forums and all the topics relating to mod devs will get you to see what I mean.

You will have to reject many ideas to keep things the way you want them or accept many to reach the goal you want, you may end up making several people dislike you along the way in either path, but I think its important to recognize just how much mod developers put up with us, the community. If you look around carefully you can find those who handle it well and those who do not handle it so well. Everyone is a little different in this regard.

You yourself will also have to deal with rejection in some cases there will be some people who will straight up state that they hate your mod with the passion of 1000 burning suns, and there will be those who love it just as much.

If you think you can handle dealing with the community or are able to straight up ignore the idle chatter you may fair better than most, but it is something to keep in mind and its often something I think about when I think about creating one of my ideas in mod form.
 
  • Like
Reactions: Pokefenn

Pokefenn

New Member
Jul 29, 2019
976
0
0
My advice is to get to the point where you can build an open source mod. Then modify it a bit. Just figure out how to do ONE slightly different thing. Repeat this until you feel comfortable adding a whole new feature. These things you do don't need to be "good" or even "fun". Like make a sound play when you right click the philosopher's stone in EE3. Anything. Just setting up the build and dev environment will be a huge task and require research.

Sadly, the only good way to learn coding is to code. Pahimar has a sort of "welcome to the universe" tutorial but even that won't teach you basic java. You're going to have to walk a fair distance in your mind just to be able to change the color of something and build it. Even then, you will probably be making mods that are buggy and slow. It's the way of the discipline.

That shouldn't discourage you, though. Just realize it's going to happen.

This is the most correct thing i have read in a VERY long time.
In vswe's tutorials he also taught java, havent watched most of it but it looked pretty decent, i would also presume its taught in the promise of people making minecraft mods :C
 

Symmetryc

New Member
Jul 29, 2019
317
0
0
Let me tell you this. Please read the entire thing before judging it.

One day I looked at a graphing calculator I found in my Math teacher's class and I saw that there were programs on it. I navigated there only to find out that you had to make the programs on it yourself. I decided that it wouldn't be that hard so the very same day I came home and looked it up on the internet. I was wrong, it was many many years ago and I was much too dumb to understand most of it. Fast forward 3 years. I saw some advertisement online about C++ schooling or something like that. I wondered what C++ was and why it was useful, so I looked it up. I found out that it was a programming language and I decided that I would give programming another shot (this time without any goal to build a cool program or a game or whatever, simply to learn). I kept looking into it and I decided that C++ was a bit too complicated for a beginner, so I started to learn how to make use of the programming language BASIC. It went rather well and I ended up also learning Lua to a fair extent (from ComputerCraft) and Java (Not too much because by the time I got used to Lua I hated overly strongly typed languages, all of the types of values in an array must be the same, the length of the array, and the depth of it. It annoyed the crap out of me to say the least). Now fast forward a couple years again. I try to teach my friend how to program and he's like "OMG, that's so cool I'm going to create the next Skyrim =D =D =D =D". All throughout the time I was teaching him, his head was swimming with game design ideas and whatnot. Because of this, he didn't really have any interest in learning, he only wanted to create games and stuff. The Englishman from The Alchemist, if you will. This will give you trouble; If you're just going to learn Java just to create a cool Minecraft Mod or whatever you have to be dedicated and focused and don't let your desires slip ahead of you.
 
  • Like
Reactions: Pokefenn

Malexion

New Member
Jul 29, 2019
263
0
0
All objects in a java array don't have to be the same if the array is of type object :)

In an object array you can put pigs, cows, and little doggies too since objects extend object, just as long as when it comes time to extract that animal you don't forget to put a dog into a dog and not into a pig.
 

Symmetryc

New Member
Jul 29, 2019
317
0
0
All objects in a java array don't have to be the same if the array is of type object :)

In an object array you can put pigs, cows, and little doggies too, just as long as when it comes time to extract that animal you don't forget to put a dog into a dog and not into a pig.

What? I don't do too much Java because of how annoying it is but are you saying that this will work?
Code:
Animal[] thing = new Dog[5];

Edit: Are you talking about a list?
 

Malexion

New Member
Jul 29, 2019
263
0
0
Code:
Object Object_Array[]=new Object[100];
[DOUBLEPOST=1377893262][/DOUBLEPOST]Could do a list if you wanted to I think, there are many ways to utilize it.

Just have to remember what I said before, anything that has extended object can be put inside, which is ingeneral a lot of things, integers, strings and even things you create.
 

KirinDave

New Member
Jul 29, 2019
3,086
0
0
What? I don't do too much Java because of how annoying it is but are you saying that this will work?
Code:
Animal[] thing = new Dog[5];

It works if Dog is an instance of Animal. You can freely cast up (and in Java, cast down) the type hierarchy. In Java, all object-level method calls are "virtual" meaning that if Animal has a makeNoise method which its subclass, Dog were to call, then calling thing.makeNoise would call the appropriate method of the most specialized subclass (in this case presumably Dog would woof).

To be honest though, this entire school of design is dangerous. Every time you subclass something, ask yourself why you are doing it and if you could use a "has a" relationship instead of an "is a" relationship. Deep type hierarchies are terrible and you don't want them. You never want them. They will only serve to make your code more brittle, less readable, and less modifiable. Most modern languages attempt to support very flat, contextually specialized ontology.

While we're on a prescriptivist kick, there is something else everyone recommends you use that you shouldn't use. Don't use private functions in objects. Private functions are a holdover from a different time and people talk about "encapsulation" like that is meaningful. Given today's modern testing tools and proclivity for code reuse, hard encapsulation is generally more trouble than its worth. Just document your methods and note which ones are internal.

Edit: Are you talking about a list?


It would work with lists, too.
 

Malexion

New Member
Jul 29, 2019
263
0
0
I really liked the Stanford CS106A: Programming Methodology course. I initially saw it on Pahimar's "Let's Mod Series", and took a look into it, and really enjoyed it! The professor is easy to understand, he's laid back, and he really knows what he's doing.

Link: http://see.stanford.edu/see/courseinfo.aspx?coll=824a47e1-135f-4508-a5aa-866adcae1111

His topics look good, but does he shows code examples/demonstrations? Which to me would be the most important thing, to see it in action.
 

Quesenek

New Member
Jul 29, 2019
396
0
0
I suggest if you have no prior java coding knowledge or even want to get better for your classes in college go to thenewboston.org he has thousands of coding tutorials. Once you have a good knowledge of classes and how to code in general look up some forge coding tutorials on youtube.
The problem i have found with having someone correct your coding booboos for you is you dont learn quite as well as if you fixed them yourself. Programming in general is a lot of learning by making mistakes.
 

Malexion

New Member
Jul 29, 2019
263
0
0
While we're on a prescriptivist kick, there is something else everyone recommends you use that you shouldn't use. Don't use private functions in objects. Private functions are a holdover from a different time and people talk about "encapsulation" like that is meaningful. Given today's modern testing tools and proclivity for code reuse, hard encapsulation is generally more trouble than its worth. Just document your methods and note which ones are internal..


My professors go on and on about encapsulation >.>
 

TheAbstractHippo

New Member
Jul 29, 2019
174
0
0
His topics look good, but does he shows code examples/demonstrations? Which to me would be the most important thing, to see it in action.

Yeah! He starts off with a program called "Karel", and it's basically this little robot that that you write and then compile commands for (in Java). It teaches you how to extend objects, create loops and methods, without having to worry about the whole "public static void main(String[] args)" thing that people typically worry about. He does cover the main function later on in the course, however. Once again, I really liked this course. :)
 

KirinDave

New Member
Jul 29, 2019
3,086
0
0
My professors go on and on about encapsulation >.>


I'd love to shoot them down. Give me their phone numbers. I'm dead serious. I will call your professor and explain to them exactly why compiler enforced encapsulation is a dubious proposition in modern object oriented toolkits.

That said, as a design principle encapsulation is key. What's not key is having to do a huge amount of handholding to adequately unit test your software.

It makes plenty of sense in module-oriented languages, but most of those offer a way to transition around the boundary for testing.
 

Malexion

New Member
Jul 29, 2019
263
0
0
I'd love to shoot them down. Give me their phone numbers. I'm dead serious. I will call your professor and explain to them exactly why compiler enforced encapsulation is a dubious proposition in modern object oriented toolkits.

That said, as a design principle encapsulation is key. What's not key is having to do a huge amount of handholding to adequately unit test your software.

It makes plenty of sense in module-oriented languages, but most of those offer a way to transition around the boundary for testing.


XD but yeah I get the point your after, it's an absolute pain to program that way, going between two different professors in Java I could feel the difference when encapsulation is made known as opposed to enforced.

I think my professor who taught C++ would be right along with you though.[DOUBLEPOST=1377895284][/DOUBLEPOST]
As you can see I know nothing about Java, I can barely get by with it :p.

Not every programmer focuses on the same area, you seem like you might like web development though it was easy to learn and play with.

Objective C is a bit of a nightmare so far, so maybe stick away from mobile development lol, im assuming the android environment is no better.
 

Symmetryc

New Member
Jul 29, 2019
317
0
0
Nah, that's not my thing, I do information theory, which mostly just takes math to do (that's why I have a very shallow knowledge of many programming languages - I just need simple things, nothing too technical, the only reason why I know Lua pretty well is because I use it for ComputerCraft, not just information theory).
 

Phuizour

New Member
Jul 29, 2019
4
0
0
So true.
Took me one year to actually get around to learning java then to learn to make minecraft mods.
Of course i think its worth it :3
https://www.dropbox.com/s/2ex2pb391y0ghq1/phuizour.zip
Is it possible for you to take a look at my code as im watching the tutorial someone posted and im getting the hang of it there is just some error that are showing up on mine and not on his, also im not sure if i may have missed something important or not, also if you can just neaten it up a little all i need is a Base code as in i need code that is 100% correct and perfect each time i wanna make a mod all i need to do is maybe change the name and a few other things.