Semicolon & Sons
X
About
Contact & Support
Code Diary
Episodes
Blog
Subscribe
Sign in
Semicolon & Sons
About
Screencasts
Code Diary
Blog
Contact & Support
Subscribe
Sign In
Functions Code Diary Entries
This is part of the Semicolon&Sons
Code Diary
- consisting of lessons learned on the job.
Actively enumerate what possible return values functions should have and consider possible exceptions
Argument order should be consistent in your API
Do not refer to or call a function defined later in the file
If a method is unavailable you probably have the wrong type
Watch out for API functions with multiple return types
Wrap in parentheses to avoid syntax errors with operators over many lines