
Originally Posted by
rwby
This doesnt help everyone btw. 
Some people are stupid and still you use hundreds of files for an sdk.
Which isn't bad. Organizing your code and keeping it clean is key.
The same goes for your coding, you should never write such code:
Code:
std::string String = "(" + ( GetNumberOfDigits( Color.R ) == 3 ? std::to_string( Color.R ) : ( GetNumberOfDigits( Color.R ) == 2 ? "0" + std::to_string( Color.R ) : ( GetNumberOfDigits( Color.R ) == 1 ? "00" + std::to_string( Color.R ) : "000" ) ) ) +"," + ( GetNumberOfDigits( Color.G ) == 3 ? std::to_string( Color.G ) : ( GetNumberOfDigits( Color.G ) == 2 ? "0" + std::to_string( Color.G ) : ( GetNumberOfDigits( Color.G ) == 1 ? "00" + std::to_string( Color.G ) : "000" ) ) ) + "," + ( GetNumberOfDigits( Color.B ) == 3 ? std::to_string( Color.B ) : ( GetNumberOfDigits( Color.B ) == 2 ? "0" + std::to_string( Color.B ) : ( GetNumberOfDigits( Color.B ) == 1 ? "00" + std::to_string( Color.B ) : "000" ) ) ) + "," + ( GetNumberOfDigits( Color.A ) == 3 ? std::to_string( Color.A ) : ( GetNumberOfDigits( Color.A ) == 2 ? "0" + std::to_string( Color.A ) : ( GetNumberOfDigits( Color.A ) == 1 ? "00" + std::to_string( Color.A ) : "000" ) ) ) + ")";
It does the job well, but is hard to read and hard to maintain.
Keeping everything clean, organized, easy to read and easy to maintain is the key aspect of a good programmer.
Good programmers write efficient code while making it easy to understand for people that have to maintain it later on.
This principle should also be applied to files.