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 72495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:03:13+00:00 2026-05-10T20:03:13+00:00

Any code can be reused in a way or an other, at least if

  • 0

Any code can be reused in a way or an other, at least if you modify the code. Random code is not very reusable as such. When I read some books, they usually say that you should explicitly make the code reusable by taking into account other situations of code usage too. But certain code should not be an omnipotent all doing class either.

I would like to have reusable code that I don’t have to change later. How do you make code reusable? What are the requirements for code being reusable? What are the things that reusable code should definitely have and what things are optional?

  • 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. 2026-05-10T20:03:14+00:00Added an answer on May 10, 2026 at 8:03 pm

    See 10 tips on writing reusable code for some help.

    1. Keep the code DRY. Dry means ‘Don’t Repeat Yourself’.
    2. Make a class/method do just one thing.
    3. Write unit tests for your classes AND make it easy to test classes.
    4. Remove the business logic or main code away from any framework code
    5. Try to think more abstractly and use Interfaces and Abstract classes.
    6. Code for extension. Write code that can easily be extended in the future.
    7. Don’t write code that isn’t needed.
    8. Try to reduce coupling.
    9. Be more Modular
    10. Write code like your code is an External API
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any program code that can help me to pop up the virtual
How can I create an environment in client-side javascript where any code related to
There is code for save button, but I can't see any code behind the
I'm trying to use PyLucene, and I can't find any code examples that actually
I have android.permission.READ_OWNER_DATA but I can't find any reliable code that would explain how
When writing PHP code for any given project, do you find you can write
any idea how i can get the code below to produce this output? 1
Can any one provide me code for consuming webservices via SOAP in java? Actually
Can any one give me java code to the below emulator images needs? The
Any suggestions on how I can cleanup the following code pattern that repeats multiple

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.