|
|
Subscribe / Log in / New account

Keep the style!

Keep the style!

Posted Mar 6, 2017 11:11 UTC (Mon) by rvfh (guest, #31018)
Parent article: Getting your problems fixed

> follow the coding standards; there is no right answer to spaces-or-tabs, but whatever the project already does, you should copy.

This is something I learned from The Practice Of Programming and keep teaching around me now; whether you like it or not, when changing a file, keep the same style.

So not just spaces or tabs, but also variables/functions/methods/classes case style, bracket (all types) placement, number of columns and so on. The last thing you want when debugging a piece of code is finding out that some variables look like functions and conversely. I love Linux' checkpatch for that! (although many parts of the kernel clearly never ran it...)


to post comments


Copyright © 2024, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds