From: Dr. M. B. <dr....@t-...> - 2014-08-21 15:24:13
|
Stefan, let me answer directly: The current code is far from finished, thats one reason why its not yet in rails_2_develop. Its pushed to the current branch with 2 goals: To be able to work on different machines and to get feedback on ealry ideas. Thanks for the feedback though. I agree with you that the goal should be to have as least code as possible and one duplicated without real purpose. The (or rather my ) design goal for the formation round is to have one "NationalFormationRound"-Class that can work for (1835,1837,1856(?), 18OE, and maybe more). I am way afar from that goal in the moment but would like to be able to test certain game mechanics after implementation, thats the reason why i copied the code the way it is currently. Regards, Martin Am 21.08.14 um 16:34 schrieb Stefan Frey: > Martin, > could you please avoid to duplicate code and classes that differentiate > only a single parameter? Current example are those classes related to > Folding and Merging into the three national railways of 1837. > > *** General remark for all contributors > (so currently mainly Martin and Alexander): > > From my experience now, one thing that makes refactoring and rewriting > of Rails somehow difficult and tedious is code duplication in the past. > > To some degree this is always unavoidable, as this is the easiest way to > ensure that code can be changed without breaking existing code. > > However later on it is difficult to merge the code again as you have to > check carefully if the code is only copied or if the code was changed > afterwards. > > So please think double, before you copy code from existing classes or if > there other ways to ensure your goal. > > I know it is especially difficult for the Round classes as they are > combining all kind of functionality. I will break those classes into > smaller bits as soon as Rails 2.0 is out of its door, however the more > code in existing Round classes exists, it will get more work to break > them up. > > Feel free to comment. > > Stefan > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |