a working definition of good code

posted in Gamedev info
Published January 26, 2015
Advertisement
a working definition of good code


A definition of "good" code (in no particular order):

1. correct - the code should work correctly.

2. brief - brevity is preferable. but not at the sake of readability.

3. simple - simpler code is preferable to more complex code.

4. bullet proof - the code should be able to handle any input params without crashing, or BY DESIGN never get passed params it can't handle.

5. easy to work with / mod / expand / maintain. "low friction" as Johnathan Blow calls it.

6. portable - more platform agnostic code is better. code which works with different compilers, OSs and hardware can be more useful when code portability is an issue. with an eye towards future portability, code should be designed with platform agnostic syntax when practical.

7. high readability - the code should be easy to read and understand. brief and simple code can help with this.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement