Multi-word coding convention.
-
Trying to decide between Parser::parseHtmlTag or Parser::parseTagHtml parseHtmlTag sounds like natural English, but when we have more than 1 kind of parse, it becomes: Parser::parseHtmlTag Parser::parseBodyTag Parser::parseATag So far so good, but if we have Parser::parseSomethingElse, it's a little hard to group / sort them based on "Tag". Parser::parseCssElement Parser::parseRandomElement I made the last 2 up :) But you get the general idea. It's hard to group them, is it tag or element. My boss already dissed the idea of passing parameter to parseTag() saying it's not explicit enough what the method is doing. I love to hear your preference on this and the reason. I don't really care, I just want to know how people usually code it. And, yes I do have a life :) !!!
-
Trying to decide between Parser::parseHtmlTag or Parser::parseTagHtml parseHtmlTag sounds like natural English, but when we have more than 1 kind of parse, it becomes: Parser::parseHtmlTag Parser::parseBodyTag Parser::parseATag So far so good, but if we have Parser::parseSomethingElse, it's a little hard to group / sort them based on "Tag". Parser::parseCssElement Parser::parseRandomElement I made the last 2 up :) But you get the general idea. It's hard to group them, is it tag or element. My boss already dissed the idea of passing parameter to parseTag() saying it's not explicit enough what the method is doing. I love to hear your preference on this and the reason. I don't really care, I just want to know how people usually code it. And, yes I do have a life :) !!!
-
Trying to decide between Parser::parseHtmlTag or Parser::parseTagHtml parseHtmlTag sounds like natural English, but when we have more than 1 kind of parse, it becomes: Parser::parseHtmlTag Parser::parseBodyTag Parser::parseATag So far so good, but if we have Parser::parseSomethingElse, it's a little hard to group / sort them based on "Tag". Parser::parseCssElement Parser::parseRandomElement I made the last 2 up :) But you get the general idea. It's hard to group them, is it tag or element. My boss already dissed the idea of passing parameter to parseTag() saying it's not explicit enough what the method is doing. I love to hear your preference on this and the reason. I don't really care, I just want to know how people usually code it. And, yes I do have a life :) !!!
If you are parsing HTML text why do you need a different method for different tags? :confused:
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?"
Colin Angus Mackay in the C# forumled mike