help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: removing white space highlight


From: Emanuel Berg
Subject: Re: removing white space highlight
Date: Fri, 26 Feb 2016 20:48:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Bob Proulx <bob@proulx.com> writes:

> If you have placed an automated routine in your
> particular editor (remember that other people on
> your team will use different editors with differing
> capabilities) that touches every line in the file
> then you will start making changesets that contain
> a lot of noise. You will check in a result that
> cannot be reasonably reviewed by a peer review
> group. If the group is at all reasonable they will
> reject your change-set and send you back to work on
> it further.

The Elisp code I've posted and the Emacs batch command
is to show how easy this can be automatized.

For this to work at the level of peer review, it can't
be implemented exactly like that. It has do be done
centrally or at the level of the peer review software
which everyone working on the project is assumed
to use.

That clarified, I still don't think it is a difficult
thing to do.

Because bottom line, no one ever needs that trailing
whitespace. It can always be safely just dropped with
nothing to it!

> And even for those folks who are just working solo.
> Your work is your reputation. If your work is good
> then so is your reputation. If your work is crufty
> then the same with your reputation. Because of
> version control your work is not just the finished
> file but the history of the file too.

Really? Are people reviewing the history of files so
they can bash people's reputation even tho the end
result is good? If so, I'm happy I don't do that on
either side of it...

While I do not consider cleaning files to be the
spoilation of anyone's reputation, I do not suggest
anyone does this "client-side". While it'll work some
people will add more later (their reputation will drop
I suppose) and then the circus is afoot. No - it
should be done "server-side" once (with a command) and
then automatically never allowed inside again. Or the
automatization can be put to work and then file by
file will be cleaned in time.

> This is why I think cleanup should be done
> explicitly as an explicit action and not as a side
> effect of other random changes.

I guess it depends how big the files are, how active
people are reviewing them, and how specific
information you get from the software what changes has
been made. Probably it isn't difficult to see where
there has been qualitative changes and where there has
just been a bunch of trailing whitespace removed.

Even so, I agree "explicit action" to the entire
project is preferable, and my command can do this to
the entire project in one keystroke.

After that, automatization (also very simple) is
implemented to drop trailing whitespace forever on and
to not regard that as something anyone ever has to
"review". Because again, no one benefits from it so no
one should want it.

>> However not wanting to have trailing whitespace and
>> having it automatized in four lines of Elisp and
>> then have the desired behavior forever seems like
>> rather good craftmanship to me...
>
> Your good craftmanship feels to me like a buldozer
> rolling through regardless of the other traffic.
> You will get to where you want to go but no one will
> want to be near you while you are doing it.

Rather like a surgeon removing dead tissue with
a waldo robot arm holding a laser scalpel...

Recall that `remove-trailing-whitespace' doesn't do
anything if there is nothing to be done!

> Aside: What? You haven't painted your house in the
> last year? People will think your house is abandoned
> if you haven't changed the paint color at least
> every year. That is the way some software projects
> feel to me.

Definitely.

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

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