[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Review Request: Layout, first paragraph bottom position fix
From:       "Carlos Licea" <carlos_licea () hotmail ! com>
Date:       2010-09-23 21:35:04
Message-ID: 20100923213504.19708.19213 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On 2010-09-10 15:41:36, Thomas Zander wrote:
> > Please provide a unit test to show the problem.
> 
> Thomas Zander wrote:
> Thanks for explaining how to load a document and see it fail; this is \
> black box testing and useless for regression testing or showing the \
> actual bug in the code. Please provide a unit test to show the problem. 
> Pavol Korinek wrote:
> To simulate this problem I had to combine tests for application \
> (KWTextDocumentLayout) and pluggin (Layout.cpp) which means don't write \
> test for some unit or function, but test for whole layout. It's not \
> possible to mix them also, because they are invisible one to each other. \
> Also to create Mock object of KWTextDocumentLayout or Layout.cpp for this \
> test is not possible, because part of functionality which I need is \
> connected to so many other fuctionallity, that it's not possible to cut \
> some. At least if I was successfull with this test, and had sucessfull \
> simulation, than run of such test, was like run application with test \
> data and check output. I suggest more people to check \
> KWTextDocumentLayout logic and check if firstParagraph boolean value, \
> should be set to true, when new shape comes into play. 
> Thomas Zander wrote:
> The Layout plugin and the KWTextDocumentLayout are indeed two separate \
> units, and should be tested separately.  This is possibly by defining the \
> interactions between the two and figuring out what you expect to happen \
> which doesn't happen right now. After defining the interaction and \
> deciding which of the two sides is buggy (either the provider of the API \
> or the user of the API) you write a unit test based on that conclusion; \
> you either write a test that tests the provider of the API or you write a \
> test testing the consumer of the API. 
> In your explanation it seems you don't have a clear picture yet of the \
> contract of the APIs since you say you need both at the same time. That \
> may be a good place to start. 
> Also, I think there are various partners listed on the Qt website that \
> provide training for writing unit tests, if you and your company lacks \
> that knowledge please consider contacting them. I'm have to be honest in \
> that I don't really have the time to explain those concepts in my spare \
> time, for free, to a for-pay subcontractor. 
> Carlos Licea wrote:
> Thomas, please, please, behave as good as you can. If you lack the temper \
> please consider contacting a counselor; I, as a paid consultant, can't go \
> consulting emotions, while I'm at my work, for free. 
> Your reviews, not matter how good or right they are, lose much strength \
> when you act in this way. We all can be rude, let's try not to. 
> Thomas Zander wrote:
> Hey Carlos,
> 
> the story is easier than assuming I'm unstable and not making sense; \
> there is a perfectly logical reason for the sentence I wrote. The facts \
> are that Matus doesn't have the experience in writing unit tests that \
> show the bug is actually where he thinks it is and I'm getting emails \
> from his customer that I should teach him this to be able to work on \
> KOffice. 
> I'm just being very clear I have no intention of teaching Matus how to \
> write unit tests for the simple reason he is a consultant that is hired \
> for his expertise and I'm a volunteer programmer working on KWord for \
> fun. 
> Compare this to someone trying to fix your car and you having to teach \
> him how to do his job. I bet you would not put in your time to do that \
> either. 
> As a smart man wrote; "focus is deciding what not to do". And I want to \
> focus on the fun things and get KWord better prepared for the next 10 \
> years of its lifetime :)

I do understand your reasoning and I do agree that a test is, probably, the \
best thing to do, so that the expected behavior gets documented. My point \
is not that you're "unstable," but that we don't need to be rude in order \
to archive great software.


- Carlos


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5305/#review7526
-----------------------------------------------------------


On 2010-09-13 07:19:03, Pavol Korinek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5305/
> -----------------------------------------------------------
> 
> (Updated 2010-09-13 07:19:03)
> 
> 
> Review request for KOffice.
> 
> 
> Summary
> -------
> 
> We use shape (m_state->shape) height to set 'end bottom position' when \
> first paragraph occurs. When m_state->shape is new one, then we should \
> set new 'end bottom position'. It can be done by set firstParagraph to \
> true on new shape. This was investigated to solve: \
> https://bugs.kde.org/show_bug.cgi?id=239703 
> 
> Diffs
> -----
> 
> /trunk/koffice/kword/part/frames/KWTextDocumentLayout.cpp 1172979 
> 
> Diff: http://svn.reviewboard.kde.org/r/5305/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Pavol
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px \
#c9c399 solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://svn.reviewboard.kde.org/r/5305/">http://svn.reviewboard.kde.org/r/5305/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  <p style="margin-top: 0;">On September 10th, 2010, \
3:41 p.m., <b>Thomas Zander</b> wrote:</p>  <blockquote style="margin-left: \
1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">  <pre \
style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Please provide \
a unit test to show the problem.</pre>  </blockquote>




 <p>On September 13th, 2010, 8:44 a.m., <b>Thomas Zander</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Thanks for explaining how to load a document and see it fail; \
