The rise of expository videos

No comments:
I've been seing more and more really great exposition on the internet, especially through videos. Speed drawing is perhaps my favorite (and it's a very interesting and informative exercise to consider what it would take to create a "Speed coding" video!), but I've seen some very effective teaching videos (this one about recycling, the enviroment, and ecology from Japan).


History of the Internet from PICOL on Vimeo.

Now here is an interesting video. I really like this style of exposition - iconic, abstract, always in motion, with cool spacey music in the background. And of course a nice British accent doesn't hurt. The subject is rather interesting, too - the very early technical development of the Internet. But what is most interesting is the attempt to standardize the iconography with "PICOL icons". What's not clear is if this is just the author, Milah Bilgil, to "standardize" something, or if this attempt is real. Of course, standardizing the iconography isn't enough - would be authors also need good, inexpensive tools to play around with this stuff. It's not clear to me if Flash is overkill for this sort of thing, or if its "just right".

Just go see Wicked

No comments:
http://www.wickedthemusical.com/img/wicked_splash.jpg

(We had front row, center tickets at the Pantages with the original cast! The principles are great singers AND great actors - sitting that close you can see the real tears on Elphabas face. The story is really nothing like the book, but it's amazing all the same.)

The true cost of evaluating EC2

No comments:
Back in July I was evaluating Amazon's cloud computing platform, EC2. I figured, why not? It's only $.10/CPU hour. Starting an instance, connecting with a browser, SSHing in would cost me less than a cup of coffee, and would be good practice. The experiment went along, I deemed EC2 too difficult to provision and use for my purposes, and forgot about it.

Today I got an email from Amazon saying I owed them about $7 for web services. I vaguely remembered seeing this before. I always thought that it was saying that I owed $7 for that one time I tried the service out: way too much, of course, and something I kept meaning to call amazon and find out about. Today I read it more carefully: turns out I've been billed about $7.50/month since I tried the service out. (Finding this out was much harder than it should have been: AWS billing and usage interface is truly awful. I ended up just doing a search in gmail for "amazon web services billing statement" and summing the amounts.)

Concerned, I used Amazon's contact form (they don't have an actual email address). I received a form letter back explaining how to cancel EC2 and S3. This was odd for a couple of reasons - first, I didn't ask how to cancel anything, I asked to understand why I had been charged for the last 6 months. I also asked for instructions on how to figure out how much they have actually charged me for. Not having my questions answered, my first instinct was to reply to the email. Turned out that the "from" address doesn't accept email. Then I read carefully and clicked on a buried link within the email itself that "no, this did not answer my question", and clicked on link that asked them to call me. Much to my delight (and surprise), I was talking to a service rep within 2 minutes (via a neat 'click to call' service called estara from atg). An apologetic, very nice women (Tessa) was completely unable to address me issue, she told me she'd have to forward my request to the web services team, as she wasn't able to help me.

Lessons: I've already "cancelled" EC2 and S3 although since I had nothing provisioned I'm not sure what that means. Hopefully it will stop new charges, at least. I realize now how dangerous it is to allow Amazon to have my credit card number, and I've removed all banking and CC information from Amazon. If I had seen a growing amount due over the last few months I would have realized sooner something was wrong. But because they just pay themselves with my CC, it didn't register that I was getting a receipt, not a bill, all this time. Second, I'm concerned that someone may have my Amazon information. Third, I have to check my bank and cc statements more carefully. Finally, if I play with EC2 again it's going to be on a different Amazon account.

It's still a mystery exactly what Amazon was billing me for: $7.50 is enough for 75 hours of a small instance, a wierd number. When I find out I'll update this post.

Update: 6 Jan 2009 I finally received a response from "Luke":

Greetings from Amazon Web Services.

I have been notified of your recent inquiry regarding your AWS charges. I have taken a look at your AWS account. These charge is due to a non-attached Elastic IP address associated with your account. Elastic IP addresses that are allocated to your account but are not associated with an EC2 instance will accrue a $0.01 charge per hour. You can view your Elastic IP addresses with this command:

> ec2-describe-addresses

