Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
jonjo9428yI always describe what I am doing in variables and function names. What is it you are trying to do?
-
@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... :/ -
@jonjo
We are basically automating a setup procedure. We've assigned constants as value to be assigned and so on....hope you get that :) -
jonjo9428y@vpanuragpandey yea I get that but surely every constant has a different purpose thus giving it a unique description.
CONSTANT_TO_GIVE_ME_CHOCOLATE -
@LicensedCrime
Indeed thanks to OOP that I just have one file to fill with all constant and few references here and there :P -
@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 . -
Doesn't it break code modularity and leak implementation details accross your application though?
-
@paulwillyjean
Code is totally modular since there is no coupling among class. I don't see why you would think that ?
Sometimes deciding name for them variables is the toughest part of coding :(
undefined
variables