XML Article without the XML

My latest article for David Mertz’s column XML Matters is up at IBM developerWorks: Lighter than microformats: Picoformats Ajax without X, Microformats without angle brackets went live a couple of days ago. It isn’t so much about XML as how to avoid XML. My feelings towards XML are that it is useful and good, but overused and not a panacea. By providing some alternatives, maybe some of the backlash against the “XML everywhere for everything” meme can be averted.

I’ve been meaning to post about the article, but I keep getting caught up preparing my presentation for the Vancouver Python Workshop on Saturday (the workshop starts Friday August 3rd and goes through Sunday August 5th). My talk this year is on using [PyObjC] to create applications and plugins for OS X using Python. I’ll get the slides up after, as soon as I can. I’m also planning on doing a shorter version of this talk at Bar Camp Vancouver which is 6 pm Friday, August 25 to 6 pm Saturday, August 26.

And I should have mentioned the Google talk at the Vancouver High Performance Computing User Group before it happened on July 27th. Narayanan ‘Shiva’ Shivakumar came up from their Seattle office to present mostly old information from their published papers such as The Google File System, MapReduce, and BigTable (video). The talk over beers after was fun, and it was good to see my friend Mark and find out he has a blog, even if it’s over my head much of the time.

Well, that’s my update dump. More stuff on actually using PyObjC coming Real Soon Now.

PySight Preview

Awhile back I promised a bunch of posts, but delays were made (including a month of vacation travelling around BC which I won’t apologize for). One of the promised projects I was going to talk about was PySight, which ought to be simple, since it’s just a trivial wrapper around Tim Omernick’s CocoaSequenceGrabber (used with his permission). But I wanted to package it nicely, write more example code, maybe some documentation.

So instead of a polished project I have no project, and finishing it is pretty low on my priorities right now, sad to say.

Fortunately, Robbie Tingey came to the rescue and prompted me about it. I put a zip file together with Tim’s code to create a framework, his example program to use the framework, my simple wrapper, and my re-write of Tim’s example program in python using PyObjC to show how to use this. There’s a README, but not much else. I sent Robbie the URL and he tried it out successfully, so I thought I’d toss it out to the rest of the world. Caveat emptor, this is pre-alpha, no guarantees, no promises, but hey, it “Works for me™.”

So if you’re feeling adventurous, go ahead and try out PySight (74K Zip) and start grabbing data from your iSight camera from Python. Contributions to packaging it nicely, documenting it, or adding examples are gratefully accepted. Or, just bug me about it and I’ll see what I can do to move it up my priority list.

Python, meet iSight. iSight, meet Python. Play nice together now.

[Update: I forgot the link. Thanks, Marcia!]

Happiness is a Warm Tiger

My copy of Mac OS 10.4 arrived Friday, right on schedule. I spent the weekend backing up my laptop, doing a clean install, and then restoring my data, which also fixed the problem I’ve been having where applications take a really long time to launch. No problems so far and performance is noticeably faster. You gotta love an OS where each update makes your existing hardware faster.

First impressions: Spotlight searching really is as fast as they claim, Dashboard is neat in a gee-whiz sort of way, but I’m not sure how much I’ll actually use it. The built-in dictionary and thesaurus are welcome additions. I’m sure with time I will come to use smart folders in both the Finder and Mail. But for me the real juice in this version is underneath the hood in the development tools.

I’ve had a few secret hopes for Tiger, for things which have not been announced, but might be slipped under the door. Three of them were: NSOutlineView gaining support for varying row height (to make it easier to write applications like OmniOutline), improved Cocoa support for QuickTime, and being able to round-trip Nibs to text format and back via nibtool. Well, two out of three ain’t bad. The NSOutline now supports row height via it’s delegate method heightOfRow:ofItem:, the QTKit framework provides excellent support for QuickTime media from Cocoa (and thus from PyObjC), but alas, nibs cannot be created from text input via nibtool (or any other tool that I’m aware of), although the nibtool man page does at least list this deficiency as a known bug.

But there is more good news in the Core Image, Core Audio, and Core Data frameworks. Core Image gives fast, powerful graphic processing and pipelining tools for both still images and video. Core Audio does the same for sound. And while Mac development in the Model-View-Controller (MVC) has been supported via Interface Builder (View), NSArrayController and NSObjectController (Controller), now with Core Data the Model portion is fully supported as well. Bill Bumgarner has a welcome example on his blog of how to use CoreData from Python.

But wait, there’s more! There’s an NSTreeController to go along with the NSArrayController and friends. There are hooks and documentation for many more of the Apple-supplied applications, including the new Sync Services. And PyObjC now has wrappers for Core Data, Automator, XGrid, and Sync Services. And that’s not to mention the improved WebKit, new features of NSTextView, and much more. It’s a great time to be a Mac developer, and being able to do all this from Python really ices the cake for me.

Coming attractions

I’m slowly making progress on ZenPaint, a simple animation tool for kids. I started writing it using PyGame, but hit the wall in terms of display, having to redefine my own widgets, etc. So I’ve taken a couple of step back and now I’m working on it using PyObjC. I keep waffling back and forth on whether to use Interface Builder or not. I don’t find Interface Builder very intuitive at all, but maybe I need to buckle down and get good at it. Knowing about nibtool helps–at least I can do text diffs and simple renames from the command-line.

One thing I would like to point out, the Apple NSDocument FAQ is one of the best bits of documentation I’ve ever seen out of Apple. So I’m mentally translating it into Python and trying to apply it to ZenPaint. As soon as I can load and save files reliably I’ll post the program and code up here for comments.

Slides up

After much delay, my slides are finally up from the VanPyZ talk last week.

Using Python and Cocoa on OS X

Again I’m using Eric Meyer’s S5 tool for HTML slides, but it still ends up being a large download because it includes a completely unneccesary quicktime movie. My daughter and I have been playing with iStopMotion and this was one of our first forays into claymation.

The reason it’s in the slideshow, is that movie making is now completely accessible to an eight-year-old, and I want to writing games and other programs equally accessible to her.

Still a ways to go…

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »

google

google

asus