At the time
of the latest release of Prototype a number of benign people, mostly
programmers complained about the alienating attitude the core team has to the
larger community and suggested some totally common –sense changes in their communication
like reflecting on requests in the wish – list etc. Now I want to talk about
the same from a different aspect:
correcting obvious mistakes and a lack of discussion of the code base.
I have just finished studying the whole library and on the way came across some issues that I wanted to discuss, or I found difficult to understand, at first, or sometimes I also spotted some obvious mistakes that should be eliminated.
My overall
experience was quite discouraging as I found the mailing list is very rarely a good forum for any real discussion, because
a.) most posts are from people with inadequate understanding of object oriented
coding ( and often the basics of the language!), b.) there is very little discussion of the
code base itself and people are asking for some quick solution or a recipe, c.)
there are no overnight / weekly etc releases to correct obvious mistakes that
other php and other libraries do have and the core team does not have ANY
communication with the members..
I made more remarks, but here are only the ones about mistakes:
The example
in the manual is clearly wrong for eachSlice. This was the first thing I
noticed right at the start still back in Prototype 1.6, but it just stayed the
same ..
Now there
is a much more serious mistake in positionedOffset:
function positionedOffset(element) {
element = $(element);
var layout = element.getLayout();
var valueT = 0, valueL = 0;
do {
valueT += element.offsetTop || 0;
valueL += element.offsetLeft || 0;
element = element.offsetParent;
if (element) {
if (isBody(element)) break;
var p = Element.getStyle(element, 'position');
if (p !== 'static') break;
}
} while (element);
valueL -= layout.get('margin-top');
valueT -= layout.get('margin-left');
return new Element.Offset(valueL, valueT);
}
I bet, they
wanted to deduce the margin-top value from the cumulative topOffset and vice-versa, didn’t they?
Nevertheless, I
am afraid it will again stay as it is even if this can cause a wrong return
value in cases when margin-top isn’t equal with margin-left!! But, who cares?
Any professional tool like prototype is not perfect and naturally there could be mistakes in anything that is more than 7000 lines long. To be clear, it is not any merit nor a form of criticism if someone finds a mistake, rather it should be regarded as valuable contribution to further improve the library. Don’t you think so?
2012. szeptember 24., hétfő 17:34:05 UTC+2 időpontban Victor a következőt írta:
About eachSlice. If you think you can fix documentation - please make pull request on github. Do you have more errors/mistakes?
Hi, Viktor!
It's very sad that the Prototype project is managed so badly, the whole
community is just let to go loose and what is even much worse, as the example
shows, even critical mistakes in the code base are left untouched for ages..
How should or could I have known about this mistake, for example? I believe
these have also contributed that Prototype has lost so much ground to competing
libraries!
Well, enough of all these. Instead, some words about the documentation. This is
far the weakest part of the whole project, the comments are laconic and it is
only geared towards the needs of the careless and the ignorant in mostly trying
to give some quick recipe and in never highlighting the underlying logic. For those who study the code base in-depth the documentation is very little help to find out about the inner working or the relationships
between the parts. This is a shame in itself as there are so many brilliant
solutions and terse coding techniques to learn and to enjoy!
If you are familiar with CodeIgnite, for example, you know the code
is fully annotated, although the authors of that library are also top core
programmers, but with the difference of understanding various needs and
promoting their project properly ..
Well, I think we could start a community effort to bring Prototype inline with other
well documented libraries. What do you think?
It's very sad that the Prototype project is managed so badly, the whole community is just let to go loose and what is even much worse, as the example shows, even critical mistakes in the code base are left untouched for ages.. How should or could I have known about this mistake, for example? I believe these have also contributed that Prototype has lost so much ground to competing libraries!
Well, I think we could start a community effort to bring Prototype inline with other well documented libraries. What do you think?