elfs: (Default)
[personal profile] elfs
So, this morning, after sending out three resumes and scanning the job boards hopefully and doing all that I'm supposed to do to keep unemployment insurance coming and find a job, I turned my attention to SecretProject, which ain't all that much secret but kinda is...

Anyway.

I managed to get to a couple of major milestones: First, I now have nested sets working with an establish heirarchy of labels for the nested sets. Think XML object heirachies with an established DTD, only being maintained in an RDBMS; the large blobs at the cores of each nested set, like the leafs of a tree data structure, are stored in a pair of separate tables, one for the leaf metadata with a one-to-one relationship with the other one that holds the Big Doc. This didn't require generics, as I feared it would. Instead, it's: Documents belong to Containers. Each container belongs to a User. Each container may also belong to (be nested within) a parent container. A class rule establishes that there exists one and only one Root Container for each User. Even better, there's a heirarchy of container types, and a classmethod associated with the Container class to render this heirarchy: "If I have a container of label type X, it may only contain containers of label type Y and Z", and so on, making rendering to the screen simple. Nifty, and fun. It makes insertions modestly expensive, but lookups are exceptionally cheap.

Sometimes, I'm convinced that the "Rails Magic" is overblown. You don't need both the "has many" as "belongs to" relationships; just make both available through the code. And the magic pluralization? Completely unnecessary. In Rails, you have to memorize what the pluralization and CamelCasing rules are for your objects. In Django, it's simple: there aren't any. If you need an object set off an existing object, you write ClassName.object_set. Not stupid at all.

That's on the Django side. On the Javascript side, I have a basic installation of TinyMCE, the nifty little WYSIWYG HTML editor that's at the heart of a lot of applications, most notably WordPress. It's LGPL, which makes me happy, and it has a metric gigaton of features. I have standard WYSIWYG working, page resizing, full screen, and localized spell checking.

After getting all this working, I said, "Hey, let me try to upload a document and see if it saves correctly." So I ran it. It didn't work. I tried it again. Didn't work. And it didn't work because... I hadn't written the save() routine, because the one-to-one relationship wasn't done yet.

Duh.

Back to the mines. See, this is why I like cucumber. It keeps me from doing stoopid stuff like this.

Date: 2009-05-06 10:33 pm (UTC)
From: (Anonymous)
Probably you've seen this already, but Djangogigs.com has some positions including some remote work. Not nearly as many as last time I looked, but some.

Profile

elfs: (Default)
Elf Sternberg

December 2025

S M T W T F S
 12345 6
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 31st, 2025 02:30 am
Powered by Dreamwidth Studios