AddstarMC / Pandora

Bukkit plugin with many miscellaneous features specifically created for Addstar MC
0 stars 3 forks source link

Interface Segregation Principle #32

Closed caloja1014 closed 4 years ago

caloja1014 commented 4 years ago

Hi!, I'm computer science student, I'm learning about SOLID, and we have the job to find some possible violation of principles in git repositories, I think I have found some, In: BeaconFix https://github.com/AddstarMC/Pandora/blob/master/src/au/com/addstar/pandora/modules/BeaconFix.java ItemGiving https://github.com/AddstarMC/Pandora/blob/master/src/au/com/addstar/pandora/modules/ItemGiving.java AntiPortalEntityTravel https://github.com/AddstarMC/Pandora/blob/master/src/au/com/addstar/pandora/modules/AntiPortalEntityTravel.java

In BeaconFix you implement the interface PacketListener, that means that you have to implements the methods that come with it, in addition we know If I have already an interface with responsibilities, and the implementor doesn't need all these stuff, so you need to break these methods and regroup them into relational behavior. In ItemGiving and AntiportalEntityTravel I watched the same for module with onEnable() and onDisable() methods.

Let me know if I'm wrong. Have a good day.

Narimm commented 4 years ago

You cannot make recommendations on a piece of code without understanding its intention and goals - and to a lesser extent its history. The fact you feel that you can review 3 classes and make a judgement about a piece of code shows

  1. You are probably just looking for credit.
  2. Your chosen course provider is out of touch and should know better than to ask students to comment on public repositories
  3. People who create problems without providing a solution are time wasters.

So well done if this becomes your GIT id - employers will review these sorts of things and well you might get a job as a cleaner.

My advice - PR or shut up. Honestly, your suggestion reeks of a waste of time serves no purpose to improve the code functionally or even at runtime.

So yes you're wrong and no we don't need any further help

Narimm commented 4 years ago

A friend just pointed out that suggesting you might make it as a cleaner is suggesting that cleaners are somehow lesser than a role as a programmer - and they are probably right - because most cleaners I know would have accomplished far more in the world in the time it took you to open this issue

caloja1014 commented 4 years ago

Hi again!, It's good to know that I'm wrong, that means I have to study harder to improve my knowledge in that subject. So thanks for your feedback. In addition the comment that I made was for academy purpose, no for credits. Have a good day.