You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stop using noargsconstructors and setters (and builders)
Stop using noargsconstructors and setters (and builders)
TLDR summary
Noargsconstructors and setters are outdated, 90's style old school Java. They needlessly allow entire categories of defects that are easily avoided by using only allargsconstructors and no setters. Please stop writing code like that.
Longer version
How many times have you come across (or written) code like this
This "progressively more detail" image loading algorithm can help you do and learn anything
This "progressively more detail" image loading algorithm can help you do and learn anything
Summary, TLDR
When doing or learning pretty much anything, the strategy where you tackle the whole thing all at once, but starting with a rough outline and then incrementally revisiting everything to go into increasingly more detail, is often more effective than doing things perfectly little by little and missing the big picture. (pun intended)
Longer version
Back in the days of dial up internet, which was very limited in speed and capacity compared to modern internet connections, images on a web page could take very long to load. There were different strategies for dealing with that problem, and if you look hard enough (pun intended again), they can reveal some things about how to do and learn stuff.
Traditionally, most Java apps are organized by layer, which needlessly encourages large, unwieldy "God classes" and spaghetti dependencies, where every class and package depends on every other across the system.
Instead, consider packaging by feature.
Longer version
Package by layer and what it leads to
How many times have you come across classes like this