Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4344270
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:52:23+00:00 2026-05-21T11:52:23+00:00

What would be a quantifiable definition of a lazy class (i.e. a class that

  • 0

What would be a quantifiable definition of a lazy class (i.e. a class that does too little)? How little methods would a class need to have to qualify as lazy in your opinion? Would a class that only has a constructor, getters and setters qualify as lazy? Or would that count as a data-class?

I understand there are no hard-and-fast rules when it comes to this stuff, but I would be curious to hear different peoples opinions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T11:52:23+00:00Added an answer on May 21, 2026 at 11:52 am

    I think this site (linked to from wiki) has a good definition: Code Smell Taxonomy

    The common thing for the Dispensable smells is that they all represent something unnecessary that should be removed from the source code.

    This group contains two types of
    smells (dispensable classes and
    dispensable code), but since they
    violate the same principle, we will
    look at them together. If a class is
    not doing enough it needs to be
    removed or its responsibility needs to
    be increased. This is the case with
    the Lazy class and the Data class
    smells. Code that is not used or is
    redundant needs to be removed. This is
    the case with Duplicate Code,
    Speculative Generality and Dead Code
    smells.

    If a class has simply an empty constructor and a getter and setter for every variable then I think that is a lazy class. Essentially, a class like that appears to violate encapsulation (though technically the representation could change while still accommodating all previously defined get methods). At the very least it is nice for classes to provide for the immutability of their instances (in multithreaded programs). Obviously some patterns (such as ones that rely on DTOs) demand “data classes” exist (empty constructor and all). I guess that means the answer is “it depends” and that is why we have code reviews.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Would the following SQL remove also the index - or does it have to
Would having a nice little feature that makes it quicker to write code like
Would someone kindly assist me with the following? I have two DataGridView objects that
I have a few hundred network devices that check in to our server every
Would that be a reason for rejection of our app, if we use the
Would you guys mind to shed some light about what are the difficulties that
I would like to make sure that when user log in it will stay
Would it not make sense to support a set of languages (Java, Python, Ruby,
Would it be possible to print Hello twice using single condition ? if condition
Would it be possible to show an image in full screen mode using silverlight.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.