Consistent code?

In the coding guidelines is written: “Make your code not stick out — make it consistent with the rest of the code you are contributing to.”

I’m not sure what it means. In other words: How can code stick out?

Stay consistent to the project’s overall coding style (formatting, uniformity, etc.) guidelines.

1 Like

I don’t understand “conformity”. But regarding coding style I would intuitively try to use the same formatting as the other programmers. That seems not a big deal to me. Maybe I’m trying to interprete too much into it and it’s simply this?

Technically, yes.

Also: Use Gerrit to Be a Rockstar Programmer (

Yes, that’s it. It was put in the guidelines because some code in Haiku was written before the guidelines were in place and/or imported from other projects. In that case, when making changes, it’s better to follow the style of the existing file, rather than try to blindly follow the formatting guidelines while they don’t match with that specific file at all.

Why a random link to an unrelated Gerrit documentation page? This is more confusing than helpful…

Not really, since this project does use Gerrit for kernel code reviews. That page explains the ‘why’ of coding development guideline consistency importance. Also, a part spelling out the basics of code review (and code maintenance by current/future developers.).

Thanks for the explanation @PulkoMandy . Now I see what is meant.

And thanks @cocobean for the link, but I think, too, that it is not very related to my question. But it is interesting anyway, it’s about certain programming habits. Unfortunately I’m more like I should not be (according to that linked text). I do polish my code before publishing it.