this post was submitted on 25 Oct 2026
371 points (95.1% liked)

Programmer Humor

33844 readers
1559 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS
 

Mine is that the useState hook is an actual plague on the entire React ecosystem. Regardless of your opinions of React, if you wanna use something then use it right.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] leMe@lemmy.dbzer0.com 3 points 3 days ago (1 children)

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.

[โ€“] Windex007@lemmy.world 3 points 2 days ago

IMO C# properties are great for exactly this reason.