Javascript SVG renderer

So, I’ve been playing a lot with how to draw arbitrary shapes in javascript for a project I’ve been working on. SVG and are both options, but poor options, as neither has great browser support. SVG loks the most promising, as it’s xml, very featureful, and integrates well into the who xhtml paradigm.

The question is, how can you use it now, before the browsers get native SVG support. The adobe plugin is an option, but anything that requires users to download a plugin is relatively worthless in the general internet sphere.

However, why not write an SVG renderer in javascript? It seems like all the pieces are there. Javascript has a good xml parser, and it can output arbitrary raster graphics, via somewhat nasty html/css hacks. You can draw an arbitrary raster image by simply using many 1 pixel div tags.

To go a step further, Walter Zorn’s javascript vector graphics library already has basic vector graphics functions (polylines, ovals, lines, etc), using thse same div hacks. This could be extended or built on to get full svg functionality.

Form validation gone wrong, or while T-Mobile tech support sucks

So, this summer I bought a blackberry. It’s nifty, and since I can get email on it, I now get viagra spam wherever I am. What more could I ask for in a handheld device?

Part of getting the blackberry meant switching to T-Mobile (so I could get a $150 gift certificate with Amazon, which I used to buy most of my wishlist). In doing so, I setup my online T-Mobile account, so I could pay my bill online. Nifty. The password I picked has a comma in it. The registration process let me pick it without a problem. However, when I go to log in, the form returns with an error message stating “Please do not use a space or ‘ or or ; in your password”. Never mind the fact THAT MY PASSWORD HAS A COMMA IN IT! So you’ll let me choose it as my password, just as long as I don’t actually try and login with it.

So, there’s a link beneath this error message saying “Forgot your password?” Hmm, I’ll try clicking on that, and see if maybe they’ll let me reset it. No dice, they just send me the password with the comma. Bastards.

So I call customer support. The lady on the other end of the phone seems to think my account is locked, despite my assurance that she’s going to need to change my password so their stupid web form will let me in. She can’t change passwords.

But tech support can. So she transfers me there. “The current wait time for the next representative exceeds three hours.” You’ve GOT to be kidding me. Maybe this is a sign you need to hire more tech support people. Or at least smarter programmers.

Then I notice a link on the front page of t-mobile.com: “Personalized online support”. Only, when you click on the link, IT WANTS YOU TO LOGIN! Using a password. The one with the comma. The one that it won’t allow.

Bastards.

Google Reader

So, I’ve been playing with Google Reader a bit, and overall, it’s another slick Google AJAX app. However, I agree with Les over at OxDECAFBAD that it doesn’t really meet the needs of people who are used to reading lots and lots of feeds:

Anyway, what I look for in a feed reader is how well it enables speed skimming: I’m going to ignore 70-90% of what I see in feeds, so I don’t want an aggregator which helps me carefully and methodically pick my way across the headlines.No, I want something which lets me scream through feeds as fast as my eyes can move and a finger can slap the space bar. I’ll queue up what I really want to read in browser tabs or some other temporary storage, but I’m not going to want to spend more than a split second on a headline.

I think the biggest thing missing is a sense of overall context. You can only view 8 headlines at a time, and by default, you see all your feedsd aggregated together. Heck, I get far more feed content than email, and I can view way more subject lines in gmail, or any other email or feed reader. The net effect is that it feels like you’re looking at your feeds through a tiny pinhole, when you really want a firehose.

I did notice something interesting about Google Reader, though. It seems to be showing me entries for feeds that I don’t subscribe to. I can’t tell whether this is a bug or a feature, but I’m voting for the latter, as they seem to be stuff I’d be interested in (weblogs.oreilly.com, for one). Maybe they’re doing cool collaborative filtering stuff? It’s not clear.

iPhoto books for my travel photos

