DarkMultiPlayer Client

DarkMultiPlayer Client

38.8k Downloads

Project not Using Proper OOP Principles

TShapinsky opened this issue ยท 3 comments

commented

looking over this project I can see a lot of sloppy code:

  • lack of setter and getter methods for variables that should be private
  • public static variables that should be private
  • code that should have its own method smushed in with other code in extremely long startup methods that allow for little recovery if a reset of a service was required
  • some well documented code but lots of undocumented methods

What you guys have here is a great product and once you get it cleaned up it's gonna be a lot easier for you in the long run. Also if you need any help I'd be glad to lend a hand.

commented

What, no complaints about the 2000+ line files :P? https://github.com/godarklight/DarkMultiPlayer/blob/master/Client/VesselWorker.cs

Where's the Pull Request with your fixes?

commented

This is essentially a bug report about coding style, so I'm going to consider this one invalid.

There's nothing wrong with publics if you're only going to have public getters and setters...

There's nothing wrong with singletons or statics.

There's nothing wrong with a 2000 line file if it belongs together.

And there's nothing wrong with this being my first project with no formal training whatsoever (I don't work in the IT industry either) :P

If I wanted to sink time into something that doesn't help users I'd rip the networking code out of DMP and put it into it's own library or move to libgren.

commented

Closing this, this isn't a bug nor does it cause problems for users. I know DMP is a bit weird in some places, but this is only one step above an argument about tabs or spaces.

Also, I don't expect anyone with no experience with the DMP codebase to be able to refactor it in any logical way, nor do I want my classes parented like the eiffel tower :).

Feel free to raise points or questions, but if you tell any modder "You're doing it wrong and you're a sloppy coder. Fix it please" without any type of discussion, don't expect kind words to be thrown your way :P.