Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2004:
[Freeciv-Dev] Re: (PR#8754) effects patch
Home

[Freeciv-Dev] Re: (PR#8754) effects patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8754) effects patch
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Mon, 19 Jul 2004 10:02:27 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8754 >

On Mon, 19 Jul 2004, Jason Short wrote:

> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8754 >
>
> It is supposed to be true for the rest of the code.  See the "comments"

Supposed != True.

> section in doc/CodingStyle.  The fact that you people (tm) keep putting
> in new functions without headers doesn't change this.

Real Programmers (tm) don't write comments. That is for Quiche Eaters.
Real Programmers (tm) don't eat Quiche.

;-)

> Although, as long as the patch is in a state of flux it may be a waste
> of time to write headers for functions that may be changed.  But they
> need to be written before committing.

So you want me to write a comment which basically is a verbose description
of the function header? Ok, I can do that. Perhaps I can even write an
automatic script that does it.

> We need to decide whether to use "building" or "improvement".  The
> current standard is "improvement" so it should be
> get_improvements_with_effect() or get_imprs_with_effect().

"improvement" isn't as much a standard as simply more used. Otherwise you
wouldn't have functions like "city_got_building".

I like "building" better, but I'm not one to mince with words. Pick one
standard, replacing is easy as this stage.
Heck, I have already renamed everything about half a dozen times, one
more time won't even make a difference. :-)

> >>I don't like the term "power" in source_power(), etc. Use "value" instead.
> >
> > Ok.
>
> source_value() is not descriptive enough IMO (not that source_power() is
> either).  I'd suggest something better but I have no idea what this
> function does.

It sums up all the contributions of a given effect type for a building and
spits out the result. I only named it source_power() because you already
had get_cathedral_power and get_temple_power() in common/city.c.

If this is sounding vaguely familiar, it is because I already said it.
That function actually *is* commented, I told you comments didn't add
anything of value 90% of the time :-).
The bloody function body has like 9 measly lines of code.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa





[Prev in Thread] Current Thread [Next in Thread]