> Up to a point - but the danger is that you end up with a design which is 
> optimally coded that no-one can understand, and is hence difficult to debug 
> and (assuming you can get it working) maintain.

I beg to differ:

newpixel = ( pixel1 + pixel2 ) >> 1;

This is hard to understand? 
Maybe because I come from a electronics background but the above code is very 
easy to understand! Very easy to debug! and has worked flawlessly for over 30 
years.


> And far too many programmers attempt to optimize their code and end up with a 
> mess, instead of concentrating on a good, clear design. If there are still 
> performance problems, then by all means look for areas to optimize (probably 
> after running some sort of profiler).

Here again this is good clean design, fast and efficient. This is not  "an 
attempt to optimize code" it is a good habit that has valid roots going back 
many years. 


> 
> I guess we'll just have to agree to disagree :-)
>


Reply via email to