Any elastic IP addresses that you associate with your account remain associated with your account until you explicitly release them. To ensure our customers are efficiently using elastic IP addresses, we impose a small hourly charge when these IP addresses are not mapped to an instance. When these IP addresses are mapped to an instance, they are free of charge. You can use the EC2 API command line tools to release the Elastic IP address with this command:

> ec2-release-address <ip-address>

I also see that you have closed your AWS account. These usage charges have ceased as of your account cancellation. Please note that any applicable charges for January 1 and 2 will be collected at the end of the month.

Regards,

Luke



Wow! What awful customer service on so many levels! First, their emails look like invoices, not charges. Second, they don't explain anywhere what the charges are for. Third, when a customer goes to great lengths to find out what's going on, they don't offer to reverse the charges that obviously should never have been charged. Fourth, they never did answer one of my basic questions: how can I find out for myself what I'm being charged for? Fifth, they don't apologize or take note of the horrible messaging that started this whole mess. The icing on the cake is the last sentence, assuring me that I'll still be billed for the two days in January I didn't use the IP - gee, thanks, Amazon.

I've responded with another email asking for a refund and complaining about their messaging and customer service. For God's sake, do NOT evaluate EC2 unless you really know what you're doing!

Month, Amount
7 $1.32
8 $6.51
9$7.42
10 $6.53
11 $7.45
12 $7.42
Total: $36.65

[Update: they refunded my $36.65. But I found a better bookstore, Better World Books.]

Buddha, women and the neutrality of meditation.

No comments:

Got into a conversation today with my girl about Buddhism and women. It's disturbing lore, because Buddhist nuns are treated as second-class citizens in the Sangha.

And that's not ok with me.

The real irony is that gender simply doesn't enter into the Buddhist description of suffering - there is no male suffering or female suffering. Indeed the solution, the eight-fold noble path, is often described as "universal". This inconsistency strikes me as incredibly unfair, not to mention inconsistent with the rest of the Buddhist teachings as I understand them. Even saying that he was "a man of his time", as the article linked to above does, doesn't excuse this inconsistency - although one could claim that he was taking a big enough risk by ignoring caste, and to take on sexism would stress his nascent movement beyond breaking. But that is being incredibly generous.

According to this story, the Buddha exhibited the supernatural gift of seeing into the future. His judgment was based on this supernatural 'knowledge', which turned out to be false. This brings his conclusion into question. It is time that we separate the brilliant, accomplished experimental psychological insights from the cultural instincts far removed from modern reality. Meditation cultivates non-reaction, dispassion, and ego-lessness. It is genderless. I find it interesting that the Buddha's mistake was tied up with a supernatural power.

There is some hope for those whom dogma matters: the five hundred years have more than elapsed, it is time for a new policy for women who would take vows.

He-Man and the Masters of the Universe!

No comments:
Wow. It's amazing to watch these old cartoons again. It's pretty amazing to watch them and observe one's own reaction. The childish delight is still there, but it's buried under layers of critical thought. The overall affect is nostalgic but fundamentally unsatisfying.

Hulu is now offering offsets in their embedded videos; here's the introduction of Cyclops and his gamma glasses:

A neat musical device: the TuneStudio

No comments:
TuneStudioBelkin TuneStudio combines a bunch of neat devices into one: it's a hard-drive audio recorder (using your iPod as the drive), it's a line mixer, microphone pre-amp,  a USB audio interface, and a condenser thrown in for good measure. It looks good and although it retails for $250 you can pick it up at Costco for a mere $180.

I skimmed the user manual and discovered a few shortcomings, though. It doesn't run on batteries and requires a 12v 1.25A power adapter - this thing sucks a surprising amount of juice! While it records 16 bit 44KHz stereo audio, it does not maintain a distinction between it's 4 channels - basically this is a 4 channel line mixer attached to a 2 channel (left and right) USB audio interface. (The audio gets recorded to the ipod as "Voice Memos" - which then sync to the PC via iTunes). You can't avoid doing the mixdown.

