Morlok8k / MinecraftLandGenerator

Pregenerate Land in a SMP Minecraft Server
http://www.minecraftforum.net/topic/187737-minecraft-land-generator/
Do What The F*ck You Want To Public License
97 stars 20 forks source link

This code is broken #4

Closed jaseg closed 11 years ago

jaseg commented 12 years ago

This is just my personal opinion. I started refactoring and rewriting your code, but I gave up. I will write a similar program from scratch (just not in java). Here a list of Issues I found with your code (except for the ones for which I already submitted github issues), so you can improve:

This is not meant as an insult or rant, I just want to encourage you to improve your coding skills! thanks for your time, jaseg

PS: One positive thing I want to note: You used https for the data transfer from github, so at least the update function is more or less secure against evildoers in teh internetz.

Morlok8k commented 12 years ago

i understand that a lot of MLG isn't standard java code. And i already knew this.

Java isn't my standard language. In fact it's the first java program i ever worked on. I hadn't coded in any language in years before working with MLG. My last language was QBASIC, back in the DOS days. (except for a little HTML/JS/CSS here and there.)

I also have no formal Java training. Everything I've done has been from looking at other example code and a Java for Dummies book i bought. (And looking at a lot of JavaDocs)

I'll work on some of your suggestions. For the update section, I wanted a unified piece of code that worked for all platforms. It was never my intent for MLG to have an installation package and use native update methods. I wanted a single file that you can put in any folder, and it can work there.

as for the /TP command... I looked at that myself. you need an active user logged into the server to move around. So, it doesn't work in this case. Also, note that this program is now almost 2 years old now. it comes from back in the old Alpha days, and is compatible with every version of the server (except the unreleased buggy versions of Beta 1.9)

as for having a lot of custom or manual code - I don't want to import a lot of libraries - this is why i've avoided apache commons, etc. MLG only relies upon the base Java framework, and the JNBT library. This way, if i have a bug, I know its my code - and not some blackbox library. Maybe its because i'm used to having to make everything myself, back in the day.

as for the Rcon stuff and github branches - I'm not even going to go near github branches with a 10 foot pole. i' actually going to remove the Rcon stuff, as it just seems overkill. All that framework just to send a stop command...

anyways, I took on this project originally because the program was no longer supported by the original author, and it needed an "!" removed. I originally had no intention of expanding it or continually re-factoring it for this long. But i have, and i will continue trying to make it better. (I do look at my code i made a year ago, and ask - why did i do it this way? -- oh yeah, Its the first way that worked!)

And so for your general topic on MLG not being up to normal Java coding standards: I find myself in this position: I have coded in many many languages over the years, never fully mastering one, largely self-taught in all. (I've also noticed that I code very verbosely in all languages - aka, the hard way) So I'm beyond the typical beginners tutorial ("hello world"), and good Intermediate tutorials are hard to come by.

Morlok8k commented 12 years ago

oh, and to reply to the title "This code is broken":

It works. I have hundreds of users download it everyday. very few complaints - and usually due to user error.