some advice on getting a design doc out for jython?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

some advice on getting a design doc out for jython?

Walter Chang-2
Hi All,

Rather than continue to rant about getting a plan together I decided
to take up the task of trying to figure out "How jython works from a
5000 ft view"

Right now I have a bit more understanding of the org.python.parser
java files which is generated from using javaCC and the python
language ASDL file available from python.org.

This allows us jython to understand (parse) the python language
constructs.  However in order to "act upon" the parsed results we
still need to have a python runtime to delegate the instructions to.
This is where the org.python.core comes in.

I spent some time looking at the 2.2a1 source that I had checked out
of sf csv and it is indeed quite a bit of complex code.  Ran it
through Posiden to see if a graphical UML representation could save me
a bit of time in understanding how everthing worked.  This didn't work
as there are about 139 java files in 2.2a and it made everything even
more confusing.

The bottom line is, I think unless someone else has a better
suggestion, a line by line exploration of all the source files would
be necessary (starting from the PyObject.java).

Before I embark on this endevor I'd like some advice:

Should I start to from the 2.1 sources (more stable, less possiblity
for change...)

or

Should I look at going through the current 2.2a sources (people are
working on it right now, confusing things like CollectionIter.java and
CollectionIter2.java...)

The goal of this is to eventually produce a design doc that can be
shared with the community.

Once we have a clear idea of the "orginal" design decisions, proper
peer review can take place and things like the JEP (jython equivelent
to PEP...please see wiki) can come into play.

I anticipate without any guidance (brute force/reverse engineering)
this would take about 3 months to do for one person.  (core and
perhaps util)


Any advice before I start would be much appreciated!

Kind Regards,
Walter


--
Simplicity--the art of maximizing the amount
of work not done--is essential.
from: http://www.agilemanifesto.org/principles.html


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: some advice on getting a design doc out for jython?

Yan Weng
Another way to do this: Write test cases against existing code.

You can't write tests without understanding the purpose of the code. But you don't have to understand all the details to write the tests. When you finish your test cases, run them, see how data flows, then you get the idea. When we fully understand the code, we create a suite of test cases for jython, too. :)

BTW, I still believe we should create a short list of "urgent tasks". We will understand the codebase better and better when we are trying to solve the problems. And we don't have to understand all the code to solve the problems. "Iterative" is always the key feature of the software development.

However, as usual, above are just my personal opinions.

Best regards,

Yan
 

On 4/4/06, Walter Chang <[hidden email]> wrote:
Hi All,

Rather than continue to rant about getting a plan together I decided
to take up the task of trying to figure out "How jython works from a
5000 ft view"

Right now I have a bit more understanding of the org.python.parser
java files which is generated from using javaCC and the python
language ASDL file available from python.org.

This allows us jython to understand (parse) the python language
constructs.  However in order to "act upon" the parsed results we
still need to have a python runtime to delegate the instructions to.
This is where the org.python.core comes in.

I spent some time looking at the 2.2a1 source that I had checked out
of sf csv and it is indeed quite a bit of complex code.  Ran it
through Posiden to see if a graphical UML representation could save me
a bit of time in understanding how everthing worked.  This didn't work
as there are about 139 java files in 2.2a and it made everything even
more confusing.

The bottom line is, I think unless someone else has a better
suggestion, a line by line exploration of all the source files would
be necessary (starting from the PyObject.java).

Before I embark on this endevor I'd like some advice:

Should I start to from the 2.1 sources (more stable, less possiblity
for change...)

or

Should I look at going through the current 2.2a sources (people are
working on it right now, confusing things like CollectionIter.java and
CollectionIter2.java...)

The goal of this is to eventually produce a design doc that can be
shared with the community.

Once we have a clear idea of the "orginal" design decisions, proper
peer review can take place and things like the JEP (jython equivelent
to PEP...please see wiki) can come into play.

I anticipate without any guidance (brute force/reverse engineering)
this would take about 3 months to do for one person.  (core and
perhaps util)


Any advice before I start would be much appreciated!

Kind Regards,
Walter


--
Simplicity--the art of maximizing the amount
of work not done--is essential.
from: http://www.agilemanifesto.org/principles.html


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
<a href="http://sel.as-us.falkag.net/sel?cmdlnk&amp;kid0944&amp;bid$1720&amp;dat1642">http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev

Reply | Threaded
Open this post in threaded view
|

Re: some advice on getting a design doc out for jython?

Khalid Zuberi
In reply to this post by Walter Chang-2
On 4/5/06, Walter Chang <[hidden email]> wrote:

> The bottom line is, I think unless someone else has a better
> suggestion, a line by line exploration of all the source files would
> be necessary (starting from the PyObject.java).
>

Mailing list discussions, checkin-comments, tracker comments etc can
also all be helpful, but gathering this is of course time-consuming!
For example, here are a couple of posts by Paul D. Fernhout that might
be interesting if you haven't seen them already (apparently you aren't
the first code archaeologist to have a dig at jython :-).

  http://thread.gmane.org/gmane.comp.lang.jython.devel/1829/focus=1829

> I anticipate without any guidance (brute force/reverse engineering)
> this would take about 3 months to do for one person.  (core and
> perhaps util)
>

If this approach appeals to you i look forward to studying the results
(prefereably incrementally as you go along). Personally i find it more
immediately rewarding to focus on existing problems, contributing
possible fixes and learning things as i go along. But i certainly lack
the high-level view myself.

Perhaps something a bit smaller in scope might work? For example, a
lot of the work towards a 2.2 release has gone into implementing
new-style classes. I think the heavy lifting is mostly done, maybe
some polishing yet to do, bugs to be fixed etc. It would help to have
a better understanding of how this works, for eg when attempting to
address bugs discovered running the test scripts. There is some
existing doc's on the wiki [1], some more info in checkin comments
[2], and since Samuele is still occasionally engaged perhaps you could
coax a bit more info out of him. This would hopefully take
considerably less time, and might even have a useful short-term impact
in advancing 2.2 development.

Or not. Just my 2 cents. :-).

- kz

[1] http://wiki.python.org/jython/NewStyleClasses
[2] look at comment for eg revision 1.1.2.1 of PyType, and other
comments in http://cvs.sourceforge.net/viewcvs.py/jython/jython/org/python/core/PyType.java?rev=2.7&view=log


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev