Wednesday, July 30, 2008

Funkload to be revisited!

Benoit Delbosc (I assume its him because the Blogger sign was 'Ben') last week responded to these two posts I made in February:
Benoit is the author of Funkload, a promising python based functional and web load tester I explored earlier in the year. Its biggest shortcoming was the problem with getting graphical charting to work because the graphing library it was using was impossible (for me) to find. Sure, numbers are important, but a picture says a thousand words.

Especially to managers.

Well, Benoit told me that the latest Funkload calls for python-gdchart2, for which linux packages (at least Debian and Ubuntu) can be had. So installation across the many machines I touch will be trivial. I don't always use linux, but now I'll make sure to use it when I need Funkload to do what I need. It might also work with Mac OS X, something I plan to investigate tomorrow.

This makes me very happy. I really enjoyed playing with Funkload, and plan to do more of it in the near future.

And, just to make Benoit happy, even though it wasn't official, for the past 6 months or so I've used it in many unofficial load/functional tests for http://nasascience.nasa.gov as well as other internal efforts. :)

Thursday, July 17, 2008

wxPython is fun!

I needed to generate lots of lipsum recently. I could use elephantangelchild's greaterLipsum but I like fancy GUIs. So I branched greaterLipsum and wrapped it inside a little wxPython app. Pretty easy to do and it works great. You can svn the results at the desktopGreaterLipsum branch.

I plan to add in new features like being able to choose the text source, making binaries for different operating systems, and other fun things.

In the meantime, it made me remember just how much fun wxPython is in general. I need to find excuses to work with it more.

Friday, July 11, 2008

Ready for boot camp!

Next week I'll be in Plone 3.x Boot Camp at American University. I've worked with Plone 3.x for months, but haven't had time to get really spot on with its features. So I'm looking towards this second experience with Joel Burton with a lot of excitement.

Anyway, after spending some time with elephantangelchild's laptop yesterday getting Python 2.4.4 installed, then PIL, then Plone 3.1.3, then taking it back down to 3.1.2, then installing in the boot camp modules, I decided to do the same for myself last night.

I decided to take a shortcut. I modified the buildout.cfg so from the start it did everything in one go, installing Plone 3.1.2 and the boot camp modules. That way I could just do one build and be happy.

Alas, buildout wouldn't work. I had to do my buildout for Plone 3.1.2 and then run it again with the boot camp modules. How silly is that? Oh well, its done and with ArgoUML I'm ready to go!

Monday, July 7, 2008

Me Grok generate Add and Edit forms!

So the first bit of documentation in the grok docs didn't work. Grok has evolved a lot so this is understandable. My thought when I dropped the effort in frustration was that my knowing of where the URLs for the add and edit forms were off. Since the docs I was first working on lacked the URL of what I where I was supposed to go that answer seemed to make sense.

My co-worker suggested I go to the explicit name of the view, which in the Zope 3 world is '@@' this or that. A good suggestion but that didn't work. More on that in a bit.

Examining the Developer Notes I discovered that the docs I was using were out of date. I changed my code to fit the notes, pointed Firefox at the URL named after the form classes, and it just plain worked. Code changes were minimal. And I'm posting to the Grok folks that the form docs are out of date.

Anyway, you can go to /myview or /@@myview in Grok. Which is good. For some reasons that others explain quite well, Zope 3 has this whole big thing with '@@' and '++' in URL bars to explicitly name views, adapters, utilities, oversized SUVs, bad American food, et al. I'm sure some people can't live without them but honestly since Grok avoids them it makes things feel more... pythonic.

Anyway, the add & edit forms, now that I can make them work, are wonderful. Pretty HTML forms with validation done in moments off a little python code.

Monday, June 30, 2008

Me Grok Smash!

So as I started on yet another graphviz application for the web, I decided to go with a new framework. I would use Grok!

Grok comes out of the Zope community, and has its foundation in the rather mature components of that application server. The difference is that tying bits of Grok together does not rely on seemingly arcane xml files. You just code in Python and a bit of TAL for the views. If you want you can leverage in more bits from the Zope world, such as zope.formlib and other interesting bits.

It is a matter of public record that I have a like/hate relationship with zope.formlib.


There are some really nice things I discovered about Grok:
  • Intuitive.
  • Only one magic bit, in that class defined as views look for their lowercase template automatically, and you can override this if you like.
  • The framework is out of the way.
  • Inheriting models is a cinch.
  • Lets you play with either the ZODB or SQL ORMs.
  • Easy use of TAL.
Some negatives:
  • A possible gotcha when you instantiate an object inside another object requires you to do a super(MyObject, self).__init__() inside the object's __init__. Not sure why I should have to write this out and it might be I did something wrong.
  • Um... still trying to find faults.
I'm rather pleased. Grok has grown up lots since I really looked at it in late autumn of 2007. I look forward to working with it more.

Friday, June 27, 2008

Beware Documentation By Topic

Yes, I know its supposed to be 'Browse', but while looking up some documentation and being distracted I took 'Browse' as 'Beware'. Since it was Grok I immediately thought of rampaging cavemen.

Heh. Fridays...

Monday, June 23, 2008

Ruby Security Problems

On the surface:

http://www.ruby-lang.org/en/news/2008/06/20/arbitrary-code-execution-vulnerabilities/

Digging deep:

http://www.zedshaw.com/rants/the_big_ruby_vulnerabilities.html

In my world, Ruby is the dark side. Tantalizing and yet there is a rock of stability about Python that I really enjoy, even if I can't define what I mean. Maybe its the security to know that the language is deep as it is broad?

Anyway, at least for today I'm grateful I've stuck with Python.