Its pretty well accepted that one of the hardest things in building stuff with computers is naming things so that humans can understand whats going on.
Anyone know of any IRC channels or more real time resources to get feedback on naming things?
"Its pretty well accepted that one of the hardest things in building stuff with computers is naming things so that humans can understand whats going on." -- Hum... that's pushing it a little bit isn't it? :P
Regardless, I think what you're looking for is commonly known as "naming conventions": http://en.wikipedia.org/wiki/Naming_convention_%28programmin... - I would suggest googling "naming conventions for <insert your language of choice>" as a starting point. From there, if you have more questions, feel free to ask :)
Any IRC channel would work (##programming or ##python for example.) However, I wouldn't overthink it. There's really only two things you have to worry about when naming classes, variables, etc. That the name conveys properly what it's trying to represent, and also that it won't conflict with other names. A more minor point would be sticking to a naming convention (ie all_like_this or allLikeThis). Variables are the easiest, since they represent something specific at all times, even if the value changes (something like position.x for a sprite). Functions while harder, are still (if you're not overpacking functionality) a concrete input and output. Data goes in, data comes out, the name should describe what that processing is going on within (such as forierTransform). Classes are a lot like variables, they represent specific things no matter how they are changing inside (if your class is capable of representing a giraffe or an elephant for instance, then a broader Animal or Mammal title would apply better.) It's not supposed to be rocket science, so I don't think second guessing yourself on all your namings is going to do you any good. Learn more about what works and what doesn't and go from there.
I would say these too. And one more thing - picking good names require an experience itself, too - if you write more code, your names will get better and better. Don't overthink it - if you make a little mistake for picking a not-really-suitable name for something you still have option to refactor your code.
And before I forget - having the opportunity to see more experienced people's code (well, the Internet is perfect for this) can nicely develop this skill.
[+] [-] Donito|13 years ago|reply
Regardless, I think what you're looking for is commonly known as "naming conventions": http://en.wikipedia.org/wiki/Naming_convention_%28programmin... - I would suggest googling "naming conventions for <insert your language of choice>" as a starting point. From there, if you have more questions, feel free to ask :)
[+] [-] Donito|13 years ago|reply
"The only real difficulties in programming are cache invalidation and naming things. " -- Phil Karlton
Came across that quote as I was reading some style guidelines for Ruby. In case it's of any interest to you: https://github.com/bbatsov/ruby-style-guide#naming
[+] [-] catharsis|13 years ago|reply
[+] [-] ragatskynet|13 years ago|reply
And before I forget - having the opportunity to see more experienced people's code (well, the Internet is perfect for this) can nicely develop this skill.