In a recent post, I listed a few good places to learn different coding styles and which coding styles are most accepted. Now, let’s decide if it’s better to develop your own coding styles or to use the recommended styles of others.

Developing your own styles
There are a few advantages to developing your own coding styles.
- If you develop your own coding styles you will be coding in a way that works for you. You have complete control over the way that you code, so you can choose to do things in a way that makes sense to you. It’s fairly easy to change your coding styles if your preferences change. You shouldn’t make changes while working on the same project, but it’s fine to do things differently from project to project until you find what you like best.
- If you are doing things the way that you want to do them, it will probably take you less time. This one could go either way, though. You could develop your own habits that you will be very familiar with and able to implement quickly. Or, you could utilize the styles of others that would take a little while to learn in the beginning but save you time in the long run.
- It’s much easier to develop your own styles. You don’t have to worry about deciding if something fits the style guidelines that you are trying to meet, you just have to make sure that things are consistent. Developing your own styles doesn’t require any extra learning, only applying what you know in a manner that makes sense to you.
Using the styles of others
There are also a few advantages to using the styles of others. By the way, by “using the styles of others” I mean following the coding guidelines that I featured in this previous post or following similar guidelines.
- Your coding style may be more accepted if you follow the standards used by others. Your code won’t be something that you just hacked up, it will be something that follows a respected set of guidelines. It’s very possible to create clean and understandable code while using your own guidelines, but if you use an already established set of guidelines it’s pretty much guaranteed that your code will be understood by others.
- You will be more prepared to work with others if you use coding standards that you may not be completely comfortable with. Chances are that if you make the transition from working alone to working with a team, you will no longer be able to do things as you want them done. You will have to follow the coding standards that everyone else on the team also follows. If you become accustomed to doing this while working on your own projects, you won’t have to adjust.
- It’s a lot easier to follow standards if you have a set list of standards in front of you. If you are making your own standards, it can be difficult to keep track of all of the different rules. When using the styles of others, you have a definite list.
What’s the difference?
There really isn’t one. It all depends on how much you value the style of your code. If you are very concerned with writing clean code, you may pay more attention that if you just want to get the job done. Moreover, it’s not that hard to adjust between developing your own styles or using the styles of others. If you are used to putting braces at the end of lines, and then you suddenly have to change your style and put them on new lines of their own, it won’t take you very long to adjust to hitting the enter key.