• 1 Post
  • 5 Comments
Joined 1 year ago
cake
Cake day: June 5th, 2025

help-circle
  • generally agree, probably most devs nowadays do. otherwise there wouldn’t be stuff like @data in lombok.

    i think the word ‘dogma’ is pretty good: it takes a good idea (encapsulation) too far. i am not old enough to have been coding when OOP was the new and hot stuff. but i imagine it comes from the idea that it is a good idea to protect private members where needed.

    public class Account {
      private Integer balance;
      public Integer getBalance() {
        return new Integer(balance);
      }
    }
    

    that is not such a bad idea to protect balance from stupid sideeffects.

      public String getName() {
        return name;
      }
    

    is a nothing burger, as it returns the same reference and does not protect from accidental sideeffects.




  • the concept may be more established for ice hockey. but it is present in all sports or possibly in life: we hope there is a referee to punish bad behaviour. but if there isn’t, we have to take things into our own hands.

    i am not necessarily talking about violence here. if at your job someone constantly tries to sabotage you, violence may not be the best approach. but some dirty play on your side, might just discourage the behaviour enough. obviously that should only be considered, if theere is no sort of referee to stop the behaviour traditionally.


  • leMe@lemmy.dbzer0.comtoMicroblog Memes@lemmy.world•Game misconduct
    link
    fedilink
    English
    arrow-up
    14
    arrow-down
    1
    ·
    13 days ago

    we had an ‘airforce’ player in our team. he usually was only on the field, if the other team played dirty. the most dirty opponent would have a painful clash with our ‘airforce’. the game usually was a bit more civilised after that.

    was it the right thing to do? probably not. would we have sent the ‘airforce’ if the referee had stopped dirty plays earlier? definitely not! did it protect other players from going home with injuries? yes!

    so no, violence is not the only correct thing to do. but it is a way to achieve certain goals. sometimes fire has to be fought with fire.