Mittwoch, 4. Juni 2008

Method in a common class

Suppose I have something like a "common" method. Something like

"addCharacters(String str, Character, character, Integer length)"

which adds characters at the beginning of a string until it reaches a certain length.

At the moment, I need that special method only in one place (class), but I or somebody else might need that method in the future in one ore more other classes in the same project.

My question is now: Do I put that method in the class where I already need it at the moment or do I put that method in some kind of common class (a utility class of some sort).

The advantage of the first solution would be that I could easily modify the method without thinking of the impact on other parts of the system. It could even delete it without anybody noticing.

The disadvantage of this solution is that somebody else who needs the same or similar functionality probably won't find the method in that special class. He will probably start implementing a similar method in a different class. This could lead to several different implementations in the same project, which have to be refactored in the future.

Is there a general answer to that question? I think there isn't. But which circumstances could influence the decision? Size of the project?

greetings alex

Freitag, 15. Februar 2008

Merge vom Release Branch auf den Trunk

Stehend auf dem Trunk
Bei From den entsprechenden Branch auswählen.
Bei From die Revision bei der Erzeugung bzw. bei dem letzten Merge des Branches auswählen
Bei To die letzte Revision auf dem Branch (müßte iegntlich Head sein)

Freitag, 1. Februar 2008

Merge von Branch auf Trunk:
Stehen auf Trunk.
From Trunk(Head)
To Branch (Head) (Checkbox angeklickt)

Merge von Trunk auf Branch:
Stehen auf Branch
From: Trunk (Revision)
To: Branch (Head) (Checkbox nicht angeklickt)