Shopped
Working at Yellowbook has taught me the importance of a good photoshop. Normally I don’t pay much heed to admonitions that “you have to visualize success”, but I have found that I can visualize it real good if I make a sufficiently epic picture using the web and/or MS Paint.

Shopped version of a classic XKCD. Yay CC licensing!
Guess what I’m working on today.
Which Describes How You're Feeling All The Time
There’s this guy in the sky and he makes you want to
Want to make you sigh, like the time
When you felt like you’re feeling all the time
(lyrics: They Might Be Giants)
Randall is my poet hero.
In actual news, Ray’s here for the week, I got me another job interview, and I learned how to use GeSHi for syntax highlighting (it is blissfully easy). Tomorrow I’ll see about integrating it with documentation, and making the colors not suck.
Stuff Gets Done
There’ve been some faint rumblings recently from JavaScript Kids. You might ask, “Why?” Go on, ask. Okay don’t ask, I’ll tell you anyway.
I take some pride in my ability to handle the frustration of my ambitions, but rejections begin to grow tiresome when you realize how much power upper-level executives have to negate the hard-won rapport and confidence of the interview team, just by nitpicking. Often these nits that are being picked seem to have something to do with any of a familiar set of acronyms, the utterance of which will sound like the name of some next-door neighbor who is a lovely person but has funky body odor. XML was one of these acronyms for me, until I learned my way around it and began using XSLT for skinning at work. Ditto for AJAX. The current problem neighbor seems to be SQL however, and I’ll be honest, it’s taken me some time to come up with the excuse (and the cajones) to ring the doorbell and get friendly with it.
Nothin’ wrong with SQL. It’s an elegant solution to an inelegant problem, even if the convention to put keywords in allcaps makes it grate on the ears of the uninitiated. It’s just that… it lives way the hell back there in the ghetto of Implementation where us designer types usually don’t venture at night. If you’re buyin’ what he’s selling–and if you’re into blogging and serialized content, you are–you don’t have much of a choice. I wrote a couple tables in PHPMyAdmin in anticipation of adding RSS content to JavaScript Kids, and a deserializer containing literally two lines of SQL code (and it works!); I’m really kind of excited about the possibilities. As Nikki said, learning the language is going to be no big deal, so when someone implies otherwise, I take it as a challenge. And as an excuse to get off my butt.
In non-coding news, I’m a bit more moved in now, I bought a vacuum cleaner so I can neaten this place up from all the rice that’s been recently spilled; while I was out, I came dangerously close to buying a new 802.11N router (fsck, they’re cheap!), and admired Rock Band and Bioshock from afar. Before he left, Yongmin explained to me how to make bulgogi, which I totally botched on my first attempt–please note that, unlike with okonomiyaki, it matters a lot what kind of meat you use–his was good enough that I’m willing to give it a second try sometime, if anybody wants a piece of that. If you don’t trust me we could just go to Le’s for Vietnamese–Ginneh took us there Wednesday and it was amazing. Yummy.
So that’s all I got for now. I think. I’ve been having a lot of trouble recently with lists of things–i.e., I have been to the hardware store three times this week, and the grocery store four times, because I didn’t think of everything I needed. Let me know if you’re interested in:
- Dragging me out of the house to something diverting this weekend
- Seeing the house / lending a hand with setup / eating my food and drinking my booze
- Forming a band the likes of which has never been seen before
- Brainstorming names for the house
- <item missing>
- Pony
- Some linguistic tomfoolery involving subsets of the SQL grammar
- Helping me obtain a TV with which to resume my FPS habit
Adventures in E-Government Usability
Today I completed my state and federal returns for 2007, and since I haven’t had to file since 2005 when we weren’t all on the bandwagon yet, this was my first chance to experience the triumph of eGovernment that is IRS E-filing. Choosing one of the many free-to-paid online tax return services seemed pretty arbitrary, so I ended up going with the one my family used. The front page was very busy-looking, and of course decked out with all those little icons saying “you can trust us!” which few people understand well enough to actually distinguish site fraud, but whatever. I linked there directly from the IRS, and the SSL certificates were in order.
I started up an account, logged in and started working through the basics. Apart from poking me repeatedly with a stick, asking “Do you want our fine, fine premium services?” it seemed friendly enough, but I soon ran into a wall when I discovered that after skipping through some of these notices, their fancy-schmancy Ajax application would nonchalantly redirect me back to the very beginning. This made certain vital sections of the data entry process impossible to reach. Clever navigational strategies got me a bit further, but eventually it dawned on me that this was absolutely unworkable, probably around the time I was trying and failing (again) to actually find a place to insert the monetary details of my skeletal MathWorks W2.
Out of desperation, and a sneaking suspicion that the site developers were idiots, I logged out in Firefox and fired up the website in IE7. I retraced my steps, and Lo, the thing suddenly worked like a charm. Now it bothers me somewhat to discover there are people who still don’t write their apps to work in multiple browsers, but that wasn’t the real issue here. What really drove me insane was that they’d provided specific instructions for using the site in Netscape, Firefox and IE. Right down to how to disable pop-up blocking for the site. So clearly they had the target in mind; God only knows where in the deployment process they dropped the ball or gave up on us non-IE-using rebels.
Once I’d finished venting over this, the process went fairly quickly. I didn’t file for free, since I had state taxes to file and hoped the slight extra cost of Deluxe filing would take their software out of idiotic mode. Mostly this meant I got some extra advice that didn’t apply to me anyway, but no matter. The thing’s over with, I’m in the black overall by roughly the amount of my economic stimulus credit, and I can move on with my life.
I recall having a somewhat loftier vision of electronic government when I first considered its manifold possibilities. We’ve got the convenience part down, more or less; now we should be concerning ourselves with the transparency and equity parts. I think the (unsurprising) assumption that because e-commerce and tax filing tend to be private sector affairs, e-filing should too, may be a mistake. They still place a lot of record-keeping and data transfer burden directly on the user, and they don’t present the kind of consistent user experience that is definitely possible. When I think of what’s wrong with this process, I also think of what’s wrong with health care, and how projects like Indivo and Dossia could be a step in the right direction. By a similar virtue, I think a comprehensive reference implementation of basic e-file services would make everyone’s lives easier and help the IRS convince more people to switch over.
Incidentally, I also got to check out the process recently for electronically filing unemployment insurance claims in the state of Massachusetts. This service is provided directly by the state, through the department of workforce development. Aside from the fact that it is needlessly Ajaxy (but who isn’t these days), I’m pretty happy with the service. It’s simple, clean, and powerful enough to tell you what you want to know. What issues it does have are quirks that strike me as probably bureaucratic in origin: you have to initially sign up by phone to get the PIN with which to create your account, and then you can only do useful things with the system during operating hours (7AM to 7PM). Since this is the very definition of an automated system, it’s silly to give it business hours. But what the heck, I can live with that.
Web stuff: Akismet, JSONP
Meant to post something about this the other night, when I got distracted by the latest Questionable Content. First, a shout to bob.pythonmac.org, which proposes an ad-hoc standard for JSON Padded requests (JSONP). Like most interesting and useful things on the web, it was proposed two years ago, and only now have I run across it in places like the Facebook API docs at developer.facebook.com.
Looking at this, I realized that problem being addressed is exactly the same as one I have wrestled with for some time. Script includes, and JSON metadata in particular, are impeded in terms of usefulness by the difficulty in getting the contents to actually do what you want them to. Pure JSON merely states values, it doesn’t make assignments, necessitating an arbitrary wrapper of some kind that spoon-feeds the data into the page (and is not itself valid JSON). By a similar virtue, JavaScript containing var and function statements can be fruitful, but they all get thrown into the global namespace unless you mask them with a Crockford wrapper or specify an existing object to bind them to. In very few other programming environments do people have to settle for this kind of repetitious nonsense:
mystuff = window.mystuff || {};
mystuff.newmethod = function() {};
mystuff.newclass = {
“some”:null,
“more”:null,
“bull”:null,
“shit”:null
};
It’s egregious and disgusting. But for cross-domain applications and quick scripting hacks you usually don’t have much choice.
The beauty of JSONP (which, due to my earliest computer science learnings and my familiarity with the Jargon File, always makes me think JSON predicate (to JSON, or not to JSON?)) is that it allows the browser to continue to interpret JavaScript at this level, while allowing backend services and stored JSON objects to ignore the extra fluff. To supply the fluff, you call a REST-style web service on top of the JSON service you want; and you hand it an extra argument specifying some code to prefix to the response.
I did something very similar once at work, and it seemed pretty slick. This proposal avoids some of the wrinkles, but at the same time I wonder if it might be too simple to capture the power of the idea. Prepending code is very URL-hack-friendly (not a bad thing in this case) but it also feels disorganized. Six months ago I probably wouldn’t have seen anything wrong with it, but here’s the thing. A standard is most useful when it not only does what people need it to do, it suggests its proper place in the scheme of things.
In this case, while it may be cool that you could shove an alert() statement (or whatever the hell else you like) in there before the code runs, chiefly that’s not what it’s for. You prepend so you can assign the returned value somewhere; you wrap so that you can run in a more controlled environment, or supply your object to a function. Basically, any time you want to use something like JSONP you’ll be trying to do one of a short list of things:
- Insert debugging statements or package manager callbacks.
- Prepare a namespace for a JavaScript “class”, or otherwise assign the received value onto some location.
- Call a function that is returned from the server, or call an existing function on data that is returned from the server.
- Roll-up a set of JavaScript classes into one request
- Something silly.
Given this, I’m not going to try and make a counter-proposal now. But I think this could argue for something slightly larger than JSONP, so that you get to fully harness REST and really get the most out of your stored scripts. It’s something that would be particularly interesting in combination with the class parser idea I suggested earlier–real classes, parsed out by a more robust language like PHP and returned as consistently correct JavaScript that smoothly integrates with the rest of your Ajax code.
Akismet I’ll have to get back to, as I should probably be catching a train nowish. Basically I was really, really confused when I first looked at the user interface, and I’m still not 100% sure I fully grok what it’s doing.