Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • DSA
  • Practice Problems
  • Python
  • C
  • C++
  • Java
  • Courses
  • Machine Learning
  • DevOps
  • Web Development
  • System Design
  • Aptitude
  • Projects
Open In App
Next Article:
A Freshers Guide To Programming
Next article icon

Blog | Programming Guidelines

Last Updated : 27 Jan, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

Computer programming is a process of writing an executable computer program for accomplishing a specific computer task. Although writing the programs is an art, however, there should be some minimum guidelines that should be followed while writing programs. 

  1. Name: 
    Define the variable names as per programming language rules. Use proper names for variables i.e, they must indicate their rule in the program. In other words, they should be closely related to the entity they represent and modules name should reflect their activity.
  2. GOTO: 
    Minimize the use of GOTO statements. GOTO should be used sparingly and in a disciplined manner. Only when the alternative of using GOTOs is more complex; then only think of using GOTO statement.
  3. Program Layout: 
    Document the program properly. Avoid meaningless comments. in order to make the program easy to read, use spaces, blank lines, indentation properly. If available, use automated tools like pretty-printers to improve the layout of the program.
  4. Information Hiding: 
    Try to achieve minimum coupling between the modules using the concept of information hiding. This means that the module must behave as blank boxes to each other. It also means that a procedure is defined in terms of its purpose but not how it achieves that purpose.
  5. Cohesive Procedures: 
    The programmer must aim for highly cohesive modules i.e, each procedure of function in the program must perform only a single task. If a procedure handles to many tasks then its logic can be hard to comprehend and bugs can easily occur.
  6. Minimise Coupling: 
    Parameter passing good programming practice, but with too many parameters the code becomes difficult to manage. Procedures with many parameters are highly coupled; they have lots of links to other procedures, where every possible try to minimize these links. However, global variables should nor=t be used instead.
  7. I/O behaviour: 
    All I/O should use a proper format: 
    • All real number output should be format in decimal form unless scientific notation is appropriate.
    • All input from the keyboard should be preceded by a prompt telling the user what format is accepted.
    • Label all input values.
  8. Robustness: 
    Robustness is the ability of a program to recover itself from any error during the runtime. It describes the reliability of the program under extreme conditions.


 


Next Article
A Freshers Guide To Programming

A

anonymous007
Improve
Article Tags :
  • Misc
  • GBlog
  • school-programming
  • Programming Basics
Practice Tags :
  • Misc

Similar Reads

  • A Freshers Guide To Programming
    Since the boom of the IT sector, computer science has become the key to the door of future ever growing careers. Everyone knows it (You're seriously living under a rock if you aren't aware of this yet). With software so rooted in the functionality of society, Programming is one of the most desirable
    3 min read
  • Articles on Programming Languages
    Articles on Programming LanguagesCC++JAVAPython Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
    1 min read
  • Java Programming Course : A Complete Guide
    Hey tech Geeks! Welcome back! Thinking to begin learning Java from scratch to pro level! No worries, get ready to complete your learning journey as GeeksforGeeks 'Master Java Programming Course' is here to be your learning partner. Java as being the most object-oriented & network- centric langua
    7 min read
  • Top 10 Programming Tips For Beginners
    Whether you are a novice or have just started to learn programming, there are key tips that can significantly enhance your learning experience. In this blog post, we'll explore the top 10 programming tips for beginners that can help you build a strong foundation and navigate the complexities of codi
    8 min read
  • How to Start Coding: A Beginner's Guide to Learning Programming
    In today's digital age, learning programming has become increasingly important. As technology continues to advance, the demand for skilled programmers across various industries is on the rise. Whether you want to pursue a career in tech, develop problem-solving skills, or simply unleash your creativ
    15+ min read
  • 10 All-Time Favorite Programming Books
    In today's digitally advanced world, we have various distinct sources to expand our knowledge about anything, such as YouTube videos, blogs, etc. However, among all these, no one is capable to take over the charm of reading BOOKS for some in-depth exploration of a particular subject or domain. In pa
    10 min read
  • 7 Common Programming Principles That Every Developer Must Follow
    If we gave you half a story to continue it, how would you do that? How would you proceed further and add your storyline there? Firstly, you need to understand the complete story, you will search for all the characters, their role in different chapters or parts of the story, which characters you need
    7 min read
  • Tips for Designing a Plan to Learn Programming and Development
    The majority of us make this mistake early on, where we try to learn everything there about Software Development. One day we are watching a tutorial on “Intro to Java”, and the next day, we try to build JARVIS (A.I) with Python. We all have been there, however, it seems like we are doing very well b
    5 min read
  • Programming For Beginners: 10 Best HTML Coding Practices You Must Know
    HTML is one of the easiest things to learn in programming. Most of the newbies and even kids step into programming picking up HTML. They learn they build some web pages but a lot of developers even experienced ones make some silly mistakes while writing the code for the front end. Making these silly
    8 min read
  • 14 Important Coding Rules to Learn from Great Developers
    If you have never coded ever then you might be thinking that software development is all about writing a bunch of lines of code in some languages and then releasing it to the production level whenever it is ready. Well, this is true but partially. Ask a developer what they actually do in their day-t
    9 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences