Monday, January 29, 2007

centralOH@python.org

There's a new mailing list, centralOH@python.org, for Python users in and around Central Ohio. If this describes you, please join us!

http://mail.python.org/mailman/listinfo/centraloh


The Cleveland area already has a wonderful Python users' group - clepy. Those of us too far from Cleveland have been out of luck, though. We hope to use the new mailing list to gather together a bunch of Python users from the area, then begin to plan some live events. Eventually, perhaps we'll have a full-fledged, regularly meeting user group. First, though, we need to contact each other!

So, please, if you know anybody within shouting distance of central Ohio, let them know about centralOH@python.org !

Friday, January 26, 2007

Pardon, your template is showing.


Forgetting to apply data to your template is a pretty understandable mistake. But why are quantities like $baseCommittmentNumber queried live, while "6th movie" and "7th movie" are hard-coded? I hope they weren't just too lazy to generate ordinal forms of $baseCommittmentNumber+1 and +2 on the fly!

Incidentally, when all is said and done, the Columbia House deal works out to a minimum of ($0.50 X 5) + ($15 X 1) + ($20 X 3) + ($2 X 9) = $93.50 for 9 DVDs.

Thursday, January 25, 2007

photos on business cards

Joe Wirtley (a CodeMash attendee) blogged an appeal for folks to include a photo of themselves on their blogs. I think it's a great idea - this weird bloggy world of electronic chatter is the most useful when we keep it linked to the world of flesh-and-blood. It's a shame to think that I've probably walked right past people at conferences whose writings I knew well.

I'm thinking of taking the appeal a step further. I love being able to recognize people and call them by name. Unfortunately, I'm a nerd, and I'm not very good at it. I struggle to find techniques to empower my socially deficient brain. Often, after I get someone's business card, I rush away to jot notes on the back - notes about what they're involved in and what we talked about, but also notes on their appearance. This is a desperate attempt to enable myself to recognize them the next time we meet, probably months or years in the future. The trouble is, a few phrases like "tall; curly hair" or "beard, glasses" really aren't enough.

I fantasized today about buying a cameraphone, snapping a photo of each person I meet, then finding a tag-based filing tool so that I could store the photos with the people's names and keywords about where I'm likely to see them again. Then, before arriving at an event, I could review the photos of people I'd be likely to see there; when I arrived, I'd call out to them by name and feel so cool.

Now, just imagine if somebody gave me a business card with their picture on it. Wow! I'd be so grateful! It would short-circuit this entire dilemma!

It's almost time for me to get new cards printed, and I could lead this incredibly useful trend by putting my own photo on them. Except... I'm nervous that it will come across funny, like I'm a wannabe model or something. Traditionally, geeks are supposed to imagine themselves as not really even having faces, as just being disembodied intelligences free-floating in the ether. The thing is, that's really not a useful myth. Talking to each other - face-to-face when we can - has very real value.

Maybe I should go ahead and do it anyway, and not worry about what people think. Maybe just being "the weirdo who puts her picture on her business cards" isn't so bad - for networking purposes, being weird isn't as bad as being forgotten. It's not "goofiness", it's "branding", right?

Hmm. Opinions? Would anybody join me on this?

Monday, January 22, 2007

CodeMash summary

Wow, CodeMash was FUN! It was chock-full of the kind of inquisitive, energetic people who make you glad to be a geek, both in the formal sessions and the informal sociable stuff.

I'll give just a few highlights, hopefully ones that haven't already been blogged to death by other CodeMash bloggers...

Even for someone who already uses TurboGears a bit, Kevin Dangoor's TG talk was great. Almost too high-energy to follow, but I got great ideas like using an in-memory SQLite back end for development testing (thus not worrying about repairing the database after testing);

It was nice to have Kevin's co-author Mark Ramm there, too. Questioning the authors beats leafing through a book any day... I just ordered my copy of the TG book for $26.99 from Nerdbooks. Amazon can slightly beat that price ($25.64), but at Nerdbooks I could toss in mildly outdated books on Unix and DB2 for $2-3 each.

David Stanek's talk on "Python Web Services" was actually more important, I thought, for the language-independent description of the relative merits of REST, XML-RPC, and SOAP-based services than it was for the Python-specific content. If you were off at some .NET talk instead, and you've always been a little fuzzy about how those work and relate to one another, go read his slide deck.

