<div dir="ltr">Agreed, make it easier.<div style>To prevent "obfuscation of the code", what about adding a separate commit that would fix the alignment.</div><div style>Jc</div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Fri, Feb 1, 2013 at 4:26 PM, Cory Quammen <span dir="ltr"><<a href="mailto:cquammen@cs.unc.edu" target="_blank">cquammen@cs.unc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I second Matt's opinion. Alignment of the typedefs makes it much<br>
easier to find a particular typedef visually.<br>
<br>
Cory<br>
<div class="HOEnZb"><div class="h5"><br>
On Fri, Feb 1, 2013 at 4:06 PM, Matt McCormick<br>
<<a href="mailto:matt.mccormick@kitware.com">matt.mccormick@kitware.com</a>> wrote:<br>
> Hi Hans,<br>
><br>
> I am of the opinion that the alignment makes the code easier to read.<br>
> The emphasis may or may not be correct, but my eyes can pass over an<br>
> aligned section much quicker and understand than one that is not.<br>
><br>
> Thanks,<br>
> Matt<br>
><br>
> On Fri, Feb 1, 2013 at 5:36 PM, Johnson, Hans J <<a href="mailto:hans-johnson@uiowa.edu">hans-johnson@uiowa.edu</a>> wrote:<br>
>> Hello ITK community,<br>
>><br>
>> I'd like to take a poll about your feelings regarding an ITK style decision<br>
>> that has been in place for a very long time.<br>
>><br>
>> The ITK style guide states that all typedefs that are on adjacent lines MUST<br>
>> be justified the same. While I think that this is often a good practice,<br>
>> this rule also obfuscates the code sometimes, and it makes unnecessary<br>
>> changes in code that is unrelated to the line of code in question (for<br>
>> example, if an internal type name is renamed to better represent the code,<br>
>> the 10 typedefs around that one also need to change).<br>
>><br>
>> As a side note, the "Clean Code" book advices against such alignement as it<br>
>> emphasizes a relationship between the elements in a column. It should<br>
>> instead emphasize the relationship between the elements in a row (when you<br>
>> look at those lines, it's usually to know what is the type of the variable<br>
>> -> horizontal relationship).<br>
>> This also has 2 practical limitations:<br>
>> - when the variable type or name are long too long that it reach the number<br>
>> of characters per line.<br>
>> - adding a new type with a name longer than the existing forces all the<br>
>> other rows to be changed, which adds noise into the history.<br>
>><br>
>> NOTE: Making this change in style policy will NOT require any code to be<br>
>> changed. It does allow more flexibility in the future.<br>
>><br>
>> ============================<br>
>> Please respond to this message so that a historical record of this proposals<br>
>> pro's/con's can be recorded on the mailing list.<br>
>><br>
>> Thanks,<br>
>> Hans<br>
>><br>
>><br>
>><br>
>> =================================================================<br>
>> Hans J. Johnson, Ph.D.<br>
>> Assistant Professor, Department of Psychiatry<br>
>><br>
>> Mailing Address:<br>
>> W274 GH Email: <a href="mailto:hans-johnson@uiowa.edu">hans-johnson@uiowa.edu</a><br>
>> 200 Hawkins Drive Phone: <a href="tel:%28319%29%20353%208587" value="+13193538587">(319) 353 8587</a><br>
>> The University of Iowa<br>
>> Iowa City, IA 52242<br>
>><br>
>><br>
>> ________________________________<br>
>> Notice: This UI Health Care e-mail (including attachments) is covered by the<br>
>> Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential<br>
>> and may be legally privileged. If you are not the intended recipient, you<br>
>> are hereby notified that any retention, dissemination, distribution, or<br>
>> copying of this communication is strictly prohibited. Please reply to the<br>
>> sender that you have received the message in error, then delete it. Thank<br>
>> you.<br>
>> ________________________________<br>
>><br>
>> _______________________________________________<br>
>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Kitware offers ITK Training Courses, for more information visit:<br>
>> <a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br>
>><br>
>> Please keep messages on-topic and check the ITK FAQ at:<br>
>> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
>><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Cory Quammen<br>
Research Associate<br>
Department of Computer Science<br>
The University of North Carolina at Chapel Hill<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>+1 919 869 8849<br>
</div>