A couple of broken examples on the pyjs website.. (Tested on firefox 14.1).

69 views
Skip to first unread message

Stuart Axon

unread,
Aug 10, 2012, 7:32:30 AM8/10/12
to pyjs-...@googlegroups.com
Some of the examples seem to be broken...   they should really work so potential users can see pyjs in action (these happened to be with the first 3 I clicked on):

Canvas Processing  [ http://pyjs.org/examples/CanvasProcessing.html ]

Displays a dialog with the message:  "CanvasProcessing undefined: called Processing constructor as if it were a function: missing 'new'."

Then does nothing.


Space [ http://pyjs.org/examples/Space.html ]

No game is displayed.







Stuart Axon

unread,
Aug 10, 2012, 7:38:28 AM8/10/12
to pyjs-...@googlegroups.com
Oops, just noticed there's already a post about space invaders.. quite random timing; I haven't looked at pyjs for donkeys years!

Renaud Chénard

unread,
Aug 10, 2012, 8:14:13 AM8/10/12
to pyjs-...@googlegroups.com
Yes, the Media example doesn't work for me on Firefox 14.0.1, Chrome 21.0.1180.75 m, IE 8 or Safari 5.1.7.

I think that the problem is just a wrong link or mime type, but for Safari, there is not even a window to show the Video...

C Anthony Risinger

unread,
Aug 13, 2012, 12:37:13 AM8/13/12
to pyjs-...@googlegroups.com
yes quite a few examples are either crappy, outdated, or completely botched.

... this is just one of the many maintenance issues that has arisen
from a former "add add add everything anywhere" approach.

i will probably be axing many examples in good time, or publishing
only a select few on the website.

--

C Anthony

Peter Bittner

unread,
Aug 13, 2012, 9:39:55 AM8/13/12
to pyjs-...@googlegroups.com
Anthony,

I've opened an issue on that very task:
https://github.com/pyjs/pyjs.org/issues/9

Basically, I compiled what we have already discussed about the
"examples index" and "broken examples" roughly in May this year.

2012/8/13 C Anthony Risinger <ant...@xtfx.me>:
> yes quite a few examples are either crappy, outdated, or completely botched.
>
> ... this is just one of the many maintenance issues that has arisen
> from a former "add add add everything anywhere" approach.
>
> i will probably be axing many examples in good time, or publishing
> only a select few on the website.

We shouldn't be repetitively condemning the past. I believe "no
examples" are still worse than some that "usually work", or work
partly. One task of examples still is giving an idea of what it is
like using the technology in question. The several code pieces give an
idea, and if they are from different people, we may see different
approaches or coding styles, and learn from it. We should be careful
on which efforts to throw away.

Yes, I do agree on consolidating! What needs to be done is find out
which examples roughly cover one and the same topic, and turn them
into ultimately "great examples" that look great in both, presentation
and source code. To start with we could cluster the existing examples
to get a better overview of what is out there already.

Peter

Billy Earney

unread,
Aug 13, 2012, 10:45:29 AM8/13/12
to pyjs-...@googlegroups.com
I agree with Peter.   I believe some examples are better than none.  A few weeks back, I was trying to fix some of the examples, but got side tracked on other issues.  I'll try to get back to them ASAP.  I would like to know what people think we should do.  Should we create a single large "show case" that contains all examples?  In some ways this is best, but I could see people wanting to just look at a simple example with only 20 lines of code, if they are trying to learn something. 

Billy Earney

unread,
Aug 13, 2012, 5:54:04 PM8/13/12
to pyjs-...@googlegroups.com
Maybe we should try to stabilize the repo, and create a new branch for development?

C Anthony Risinger

unread,
Aug 14, 2012, 4:16:08 AM8/14/12
to pyjs-...@googlegroups.com
On Mon, Aug 13, 2012 at 8:39 AM, Peter Bittner <peter....@gmx.net> wrote:
> Anthony,
>
> I've opened an issue on that very task:
> https://github.com/pyjs/pyjs.org/issues/9
>
> Basically, I compiled what we have already discussed about the
> "examples index" and "broken examples" roughly in May this year.
>
> 2012/8/13 C Anthony Risinger <ant...@xtfx.me>:
>> yes quite a few examples are either crappy, outdated, or completely botched.
>>
>> ... this is just one of the many maintenance issues that has arisen
>> from a former "add add add everything anywhere" approach.
>>
>> i will probably be axing many examples in good time, or publishing
>> only a select few on the website.
>
> We shouldn't be repetitively condemning the past. I believe "no
> examples" are still worse than some that "usually work", or work
> partly. One task of examples still is giving an idea of what it is
> like using the technology in question. The several code pieces give an
> idea, and if they are from different people, we may see different
> approaches or coding styles, and learn from it. We should be careful
> on which efforts to throw away.

weeell, i don't think i'm repetitively doing anything (i'm not sure
i've even alluded any problem from the past), but i don't agree much
with your sentiments :-( ... the repository is absolute chaos with the
obvious rotting bits all over the place, and i'm more inclined to
slash first and resurrect later if useful.

IMO anyway, 2 busted examples in a row would likely cause me to move
on, or at the very least, reconsider/search-elsewhere-harder ... no
published examples means lack of time and/or resources; knowingly
publishing 50% busted examples is essentially incompetence and/or lack
of pride.

the examples are written by many people for sure, but IMO many are
poorly written and lacking any consistent style whatsoever -- in the
HTML or the Python code -- giving an absolute "scatterbrain" feel to
the whole thing without providing good context for WHY each example
exists or is useful at all.

inconsistency is the enemy of sustained forward development -- any
example surviving the gauntlet must eventually conform to the
established style (roughly PEP8), and a more rigorous entrance exam.
the first task however is converting all examples to packages,
importable from the `examples/__init__.py`.

> Yes, I do agree on consolidating! What needs to be done is find out
> which examples roughly cover one and the same topic, and turn them
> into ultimately "great examples" that look great in both, presentation
> and source code. To start with we could cluster the existing examples
> to get a better overview of what is out there already.

sounds fantastic, and a good project for anyone looking to take the plunge.

--

C Anthony

Billy Earney

unread,
Aug 14, 2012, 7:16:39 AM8/14/12
to pyjs-...@googlegroups.com
I'll volunteer to consolidate the examples.

Billy Earney

Peter Bittner

unread,
Aug 14, 2012, 9:05:07 AM8/14/12
to pyjs-...@googlegroups.com
2012/8/14 Billy Earney <billy....@gmail.com>:
> I'll volunteer to consolidate the examples.
>
> Billy Earney

Woooo!!! Billy, you're my hero of the day!

Be ready to assign the pyjs.org issue #9 to yourself (not sure if you
can do that, actually): https://github.com/pyjs/pyjs.org/issues/9
If you can't please join the pyjs organization on GitHub (not sure if
you can---aaargh!) then I can assign the issue to you.

Peter

Billy Earney

unread,
Aug 14, 2012, 7:39:30 PM8/14/12
to pyjs-...@googlegroups.com
I've searched github and can't figure out how to join the pyjs organization.  Feel free to add me, if you can.    Are there one or two examples that correctly shows how you see the examples shaping up (if no pyjs examples are up to par, is there an example from another python app)?  That would definitely be a lot of help.

I'm going to install the pep8 module so I can check that the examples do match most of the coding style defined in PEP8.

Thanks!
Reply all
Reply to author
Forward
0 new messages