Lanka Developers Community

    Lanka Developers

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Shop

    Etiquette to follow when coding...

    Blogs
    code
    5
    7
    1350
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • lahirunc
      lahirunc last edited by

      These day's we see lot of coders out there publishing their work or posting up in Q/A Sessions but most of them lack proper standards.

      Following are some of the standards you should follow when you code..

      1. Indentation

      This is one of the main problems that can be seen among most amateur developers. These programmers codes tends to look like a mess. Use of correct indentation will provide following advantages.

      • Organized Code
      • Will help identify code blocks easily and aid when debugging

      2. Comments

      Commenting plays a major role when understanding someone's code as well as it helps the formatting of the code as well.
      It is encouraged for developers to always comment their codes such as what they did, what happens in the code and other dependencies to reduce errors that cause when that specific code segment is affected by major change.

      3. Naming Convention

      When naming a variable it is best practice to either use Pascle Case (eg:- AddCalc()) or Camel Case (eg:- addCalc()).
      If a variable name consist of more than two or more words then use of underscore( _ ) is recommended (eg:- monthly_salary_calc() ).

      4. Usage of Component

      When using components such as Textboxes, Buttons, RadioButtons, Classes always use their shorten form when naming them as it makes your life easy by being easy to find the correct component. eg:- txtName or NameText or nameTxt.

      There are more standards when coding but above said are the most important ones. So make sure when you code you life up to the standard so you can have a good coding life.

      1 Reply Last reply Reply Quote 2
      • dev_lak
        dev_lak last edited by

        Usefull post..

        lahirunc 1 Reply Last reply Reply Quote 1
        • root
          root Linux Help last edited by

          very useful things bro, thnx

          lahirunc 1 Reply Last reply Reply Quote 0
          • lahirunc
            lahirunc @root last edited by

            @root thanks

            1 Reply Last reply Reply Quote 0
            • lahirunc
              lahirunc @dev_lak last edited by

              @dev_lak thanks

              1 Reply Last reply Reply Quote 0
              • imadusanka
                imadusanka last edited by

                Good post. Thank you

                1 Reply Last reply Reply Quote 0
                • F
                  fern Node.js last edited by

                  thank you mate :heart:

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post

                  1
                  Online

                  3.6k
                  Users

                  1.3k
                  Topics

                  5.3k
                  Posts

                  • Privacy
                  • Terms & Conditions
                  • Donate

                  © Copyrights and All right reserved Lanka Developers Community

                  Powered by Axis Technologies (PVT) Ltd

                  Made with in Sri Lanka

                  | |