I’m thinking I’d really like to finally get off my butt, and put together a nice hardcover book of all my travel photos, if for nothing else, as something for me to have, and to show to people who want to know more about my travels. I was thinking maybe one book for “Australia”:http://scottyallen.com/cgi-bin/indexer.pl/travel/australia, one for “Asia”:http://scottyallen.com/cgi-bin/indexer.pl/travel/seasia, and one for “Mexico”:http://scottyallen.com/cgi-bin/indexer.pl/travel/mexico/chihuahua. Or maybe just one for each trip. We’ll see…I was also thinking I should include excerpts from my dairy as captions and text. We’ll have to see how that works out.

BTW, this is a test of posting to my moveable type blog directly from 43things.com, which is a novel way to let me own my data.

Class::DBI woes

I learned about Class::DBI over the summer, and have really come to love it. Well, almost. The idea is that it’s an OO to RDMS mapper. And a really slick one at that. You basically tell it what table an object should be linked to, and what fields that table has, and what other objects are foreign keys on that table, and it creates all the basic RDMS methods you would want, from create and delete, to search, to getters and setters, to you name it.

However, I’ve been tearing my hair out for several days now with some really nasty problems with it. I’m trying to do something that’s a bit funky, and Class::DBI is making it that much worse.

Basically, I’m trying to do some node/association stuff. So I’ve got one node table, and one association table, with some periphery tables with one-to-one relationships with the main two tables, which provide extra fields for specific node types. So, for instance, there’s a user node, which has a seperate user table.

On the OO side of things, there’s a Node object, and a User object which inherits from Node. The idea is that the User object is a specialized version of a Node row, one in which the type field is set to ‘user’, and for which there’s a matching row in the user table. There’s some special magic using triggers, which reblesses objects into the right subclass when they get hydrated out of the database, as well as some more trigger magic which sets the type field properly.

The problem really stems from the fact that Class::DBI uses Class::Data::Inheritable to store trigger information. The HasA and MightHave relationships use triggers to do inflation properly (so that a createdby foreign key field becomes a User object when the node is hydrated). All the trigger information is stored in a single Class::Data::Inheritable accessor (__triggers).

Class::Data::Inheritable is built such that if a subclass changes the data, it gets it’s own, seperate copy. This is a problem for me, because the various initialization code doesn’t always get called in the same order, and definitely not in an order I have very good control over. Thus, if the User object sets a trigger before the Node object finished setting it’s triggers, the User object never inherits the all of the necessary triggers. Which really sucks.

And it took me many, many hours to figure this out. I guess the upshot is that I now know far more about the perl compilation process than I probably will ever need to again.

43 Things

I discovered 43 Things just yesterday, via some blog posting which I can’t seem to find now. It’s an interesting twist on the new social networking sites, and is particularly interesting, as it seems focused on getting things done, rather than just wasting time. This is one of those tools that makes me feel hopeful about the human race, and that some portion of it isn’t completely doomed to consumerism.

On growing community sites

So, I’m reading Guy Steele’s paper Growing a Language for my Principles of Programming Languages class. It’s a fairly interesting paper on how to go about designing a programming language with growth in mind, and how to manage that growth.

But what really struck a chord with me was when he started talking about ESR’s “The Cathedral and the Bazaar”, as it relates to programming languages. He cites a quotes from Christopher Alexander:

Master plans have two additional unhealthy characteristics. To begin with, the existence of a master plan alienates the users… After all, the very existence of a master plan means, by definition, that the members of the community can have little impact on the future shape of their community, because most of the important decisions have already been made. In a sense, under a master plan people are living with a frozen future, able to affect only relatively trivial details. When people lose the sense of responsibility for the envrionemnt they live in, and realize that they are merely cogs in someone else’s machine, how can they feel any sense of identification with the community, or any sense of purpose there?

It occured to me that a lot of community based sites and projects, even if not being open source, are really operating largely in a bazaar fasion. Think of six apart, Technorati, and flickr for some examples. They all take a large amount of input from their users when deciding on a new direction. They also tend to come to the table with a pattern to fit user desires and needs in, not a master plan to cram down their users throats.

This is a huge paradigm shift for me. It means that the rules “release early, release often” apply not only to software you ship, but web tools as well. Get it out there as quickly as humanly possible, missing features and bugs be damned. And then let user interaction and feedback drive your efforts.