As a data geek, I really perked up at Scott Guthrie's keynote on LINQ. It's a new language component that basically extends the SQL idea (describe what data you want, let the computer worry about how to get it) beyond just RDBMS and into flat files, XML, web services... wherever the data may be squirreled away, it'll be a way to go get it with a single consistent syntax. Cool! I'll be eagerly looking forward to IronPython implementations of LINQ. So, Microsoft - thank you for LINQ, thank you for being one of the CodeMash sponsors, and I forgive you for Vista overwriting the GRUB boot loader on my dual-boot machine this morning (but only because I found a tutorial on how to repair it).

James Ward demonstrated ooooh-aaaah stuff you can do with Flex, which wasn't surprising. More importantly, I learned that the Flex/Flash world has really opened up ("opened" as in "open source"). When I looked into it a few years ago, it seemed that you needed a $mucho-K Flash server to even dip in. That's not the way I do things; I build a minor app or two - something that will really be used, not a development-only toy - before I know whether I really want to run with a technology. Now, most of the stack is open-source and free; only a couple optional (admittedly very convenient) components are commercially licensed. Adobe's new mostly-open-source business model for Flex permits my kind of experimentation; good for them!

Kevin Dahlhausen's talk on Test-Driven Development filled an embarrassing gap in my understanding of TDD - I'd heard of mock objects, but had never really figured out what role they play in TDD.

I took part in two Open Space discussions - one on women in IT, one on social networking for nerds - that were important enough that I think I'll give them their own blog posts in the next few days.

I heard Martin Fowler's name come up so many times that I finally screamed (internally), "Okay OKAY I'll read his stuff, already"!

In a week or so, I'll update this post to include hotlinks to the talk slide decks; most of them aren't posted yet.

Anyway... so much glorious fun. With CodeMash in January and PyCon in February, who dares call winter a blah time?

Thursday, January 18, 2007

CodeMash

I'm here at CodeMash in Sandusky! I'd thought about blogging the whole conference real-time, but I think I'll only be doing a little of that... my laptop is fearfully heavy, and dragging it around all day would seriously inhibit my enjoyment of the Hallway Track (the stuff you learn chatting informally with people between sessions).

Anyway, so far, CodeMash is AWESOME. Very professionally run, and with excellent content. It began last night with a great expert panel discussion on languages - the sort of experts who seem to know a dozen different languages in more depth than you know your very favorite. It feels so good to have something like this here in Ohio.

A couple notes from the language panel...
  • As a Pythonista, I was very gratified that the whole panel had a lot of knowledge of and respect for Python; it seemed to be mentioned more than any other single language!
  • Tha panel took up the question of "which language should new computer science students learn?" The consensus was that sticking to any one language is a real mistake. Every language carries its own limitations and patterns of thought; learning new languages broadens the ways you have to think about a problem. Teaching students only one language risks hard-coding the assumptions and limitations of that language right into their brains. The rule of thumb "learn a new language every year" came up.
  • As for specific languages, Python was the first reccommended... and assembly ended up also very highly reccommended.
Anyway, it's going to be a great conference. I'll try to update tonight. There will be a lot of tough decisions about which talks to go to, and I may decide against some of the Python talks - partly because I might be already beyond some of them in skill, and partially to honor the cross-language spirit of CodeMash.

Friday, January 12, 2007

PyCon and CodeMash

I'll be at PyCon, Feb. 23-25 in Dallas!


I'll also be at CodeMash in Sandusky!

CodeMash – I'll be there!

I've mentioned both these conferences, but this is a good time to remind you of both of them, because the early-bird PyCon registration is almost upon us (Jan. 15) and CodeMash itself is almost upon us.

After two conferences in two months, my employer will probably manacle me to the server for the rest of the year, but it'll be worth it. I'd been coy up until now as to whether I'd actually make it to these events; my personal schedule has been wildly chaotic. But now I've got reservations in hand, so I'll see you there!

Wednesday, January 10, 2007

Geek Event Aggregator is back

Re-introducing the Geek Event Aggregator - the world's most comprehensive and least accurate compilation of technology events! The Aggregator regularly scans a huge variety of event announcement websites and gathers the information into a single location. Now, when the VIC-20 Users' Group schedules a meeting down the street from your in-laws in Pittsburgh, you'll know it.