Some might say that using an iPod as the hard drive here is gimmicky - Belkin could have released the exact same device with a built-in hard drive. But I think there's a legit reason to do it this way - this is a semi-casual device, and it's pretty neat to be able to use all that storage on your iPod as musical tape. How cool would it be to record a local band and then listen to the jam on your iPod on the way home? And as for making podcasts, it makes a lot of sense to preview your podcast on the target device. And also, it makes a lot of sense to get the audio onto the PC with iPod sync rather than connect a new device to the PC - it fits people's existing workflow better. Finally, it may be possible to couple the TuneStudio with some custom iPod software, providing an extensible and very powerful mixer platform based on, say, the iPod Touch. (When will Ableton port Live to the iPod Touch anyway?)

Why Internet TV isn't mainstream yet: notes from the bleeding edge

No comments:
Using hulu for about a year, and it generally rocks. Good replacement for cable/satellite television - I've been watching House, Fringe, 30 Rock, and The Colbert Report regularly. And the occasional SNL skit. The big NBC morning and news shows are chopped up into topical pieces so you can just watch the interesting bits. Hulu provides a news feed of  videos, although this is a very active feed so it kind of dominates the "all feeds" mode in most news readers. Still not sure if it's possible to subscribe to a feed-per-show. Very good audio/visual quality. Very annoying if your network goes down or slow. Nice to link to and embed videos in the blog, facebook. It's just neat to be able to link to a completely new part of one's life: the TV one watches. Hulu (and services like it) allow you to comment on it, criticize it, share it. Unfortunately some videos expire, making those URLs useless after a time, and meanwhile your commentary does not expire which creates a problem large enough to be noteworthy. It's particularly bad with hulu because they only warn about expiration when it's approaching. YouTube does not suffer from this problem (for example, consider the music video "Ooh Yeah" - it expired on hulu but is still live on youtube. OTOH YouTube audio and video quality is generally a lot worse than hulu, although this may be changingn with youtube's recent support for HD content). Really don't mind the Hulu commercials at all - they are short (15-30s) and, at least for TV episodes, they fit the narrative somehow (I remember feeling a bit awkward watching Firefly on DVD without commercials). It's cool to watch an hour show with 5 commercial breaks of only 15s each!

Ripped DVD, and video podcasts. Ripping a DVD is actually really nice if you have the hard-drive space, and if you have the time (HandBrake takes at least 2 hours to rip a movie). The biggest benefit of this method is reliability - the movie won't skip or stop if your network becomes slow or unreliable. It's also convenient: you can use the excellent "Front Row" application on the Mac (or the lesser Windows Media Center on Windows) to watch these movies, which is currently not possible with Flash-based streaming players like Hulu or YouTube (one tip when using HandBrake with Front Row: plop your movies into the iTunes Movie folder so that they appear in the Front Row menu.) I've only watched a few video podcasts - I downloaded some iPhone SDK videos, but was actually annoyed (and continue to be annoyed!) that they appear in Front Row movie menu along side "Harry Potter and the Chamber of Secrets". The quality of these podcasts remind one that they are designed to be viewed on a video capable iPod, and not a large computer monitor. That said, there are some television shows made available in this format, such as the Rachel Maddow Show on MSNBC. A small drawback is that the iTunes store is the go-to place for this kind of content, and I still don't feel comfortable surfing the web with the iTunes store. One reason I don't like the iTunes experience, for example, is that I can't easily link to podcasts!

Gaming. Gaming is more and more a viable alternative to passive TV watching. PC gaming is limited in the living room because of akward controls - the mouse/keyboard doesn't work on the couch. Ironically these are the controls that make PC games (and applications) so compelling. Modern consoles have many of the features of PCs (like wireless internet connectivity and web browsers) but the controls and interfaces are designed to work in the living room, a huge plus. The consoles are generally capable of movie and audio playback (the PS3 is a very good blu-ray player, for example). I don't have a console in my apartment, in part because I don't have the space but also because adding another box would increase the complexity of my simple setup considerably. (Of course if everything supported HDMI it would be a different story).

Cable, Satellite, and TiVo. In some ways Hulu is like a TiVo - in both cases you can only watch stuff that's already been broadcast. In both cases you watch fewer commercials. And indeed TiVo addresses several weaknesses of Hulu: first, it doesn't depend on strong network connectivity AND it caches the entire show, which ensures smooth playback. Second, the interface and controls are designed for the living room. Of course, TiVo is very expensive (the box, the TiVo service, and the cable service all cost money - the latest TiVo costs $600), but Hulu is essentially free. Also, TiVo box is not a generally useful PC and so is limited to doing one thing only. And it's proprietary nature means you pay a lot more for storage than with a PC. There are some HTPC projects out there that are frankly rather exciting, but aren't really ready for primetime.

Apple TV. I don't own it, but I think it's an interesting idea. Apple TV is a hybrid device: it distributes the PC "signal" to the living room (photos and music), but also serves as a signal source providing Hulu-like movies and TV shows - for a price. The ability to rent movies and TV shows with immediacy is an interesting idea, but one which obviously favors Apple's balance sheet. I think it's a bad proposition to spend $230 to give a company a turnstile in your living room; call me old-fashioned. It seems to me that the cable/TiVo solution is a better value, especially for those who watch a lot of TV. (Admittedly, most cable companies also put a turnstyle in your living room with Pay-Per-View!)



[Update: what is boxee? I don't know but I've signed up for the alpha]

John Resig and what we can learn about Useful Blogging

No comments:
John Resig is an inspiration. His blog is ultra-useful. It's clear, informative, and often cutting edge in the JavaScript/jQuery/browser space. His posts are often accompanied by helpful graphs and, more often than not, usable code and workarounds. I have been a fan of jQuery since I started using it this summer, and have continued to be impressed with it's creator's output. Even when he posts an opinion piece, it is on topic and respectful. The important question arises: what makes his blog so useful and how can we emulate it?

Consider a recent post about the accuracy of JavaScript timing. Now, an ordinary blogger would have posted something like "I ran across some odd results in my Dromaeo testing. Anybody know wassup?" But John went deeper, did a lot of testing, graphed the results, and posted what he found. Heck, he even included a graphic explaining normal distributions. (Basically, JavaScript timing in Windows/IE is very coarse - results are rounded to the nearest 15ms.)

By comparison my own blog is a bit of a ramble. It's true that I'm not so single-mindedly interested in browser programming. My programming interests run the gamut from scalable software architectures, front-end architectures, programmer productivity, prototyping, web design, and data design. And of course there's a sizable amount of personal items in this blog stream. But even so I daresay the overall quality of the blog has much room to improve.

I would like to create a new blog that is more like John's - focusing purely on my core technical interests, designed to be useful and educational, rather than just an invitation to discuss. It needs a new, simpler URL - like javajosh.com/blog. Since I only have about 30 (valued) readers a month I don't think the transition would be too bad. And I can always continue to post personal and "off topic" things to this blog. (An important question is what to do with on topic posts to the old blog, but I can tackle that one later.)

A demo of jMaki: yet another unnecessary abstraction

No comments:
Doris Chen posted an screencast of jMaki in use (with Netbeans and Glassfish). It's unnecessary because a) jMaki isn't a good idea, b) the tooling looks cumbersome, and c) the end result looked really bad.

