Do you follow any coding conventions/standards?
Fum

Fum @funbeedev

About: I work as an Embedded C Engineer. Interested in expanding my knowledge in other areas of software development. Building a collaboration community for devs at https://inspirezone.tech

Joined:
Aug 12, 2020

Do you follow any coding conventions/standards?

Publish Date: Jun 4 '21
4 12

Coding conventions provide guidelines on how code should be written for a particular programming language to allow best practices and consistency in programming style.

I’m forming a list of coding conventions by programming language and wanted to find out if devs here use coding conventions at all and if you do, which ones? Also, Are there any industry specific standards you follow?

I work with embedded C and my industry doesn’t have any coding standards that must be strictly followed as such. However, if I wanted some guidelines I tend to use a standard called MISRA C (Motor Industry Software Reliability Association) as a reference because it’s widely recognised in the embedded space.
Although, admittedly most of the time I’m simply using my own idea of best practices from past experience!

Comments 12 total

  • Siddharth
    SiddharthJun 4, 2021

    Do you mean a convention for any specific language? Or any language?

    • Fum
      FumJun 4, 2021

      Any language at all!

      • Siddharth
        SiddharthJun 4, 2021

        Hmm, I mostly follow the xo style. It seems to be the perfect mix of best practices and my favourite styles

        • Fum
          FumJun 4, 2021

          nice, thanks for sharing!

  • max
    maxJun 4, 2021
    • w3c for html
    • smacss for css/scss
    • ESLint & airbnb for JS (one of the best, with example & explanations)

    • Other languages > ~linters & unit tests

    • Fum
      FumJun 4, 2021

      That's a lot of standards to keep track of 😆

      • max
        maxJun 6, 2021

        The bigger part is to add them in your linters:

        • Got one in vscode
        • Got one in a dedicated task (mostly using it before git stuff) where i can get more details.

        It's kinda tedious at the beginning, but very quickly it just make you code wayyy cleaner, and it become usual you don't even think about it after the first month.

        AirBNB is also great for that as it clearly explains every little thing, it's mostly a DRYer/Refacto of your code ^^.

        Also using them through a proper development environement (npm for front for example), through packages, makes updates a breeze ;)

  • Sarah Abd
    Sarah AbdJun 5, 2021

    I don't use all but I know :

    There are also DRY, KISS and PEP for standards.

    • Fum
      FumJun 9, 2021

      Thanks for sharing, very helpful :)

  • АнонимMar 8, 2022

    [deleted]

  • Fum
    FumMar 8, 2022

    test123

  • Fum
    FumMar 8, 2022

    test456

Add comment