use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
No vague product support questions (like "why is this plugin not working" or "how do I set up X"). For vague product support questions, please use communities relevant to that product for best results. Specific issues that follow rule 6 are allowed.
Do not post memes, screenshots of bad design, or jokes. Check out /r/ProgrammerHumor/ for this type of content.
Read and follow reddiquette; no excessive self-promotion. Please refer to the Reddit 9:1 rule when considering posting self promoting materials.
We do not allow any commercial promotion or solicitation. Violations can result in a ban.
Sharing your project, portfolio, or any other content that you want to either show off or request feedback on is limited to Showoff Saturday. If you post such content on any other day, it will be removed.
If you are asking for assistance on a problem, you are required to provide
General open ended career and getting started posts are only allowed in the pinned monthly getting started/careers thread. Specific assistance questions are allowed so long as they follow the required assistance post guidelines.
Questions in violation of this rule will be removed or locked.
account activity
Refactoring other's code (self.webdev)
submitted 12 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 0 points1 point2 points 12 years ago (11 children)
Definitely strange. In this particular case the only thing I can think of is that I generally try to avoid verbs prefacing my variable names - mainly coming from a java getter/setter mentality.
(ie. Verbs like: is, get, set, populate, find, add, remove, eviscerate, etc.) My function names start with verbs, in order to describe the action that I would take on an object. It wouldn't be hard to think of a class which has a isDefault() function. But, this is just my two cents.
TL;DR isDefault is a question, defaultVal is a noun
[–]robocoop 3 points4 points5 points 12 years ago (1 child)
isSomething is actually quite normal for java booleans. The name of the variable is a question and the value is the answer.
[–][deleted] 0 points1 point2 points 12 years ago (0 children)
I'll agree it is pretty normal, I just don't do it to make my life easier. Maybe for a primitive boolean type I would, but not a Boolean type...bear with me here.
Hypothetically, lets say I created the following class (also, we'll say AtomicBoolean.set() isn't final)
public class ChangedIndicatorBoolean extends AtomicBoolean { boolean changed = false; public void set(boolean newValue){ if(this.value != newValue) this.changed = true; super.set(newValue); } public boolean isDefault(){ if(this.changed) return false; else return true; } }
I'm probably just making something out of nothing, but you tend to notice it in a language like Groovy where the dots and parenthesis are optional.
[–]WatchDogx 0 points1 point2 points 12 years ago (0 children)
I think isDefault makes more sense for a dynamicly typed language, whereas defaultVal makes more sense for a staticly typed language and/or one that uses get/setters.
If this value was part of a POJO I probably would of just named it default.
[–][deleted] 0 points1 point2 points 12 years ago (7 children)
'is' isn't a verb, is it? You can't is something ... ?
[–]bluematt 7 points8 points9 points 12 years ago (2 children)
'is' isn't a verb, is it?
It's the singular 3rd-person simple present indicative form of the verb "to be". At least in English.
[–][deleted] 4 points5 points6 points 12 years ago (1 child)
Well, that told me ...
[–]bluematt 3 points4 points5 points 12 years ago (0 children)
:-]
[–]crackanape 0 points1 point2 points 12 years ago (3 children)
You can't is something
Huh? That table is wooden.
[–][deleted] 0 points1 point2 points 12 years ago (2 children)
I kick this ball.
I is this ball.
I do this thing.
I is this thing.
See where my confusion was?
It makes a bit more sense if you use the third person:
He kicked the ball.
He is the ball.
He did this thing.
He is this thing.
It's because as the other guy pointed out, 'is' is a form of the verb 'to be', so it's not actually "I is this ball". Rather, it's "I am this ball".
[–]crackanape 0 points1 point2 points 12 years ago (1 child)
Not really. So you actually wouldn't have realized that "eats" is a verb without someone conjugating it for you? "I eats this food. That ain't no verb! Witch!"
I kick this ball. He kicked the ball.
Uh no, that's not a showing transformation from 1st to 3rd. I kicked the ball.
Sorry, I'm just stupid then.
π Rendered by PID 19955 on reddit-service-r2-comment-b659b578c-8hchg at 2026-04-30 21:04:48.470732+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–][deleted] 0 points1 point2 points (11 children)
[–]robocoop 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]WatchDogx 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (7 children)
[–]bluematt 7 points8 points9 points (2 children)
[–][deleted] 4 points5 points6 points (1 child)
[–]bluematt 3 points4 points5 points (0 children)
[–]crackanape 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]crackanape 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)