Wednesday, March 31, 2010

Consistent Variables

Sort of sounds like an oxymoron, huh? For whatever reason, I've gotten used to naming variables one way in Python and another in Javascript. In Javascript, I've been using the "variableNameExample" scheme, whereas in Python I've been using the "variable_name_example" scheme. I've been going back and forth between the two a lot lately, and I'm asking myself "Why?"

Part of me whats to switch everything to the first example, since I think is easier to type and looks "prettier", and it definitely is the more common scheme used in Javascript. Of course, changing everything over on the Python side will take time that I currently don't have. I may just start using the case-switch scheme for here on out, and then later go back and "sed" many of the underscore variables to case-switch variables..

Hindsight is always 20x20!

15 comments:

  1. 先將一個人的生活過好,才有能力過好兩個人的生活 ..................................................

    ReplyDelete
  2. 被人揭下面具是一種失敗,自己揭下面具卻是種勝利。............................................................

    ReplyDelete