I have been thinking about the Feature Envy smell lately. Suppose I have an object called DomainObject, that responds to a message "exportTo:someExport". This is basically the DomainObject's way to provide a copy of its internal state:
exportTo:someExport
someExport setX:myX.
someExport setY:myY.
someExport setZ:myZ.
That...
Eclipse (RedRails) complain about "Feature envy" in the following code:
if input_text =~ /^(---\s*\n.*?\n?)(---.*?)/m
content_text = input_text[($1.size + $2.size)..-1] # warning in $1
header = YAML.load($1)
@content = content_text.strip()
@title = header["title"]
end
My understanding is that I safe to ignore this warning. B...
I have some code that looks like:
class Parent {
private Intermediate intermediateContainer;
public Intermediate getIntermediate();
}
class Intermediate {
private Child child;
public Child getChild() {...}
public void intermediateOp();
}
class Child {
public void something();
public void somethingElse();
}
class Client {
priv...
Using git, I can create branches conceptually, without having to branch my directory structure. When I switch between branches (assuming that everything has been committed), it will change the contents of the files that I'm working on to reflect whatever the status of the "current" branch is.
I really like being able to do this - it fit...