Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do you think a software company should impose developers a coding-style? [closed]

If you think it shouldn't, explain why.

If yes, how deep should the guidelines be in your opinion? For example, indentation of code should be included?

like image 276
friol Avatar asked Sep 28 '08 08:09

friol


People also ask

Why is coding style important?

Coding standards help in the development of software programs that are less complex and thereby reduce the errors. If programming standards in software engineering are followed, the code is consistent and can be easily maintained. This is because anyone can understand it and can modify it at any point in time.

What is coding style in software engineering?

Programming style, also known as code style, is a set of rules or guidelines used when writing the source code for a computer program. It is often claimed that following a particular programming style will help programmers read and understand source code conforming to the style, and help to avoid introducing errors.

Do coders have their own style?

Coding style is extremely personal and everyone has their own preferred style. You can discover your own personal style by looking back over code that you've written when you didn't have a style guide to adhere to.

Do developers have to code everyday?

So, no, being a programmer doesn't mean you write code all day, or even most of the day, though days full of coding do happen.


2 Answers

I think a team (rather than a company) need to agree on a set of guidelines for reasonably consistent style. It makes it more straightforward for maintenance.

How deep? As shallow as you can agree on. The shorter and clearer it is the more likely it is that all the team members can agree to it and will abide by it.

like image 193
Hamish Smith Avatar answered Sep 21 '22 06:09

Hamish Smith


You want everybody reading and writing code in a standard way. There are two ways you can achieve this:

  1. Clone a single developer several times and make sure they all go through the same training. Hopefully they should all be able to write the same codebase.
  2. Give your existing developers explicit instruction on what you require. Tabs or spaces for indentation. Where braces sit. How to comment. Version-control commit guidelines.

The more you leave undefined, the higher the probability one of the developers will clash on style.

like image 21
Oli Avatar answered Sep 22 '22 06:09

Oli