jMaki isn't a good idea because it's a taglib that tries to normalize the use of many javascript libraries by abstracting over them. In principle it reminds me of Apache's commons logging api, which is designed to abstract away the differences between Sun's logging API and log4j. This pattern of bad idea pervades the Java platform, unfortunately. Successful projects use succesful implementations, not just APIs. It's important to know Tomcat, not just the servlet APIs, and it's important to know log4j, not the commons API. And it's important to know jQuery and it's UI plugins, not jMaki. To do real work you're going to have to know the underlying JavaScript library anyway, so why bother with an abstraction that will just get in the way?

The Netbeans tooling looks rather cumbersome. I've been (re)reading Donald Norman's "The Design of Everyday Things" and was struck with how unruly Netbeans looked in the screancast. It's all the little things Doris has to do - find an obscure menu item to check that a plugin is installed, center the dialog box on her screen, search through a list of completely unrelated plugins to enable the one she wants, etc. Or when she drags a widget into the JSP and has to right-click and "format" the badly formatted text every time. Since when does dragging stuff create text? And why can't it format itself?

The final blow was that the end result looked (and sounded) like crap. The fish eye widget was layed out wrong, and the google map was too large and also layed out wrong. Putting sound in the page was just a bad idea - that's like adding blinking text. (Just because you can doesn't mean you should!)