Also, Steele’s paper is pretty fun, because he only allows himself to use multisyllable words if he defines them first (using either single syllable words, or words he’s already defined).

Persistent searches and watches

After some heated discussions with Jack Krupansky about how to search for data, and how to find information that we may not necessarily be looking for, but will find interesting, I’ve been thinking a lot about searching and filtering on the internet.

What I realized I have a need for, is a way to do persistent searches, and places watches for certain data. For instance, I did a search a while back for a network driver for my 12″ apple powerbook’s apple extreme wifi card that would allo wme to set the card in promiscuous mode. There currently doesn’t seem to be such a thing. But there might be in the future. And I would love to be notified of such a thing in the future.

Chris alerted me to the existance of Feedster, which allows you to do basically exactly what I want, though it only searches blogs. Basically, you can run searches on blogs, and then get an rss feed of the search results, which update realtime. Pretty slick, though it’d be a lot better if it wasn’t restricted to just blogs.

I’ve also been toying with the thought of resurrecting my “html diff” tool, which allowed for watching a page for “significant” updates (defined as changes in the page content that weren’t randomized per page load, such as ads or quotes or such). It would be a cool way to place “watches” on certain pages that may not be updated very often. Hmm… I think I could probably even do an rss feed of it pretty easily.

An example use would be to place a watch on a page that described a software version number, to be notified when the software was updated. I’m sure there are tons of uses I’m not thinking of.

EntConnect

I spent the better part of the weekend at EntConnect, a conference for entrepeneurs down in Denver. It was small (probably 30-40 people max), but interesting, as people came from all walks of life, from play publishers, to elderly private detectives, to PIC chip development tool programmers.

Going into it, I thought it would be very technical,a bunch of geeks, well, being geeks. It wasn’t. By and far, the focus was on the business side of being an entrepeneur. Which isn’t to say there weren’t a lot of geeks there, doing geeky things. But, somewhat by nature of the diversity of the group, the focus of the talks,a nd much of the focus of the adhoc discussions inbetween centered around the business issues involved with owning and running a business.

While not all of the talks proved valuable to me (I don’t really sell a product, so discussions such as how to claim R&D time as tax credits aren’t immediately relevant), I did find some really valuable tidbits:

  • Am I trying to build a lifestyle company, or a wealth company? One interesting measure of this is: company value - me >= 0. In my case, no I don’t think it is, not right now anyway. But maybe I’m ok with that.
  • I need to put together a clean, standard consulting contract. I head too many ugly stories of lawsuits and people not getting paid.
  • Once a month, bug someone more successful than you breakfast, lunch, or dinner, their choice. This is an interesting way of having mentors, without choosing just one.

I think that’s all for now. I’m off to the components lab now, to attempt to exist in the other part of my life now.

Electing with clicks

Last night I managed to drag Alex up the hill to NCAR to go to the bimonthly RMIUG talk - Electing with Clicks: The impact of the Internet on Politics today. It was quite interesting. The two men that spoke, Matt Statman of Motive Design+Interactive(the design company that did the DeanForAmerica.org website) and Bobby Clark, a recent alumnus of Dean for America, talked about the process of creating Dean’s online presence.

The talk focused largely on their “branding strategy”, and how they focused on creating an online presence for Dean in a similar manner to one created for a product or company. I think for me, the most interesting part was the discussion about how they dealt with two way communication - people posting comments to the blog, creating fan websites, contributing software, etc. They’re policy, pretty much from day one, was to embrace it. They weren’t worried about linking to pro-Dean blogs that might post something controversial, or deleting comments to the blog that were intentionally inflamatory. Instead, they focused on building on the momentum, even if it meant a few glitches along the way.

This building on momentum carried over to the content they created as well. Rather than constantly focusing on getting each little piece perfect, they looked more at the big picture, and just kept on moving.

I think the most amusing part of the talk, though, was the screenshots they showed of the initial website proposal that Motive did. Since Motive, nor the campaign at the time, had any pictures of Dean to work with, they instead used images of Martin Sheen taken from West Wing for the website mockup. Very clever, and hilarious.

Read on for the rest of the notes I jotted down during the talk.
(more…)