<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>Andrei Dmitriev&apos;s Blog</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/thetan/" />
<modified>2006-07-21T09:02:43Z</modified>
<tagline></tagline>
<id>tag:weblogs.java.net,2008:/blog/thetan/327</id>
<generator url="http://www.movabletype.org/" version="3.01D">Movable Type</generator>
<copyright>Copyright (c) 2006, thetan</copyright>
<entry>
<title>77  unrequited votes</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/thetan/archive/2006/07/77_unrequited_v.html" />
<modified>2006-07-21T09:02:43Z</modified>
<issued>2006-07-21T08:22:01Z</issued>
<id>tag:weblogs.java.net,2006:/blog/thetan/327.5221</id>
<created>2006-07-21T08:22:01Z</created>
<summary type="text/plain">An idea how to deal with GridBagLayout.</summary>
<author>
<name>thetan</name>

<email>Andrei.Dmitriev@Sun.com</email>
</author>
<dc:subject>J2SE</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/thetan/">
<![CDATA[<strong>*Introduction*</strong>
<p>
When there were no other tasks I've  gathered a requests statistics on the GridBagLayout class changes. I considered both defects and RFEs.
By the way, we seem have to refuse that division and  treat each defect now  as RFE.
<p>
I was surprised by the fact that there are only 14 CRs inquire one or another change in the   GridBagLayout class behavior. Believe, we have more defects in this class than  are reflected in our defect database. Wow, it seems we should not take the joke about changing the name of that class by replacing first “a” to “u” seriously!
<p>
Some of known defects <br>
(<a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4238932">4238932</a>,  
<a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4126689">4126689</a>
)
have already went through a standard procedure on a 
<br>
<a href="http://forums.java.net/">contribution forum</a>.
<br>
We already accepted the fix for <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4222758">4222758</a> and targeted it into Dolphin. Thanks, LeoUser! :)
<p>
But the result of our collaboration with developers  still can not be considered very successful.
Why? 
<p>
<strong>*A couple of words about the compatibility*</strong>
<p>
The only reason why the patch that is fixing a critical issue can not be integrated into the JDK master workspace is the broken compatibility.
<p>
As usual a patch that is developed by an engineer passes reviews, approvals, and comprehensive testing. This process happens in several stages and accomplishes by different teams.
<p>
All these efforts are intended for the only one goal – (surprise-surprise!) the programs that worked with previous versions of JDK must keep working with each new version. 
And we are really trying to follow that rule :)
<p>
So, when a user submits a patch via the <Contribution forum>, that patch is also passing exactly the same standard procedures. 
<p>
Ideally, we should find 100% possible issues on the testing stage and don't pass them into release. In the end, this is what we expect expanding a testsuite with a new testcase for each bug-fix.
<p>
Thus, I mentioned a key term of this article – a testsuite.
The more regression tests are in our testsuite – the stronger possibility that  we will not miss any  issue just before the integration.
<p>
The test itself is assigned  to verify  in program that documentation is in accordance with the implementation. Sometimes it just verifies a reasonable behavior since the documentation for some aspect is absent.
<p>
<strong>*Documentation*</strong>
<p>
Usually tests are written based on some existing documentation assertions. In particular, from JavaDoc.
<p>
But in some cases the documentation may not be considered good or complete. The GridBagLayout class is the case here. By historical reasons that implementation includes much more nuances than described  in the documentation.
<br>
Some details may just be missed indeed.
<br>
So far, an ordinary developer should rely on the  current JDK behavior and design GUI in accordance with his/her current experience.
<p>
Therefore a migrating to the next (or just to another) JDK version may cause some unpleasant effects.
<p>
A user falls into confusion and asks us to fix it. Or  just fix the problem by himself in his particular JDK. :)
<p>
Thus, we have a poorly documented (lets call this so:) class and, as a sequence, a lack of test coverage.
For example, a recent attempt to integrate a fix for 
<a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4238932">4238932</a>
led us to “unpatching” that fix after it was integrated into the master workspace because the result really impacted other applications.
We didn't find the solution that satisfies both sides.
That defect is still opened and awaiting for a contribution! :)

<p>
<strong>*Solution*</strong>
<p>
We know that many people use this layout manager. As a library developer I can't spend much time on writing industrial applications that use the GridBagLayout class.
<p>
Probably you develop such applications. That is why I came to the following idea.
If we could create a reliable testsuite for the GridBagLayout class this testsuite may compensate a lack of documentation.
Perhaps this testsuite will greatly help to make changes in GridBagLayout in future.  This will also noticeably decrease the risk to broke the fix. We will verify the patch before the users (you) can do the same with released JDK. :)
<p>
I don't know how we will interact while creating that GridBagLayout testsuite. Most likely I'll 
post a new defect on to the peabody forum. (try this one: 
<a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6450943">6450943</a>) Every interested person would now be able to post a test. Also we need some rules how to design them. 
The following rules are already in my mind: 
<br>
<ol>
<li> the test must be as short as possible
<li> one should be written on AWT not on Swing. I'm almost sure that any problem with layouting of Swing components might also be reproduced with AWT ones. Actually, I love Swing but it's too hard to look both into AWT and Swing code :)
But if you feel that the problem is Swing-specific - feel free to post that test.
<li> it must say something like “Test passed” or “Test failed” when finish.
</ol>
<p>
What's your interest in this venture?
<p>
<strong>*Result*</strong>
<p>
A functioning test that is included into the testsuite  guarantees that none of future fixes will  break the test's  behavior which in its turn reflects your application! I just realized that there is actually no 100% guarantee to avoid that situation. To be honest we may change something and intentionally break some regression test, however this happens rarely. Nevertheless, the life is an unfair thing itself and 
I should warn about it.
<p>
From our side we are interested in that all applications keep working  as it was planned .
Moreover, I like that I can review peabody fixes faster. :)
<p>
<strong>*Conclusion*</strong>
<p>
At the very beginning I said that “But the result of our collaboration with developers  can not be considered very successful.”
Should I call the result a collapse?
Definitely no.
I think those attempts if even they were not very successful gave us an invaluable experience and we can apply it right now. 
<p>
Thanks,<br>
  --Andrei]]>

