Close Menu
geekfence.comgeekfence.com
    What's Hot

    Scotland and First-Person Screams Are Silent Hill: Townfall’s New Direction of Intimate Horror

    July 30, 2026

    The first 30 days of agentic AI governance: A practical checklist

    July 30, 2026

    Lowering AWS KMS decrypt API costs in EMR Spark jobs

    July 30, 2026
    Facebook X (Twitter) Instagram
    • About Us
    • Contact Us
    Facebook Instagram
    geekfence.comgeekfence.com
    • Home
    • UK Tech News
    • AI
    • Big Data
    • Cyber Security
      • Cloud Computing
      • iOS Development
    • IoT
    • Mobile
    • Software
      • Software Development
      • Software Engineering
    • Technology
      • Green Technology
      • Nanotechnology
    • Telecom
    geekfence.comgeekfence.com
    Home»Software Engineering»Tabs Versus Spaces: Defining a Coding Standard
    Software Engineering

    Tabs Versus Spaces: Defining a Coding Standard

    AdminBy AdminJuly 30, 2026No Comments2 Mins Read1 Views
    Facebook Twitter Pinterest LinkedIn Telegram Tumblr Email
    Tabs Versus Spaces: Defining a Coding Standard
    Share
    Facebook Twitter LinkedIn Pinterest Email


    Joseph Maurer

    Press enter or click to view image in full size

    Writing clean and maintainable code is pivotal to any production project. And yet even the most functional code is frowned upon if it doesn’t follow the coding standards that a company sets. A good engineer knows that any big changes need to go through a code review before being merged into the mainline. Yet the most frequent comments made in those types of reviews are often about violations of any coding standards (not the functionality). So why do we care so much about coding standards? Do people really debate tabs versus spaces?

    Defining a Coding Standard

    Why is a coding standard important?

    • It creates a consistent look across the entire code base.
    • Enables readers to understand the code more quickly.
    • Easier to maintain the code base during merges.
    • Easier to check for following best practices.

    Most of the time when working at a company they already have a coding standard provided that hopefully is written in a way that is easy to understand. But let’s say you are starting a pet project that you plan to open up to the community as open source. What standard do you follow and how do you communicate it to the people that will hopefully be contributing? Well you don’t have to reinvent the wheel. There are plenty of pre-made coding standards out there. Here is a list of some of the good ones I found:

    Tips for Following the Standard

    I really only have one tip for helping to follow a style guide. Make it impossible to fail. Setup your IDE so that it yells at you every time it finds something that violates the standard. Is that super annoying when you’re just trying to get the code to work? Absolutely, but it is also the only way that you will learn to conform to the standard. Plus some of the rules are annoying.

    Follow this tutorial for how to add your coding standard to your IDE

    Pro tip: Most standards define a max number of characters per line. Setup your editor to display a vertical line at that mark like the line on the right in the screenshot below:

    Press enter or click to view image in full size

    Tabs Versus Spaces?

    The answer is spaces. Why? Because…. It just is. Honestly, I’m fine with either. Just never mix the two. Be consistent.



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

    Related Posts

    Explore Clipboard Operation in JavaScript

    July 29, 2026

    Leading Agile Initiatives That Succeed | Mountain Goat Software

    July 28, 2026

    Birgitta Boeckeler on Harness Engineering for AI Agents – Software Engineering Radio

    July 27, 2026

    Agentic DevOps at AWS – Software Engineering Daily

    July 26, 2026

    How To Reuse React Components

    July 24, 2026

    A Quality Model for Machine Learning Components

    July 22, 2026
    Top Posts

    Understanding U-Net Architecture in Deep Learning

    November 25, 202567 Views

    The Next Paradigm in Efficient Inference Scaling – The Berkeley Artificial Intelligence Research Blog

    May 16, 202636 Views

    Hard-braking events as indicators of road segment crash risk

    January 14, 202634 Views
    Don't Miss

    Scotland and First-Person Screams Are Silent Hill: Townfall’s New Direction of Intimate Horror

    July 30, 2026

    Silent Hill games have rarely ventured beyond the titular mysterious town in Maine, but that’s…

    The first 30 days of agentic AI governance: A practical checklist

    July 30, 2026

    Lowering AWS KMS decrypt API costs in EMR Spark jobs

    July 30, 2026

    AI agents need security regression testing, not another checklist

    July 30, 2026
    Stay In Touch
    • Facebook
    • Instagram
    About Us

    At GeekFence, we are a team of tech-enthusiasts, industry watchers and content creators who believe that technology isn’t just about gadgets—it’s about how innovation transforms our lives, work and society. We’ve come together to build a place where readers, thinkers and industry insiders can converge to explore what’s next in tech.

    Our Picks

    Scotland and First-Person Screams Are Silent Hill: Townfall’s New Direction of Intimate Horror

    July 30, 2026

    The first 30 days of agentic AI governance: A practical checklist

    July 30, 2026

    Subscribe to Updates

    Please enable JavaScript in your browser to complete this form.
    Loading
    • About Us
    • Contact Us
    • Disclaimer
    • Privacy Policy
    • Terms and Conditions
    © 2026 Geekfence.All Rigt Reserved.

    Type above and press Enter to search. Press Esc to cancel.