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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:43:59+00:00 2026-06-03T02:43:59+00:00

Aside from language-specific constructs, for someone who is programming in PHP, javascript, java, and

  • 0

Aside from language-specific constructs, for someone who is programming in PHP, javascript, java, and python, what are the top 10 clean coding must-do’s? I would like to keep my code as clean as possible and as readable as possible. For example, what’s the take on placing the function body opening bracket on the same line as the function declaration vs a new line? Also, what’s the take on spacing between things for example (x==10) vs ( x == 10 )?
Any helpful hints for clean coding will be appreciated!

  • 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-06-03T02:44:01+00:00Added an answer on June 3, 2026 at 2:44 am

    Here’s a few that may help:

    1. Give intuitive names to variables and methods
    2. Use your specific language coding style (e.g. in Java vs C++ you
      use different style on brackets; choose according to specific
      language conventions)
    3. Always put comment on what/why something is happening.
    4. But don’t pollute code with comments.
    5. Try to integrate design patterns if you can. It helps in reusability
      and maintainance
    6. Don’t put everything in one method. Each method should do one thing
      and do it really well (this also makes the method easier to read/understand/test/debug)
    7. Don’t put hard-coded strings in your code
    8. Separate application data and application code. I.e. try to not hard
      code configuration of your code.
    9. Don’t try to be more clever than the compiler. Write code that other
      people can understand it as well and let the compiler do any
      optimizations
    10. Write code in a way that shows your intentions. Write code keeping
      in the back of your head that in 7 months you may need to debug it,
      or someone else might need to fix/enhance it. It is impossible to
      remember why you did something after 7 months (and comments are
      good but sometimes not good enough). Let alone the poor guy trying
      to fix your code

    I am sure there are a lot more but I believe these can be useful in any language

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

Sidebar

Related Questions

I'm a PHP/MySQL developer who hasn't used any form of versioning aside from copy/paste
Aside from the language used (Java, C#, etc.), are articles and books for Hibernate
Aside from the language differences Javascript vs. Objective-J what benefits does Cappuccino provide over
Aside from the obvious (localhost, 127.0.0.1) does PHP (command line interface!) have a mechanism
I'm planning a programming project, but am an unexperienced programmer. Aside from a couple
Aside from scalability issues, has anyone here actually stumbled upon a web-development problem where
Aside from the PEAR repository, which I find often has quite messy code with
Aside from not deploying a Django project to the web site root directory, is
Aside from the official GWT blog, which GWT blogs do you read?
Aside from the GL Support, is there a way to override locale settings with

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.