Apologists would say (at least) that I'm nitpicking. At least the tools worked; and none of those things I mention are show stoppers, and any programmer who can't deal with a few tool quirks doesn't deserve his salary. And as for the end result looking bad, this was a programmer's demo, not a designer demo - it can all be fixed with some CSS edits later, done by a web designer.

My response is this: the tools work, but encourage errors. They encourage small errors of setup and use. But they encourage a much larger error: the tooling's "map" of the system is not that of the programmer's (or at least not this programmers). I fail to see what a JavaScript abstraction has to do with SVN, and yet these things are presented together in a dialog. I fail to see how a collection of text is a "widget" or why dragging would create text. And yes, I fail to see why I need a JavaScript abstraction in the first place that appears to do little more than substantially increase the complexity of my system.

I feel that IDE's are little more than glorified text-editors, and begin to fail when they themselves introduce abstractions. In a subtle way, the tooling begins to dictate the programmer's mental model of the design- and runtime of his system. In this case, it's nice that Netbeans can easily add a taglib to your web project. But it's not nice that this capability is expressed as a "plugin". It should be expressed as a macro or script: a macro that adds a jar or two there, a line of code to web.xml there, and adds some new JSP specific snippets (particularly taglib declaration and taglib instances). It may even remind you that you'll have to redeploy to get the effect. One concrete difference between a plugin and a script abstraction is that the Netbeans plugin method requires that you select the "plugin" on project creation.

The end result should look good because this kind of programming is all about the front-end. Widget positioning and sizing is not a trivial problem to be swept under the rug! Either jMaki or Netbeans needs to take better care to provide better defaults. And too, programmers are (hopefully) wary of these "slap it together" demos - everyone knows (or should know) that slapping stuff together is the easiest part of programming. It's fitting it all together professionally and solidly which takes time, effort and skill.

Illustrator Ninja

No comments:
Here is 40 hours of illustration condensed into 7 minutes by the remarkable Chad Pugh:


iPhone Invisible Shield Review

1 comment:
invisible shieldI scratched the screen of my iPhone a bit on my keys, and resolved to get a screen protector. I purchased the Invisible Shield from amazon.com for about $12. I followed the directions closely, and almost immediately noticed a reddish discoloration, and some subtle mottling - not bubbles but subtle irregularities in texture. I also noticed that the touch sensitivity of the screen was reduced. On two occasions keys that I did not intend to press were pressed and held - and it was the backspace key (which resulted in the loss of two fairly long text messages). Last night I removed the Invisible Shield. The difference was remarkable - my iPhone screen was brighter than it had been in 3 months, and the touch screen deliciously responsive. It was like getting a new iPhone.

I estimate that the cost to produce what is essentially a sticker has got to be very small - less than $1, which makes the asking price of $12 very high. (products of this nature are generally marked up by a factor of 5 or 6 - 12 is very high).

Given all of this, I cannot recommend the Invisible Shield. Given the pace of technological progress, it is better to endure the occasional scratch and eventually replace the device, especially if the usability of the device is reduced by that protection. I think that my iPhone's screen can last 4-5 years if I can manage to avoid putting my keys in the same pocket as the phone!

This is a photo of the removed Invisible Shield, clearly showing the reddish discoloration. Frankly, against the white napkin it looks much more dramatic than on an iPhone.



Having fun in Silverlake

No comments:

_MG_1334small
Originally uploaded by Christian Garrido
I love the composition of this shot I found on flickr. A great moment.

The limits of human art

