3 ms·
> You need to take every piece of advice and figure out when and where it does not apply. This. It is almost obvious. But you still see lots of cases where adv
by huherto 10y ago
> You need to take every piece of advice and figure out when and where it does not apply.
This. It is almost obvious. But you still see lots of cases where advice is followed where it doesn't make sense.
A particular contrarian thing that I do in Java. When I need objects that are pure Data Transfer Objects (DTOs) with no logic whatsoever inside I just declare all members public and do not bother writing (or generating) getters and setters. I know we were told NEVER to do this. But in this case there is not attempt to encapsulate anything as there is nothing to encapsulate.
- douche 10y agoJava really needs to get auto-properties added in someday...