34

Sometimes deciding name for them variables is the toughest part of coding :(

Comments
  • 0
    I always describe what I am doing in variables and function names. What is it you are trying to do?
  • 3
    It's like naming children.
  • 3
    @acerspyro

    private float _johnAdams?
  • 0
    @jonjo
    My constant class has nearly 300 constants and every time I have to name a constant I fucking thing x7 to make sure it doesn't get lost among those 700s... :/
  • 0
    @acerspyro
    Lol USER_PATH_JUNIOR ??
  • 1
    @Belzeburger
    Wouldn't it be protected ?
  • 0
    @vpanuragpandey why do you have so many constants?
  • 0
    In time you will see, that naming is the hardest part of all
  • 1
    @jonjo
    We are basically automating a setup procedure. We've assigned constants as value to be assigned and so on....hope you get that :)
  • 0
    @vpanuragpandey yea I get that but surely every constant has a different purpose thus giving it a unique description.
    CONSTANT_TO_GIVE_ME_CHOCOLATE
  • 0
    @LicensedCrime
    Indeed thanks to OOP that I just have one file to fill with all constant and few references here and there :P
  • 0
    Why are all the constants grouped in one place?
  • 0
    @paulwillyjean
    It improves the readability , since you reference these constants throughout the application and in case you wish to modify some you need to look in one file rather than browsing through 50-60 classes and so on .
  • 0
    Doesn't it break code modularity and leak implementation details accross your application though?
  • 0
    @paulwillyjean
    Code is totally modular since there is no coupling among class. I don't see why you would think that ?
Add Comment