-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why are a lot of variables prefixed with 'm'? #13
Comments
That is my usual habbit. |
https://stackoverflow.com/a/7072899/5585431 |
Bro Chill Note:- Not everything is a convention and nor you are always required to follow the conventions :p its just in my coding style |
|
They are just variables and please reset to the last commit. Its something that I use the most, there is no convention in writing the variables names. There should be something to differentiate between objects that refer to a layout object and a normal int, String, class object that has no connection with the layout |
I agree with that. But the "m" doesn't make it any clearer what it is. It doesn't say if it is a String, a TextEdit or some Date widget. My point being, we could use some other indicator but not 'm'. It doesn't provide any useful info. |
I agree with that I just don't know why I am using m but then if we are using a single alphabet and any alphabet will not make sense |
So, here's my suggestion: |
Exactly my point. It isn't doing anything helpful.
Maybe initially, yeah. But in my opinion, it would increase readability. See my suggestion |
It is doing a lot of helpful things. Try doing frontend you would realize that you need to make a different common naming scheme for all the variables that define some layout object Other note:- just in case you ask anything |
This thing I can get by. It gives me some information on reading it. It says this a textEdit on the Main activity.
I definitely agree with all this.
But not this. Why do you think so? Say, if I read |
Ya I think I should have named everything properly but because of the fact that this is a hackathon project I was working pretty fast and not thinking about the basic stuff |
So, now that we have a common ground, what does m signify here? Isn't it redundant? And isn't PS: Don't say that you want to capitalise the D of Date |
Ya I can name it |
Isn't the trailing |
What if I just say that |
Dude, chill. We were just having a discussion. Such conventions, if we are using, should be explicit so that they may provide any one reading the code with the required info. I get what you're trying to say there. But why would you ever create a |
Example:
The text was updated successfully, but these errors were encountered: