On Wed, Mar 18, 2015 at 5:05 PM, Niels Charlier <[email protected]> wrote:
> On 18-03-15 16:57, Andrea Aime wrote:
>
> On Wed, Mar 18, 2015 at 4:51 PM, Niels Charlier <[email protected]> wrote:
>
>> In my change you can clearly see in the if block when the filter is
>> needed and why, and it is not created otherwise. That is much more logical
>> and readable.
>>
>>
> We can agree to disagree here... the core is more correct, I don't find
> it more readable, of course
> we have different ways to approach code and so on, but believe your
> statement is just a matter
> of personal taste (as such, I advise to better qualify how things are not
> readable for other people
> to understand your point of view).
>
> Don't think it is personal taste. First, you are creating something
> that is not needed and thereby waste memory and time. Even though something
> as small as that doesn't matter any more in modern computer systems, it is
> bad code practice. Second, the third party reader must put two things
> together that are in a different place in the code and aggregate them
> logically to understand the real condition: "if (rootAccess) { ...} else
> {...}" and later "if (wsAccess != rootAccess) {" . Third, this separation
> of the condition in the code is what introduced the bug which proves the
> point, and it would more likely create bugs in later edits because the
> logic is spread around.
>
Thank Niels, I don't think we have anyone reviewing pull requests from this
angle... I invite you to join
the team that checks the incoming pull requests and thus help increase the
GeoServer code quality
Cheers
Andrea
--
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
-------------------------------------------------------
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel