Signed word lengths and indexes
BCS
none at anon.com
Tue Jun 15 16:50:40 PDT 2010
Hello Steven,
> On Tue, 15 Jun 2010 16:07:26 -0400, BCS <none at anon.com> wrote:
>
>> Hello Steven,
>>
>>> Why is it offensive if I expect a code reviewer to take overflow
>>> into consideration when reviewing code
>>>
>> That's /not/ offensive. For one thing, only very few people will ever
>> need to be involved in that. The reason I wouldn't let it pass code
>> review has zero to do with me not understanding it (I do understand
>> for one thing) but has 100% with anyone who ever needs to touch the
>> code needing to understand it. That is an open set (and that is why
>> I find it marginally offensive). The cost of putting something in
>> your code that is harder (note I'm not saying "hard") to understand
>> goes up the more successful the code is and is effectively
>> unbounded.
>>
> So I have to worry about substandard coders trying to understand my
> code? If anything, they ask a question, and it is explained to them.
If *any* user *ever* has to ask a question about how code, that does something
as simple as loop over any array backwards, works the author has failed.
If even a handful of users take long enough to understand it that they even
notice thay'er are thinking about it, the author didn't do a good job.
I guess I can restate my opinion as: I'm (slightly) offended that you are
asking me to think about something that trivial. Would you rather I spend
any time think about that or would you rather I spend it thinking about the
rest of your code?
> In other words, the code looks strange, but is not hiding anything.
> Code that looks correct but contains a subtle sign bug is worse.
>
Looks correct & is correct > looks wrong & is wrong > looks wrong and isn't
> looks right and isn't
You might talk me into switching the middle two, but they are darn close.
>>> It's not some sort of snobbery, I
>>> just expect reviewers to be competent.
>> I expect that to. I also expect people reading my code (for review or
>> what-not) to have better things to do with their time than figure out
>> clever code.
>>
> I guess I'd say that's a prejudice against learning new code tricks
> because not everybody knows them. It sounds foolish to me.
I have no problem with code trick. I have problems with complex code where
simple less interesting code does just as well.
I guess we aren't likely to agree on this so I'll just say; many you maintain
interesting code.
--
... <IXOYE><
More information about the Digitalmars-d
mailing list