A technical blog which contains personal opinions and not those of my employer. Major topic areas will include the Python language and other technologies of note. This blog contains subjective opinions. Any resemblance to facts is entirely co-incidental.

Tuesday, November 29, 2011

So here's my idea: an anti-framework. I'm interested in the idea of building a framework, because it would be nice to provide a nice, standard set of libraries and modules to work in (much like the standard library, but extended to cover the scientific domain). However, the problem with building frameworks is basically the competing standards problem.

So here's my new idea. An anti-framework, build out of a relatively small number of de facto standard scientific components for Python (like numpy, scipy, matplotlib, I imagine there are some others) and call it something zingy. Any framework or environment which passes its unit tests in the anti-framework is then "zingy-name-compatible". You don't run with a zingy-name framework, because lots of people need more than what's in the standard framework for all sorts of reasons. It's perfectly okay for some-other-framework to extend zingy-name-framework, so long as it remains backwards-compatible with zingy-name framework.

Then, anyone building a relevant application, framework, or whatever can be zingy-compatible if they will support any tool written only using the zingy core libraries.

Wednesday, September 7, 2011

I came across this fantastic quote today, capturing something which I've always found to be true. I think I can now add this as a second item to the list of things I find to be true in the workplace. The first is that the relentless pursuit of simplicity is the only weapon we have against the complexity of what we are trying to achieve.

“The advice I like to give young artists, or really anybody who’ll listen to me, is not to wait around for inspiration. Inspiration is for amateurs; the rest of us just show up and get to work. If you wait around for the clouds to part and a bolt of lightning to strike you in the brain, you are not going to make an awful lot of work. All the best ideas come out of the process; they come out of the work itself. Things occur to you. If you’re sitting around trying to dream up a great art idea, you can sit there a long time before anything happens. But if you just get to work, something will occur to you and something else will occur to you and somthing else that you reject will push you in another direction. Inspiration is absolutely unnecessary and somehow deceptive. You feel like you need this great idea before you can get down to work, and I find that’s almost never the case.” ~ Chuck Close

Tuesday, July 26, 2011

As I've mentioned before, I'm working on a new project for helping collect benchmarks for Python programs. To start with, only CPU performance is measured since that's the easiest data to collect, but I'd like to collect other metrics eventually. The wiki has three fairly thorough tutorials, and some more under construction. The installation of the package with easy_install seems to be working okay, and I believe all the tutorials have correctly functioning code snippets.

If you have an interest in collecting performance data on your Python program, maybe you would be happy to work through the tutorials and let me know if you come across any bugs in benchmarker.py, or in the tutorials. If you have any questions that you would like to see addressed in the tutorials, please also let me know!

If you want to cut straight to the action, you can install benchmarker.py with

easy_install benchmarker.py

(although I'd suggest doing this in a virtualenv for the time being). Please let me know if that doesn't work -- this whole exercise will be somewhat undercut if others have trouble installing the package!

Thanks very much to those who have already helped identify bugs and issues, and contribute to lifting the standard of this package.

Sunday, January 23, 2011

(1) install python-twitter-tools
(2) Register an app with twitter to get oath credentials
(3) Run this code ftw!
(4) You'll need to set those four variables to the ones you got in step 2 for this to work of course

python-twitter-tools has the most natural twitter API I've seen. It's really beautiful. The namespace follows the restful API urls, so you don't need any documentation other than what's on the twitter dev website. It really does Just Work.

Saturday, January 22, 2011

Three concentric spherical surfaces, with a randomly-connected graph overlaid on each one, spinning. http://www.youtube.com/watch?v=bXOTCZXkUjk ... born of an idea I wanted to explore. Python + Mayavi = rapid gratification! Thought I'd post the code for anyone who's interested. I'm trialling the use of the Enthought Python Distribution, it certainly provides a nice technology stack to work with. All the components could be installed separately, but I'm very happy to have something where things "just work" (at least, so far).