Saturday, July 28, 2007

Dear people at the firefox booth at OSCON

This is a fox. This is a red panda. I can imagine that these could be easily confused by the casual observer. While my daughter thinks the plush toy that I purchased at your booth is adorable, I feel it is my duty to point out that most if not all of the people who purchased these toys thought they were getting a fox. A firefox. I'm not planning to press this issue farther at this point, but I think it's important that you recognize this misleading maneuver and apologize publicly. Or send me another one for free for my son. :)

(OK, I've just learned that a firefox IS a red panda. But you have to admit that ALL firefox art work depicts a "normal" fox. But still I deserve another free firefox....)

Friday, July 27, 2007

Python and Data Structures

I've been really lucky finding exact matches for some of my wishes recently. For instance I decided to start working in a methodical manner to keep my CS skills strong and up to date. I've always had little fun learning projects going but I want to be more organized and consistent about it.

As a first project I was thinking of taking the Weiss algorithms and data structures in C book and do it all in python. It turns out that (a) it's really hard to write good library code from scratch. And I didn't want to spend my limited time doing that and not learning much matierial. (b) I'd rather learn from someone who knows what they are doing (e.g. well thought out pythonic code instead of my sad ports of C to python code).

The solution was: Data Structures and Algorithms with Object-Oriented Design Patterns in Python. It is so exactly what I was looking for that it's scary.

Any way if you are interested in learning or relearning OO design ideas and/or algo/data structures and you want to use python (or ruby, c#, etc) you could do a lot worse than this (family of) book(s).

OSCON notes

- One of the highlights for me was a panel discussion at Powell's Technical book store with some of the authors of the book "Beautiful Code". Besides just being interesting to put some names with faces it was really fun to see some famous programmers talk about code they found beautiful. It was sort of like watching people who have been given an opportunity to talk about how awesome their children are.

As a side note there was sort of a heated exchanged between the developers of svn and one of the lead developers of perl (chromatic). It some how surprisingly came down to an argument over whether lisp was beautiful and whether perl was like the only language that one could write the programming equivalent of Finnegan's Wake. And then something about getting tattoos with perl code. Etc. The content of the discussion was pretty interesting but just seeing that these were real people who don't necessarily think that you are awesome simply because you are an open source developer was a bit enlightening.

- I was very disappointed to that Damian Conway didn't speak this year. After first seeing his perl in klingon talk a few years ago, I've been hooked. Almost makes me want to rediscover my perl roots. Almost.

- On the other hand it was interesting to finally see Steve Yegge talk in person. His powerpoint slides crapped out but he gave pretty interesting talk on the importance of product positioning. Much more interesting than it sounds. And NBL is javascript2 if that wasn't already obvious.

- Giles Bowkett gave a rehash of his seaside presentation which is available from his web site. I was excited when he started the talk because he was actually up there going thru code, but then he fell back to his prepared talk. The talk was interesting, but was more marketing than reasoned argument for the wonders of seaside.

- I saw two talks by Simon Peyton Jones on parallelism and memory management using haskell. Here's a case where the personality of the person was a bit surprising to me. He was the most friendly and ebullient yet soft spoken and modest speaker I've seen so far at OSCON this year. Quite in contrast to haskell which makes me cry when I try to use it. But I keep trying.

- overcoming bias. I had recently discovered this web site (I think thru oreilly radar) so it was interesting so see one of the bloggers from there speak. I've been thinking alot lately about how you can detect biases in your self and other and how to systematically recognize and overcome them. So it it's pretty uncanny (to me) that there is a site about this and I got to see a talk on this. The universe is trying to tell me something....

- State of the Onion: Always interesting to hear Larry Wall speak. Once again I can't help to be intrigued by perl to hear it described, but I'm always a little horrified when I do. his talk was basically a tour of the features and concerns that a language designer must consider. it seems that perl 6 (if it is ever released) will be the kitchen sink of all kitchen sinks. Interestingly his talk was not given the focus it usually does and was just given in a well packed conference room rather than the central meeting area.

Thursday, July 26, 2007

django's newforms

I've been anxiously awaiting for a long time for the newforms documentation to show up in the on line beta of the django book. It's still not there so I took matters into my own hands and did the unthinkable: I read the documentation on the django site. I know, I know, what sort of loser reads the documentation?  Desparate times call for desperate measures friends.

Anyway I think the use and function of newforms has finally settled in my brain.  Partly because I copied someones example a few months back and got it working though I didn't thoroughly understand it.  Partly because I read thru the documentation for the 3rd time. And party because I read through the unit test code for newforms.

Any way my issue was that I was trying to clone an existing object. The breakthrough was realizing that I could call form.save(commit=False) so that I could intercept the resulting model instance and set the id = None before saving it so i didn't update the original object in anyway.

I just may get the hang of this django thing one of these days...

Greetings from OSCON

I'm sitting here at geek central and I've decided it's as good a time as any to start my tech/geek/whatever blog.  So here goes.

Mostly this will be a brain dump of things I'm working on or learning and other random observations of the world.