The best code style guides in the world !

styleguideimgIn SOOMLA, we don’t compromise on our code quality. It’s easy to say but extremely hard to do. We have code written in 8 different languages: C++, Java, Javascript, Ruby,

C#, ObjectiveC, CSS and Lua. It might get pretty hard to manage the quality in such a diversified code base.

If you don’t follow a style guide, you can almost never accomplish high quality in your code base. We searched and found the best code style guides out there and decided to share them with you:

Javascript – https://github.com/airbnb/javascript

AirBnB is one of the best technology companies out there. Their products are top notch and you immediately recognize that they are doing a lot of things right. Their Javascript style guide is easy to read, useful and to-the-point.

C++ – http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml

That was an easy choice 🙂 Google are absolutely the kings of technology in the world. They probably have the most sophisticated algorithms in their backend all written in C++ so one can calmly choose their style guide for your C++ code.

Ruby –  https://github.com/airbnb/ruby

We chose AirBnB’s style guide for our ruby code as well. They did the same incredible work as they did in their Javascript style guide with this easy-to-read and follow guide.

CSS – https://github.com/styleguide/css

Github’s short and useful style guide for CSS is enough. CSS is not such a complicated technology so you don’t need many rules and restrictions.

Lua – http://lua-users.org/wiki/LuaStyleGuide

We use Lua when we develop our plugin for the Corona game engine. The best and most useful guide for Lua comes from the Lua users website. It’s a very thorough and in-depth guide that explains many concepts of the language.

styleguideimg2

 C# – http://msdn.microsoft.com/en-us/library/ms229042.aspx

When one wants to develop a Unity3d plugin, one must use C# and know how to style C# code. We chose the de-facto style guide given by Microsoft. They did an amazing job preparing these in-depth guidelines for almost every aspect of the language.

Objective-C – https://github.com/NYTimes/objective-c-style-guide   http://google-styleguide.googlecode.com/svn/trunk/objcguide.xml

We selected 2 winners for this great technology that’s commonly used to create iPhone/iPad/OSX applications. The Google options is more in-depth and thorough and the NY Times one (surprised? so are we..) is shorter and more concise. Either one will make your code look better.

Java – http://google-styleguide.googlecode.com/svn/trunk/javaguide.html

Last but no least, Java. The language used for Android development. When you can use a guide given by Google you just take it with both hands and say “thank you”. This guide will walk you through everything you ever wanted (or didn’t want) to know about how to style your Java code. From naming conventions through formatting to javadoc, everything you need in one place.

Code styling is every software engineer’s job. It’s extremely important and should never be neglected. We suggest that you select your preferred style guides for your technologies and follow them. You don’t have to be anal about the ones you select. You can make modifications when you feel things need to be different but then you’ll have to strictly follow your own guidelines.

Feel free to share:

1 COMMENT

  1. Thank you for this list. I had started googling best practices for several of the languages I’ve been exposed to (mainly c++ and java). Eventually I found several style guides by google and github, and I simply don’t have the experience yet to sufficiently tell which is better. Having a premade list of good style guides is appreciated.

LEAVE A REPLY

Please enter your comment!
Please enter your name here