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

  • SEARCH
  • Home
  • 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 590165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:30:00+00:00 2026-05-13T15:30:00+00:00

Which principles, code qualities, practices, aproaches, language or framework features help you to reuse

  • 0

Which principles, code qualities, practices, aproaches, language or framework features help you to reuse effectively functions, classes etc in wider range of cases. All of the situations are interesting: either you can modify both implementation and interface of the code to enable/improve reuse, or only implementation, or nothing at all. The key indicators of effectiveness of reuse are (as for me):

  • how much it reduces effort for implementing and maintanance
  • quality of application does not degrades
  • how much complexity is reduced

(all comparing to reimplementing from lower level).

PS. If possible please specify one factor per answer with description how it helps in your case.

  • 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-13T15:30:00+00:00Added an answer on May 13, 2026 at 3:30 pm

    Test Driven Development. For code to be easily unit tested it should:

    1) do one thing only

    2) have as few dependencies as possible

    3) often have those dependencies passed in (so that they can be mocked out)

    By an amazing coincidence these factors also make for reusable code. Actually it is not coincidence – the best way to have reusable code it to ensure it is used by at least two callers as early as possible. Code created with TDD starts life with two parents – the code under construction and the unit tests, so it is being reused from the start.

    TDD has many other advantages apart from reuse – it gives you automated tests for all your code, it acts as example documentation for how to use the code, and it makes refactoring safer. Writing code with TDD can take longer than writing code without tests, but you will often make it up by needing far less time debugging.

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

Sidebar

Related Questions

The open-closed principle states that Software entities (classes, modules, functions, etc.) should be open
I am trying to define which agile practices we are going to use, and
I'm reading Stroustrup's Programming: Principles and Practice and came across this code: int main()
I find myself in conflict, regarding which code style I should follow when using
I know HTML is not a programming language and so applying Object Oriented principles
I have a situation where I have 4-5 very similar classes which I'd like
I am currently writing a program which is having a lot of code duplication
OCP (Open/Closed Principle) is one of the SOLID principles. Which is says: Software Entities
In order to use test-driven development principles for code involving the Android status bar,
I want to construct classes for use as decorators with the following principles intact:

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.