Catherine: pyOraGeek

Wednesday, May 21, 2008

slides from SQL*Plus Alternatives

I've posted my slides from today's GCOUG presentation here. I'm not sure the page won't move eventually, so bookmark this entry rather than the destination page, and I'll update this entry if it moves. I need to figure out a good long-term location for posting documentation like this...

Thanks for being a great audience! Feel free to contact me to ask questions about SQLPython or request new features.

Labels:

Thursday, May 15, 2008

cmd2 0.3.0

I'm speaking on SQL*Plus alternatives again on Wednesday at GCOUG, and trying to polish up sqlpython a bit in preparation for that. That required polishing cmd2; I've been increasingly embarrassed that cmd2 used homemade code (flagReader) to interpret --options --like --these, instead of using a perfectly good module from the standard library (optparse).

Optparse is not designed for iterative cmd-type apps where you remain at an application prompt after issuing each command - it keeps issuing sys.exit()s to kick you back to the shell. That was my excuse for not using it earlier, but once I decided to fix it, a little subclassing took care of it.

Next I got a little deeper into decorators than I'd ever been, to provide a concise way to specify those options:

@options([make_option('-k', '--ketchup', action="store_true", help="Ketchup on that?"),
[make_option('-r', '--relish', help="relish (sweet or dill)")])
def do_hotdog(self, arg, opts):
if opts.relish:
self.stdout.write('One dog with %s relish\n' % opts.relish)
if opts.ketchup:
self.stdout.write('Hope you're not wearing white!\n')

That was pretty fun. Took some experimentation and this article, though, to figure out how to write a decorator that would accept an argument.

I didn't throw away the homemade ("flagReader") code, for backward compatibility; I issue a DeprecationWarning instead. I did throw away the guts and reimplement it as a wrapper around optparse. I managed to do that part on a single 20-minute bus ride, thanks to good doctests on flagReader. I feel so grown-up!

Finally, inspired by Brandon Rhodes' article in the March 2008 Python magazine, I tried supporting buildout deployments this time. I'm not sure I'm getting it quite right yet; expect it to actually work in cmd2 0.3.1.

Tuesday, May 06, 2008

PyOhio Call for Proposals

PyOhio: Call for Presentations

PyOhio, the first annual Python programming mini-conference for Ohio and surrounding areas will take place Saturday, July 26, in Columbus, Ohio. The conference is free of change and will include scheduled presentations, Lighting Talks and unconference-style Open Spaces.

You can read more about the conference at http://pyohio.org

PyOhio invites all interested people to present scheduled talks. All presentations are expected to last 40 minutes with a 10 minute question-and-answer period. PyOhio will accept abstracts covering any area of Python programming. A classroom area with computers will also be available for possible hands-on sessions.

All presentations proposals should submit abstracts no longer than 500 words in length. Abstracts must include the title, summary of the presentation, the expertise level targeted, and a brief description of the area of Python programming it relates to.

All proposals should be emailed to for review.

The submission deadline will be June 1, 2008. Accepted proposals will be notified by July 1.

Friday, May 02, 2008

choose the tool last

Yesterday, someone asked me if I could design "an MS Access database" for him.

Growl.

As I reflected on it, I realized that the problem is not really the particular technology specified - the problem is that the technology was specified at all before the need was described.

If I offered to make you anything you wanted for dinner, would you ask for "something made with a Teflon spatula?" If you did, I'd tell you, "No no no no no. Describe what you want to eat, and let me figure out what I'm going to use to cook it."

My potential client didn't literally mean that he wanted MS Access to be used, he meant that he wants a database with a GUI interface. He thinks of "Access database" as a way to describe that, because it's the only thing he's ever seen used to build products vaguely resembling the one he's imagining. It's nothing more than a limitation of vocabulary and experience.

The problem is that, so often, that kind of pidgin is taken literally. Tools are pre-selected far too early - while the business users are imagining their needs, before the geeks themselves are even involved,

As a result, there are a lot of geeks out there trying to beat eggs with Teflon spatulas.

My story ends happily, however. My potential client got it when I explained this, and we're going to meet so I can find out what he wants. Then - and only then - will we start discussing which tools to use.

Thursday, April 24, 2008

Penguicon talk materials

Ooh - sorry, I got distracted! Here, at last, are the materials for my talk last Saturday, "Into the Dayta-b'hase: A First-Level Introductory Adventure".

A tarball is here with the slides (dnd.html), queries run (scripts.sql), and a big SQL script to set up the database (dnd.sql)

Monday, April 14, 2008

tax rant

ABSTRACT

Citibank spends a lot of time imploring their customers to go to all-electronic statements... but they don't improve their electronic statement availability to make them practical. Ohio Dept. of Taxation spends a lot of time imploring people to file electronically... but they can't be bothered to test their forms, or to provide a feedback button so that end users can notify them of errors they find.

This is a bad pattern. If you want people to go electronic, focus on getting it right, not on pro-electronic cheerleading.

* * * * *


Ohio has a "use tax" - a law requiring that you add up all your mail-order and interstate purchases from out of state so you can retroactively pay Ohio sales tax on them with your tax return. I think six or seven of us actually obey this law, and the folks at the bureau of taxation laugh, blow a kazoo, and scrawl "PATSY!" on the return whenever they come across someone who paid it. Oh, well.

Digging up records on all these purchases sucks. Citibank, though I love their customer support*, didn't help. (You can download your last six statements, one at a time... or, after March, you can request a PDF report of the whole last year - please allow two business days for your request to be processed. Excuse me? Some people store information on devices called "computers"? A year of credit card statements is about 50 KB... I think you can afford to keep that on disk. Ask Google if you're hard up, they'll give you a few gigs.)

So anyway... I finally, FINALLY, splice electronic records and sift paper records and total up my internet purchases for the year... open up the Adobe form from tax.ohio.gov... and...

...and the line to enter your quantity of out-of-state purchases is not editable. It is pre-set to zero and locked.

One good thing has come out of tonight: I found wesabe, a really nice site for slurping up records from your various accounts automatically. Next year I won't need to fight Citibank, because my Wesabe account will keep itself updated all year long. Wesabe, I'm happy to say, gets it right. Free services generally do, as opposed to people I pay, who generally get it wrong. It's a strange era we live in.

(* - When my credit card was stolen years ago, Citibank was absolutely wonderful to me. It'll take a lot of blundering to erode the goodwill they earned from me then.)

Tuesday, April 08, 2008

PyOhio

It's official! We have a place, we have a date... now all we need is you!

PyOhio
Regional Python programming miniconference
July 26th, 2008
Columbus Metropolitan Library
96 S. Grant Ave.
Columbus, OH 43215 USA

Labels: