Menu

Getter, Setter, Never?

Published on December 04, 2019 and filed under Software engineering
Written
by Zvonimir Spajic and will take

6 minutes

of your time.
In short
The rigmarole of starting a new project can be tedious. You have to create a bunch of basic classes and fill in all their getters and setters. Luckily your IDE can automate this for you. But should you even generate these methods? Take a look at when getters and setters are an anti pattern. Learn how to improve your classes and readability of your code.

Want to see more articles like this in your inbox? You know what to do.

Written by

Zvonimir Spajic

Zvonimir is a passionate software developer coming from Croatia but with current base in Berlin, Germany. Don't ask him anything in German yet though, he's still working on his sprachen-skills.

Learn more about Zvonimir Spajic

Related articles

Follow these 4 steps to take your debugging skills to the next level

Follow these 4 steps to take your debugging skills to the next level

Bert Ramakers

March 27, 2020

What we talk about when we talk about testing

What we talk about when we talk about testing

Zvonimir Spajic

March 26, 2020

Never talk to strangers

Never talk to strangers

Zvonimir Spajic

January 20, 2020