<div>Hey there Dmitry!, I&#39;m very excited here watching your refactoring, let&#39;s see if my opinion can help a little.</div><br><div class="gmail_quote">On Sun, Jul 10, 2011 at 10:59 AM, Dmitry Kazakov <span dir="ltr">&lt;<a href="mailto:dimula73@gmail.com">dimula73@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>Ok, what I don&#39;t like about this naming:<br><br>1) I don&#39;t like KisDabProcessingStrategy name. Some actions like &quot;initialization of the stroke&quot; do not work with &quot;dabs&quot; in Lukas&#39; meaning. Btw, what is exact meaning of the term &quot;dab&quot;? :)<br>
</blockquote><div><br></div><div>The concept of dab only applies to brushes that paint a succession of stamped images to the canvas.</div><div>Most photoshop brushes (those that use images) paint 1 copy of their mask at a time (modified by parameters like color, opacity, etc). They work like a stamp (the wooden object here <a href="http://www.garetto.cl/images/productos/1932/img1.jpg">http://www.garetto.cl/images/productos/1932/img1.jpg</a> ) that successively stamps on the canvas at every instance of PaintAt (producing a result like this <a href="http://cdn.clasipar.com/pictures/photos/001/398/953/vga_sello2.jpg">http://cdn.clasipar.com/pictures/photos/001/398/953/vga_sello2.jpg</a> ). Each one of those seals is a Dab.</div>
<div><br></div><div>Not a very concise definition but I think that is as precise as it goes.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I want to call it like KisStrokeJobStrategy. What do you think, is it easy to distinguish it form KisStrokeJob class?<br></blockquote><div><br></div><div>It is easy to distinguish because they are related. KisStrokeJobStrategy works with instances of KisStrokeJob (if I understood the diagram correctly), describing how to use them.</div>
<div><br></div><div>I think the name KisStrokeJobStrategy is much better.</div><div><br></div><div>Dab is very specific to brushes that work like stamps. New brush engines like the Sketch Brush do not work with &quot;dabs&quot; anymore; they may use PaintAt, but they are not stamping seals over the canvas 1 at a time. So I think we should look for a better name to refer to single operations of painting, something more general.</div>
<div><br></div><div>Some brainstorming follows:</div><div>stroke unit</div><div>stroke node</div><div>painting iteration</div><div>paint instace/instant</div><div>stroke instant</div><div>slice</div><div>stroke differential (as opposed to stroke integral which would be the entire stroke)</div>
<div>paint differential</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>2) I don&#39;t like the fact that the definition of the subtype of the class is put into the beginning of the name.<br>

<br>KisPainterBasedStrokeStrategy -- probably, not good<br>KisStrokeStrategyPainterBased -- better?<br><br>FreehandStrokeStrategy -- not good<br>KisStrokeStrategyFreehand -- better?<br><br>What do you think? What is the common practice here?<br>
</blockquote><div><br></div><div>I (think I) have seen both practices.</div><div>I&#39;ve seen the Subtype-goes-at-the-end naming strategy in classes like KoDocumentSection (there&#39;s -View, -Delegate and -Model) and for me it was very easy to follow.</div>
<div><br></div><div>The reason it is easy to follow is because I can simply grep for classes with the same root and will find all subtypes. That won&#39;t work with the reverse style of naming which is also less logical if you ask me (obviously I can perform a better regular expression search but... it will be more contrived).</div>
<div><br></div><div>I think using:</div><div><br></div><div>Global Prefix - Type - Subtype - Subsubtype</div><div><br></div><div>Is the most logical convention, and useful when looking for related classes.</div><div><br></div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>3) I don&#39;t know where I should add Kis- prefix and where not. These classes are too small, too specific and too private to use such global prefix. What is the general rule there?<br></blockquote><div><br></div><div>
I don&#39;t know if there&#39;s a general rule. We&#39;re following the KDELibs coding style so I assume we&#39;re also trying to follow the naming conventions:  <a href="http://techbase.kde.org/Policies/Library_Code_Policy">http://techbase.kde.org/Policies/Library_Code_Policy</a></div>
<div>But I couldn&#39;t find anything related to this particular situation.</div><div><br></div><div>In my opinion, classes that are not going to be in contact with &quot;the outside world&quot; during their lifetime should have no Kis- prefix.</div>
<div><br></div><div>So if those classes are too small, too specific and too private, I&#39;d skip the Kis prefix.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
4) Well, and, finally, the word &#39;strategy&#39; is too long for names =( But I can&#39;t simply remove it because there are classes like KisStroke and KisStrokeJob.<br></blockquote><div><br></div><div>Don&#39;t worry about class names being too long. Screens are getting larger and larger, and people who insist on editing their code on a small screen within a console with 80 characters per column are a minority; the majority will (I believe) gladly trade off some screen space in exchange for having a better clue of what the code does.</div>
<div><br></div><div>I was grateful of having a class named KoDocumentSectionDelegate, I didn&#39;t care that it was long and took 25 characters all by itself, its function was clear and it saved me time; that&#39;s what matters in the end.</div>
<div><br></div><div>Keep the word Strategy.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>Thanks for your advices in advance! =)<br><br clear="all"></blockquote><div><br></div><div>May it be useful to you!.</div><div><br></div><div>Best regards,</div><div>~Pentalis. </div></div><br>