Saturday, December 5, 2015

C++, coding standards, and code refactoring

Dec. 5, 2015

Surprised that C++ is such a popular programming language, a few days study, Julia was so amazed and she likes to learn C++ again; a lot of coding standards, C++ guidelines also applies to the programming languages she uses, C#, OO programming.
CppCon 2014: James McNellis & Kate Gregory "Making C++ Code Beautiful"
https://www.youtube.com/watch?v=BiYliKliFvs


CppCon 2014: James McNellis & Kate Gregory "Modernizing Legacy C++ Code"
https://github.com/CppCon/CppCon2014/tree/master/Presentations
video 26:46/59:20
Keep Functions Linear
Functions that have mostly linear flow are easier to understand
and easier to modify during maintenance and bug fix

Recommendations:
Eliminate complexity introduced by the preprocessor
Refactor functions to linearize and shorten them
Update any manual resource management to use RALL
Litter your code with the const qualifier
Convert C casts to C++ casts
Use algorithms instead of loops
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md

Surprised that C++ is such a popular programming language, a few days study, Julia was so amazed and she likes to learn C++ again; a lot of coding standards, C++ guidelines also applies to the programming she uses, C#, OO programming, and are great. 
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md

No comments:

Post a Comment