</content>
</entry>
<entry>
<title>To Fix or &quot;Will not fix&quot;</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/thetan/archive/2006/06/to_fix_or_will_1.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-06-02T13:00:09Z</issued>
<id>tag:weblogs.java.net,2006:/blog/thetan/327.4950</id>
<created>2006-06-02T13:00:09Z</created>
<summary type="text/plain">A user once reported a defect then has a very limited ability to 
affect that issue. He couldn&apos;t participate in discussion much.
This article describes how to influence on defect resolving from the user side.</summary>
<author>
<name>thetan</name>

<email>Andrei.Dmitriev@Sun.com</email>
</author>
<dc:subject>J2SE</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/thetan/">
<![CDATA[<strong>Preface</strong>
<p>
Usually developer starts to work on some issues from understanding the problem. A description represents a problem in a general. Unfortunately the actual difficulties of any particular user are hidden behind the common phrases.
</p><p>
A description is intended to be impersonal, which gives to a developer a chance to clearly understand the problem, evaluate it and find the most effective way to resolve.
</p><p>

<strong>Priority</strong>
<p>
The importance of any particular issue is determined according to its 
priority. The Priority in its turn defines how fast the issue will be 
processed.  (such is the case in an ideal world :))
</p>

<p>
But the life is very unfair and a user once filled the form 
(i.e. reported a bug) then has a very limited ability to 
affect that issue. He couldn't participate in discussion etc.
</p><p>
All comments are truncated from a bug report so a user could only add 
them via <a href="http://bugs.sun.com/bugdatabase/">Sun site</a> 
(look at the bottom of any CR).
</p><p>
It makes an illusion of involvement 
but these comments are not assigned by internal bug tracking 
system with a particular bug report.
</p><p>
Yes, it looks rather complicated.
</p><p>
But there is another way to affect developers within Sun.
</p>

<strong>Have you ever heard about <a href="http://bugs.sun.com/bugdatabase/index.jsp">Top25</a> bugs?</strong>
<p>
These lists are generated with respect to users feedbacks. Every 
<a href="http://bugs.sun.com/bugdatabase/login.do">registered</a> user could vote for (or against) one or 
another bug or enhancement. The number of votes  is taken into 
consideration for the defect priority estimating.
</p><p>
<u>The more votes - the higher priority! </u>
This is rather simple and might be already known to most users.
</p><p>
However, there is another way : <a href="http://forums.java.net/">forum</a>.
</p><p>
How could it help to an ordinary user? The point is that 
all messages from that forum are read by Sun engineers.
If even a responsible engineer just skipped a message any  
other engineer can answer or request a right person to help.
</p><p>
Well, I can share with you a true story  from Sun.
</p><p>
Some time ago we've received a request <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6404008">6404008</a>.
</p><p>
An engineer, responsible for that area has already fixed a 
similar defect (that is, here is that defect <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5039416">5039416</a>) 
and was pretty sure that this is not a defect any more.
</p><p>
And such is the real case: If we look on it with curiosity 
then we could notice that these defects (well, patches for them)
contradict to each other or something like that.
</p><p>
Considering the ponderability of the first defect 
(it had a lot of votes) we just decided not to fix it in 
order to avoid users' disappointment and not to change the current behavior. 
And this is an exact scenario if user submitted a second bug stopped here. 
But instead he came to <a href="http://forums.java.net/">forum</a> () and asked a community <a href="http://forums.java.net/jive/thread.jspa?forumID=74&threadID=14329&messageID=98791#98791">opinion</a> on this.
</p><p>
His message (well there were a lot of them) were reviewed by 
our engineers and they initiated the internal discussion.
</p>

<strong>What is the result?</strong>
<p>
Finally the problem was described more in detail, a fragment of 
code that certainly doesn't work with that fix was posted in the 
forum, and a class of applications affected by that fix was 
described as well.
</p><p>
At last we re-opened the bug back. Have I already mentioned 
that the bug was closed as "Will not fix" in the first day of it's life? :)
</p><p>
I should also note a number of votes against that defect. It grew 
up to 12 in two days.
</p><p>
As far as I understood the colleagues of the submitter also 
presented their votes for him.
</p><p>
These consolidated efforts lead us to the fix for the critical bug 
shortly. Lets call a critical bugs those ones which are important to users.
</p><p>

<strong>What is this story about?</strong>
<p>
First of all, we are interested in your opinion on every our 
change. We want to draw your attention and give you a new 
capabilities to improve your products, make them more simple 
and attractive. We hope that our cooperation will be mutually beneficial.
</p><p>

All you need to do is to report a problem to Sun engineers using 
one of these methods. Believe there are also another ways!
</p><p>
If this problem is really important (you probably know how to 
increase its priority now :) ), solutions will appear very soon!
</p><p>
Good luck!]]>

</content>
</entry>

</feed>