this is black box testing and useless for regression testing or showing the \
actual bug in the code. Please provide a unit test to show the \
problem.</pre>  </blockquote>





 <p>On September 17th, 2010, 1:42 p.m., <b>Pavol Korinek</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">To simulate this problem I had to combine tests for \
application (KWTextDocumentLayout) and pluggin (Layout.cpp) which means \
don&#39;t write test for some unit or function, but test for whole layout. \
It&#39;s not possible to mix them also, because they are invisible one to \
each other. Also to create Mock object of KWTextDocumentLayout or \
Layout.cpp for this test is not possible, because part of functionality \
which I need is connected to so many other fuctionallity, that it&#39;s not \
possible to cut some. At least if I was successfull with this test, and had \
sucessfull simulation, than run of such test, was like run application with \
test data and check output. I suggest more people to check \
KWTextDocumentLayout logic and check if firstParagraph boolean value, \
should be set to true, when new shape comes into play.</pre>  </blockquote>





 <p>On September 21st, 2010, 3:38 p.m., <b>Thomas Zander</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">The Layout plugin and the KWTextDocumentLayout are indeed two \
separate units, and should be tested separately.  This is possibly by \
defining the interactions between the two and figuring out what you expect \
to happen which doesn&#39;t happen right now. After defining the \
interaction and deciding which of the two sides is buggy (either the \
provider of the API or the user of the API) you write a unit test based on \
that conclusion; you either write a test that tests the provider of the API \
or you write a test testing the consumer of the API.

In your explanation it seems you don&#39;t have a clear picture yet of the \
contract of the APIs since you say you need both at the same time. That may \
be a good place to start.

Also, I think there are various partners listed on the Qt website that \
provide training for writing unit tests, if you and your company lacks that \
knowledge please consider contacting them. I&#39;m have to be honest in \
that I don&#39;t really have the time to explain those concepts in my spare \
time, for free, to a for-pay subcontractor.</pre>  </blockquote>





 <p>On September 23rd, 2010, 5:42 a.m., <b>Carlos Licea</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Thomas, please, please, behave as good as you can. If you lack \
the temper please consider contacting a counselor; I, as a paid consultant, \
can&#39;t go consulting emotions, while I&#39;m at my work, for free.

Your reviews, not matter how good or right they are, lose much strength \
when you act in this way. We all can be rude, let&#39;s try not to.</pre>  \
</blockquote>





 <p>On September 23rd, 2010, 8:44 a.m., <b>Thomas Zander</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Hey Carlos,

the story is easier than assuming I&#39;m unstable and not making sense; \
there is a perfectly logical reason for the sentence I wrote. The facts are \
that Matus doesn&#39;t have the experience in writing unit tests that show \
the bug is actually where he thinks it is and I&#39;m getting emails from \
his customer that I should teach him this to be able to work on KOffice.

I&#39;m just being very clear I have no intention of teaching Matus how to \
write unit tests for the simple reason he is a consultant that is hired for \
his expertise and I&#39;m a volunteer programmer working on KWord for fun.

Compare this to someone trying to fix your car and you having to teach him \
how to do his job. I bet you would not put in your time to do that either.

As a smart man wrote; &quot;focus is deciding what not to do&quot;. And I \
want to focus on the fun things and get KWord better prepared for the next \
10 years of its lifetime :)</pre>  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I do \
understand your reasoning and I do agree that a test is, probably, the best \
thing to do, so that the expected behavior gets documented. My point is not \
that you&#39;re &quot;unstable,&quot; but that we don&#39;t need to be rude \
in order to archive great software.</pre> <br />








<p>- Carlos</p>


<br />
<p>On September 13th, 2010, 7:19 a.m., Pavol Korinek wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://svn.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px \
black solid;">  <tr>
  <td>

<div>Review request for KOffice.</div>
<div>By Pavol Korinek.</div>


<p style="color: grey;"><i>Updated 2010-09-13 07:19:03</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description \
</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">We use shape (m_state-&gt;shape) height to set &#39;end bottom \
position&#39; when first paragraph occurs. When m_state-&gt;shape is new \
one, then we should set new &#39;end bottom position&#39;. It can be done \
by set firstParagraph to true on new shape. This was investigated to solve: \
https://bugs.kde.org/show_bug.cgi?id=239703</pre>  </td>
 </tr>
</table>





<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
</h1> <ul style="margin-left: 3em; padding-left: 0;">

 <li>/trunk/koffice/kword/part/frames/KWTextDocumentLayout.cpp <span \
style="color: grey">(1172979)</span></li>

</ul>

<p><a href="http://svn.reviewboard.kde.org/r/5305/diff/" \
style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic