[MPlayer-users] [PATCH] make cache2.c readable
Rich Felker
dalias at aerifal.cx
Wed Aug 23 23:51:57 CEST 2006
On Thu, Aug 24, 2006 at 01:03:12AM +0400, Andrew Savchenko wrote:
> > Are -> and > in different color in your editor?
>
> Yep. I've changed it's syntax description, it's easy enough.
>
> > What if my ssh client does not support colors?
>
> Change your ssh client. Moreover you can _mount_ ssh and use any client
> you want.
I think he meant terminal emulator. Even still your argument is
nonsense. What if you only have a monochrome monitor? What if you're
colorblind?? Depending on syntax coloring for source code to be
readable is utter nonsense. I used to use syntax hilight until I
realized this, that syntax hilight is just like a fast cpu: it
encourages you to be lazy and write shitty code. Here shitty means
"poor readability" instead of "poor performance" but it's the same
principle: crutches just make you weak.
> > I looked at the existing code and tried to figure out
> > what style is used there, then apply it over entire file.
> >
> > I did add spaces around <, >, >= etc because I thought that
> >
> > if(space>s->buffer_size-pos) space=s->buffer_size-pos;
> >
> > is *hard to read*. Why should reader waste his time trying to find >
> > there? We should encourage, not preclude peer review.
> > IOCCC is there ------> http://www.ioccc.org/
>
> Well, I don't stay on that original code is an example for all coders,
> but please understand that a lot variety of programmers has a lot
> variety of preferences, so left those code "as is". It would be a mess
> if anyone'll cosmetically change code of another person.
>
> I can suggest you two solutions of this problem:
>
> 1) Format original source as you want, write your own code and apply
> diff -uwbBE to all your changes, then fix diff file by hand.
>
> 2) Format original source as you want, create patch to original code,
> write your own code, then apply reverse diff to your code to discard
> cosmetic changes and apply final diff to original code.
:)
Rich
More information about the MPlayer-users
mailing list