I just wanted to start a thread for people to discuss and share the systems/conventions they use for naming their objects/variables/methods etc. I'm assuming that everyone follows the standard guidelines but I'm wondering about the various strategies that people use for naming.
Things like:
don't sit well with me. I feel like there should be something in the name of that instance of NSTextField to indicate what it's role is. But then it seems like it's easy to start getting ridiculously long variable names. When your app is simple and only has one NSTextField, it's purpose is fairly obvious, but as your GUI evolves it's certainly possible that you may have more NSTextField instances and calling them textField1, textField2 etc. doesn't really seem appropriate either.
I'm still a novice and haven't developed a style, so I'd be interested to see some of the strategies you guys use so I don't stumble into bad habits early on. Thanks in advance for any wisdom you pass on.
Things like:
Code:
IBOutlet NSTextField *textField;
don't sit well with me. I feel like there should be something in the name of that instance of NSTextField to indicate what it's role is. But then it seems like it's easy to start getting ridiculously long variable names. When your app is simple and only has one NSTextField, it's purpose is fairly obvious, but as your GUI evolves it's certainly possible that you may have more NSTextField instances and calling them textField1, textField2 etc. doesn't really seem appropriate either.
I'm still a novice and haven't developed a style, so I'd be interested to see some of the strategies you guys use so I don't stumble into bad habits early on. Thanks in advance for any wisdom you pass on.