Close Menu
geekfence.comgeekfence.com
    What's Hot

    Wilkie refers gambling concerns to anti-corruption commission

    August 13, 2026

    Lumen ready for AI traffic rush – with programmable fabric and “more fiber than anyone”

    August 13, 2026

    With a feel for physics, AI models simulate a wider range of real-world scenarios | MIT News

    August 13, 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 Read6 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

    SED News: The Kimi Moment, Runaway AI, and Tokenmaxxing

    August 11, 2026

    Jason Gorman on The Effective Use of AI For Software Development – Software Engineering Radio

    August 7, 2026

    The Terminal as an Agentic Interface

    August 6, 2026

    Sonali Varde on AI and the Engineering Manager Role – Software Engineering Radio

    August 2, 2026

    Docker and Sandboxing AI Agents

    August 1, 2026

    Explore Clipboard Operation in JavaScript

    July 29, 2026
    Top Posts

    Understanding U-Net Architecture in Deep Learning

    November 25, 202579 Views

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

    May 16, 202644 Views

    Is it too late to start learning AI and machine learning in my 30s or 40s?

    April 9, 202641 Views
    Don't Miss

    Wilkie refers gambling concerns to anti-corruption commission

    August 13, 2026

    Independent MP Andrew Wilkie has taken the fight over gambling reform to the National Anti-Corruption…

    Lumen ready for AI traffic rush – with programmable fabric and “more fiber than anyone”

    August 13, 2026

    With a feel for physics, AI models simulate a wider range of real-world scenarios | MIT News

    August 13, 2026

    Monitoring beyond SNMP: Turning your network into a sensor

    August 13, 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

    Wilkie refers gambling concerns to anti-corruption commission

    August 13, 2026

    Lumen ready for AI traffic rush – with programmable fabric and “more fiber than anyone”

    August 13, 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.