No comments:
It is remarkable that a human can create anything larger than what can be contained in a canvas, or on a single sheet of paper. Novels, cars, software...these are monumentally complex objects, and if their true complexity were ever to be appreciated, I doubt anyone would have the heart to attempt their creation.

Despite the inherent difficulty, people still create large works, and sometimes successfully. That success is rare and precious, and should not be taken for granted.

Whole Foods mixed message

No comments:

Pink salt from the Himalayas. Millions of years old and harvested for
Whole Foods customers to the tune of about $16 per pound.

This is an example of a dilemma faced by Eco-tourists - they love
nature and want to preserve it, but they also want to hike in it and
enjoy it. But sometimes it's not possible to do both.

It's interesting to me that the same person who insists on organic
foods, recycled toilet paper and fuel efficient cars would buy
something so incredibly unsustainable as salt taken from the tallest
oldest mountains in the world.

Movie: How to Loose a Guy in 10 Days

No comments:
This is an old RomCom, and I'm only reviewing it because it was, like so many recent movies, both entertaining and troubling. Entertaining because it is in part a comedy of modern manners. Troubling because of it's rampant misogyny. And because it was recommended by a female friend I find it even more troubling.

The women in this picture are portrayed almost universally in a negative light. No, I get the premise - I understand that Kate Hudson's character "Andy" is trying to act like a crazy woman in order to push her love interest "Ben" away for the sake of a magazine article. I'm not really talking about those antics. I'm talking about her "real" behavior as a vapid, image-obsessed, vain, self-serving and manipulative woman. The other women who surround her are equally ethics-challenged and quite weak. "Mrs. Lauer", wife to the De Laur diamond magnate, is the classic cougar, in all her tasteless glory. In truth her over-the-top performance worked comedically.

The only positive role-models for women would be Ben's compeition. Two women given only cameos who seemed cool, collected, and focusedl. Of course, they still get beat out by the man though.

It troubles me that "reproductive fitness" for a woman in this movie (and in so many others) has been reduced down to having the right weight, clothing, and make-up, and avoiding certain behavioral faux paus. What happened to intelligence, compassion, energy, and kindness? Indeed, in this regard men hardly fair better in the movie - "reproductive fitness" for a man is reduced to six pack abs, a full head of hair, and a well appointed New York apartment, and the ability to put up with an excess amount of abusive female drama.

As an added little kick in the ribs, the movie portrays vegetarians and vegetarianism in a harsh light: vegetarian food is apparently tasteless and unsatisfying, and those who serve it are ugly, judgmental, and rude.

Idea: Annotated music streams

No comments:
The KCRW Music Stream is a wonderful resource - it's a free, commercial free, internet resource for a constant stream of thoughtfully selected, interesting music. My only gripe with it is that it can be hard to identify a song that you like. It's true that the DJ announces the artist/track/album on occasion, however this is not terribly convenient. It would be nice if the player (iTunes in my case) could display this information automatically.

Note that KCRW provides track information on the web, but it's not very easy to get to. It would be better to annotate the stream such that the information is already available in the player.

One workaround is Shazam - indeed it's a strange day when one holds their iPhone up to the computer speaker to identify a song! (This reminds me of another idea I had that would use OCR to make a bitmap brochure site SEO friendly...)

Anyway, the economics would seem to make this workable. After all, if I like a song enough to click somewhere, I'm probably willing to buy the song. (Indeed, this is Shazam's business model, from what I can tell).

The value of greed, fear, and vanity.

No comments:
Mortgages create fear, which in turn creates productive people, which is in the end good for everyone.

It seems that the most common motivations for success are fear and greed. Vanity and simple obsession follow a close second. Sheer joy in the work is perhaps the least common. In the west most people are motivated by fear - that is the true value of the mortgage culture. Instinctively people know that they need fear to function, to survive. While all people are motivated in the short term by greed, long term greed (usually mixed with vanity) is rewarded by the investor culture.

I make these comments without prejudice. In many ways I think any wealthy society owe fear and greed a debt of gratitude - without them, individuals and organizations could very well grind to a halt, too content for their own good. Indeed, there have been times in my life where I could have used a larger dose of fear to get me over a particularly difficult hurdle.

