[RCD] Codebase cleanup, PSR-1/2 compliance - and before you say no, I'm offering to do the work

Reindl Harald h.reindl at thelounge.net
Mon Sep 2 22:53:55 CEST 2013

if you think people care about a maintainable code base
are trolls what do you do on a devel list?

for the ordinary users this may not matter *until* things
start to break because nobody konws what the code is
suppsoed to doing

Am 02.09.2013 22:03, schrieb stephane martin:
> "Roundcube, code proudly cleant by argumenting trolls"
> On Mon, Sep 2, 2013 at 9:43 PM, Thomas Bruederli <thomas at roundcube.net <mailto:thomas at roundcube.net>> wrote:
>     On Mon, Sep 2, 2013 at 9:20 PM, David Deutsch <skoremail at gmail.com <mailto:skoremail at gmail.com>> wrote:
>     >> A proper and predictable process flow is something I learned to appreciate
>     >> during my years as a software developer.
>     >
>     > Sure, although I don't understand how my approach makes it any less
>     > predictable. All I have done is fan out the if/elseif structures and,
>     > arguably, that makes it easier to check through them. Maybe changing it to
>     > no-oneliner-ifs will make this a little clearer for you, but the return
>     > statements really stand out when you scroll through the code - whether or
>     > not they are wrapped in if blocks or individually.
>     >
>     >
>     >> What's wrong about if clauses with proper indenting? These can even be
>     >> collapsed with a sexy IDE.
>     >
>     > Nothing wrong with them. It's just: Do you wrap the entire content of a
>     > function in an if or do you make a negated if -> return statement? The first
>     > doesn't scale, the second makes things more readable - that was really all I
>     > was trying to convey.
>     For that specific "entire content of a function" case I mentioned the
>     exceptions that allow returns at the beginning of a function that
>     check preconditions.
>     But I'm more referring to your initial refactoring in
>     https://github.com/daviddeutsch/roundcubemail/blob/cleanup-3/plugins/archive/archive.php#L17
>     In such cases I think a sequence of if/else if/else blocks makes more
>     clear for the reader that these are three distinct cases handled in
>     the plugin init function.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20130902/aab32d66/attachment.sig>

More information about the dev mailing list