Category archives: Snaking
Discussions of programming, particularly of programming Python
Cheap User Testing (via Steve Krug)
Written by
on
in
Snaking.
The book "Don't Make Me Think" has a simple mechanism for doing user testing "on the cheap", we used it to some good purpose and someone asked me about it at TorCHI, so here's a summary:
- do user testing approximately once per month or once every two weeks
- recruit users as closely as possible to ...
Notes from PyGTA's Programmer Liability Round Table
Written by
on
in
Snaking.
We had a lively discussion last night about programmer liability. Consensus (such as there was) seemed to be that perfectly reliable software is extremely expensive and likely futile as a goal given complexity restrictions, basically if every app must meet milspec the industry as we know it is toast, as costs would go through the ...
Time to start testing for PyOpenGL 3.0.1
Written by
on
in
Snaking.
PyOpenGL 3.0.1 is pretty much finished AFAICS. The biggest visible change is support for the OpenGL_accelerate module (written in Cython) which provides a noticeable speedup for my applications. However, the fact that the code is C (once generated) means that bugs are going to be introduced (including possible segfaults).
There are also a number of ...
Sphere rendering with numpy...
Written by
on
in
Snaking.
So, you ask; "how do you generate the coordinates necessary to render a (unit) sphere" (you do ask the strangest questions)? Well, since you insist, here's a quick rundown of one way to go about it. We'll assume that we're going to use a pair of vertex/index VBOs to render the geometry. We won't try ...
Do not use "profile", use "cProfile"
Written by
on
in
Snaking.
For those who didn't see the presentation at PyCon:
- do not use the profile module with python 2.x
- use the cProfile module (or hotshot if you're on < 2.4)
the profile module has extremely high overhead and will produce results that would have you doing the wrong thing if you were to believe them. See ...
Most of the work I planned to do is done...
Written by
on
in
Snaking.
There's always going to be lots more work to get done, but I think I'm pretty much okay with where OpenGL_accelerate is for now. There's now a C-level API for format handlers, so that Cython modules can be written that pretty much do a cast and a dereference to get values, rather than doing lots ...
Where are we...
Written by
on
in
Snaking.
So with a fairly extensive set of Cython wrappers, running a fairly large, heavy VRML world with transparencies and all the rest, I see a noticeable, but modest, speedup.
The world I'm testing on goes from ~12.8fps (avg) to 15.5fps (avg), that's a nice 20% speedup. On average OpenGLContext now spends around 20% of rendering ...
Cython for the last couple of days...
Written by
on
in
Snaking.
I've been writing accelerator modules for PyOpenGL for the last two days. I think I've got to a reasonably comfortable point. I've got a Numpy FormatHandler and an ArrayDatatype written. With some judicious use of cdef'd typed self variables there's a lot of overhead eliminated from the wrapper operation. To make it really fast, however, ...
First step in eliminating GLU quadrics...
Written by
on
in
Snaking.
OpenGLContext is currently using GLU quadrics to render the various VMRL quadric primitives. There's no particular reason to do so other than it was easy and simple to implement. I've just written up some code to generate two VBO-compatible arrays that render a sphere with a given angular resolution as a single glDrawElements call (once ...
GL_ARB_compatibility
Written by
on
in
Snaking.
So yes, apparently the ARB listens when its remaining community screams. This extension (as Lorenzo points out) has been promised to be supported by nVidia on all of its planned 3.x cards and it effectively "undoes" the deprecation of the legacy APIs in OpenGL 3.1. So you can likely get away with not rewriting, as ...