Consistent joyful motivation to excellence is quite rare. It is probably not possible without being an abstract thinker, and so able to derive pleasure and direction from an abstract ideal. The joyful motivation in its pure form seems more consistent with religious striving than with economic striving but n truth, I think that this motivation is shared by all at certain points in time. For example, the movie mogul (who is normally motivated by greed and vanity) may step back once in a while and appreciate the movie for the work of art that it is.


The Man is hosting a music festival!

No comments:
The Man is hosting this years misnamed "West Beach Music & Arts Festival". Check out their rules:
buzzkill

I mean, really? You're going to host a 3 day music event and do not allow blankets or chairs? "No outside food or drinks" has a rather obvious economic incentive - but I fail to see the case against blankets. And what about the ban on "Professional Cameras"?

I wonder how many artists would play this "festival" if they knew the rules?

Nice phishing attempt!

No comments:
What gets you is the implication that someone has charged something to your paypal account - something that is all too possible, alas.

Sweet! Another request to use a photo

No comments:
I realize it's not much, but this is the 4th time someone has asked to use a photo from my flickr stream. As an amatuer with very little experiene, I think that's just great. (I've no doubt that the really good photographers get that many requests per day - but I'm happy). Here's the image they like:



(For a book called "Superbikes", being produced in Japan.)

[Update: okay, I have to mention the irony here: this GS500 is in really really bad condition! If you look closely you can see the rust, and the tires are completely bald. There was a persistent oil leak that made riding it dangerous. I think it had something like 100k miles on it when I snapped this photo. It qualifies as a superbike only in the sense that it was super durable!]

Why templates are just a special case of AJAX

No comments:
I've been writing webapps with template languages for some time. Templates are a nice way to stay as close as possible to the original, static HTML. I've noticed that with Ajax in general, and jQuery in particular, one can get even closer to not modifying static HTML. I've also noticed that templating can and should be done on both the client and server.

There's a very nice Ajax architecture that basically dictates that you make a request against the server, retrieve meaningful data (rather than data embedded in presentation) as XML and then insert that data into the DOM. This is precisely how server-side templates work! The only difference is that the data is not serialized, and is generally some architecture specific form. For example, in Java the template data may be object graphs embedded in a HashMap.

A server-side template, then, could theoretically be replaced by an Ajax call, if the template worked on the client. For some years now, there's been XSLT support in all modern web clients, and XSLT can indeed be used as a templating language of sorts. However, XSLT is verbose, unwieldy, and therefore fails miserably in the only criterion that matters: does the architecture minimize the mutations you have to make to static HTML?

Actually, I think it would be a nifty thing to do client-side only templates, but for practical reasons I don't think such an architecture would fly (first, because some clients don't support meaningful programmatic execution of any sort, and second, because you'd have to take special care to avoid that initial loadind performance hit). Therefore one needs a solution that can execute in both places. XSLT can indeed work both server and client side, but as we've seen it's a less than optimal solution.

The approach I like is to use JavaScript for the templating language. Indeed, one codes the software as if it was client-side only Ajax, and then rely on runtime parameters to tell the server to exec that initial XHR on the server. This is made possible in a Java server by two pieces of technology, Rhino, and John Resig's env.js. It works, it's nice, and I'll write about it in more detail if there is interest.

A pretty sweet band: Lowen and Navarro

No comments:
This band was introduced to my by a neighbor - who is the niece of Navarro. They have a mature, soulful vibe with some pretty tight song writing ability. They sound like they'd be a good live show.

Idea: Recover my stolen stuff (dot com)

No comments:
Ok, so I just had a camera with lenses stolen, and I'm determined to find it. How can I do that? One thing is to register the SN with the national stolen goods registry (whatever that is - I could find no reference on the Internet).

Another thing I was going to try is to see if the combination of items was for sale in the usual places: craigslist, ebay, the recycler, and the local used photography places. But that's a lot of work, and I think that at least some of it could be automated.

So why not "recovermystolenstuff.com"?