Thursday, December 16, 2010

BitSquid C++ Coding Style

The BitSquid Coding Style Guidelines:


  1. Almost the same as the Google C++ style guide (,which I use and love ;).

  2. I agree with everything but the underscores for variable and function names. I find camel case easier to read than underscores.

    That said, I definitely feel it IS something that I feel should be specified. I'd rather read and code underscores than have a mix anywhere in the code.

    Lastly, the one place I feel a piece of "hungarian-esq" notation works is notating an argument to a function:
    my_func(int a_argument1, int a_argument2)
    // code body

    Though this might harm the type of readability you're looking for, it differentiates arguments from local variables and can help someone scanning the code figure out where the variable came from easily, especially in longer functions (e.g. whether it's a calculated value local to the function or passed in).

  3. I-actually-like-dashes-best,-but-unfortunately-that's-not-valid-C++. Underscores_are_the_next_best_thing_because_what_you_write_is_still_quite_readable. CamelCaseIFindNotVeryReadableAtAll,ButIGuessYouCanGetUsedToIt.

    I haven't felt the need to distinguish arguments, to me they don't seem "special enough" and I like to keep the functions short. Actually I'm not so sure on the hungarian notation on member variables either. It might be clearer to just write this-> everywhere... it's a bit more typing though... and harder to enforce. But all of this is a matter of taste anyway.

  4. When I sit and code in visual studio, i think its nice for example to write m_ and then press ctrl-space to get all member variables. Or for example to write class.get and press ctrl-space to get all the getters from the class. Thats one big reason I think to write m_ before members and get before get functions.

  5. I was refering to this excellent post from time to time, but unfortunately, the link pointing to the coding style stopped working. Is it available anywhere else?

    1. Thanks for noticing, I've found a new home here:

  6. This is a great article, with lots of information in it, These types of articles interest users in your site. Please continue to share more interesting articles!
    Quickbooks contact helps you with everything regarding QuickBooks software. If you are stuck in some general issues related to QuickBooks like installation error or payroll issues then we are here to help you anytime you want.

  7. yes c++ is a language. it is used to create a programs. it's most common application used in nowadays.
    windows spotlight quiz is also made by this language

  8. I was surfing net and fortunately came across this site and found very interesting stuff here. Its really fun to read. I enjoyed a lot. Thanks for sharing this wonderful information.

  9. Great to see your blog..

  10. Microsoft excel is very widely used application by small or large organizations. XLSX viewer tool is the best rated free Excel file reader to open, edit various different types of spreadsheets files. It is a type of xls file extension that used to various mathematical models. For more information, you may visit.

  11. I am Jackson Levi From Australia . I am So Glad to see your post. You did a great job in this post. It was very helpful for me. Thank you for sharing this Blog. Netflix Phone Number Australia +61480-020-996 is the one-stop solution to all your Netflix-related problems. If Netflix itself can’t resolve your problem, our exclusive services are the most reliable toll-free number in the industry. Where certified experts make things easier and resolve problems instantly our technical team resolves all problems related to Netflix. It happens due to a wide variety of reasons. You can take help from technical support on the support team to resolve buffering issues.It affects your work and business which totally depends on the internet. We are open 24*7 to assist you regarding streaming problems and non-technical issues after fixing the problem watch your favourite channels on Netflix .