[Freeciv-Dev] Re: Profiling Civserver again
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
At 09:54 AM 01/08/02 +0200, Raimar Falke wrote:
>On Wed, Aug 01, 2001 at 09:59:52PM -0500, Mike Kaufman wrote:
>> On Wed, Aug 01, 2001 at 09:27:04PM -0400, Ross W. Wetmore wrote:
>> > Defensive programming like defensive driving is worthwhile if it doesn't
>> > cost that much more to implement or follow the right habits.
>>
>> yes, but this whole discussion started as a result of "hey this
>> function got called umpteen million times!" It might be interesting
>> to see what the differences are between modulus and while loops and
>> such in the macro, but if a little care can avoid the problem, I say
>> we might as well try.
>>
>> Besides, (not following the list as carefully as he should) has
>> anybody checked to see how often (and where) the code goes outside
>> of [-map.xsize,2*map.xsize]?
>> If it doesn't, why build in a lot of defensive cruft into the code?
>
>I agree. We should make it fatal and see what breaks. AFAIK the only
>time where an interim value is outside is, that you go from a valid
>position one step in a direction.
I'd like to amend this slightly :-).
We should make this fatal during development or in development builds, and
turn off the behaviour or revert to defensive code when the release is in
final beta or goes out.
Make the developers suffer if they are programming poorly, and expose their
problems during development to get them fixed. Don't take it out on the
customers after the fact :-).
BTW: if you get network corruption or something equivalent that is not
supposed to happen once it is out the door, then the code should still try
not to fall over in a puddle of bits. Building all sorts of limiting
heuristics about the way things are supposed to work in a perfect
environment (and never do) is equally bad programming.
> Raimar
>
>--
> email: rf13@xxxxxxxxxxxxxxxxx
> "We just typed make..."
> -- Stephen Lambrigh, Director of Server Product Marketing at Informix,
> about porting their Database to Linux
- [Freeciv-Dev] Re: Profiling Civserver again, (continued)
- [Freeciv-Dev] Re: Profiling Civserver again, Lino Mastrodomenico, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Ross W. Wetmore, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Vasco Alexandre Da Silva Costa, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Gaute B Strokkenes, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Paul Zastoupil, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Trent Piepho, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Mike Kaufman, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Ross W. Wetmore, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Mike Kaufman, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Raimar Falke, 2001/08/02
- [Freeciv-Dev] Re: Profiling Civserver again,
Ross W. Wetmore <=
- [Freeciv-Dev] Re: Profiling Civserver again, Raimar Falke, 2001/08/06
- [Freeciv-Dev] Re: Profiling Civserver again, Thue, 2001/08/02
- [Freeciv-Dev] map_adjust_x (was: Profiling Civserver again), Mike Kaufman, 2001/08/02
- [Freeciv-Dev] Re: map_adjust_x (was: Profiling Civserver again), Jason Dorje Short, 2001/08/02
- [Freeciv-Dev] Re: map_adjust_x (was: Profiling Civserver again), Thue, 2001/08/02
- [Freeciv-Dev] Re: map_adjust_x (was: Profiling Civserver again), Ross W. Wetmore, 2001/08/02
- [Freeciv-Dev] Re: map_adjust_x (was: Profiling Civserver again), Paul Zastoupil, 2001/08/02
- [Freeciv-Dev] Re: map_adjust_x (was: Profiling Civserver again), Gaute B Strokkenes, 2001/08/02
- [Freeciv-Dev] Re: Profiling Civserver again, Reinier Post, 2001/08/02
- [Freeciv-Dev] map_adjust_x (was: Profiling Civserver again), Mike Kaufman, 2001/08/02
|
|