(Yes, I've introduced this before, almost a year ago. But a LOT has changed, and the accuracy is much better now.)

The Aggregator uploads its data into a Google Calendar account - the most convenient way to access it is as a Google Calendar user (which I really do recommend.) Here's what you do.
  1. Log into your Google Calendar account and choose "Manage Calendars".

  2. Click "add calendar"

  3. Search for "geek event aggregator", then select "Add Calendar".

  4. Return to your calendar home. Oops, your calendar now looks dense with events. That's because you're seeing an unfiltered list of all events, everywhere. Better un-check "geekEventAggregator".

  5. Now you can make real use of the Aggregator - search for the city, state, or region of interest. The Aggregator attaches several keywords to each event based on its location.

  6. Don't take anything the Aggregator reports at face value! Double-check it all. Remember, it's just a poor computer trying to read webpages that were written for humans. It doesn't even attempt to find the time of day, it just declares that everything runs 9-5 Eastern time (who cares if it's in Johannesburg?) I expect to keep gradually improving the accuracy as time goes by.
If you don't have and don't want a Google Calendar account, you can also access it through a static HTML page, an ICS document, or an XML feed. In that case, you don't get Google's handy Search button, and you'll need to use your own patience/creativity to find events in the places you want.

The Geek Event Aggregator is written in Python (of course!) Behind the scenes, it uses TurboGears and PostgreSQL. (No, you don't see a TG-based web application; the web app generates an annotated version of each scanned webpage, which I can use to troubleshoot the scan; thus, the improved accuracy of this second-generation Aggregator.)

I expect to present a Lightning Talk on it at PyCon 2007 (you are going to PyCon, aren't you?)

Thursday, December 07, 2006

Swivel

Darn. I didn't think of Swivel. Then again, you didn't think of it, either.

Swivel is described as "YouTube for data". Not just for uploading and viewing data... but also for madly cross-tabulating. Wow!

As a database professional, I'm kind of embarrassed that two physicists came up with it. But I'm the spouse of a physicist... so I'm kind of proud, too.

Anyway, I was interested in seeing what sort of data was in there on gender issues... so I searched Swivel on "gender" and got... no hits. Wow. I decided to look for some data worth uploading - say, that frightening "Balancing the Equation" study showing a steady drop of women working in information technology. Well, that study appears to be in send-us-cash-and-we'll-mail-it-to-you form; in fact, I don't see a lot of raw, upload-worthy data out on the web at all. Hmm. Any ideas?

There's got to be some mailing list of Swivel contributors out there somewhere; I guess I should find it and ask them where they find their raw data.

I'm dying to know what RDBMS they run on...

Tuesday, December 05, 2006

PyCon 2007

PyCon is coming! February 23-25, 2007 in Dallas!

I had the unexpected honor this year of serving on the Program Committee - the people who read the submitted abstracts and argue about which talks to include. The decisions were not easy! We had more excellent proposals than we could fit into the schedule... I wonder if we'll discuss scheduling four days for PyCon 2008. I think we've outgrown three days! We do have plenty of time set aside for Open Space talks and Lightning Talks, however, and I hope the presenters who didn't get into the regular schedule will show their stuff there.

Just reading the proposals was a great educational experience - I picked up news and ideas that have helped me quite a bit already. The actual conference is going to be incredible - though it will probably include plenty of those "Noooo! I want to be in all three seminars at once!" moments.

The hotel's conference rate is actually a good deal for the quality of the hotel - I know that's not always the case at conferences - but the number of rooms available at that rate is pretty limited, so consider getting your reservation right away. With so much good stuff going on from morning till night, it's really nice to "commute" via the elevator.

Monday, December 04, 2006

I'm all grown up!

I'm finally a serious open-source participant!

... by which I mean...
  • I was using a software package (SQLAlchemy),
  • found a place where it didn't meet my needs,
  • submitted an enhancement, together with test case,
  • and had the enhancement taken up into the project trunk.
I've got a second (less trivial) enhancement submitted but not yet incorporated, too. If you're using SQLAlchemy and you need to use reflection on tables that you're reaching through a database link, you'll need to do it via synonyms and grab code from this ticket. I hope it'll get into the trunk eventually, but it's a low-priority specialty need. (Unless, of course, you need it, in which case there's nothing low-priority about it!)

I guess I've been through the process before with SQLPython, via private email with its creator... it just felt so formal this time, with a Bug Tracker and Ticket Numbers and everything.

Anyway, the whole process takes a little puzzling out... but wow, it's FUN!

Tuesday, November 14, 2006

An agile January to you

There's going to be a fantastic week of agile programming activities in this area this coming January!

Begin with The TurboGears Jam in Ann Arbor, MI, Jan. 14 - 16.

On the 17th, drive two hours southeast to Sandusky, OH.

Then, Jan. 18 - 19, attend CodeMash at Kalahari Resort.

I don't know if they planned these events to dovetail so well, but Bruce Eckel is deeply involved in both, so perhaps they did.

Girls in IT

This Friday, there's a conference at Sinclair Community College here in Dayton (and other sites in Ohio) called We Are IT Day, designed to encourage high-school girls' participation in information technology.

We Are IT Day website

They're still accepting "lunch buddies" - technology professional women who can chat with a small group of girls over lunch.

And, if you know a girl here in Dayton who should be there, try to make sure she can go!

(Sorry I didn't publicize this earlier - I hadn't found a website for it.)

Tuesday, November 07, 2006

IronPython and Oracle

In my post on "Oracle-free Oracle access", I speculated that using IronPython with Oracle's .NET tools might be an effective way to access the database, but I'd never actually tried it.

Since then, I've been contacted by two people who've not only done it successfully, they've written up nice descriptions with code.
I recommend both blogs - they're in my feed reader.

If you can't read Bernd's post, here's my translation of the text that precedes his script:
Here follows the code for a simple IronPython program which enables the interactive input of SQL statements and output from an Oracle database. I use the ODP, which apparently is included with Oracle 10g XE, because I have not installed it separately. In addition, I use the well-known HR demo schema.

After startup, an example session might look like this:

Monday, November 06, 2006

Ubuntu: Linux for Cats



Our kitty knows his Linux. Posted by Picasa

Sunday, November 05, 2006

TurboGears and Oracle

This weekend saw the fulfillment of a lifelong dream - I got TurboGears working against an Oracle database!

For general information, I recommend the ToDo list tutorial and Splee's post on SQLAlchemy/TG. But there are some particulars you'll need to know to work with Oracle... so here's a super-basic example to demonstrate.
  1. After installing TurboGears, run at the command prompt:
    tg-admin quickstart --sqlalchemy
  2. In dev.cfg, replace
    sqlalchemy.dburi="sqlite:///devdata.sqlite"
    with
    sqlalchemy.dburi="oracle://scott:tiger@orcl"

    [EDIT April 25, 2007:] Unless you've specifically configured your Oracle database to support Unicode (and maybe even if you have - I'm still fuzzy on this part), you'll also need to set
    sqlalchemy.convert_unicode=True

    If you decide to leave it out, then start getting
    SQLError: (NotSupportedError) Variable_TypeByValue(): unhandled data
    type unicode
    you'll know you needed this parameter set.
  3. Add the following to model.py:
    from turbogears.database import bind_meta_data
    bind_meta_data()
    from sqlalchemy.ext.assignmapper import assign_mapper
    emp_table = Table("emp", metadata, autoload=True)
    class Emp(object):
    pass
    assign_mapper(session.context, Emp, emp_table)
  4. To controllers.py, add

    import model
    then add to the Root class

    @expose(template="myProjectName.templates.emps")
    def emps(self):
    emps_list = model.Emp.select()
    return dict(emps=emps_list)
  5. Copy templates/welcome.kid to templates/emps.kid, and replace the document body with

    <ul>
    <li py:for="emp in emps">
    ${emp.ename} : ${emp.job}
    </li>
    </ul>
  6. From the command prompt, run
    python start-myProjectName.py
  7. Point a browser at http://localhost:8080/emps
There - you're listing data from SCOTT.EMP!

You can, of course, manually define the columns of your tables; using autoload is simply more convenient and error-proof. It'll only work against tables that have a primary key, though. If you don't use autoload, you don't need to call bind_meta_data in model.py.

TurboGears has recently added SQLAlchemy, as an alternative to SQLObject, for its database-access layer. I don't know much about their relative merits, but it seems like SQLAlchemy may be more friendly to a database-centered (as opposed to object-programming-centered) point of view. In any case, SQLAlchemy has Oracle support, whereas SQLObject's Oracle support still hasn't been integrated into the main codebase. Thus, I'm using the SQLAlchemy flavor of TurboGears.

Tuesday, October 31, 2006

Oracle Net unaccountability

I have a complaint. After seven years of Oracle experience, ORA-12154: TNS:could not resolve the connect identifier specified ought to be in my past.

I installed a standard Oracle 10.2 client on a fresh, new machine, only to find that the sqlplus.exe in {ORACLE_HOME}/bin was not looking in {ORACLE_HOME}/network/admin for its TNSNAMES.ORA. I don't know where it was looking, or why. I searched for any of those annoying stray TNSNAMES.ORA files, and there weren't any, but that doesn't mean that Oracle Net wasn't looking for TNSNAMES in all the wrong places. I eventually gave up and set the TNS_ADMIN environment variable, but that was an unsatisfying brute-force solution; I want to know why SQLPLUS wasn't looking in the standard place in its own home for TNSNAMES.ORA, but apparently I'll never know.

The problem is that Oracle Net gives you no feedback about what went wrong when something goes wrong. Did it find a TNSNAMES.ORA, but hit a syntax error in it? Did it find a TNSNAMES.ORA, but not the one you expected it to? Did it not find a TNSNAMES.ORA at all? Well, you'll just have to guess. Yes, you can trace Oracle Net; you need to insert directives like TRACE_LEVEL_CLIENT=user and TRACE_DIRECTORY_CLIENT into SQLNET.ORA. Ah, but which SQLNET.ORA? Well, that's the problem - if Oracle Net isn't looking where you expect it to for TNSNAMES.ORA, it won't see your SQLNET.ORA either.

It was a big improvement when TNSPING was upgraded to report on which SQLNET.ORA it was using. (And, indeed, in my case, TNSPING reported that it was using {ORACLE_HOME}/network/admin/sqlnet.ora, as you would expect, which is probably why TNSPING could resolve my service names just fine.) We really need a similar improvement in Oracle Net in general - some troubleshooting information that's transmitted in the error message every time TNS resolution fails.

Have I simply missed the memo on some good way to troubleshoot these problems? If you know of one, please let me know.

While researching it, I did find a pretty nice resource - ora-code.com. Their ORA-12154 page is a more concise and relevant checklist than anything I know of on MetaLink. Unfortunately, they lack a search box, so the best way to find their pages is simply to Google for "ora-code 12154".

There. Now if Oracle magazine ever asks me "what one improvement I'd like to see in Oracle", I have my answer ready. That and PL/Python, of course.

Sunday, October 22, 2006

resetPwd.py

I just posted a little script at http://sqlwrappy.sourceforge.net/resetPwd.py for password changing; a full description is at http://sqlwrappy.sourceforge.net/resetPwd.html. You may like to use it / borrow from it if
  • You need to provide for nontechnical users who must field "Can you reset my password?" requests (the designed purpose)
  • You want a relatively robust command-line way to collect Oracle account login information
  • You want to crib code for a command-line pick-from-this-list loop
I packaged it into the 0.1.2 release of sqlWrap.py, too.

Friday, October 20, 2006

The destructive power of stereotypes

I hope that this study receives all the attention it deserves.

"Women exposed to bogus scientific theories linking their gender to poor math skills did worse on arithmetic tests than others..."

This is why people who care get so upset about "harmless personal opinions" about women being inherently worse at acience/math. They're not harmless. They push women away from technical excellence. Yes, that bothers me, and no passive-aggressive whining about "political correctness" will make me accept it in demure silence.

It's especially remarkable that the study showed an easily measurable effect of just one claim of male superiority. Now imagine the cumulative effect of hearing such claims, again and again, over an entire lifetime... it's no wonder that the women who do end up in technology are the exceptionally flinty ones.

Sunday, October 08, 2006

meaning of LAMP

Among the great things I learned at Ohio LinuxFest came from Jeff Waugh's talk. I bet you've seen that LAMP acronym around, and wondered what it stood for.

Linux
Apache
Most scripting languages begin with "P"
PostgreSQL

Now, that makes a lot more sense.

Monday, October 02, 2006

Oracle BoF at LinuxFest

Thank God, the babysitter, and a wonderful spouse, I did get to go to Ohio LinuxFest after all. Hooray!

With one talk each on MySQL and PostgreSQL, it was a good day for database enthusiasts. Maybe that's why I saw quite a few Oracle users there.

The organizers also invited attendees to put together impromptu Birds-of-a-Feather (BoF) sessions. I was tempted to throw together one for Oracle, but I felt like my impromptu idea needed more preparation... I wanted to have a list of topics to seed discussion if it drags.

So, what kind of topics would you suggest for an Oracle-Linux BoF? Here are some that occurred to me.
  • Experiences with Oracle on various Linux distributions
  • Oracle's ancient Apache 1.3 HTTPServer; is it ever going to get to 2.0? Can you get mod_plsql working on Apache 2.0?
  • Open-source SQL*Plus alternatives (actually, someday I hope to talk at OOUG on this)
  • Experiences with RAC on Linux, Oracle Cluster File System, etc.?
Please, add topics to this list! And, if you're going to be at next year's Ohio LinuxFest, come be part of an OraBoF!