On Sat, 3 Dec 2005, Hansenet Mail wrote:
> So what can we do about this?
> 1.
> I would really really love to have that "big picture". But that
> - needs a lot of discussion in advance
> - needs careful planing afterwards
> - needs a strategy how to get from the current mess into an organized state
> again
> - has to be made known to and commited by everybody that touches src
This is essentially a proposal for a major overhaul of the code. While I agree
that because of the way the code has grown it has many kludgy aspects to it, I
do not think that any project to change the code on this grande of a scale is
likely to succeed. I do support making incremental improvements
in the overall structure when possible.
> 2.
> I really really would love to see that dependency graph. Since i am on
> windows,
> chances are bad at the moment, but maybe a graphics file (gif?) every now
> and then
> would be very helpful. If there is any chance to get that in the wiki i
> strongly
> second doing that.
Having the dependency graph publicly posted would be a good thing.
> Some more opinions of mine:
>
> 3.
> I am a strong supporter of the projects underlying technique of extreme
> programming.
> But i also think that some essential things are missing at the moment:
> We don't have tests (that is automated test code like unit tests). They
> would show
> us immediately, if things get broken or not. I have a very ambiguous opinion
> on unit
> tests, since they can easily become a project of itself. But we should at
> least consider
> to have tests for some important core functionality. One consequence of
> missing tests is
> that we are afraid to do bigger reworks of the code, even if they are done
> in small steps.
> XP is also about pair programming and there is one big reason for that:
> Communication!
> Now pair programming for wesnoth is of course a problem but communication is
> not.
I am not sure that I would categorize the underlying technique of this project
as extreme programming, although maybe I just don't knowwell enough what that
means. I think that unit tests are not likely to succeed in wesnoth. They
would be a project in and of themselves and would have to be maintained along
with the code they are meant to test. An approach that I hope to move toward
is not the use of unit tests, but rather the use of a fully integrated tests.
For example, I would like to be able to run wesnoth in batch mode having the AI
play through all of Heir to the Throne. This would then be cron'd to run on a
nightly build of wesnoth based upon the nightly tar-balls produced by gna.
While this would not tell us specifically what has been broken, if it is unable
to complete the campaign, we at least know that something was broken on a
particular day of commits. This should significantly narrow down any major
game-busting errors sneaking in. We are not in a position to do this yet, but
I think we will get there. You might notice that this goal is in sync with
another goal, defining levels of scenario/campaign difficulty based upon the
AI's capability at playing through levels.
> 4.
> As i said earlier, better organizing the code turns out to be a necessity
> IMHO.
> I go one step further and say: In a not too far away future, if we don't get
> the code
> organized better, many changes will break more things than they fix. This
> will become worse
> over time.
> So i make a proposal here: Every patch, that changes essential parts of the
> code, has to be
> sent to yann first to be approved. This of course only under the
> preassumption that yann finds
> enough time to not delay the development substantially. But i don't think,
> that those kind of
> patches will appear very often. As a first approach, we can define essential
> as changing includes
> of a source file.
As you pointed out, I don't think that we can easily define what are essential
parts of the code. I would like to gather information from all the coders on
what parts of the code they feel comfortable with changing. Such a list would
then enable other coders who are delving into a new area of the code to contact
one of the others who is already familiar with it. This would be a big step in
improving communications. As for the question of changing the include files in
any wesnoth code needing a single individuals pre-approval, I think it would
likely be a major burden. It would, however, be reasonable to identify the
"low-level" source files that should be kept to as slim an include list as
possible. Modifications to the include list on these files then could require
approval by one individual. I think that this has a reasonable chance of
success. Yann would be the obvious person to take this task on if he was
willing. Yann, any comments?
> 5.
> We need someone to coordinate the efforts of getting the "big picture". This
> is a perfectly
> suited task for the "code leader", that was proposed by Dave lately. It
> doesn't mean he has
> to be doing all the work himself, he could as well delegate it. But he takes
> over
> responsibility and "keeps things going".
I certainly do think that moving the wesnoth codebase towards a more
maintainable structure is a good thing. I do not, however, think that major
refactoring of the code should be done purely for refactoring's sake. When the
opportunity arises because of other changes, then reorganing the structure
should be done. Basically, I think that a complete overhaul is doomed to
failure because of the scope of the code changes needed. Someone that has that
much interest, ability, and time is probably going to just write their own
game from scratch.
> If i understand this right, i just adapted the path to font.hpp. Shouldn't
> break anything or make things
> more complicated. Btw, there is still an open issue about relative vs
> absolute paths for header files.
> Most of them are absolute (originating from src-directory), but there are
> some exceptions, mainly within the
> gui widget files. We should have a decision about it and then clean up the
> paths accordingly.
I agree, but I have no particular preference myself. Before making a decision
on the matter, does anyone have any strong opionions one way or the other?
>
> Ah, enough talking. Now it's your turn to comment on that. I am glad i don't
> have to do all these decisions :P. I am still experiencing "whelp
> protection", you know ;-)
>
> Kind regards
>
> Jorg Hinrichs
>
Yeah, it is often a lot more fun when you don't have to make decisions. I will
always remember fondly my time in wesnoth when I could submit a patch to
savannah and let someone else decide if it was worth actually having in
wesnoth.
-John
(AKA Darth Fool)
--
-------------------------------------------------------------------
"In theory, theory and practice are the same,
but in practice they're different."
-------------------------------------------------------------------
John W. C. McNabb
-------------------------------------------------------------------