Flash Development with Flex Builder
Dear Lazyweb, I've started doing Flash and Flex development. For me the Flex Builder IDE is significantly better than the Flash CS4 IDE, but when you build a SWF in Flex Builder it includes all of the MX widgetry. That's too heavyweight for building simple Flash applets. Is it possible to get around that so I can use Flex Builder for my non-visual Flash development without bringing in MX?
Update: David Zuckerman a Flex Builder Developer dropped in to provide this invaluable advice:
Hey Ian, have you tried an ActionScript project in Flex Builder? It sheds most of the Flex weight, but you’ll still need to modify your project settings. In your setttings, go to the “ActionScript Build Path” tab, and open up the Flex SDK that’s listed there. Remove everything but playerglobal.swc (you can keep utilities.swc if you want). That should give you just the language definition, and none of Flex
I haven't moved the project over to this fully but it looks like it works perfectly. Thanks David!
New challenges
So I've been at a new job for a couple of weeks now. I left Songbird around when we shipped 1.0 to seek some new challenges. I've been doing Mozilla browser development for seven and a half years and I'm sick of it. I still think building browsers is one of the most interesting fields to work in - since we all spend much of our time working and interacting through web sites small incremental improvements to web browsers can have a huge impact on a wide variety of activities. But building web browsers is hard.
Now I'm doing some web stuff. It's a challenge but in different ways. I'm working a lot with Flash and AIR right now, I've just successfully evangelized jQuery to the other developers and about to head back into cross-browser html + css development. The project I'm working on is still under wraps but it's really exciting and I'm working with some pretty amazing people. I can't wait to be able to brag about it.
In the mean time I might start talking about more web-y things here.
Free Technical Books, Online
(Inspired by James Tauber, I'm going to try to write a blog post every day for November. Some of them will be here but others will be over on my personal blog.)
When Oreilly originally launched their Safari Books Online service in 2001 I was really excited. I love technical books but they're expensive to buy and heavy to carry around. It turned out that they were expensive to read online too. Full access to Safari costs almost $500/year and a limited ten-books-a-month plan costs over $250/year. I don't spend nearly that much money on technical books as it is, and while I'd save some time over just Googling for information that's available freely online I'm basically a cheapskate.
Today I noticed that San Francisco Public Library offers access to SBO. A bit of digging showed me that the Oakland Public Library (where my lovely wife works) also have a Safari subscription. With my library card number I can about a third of the books on the main site - but that seems to be a broad and deep collection. There's no downloading and the lynda.com videos aren't available. But the price is great.
Meanwhile, in the day job
A couple of months ago my role at Songbird shifted a little. Up till then I was working on the core product, fixing bugs and adding features across the whole product as part of the bird engineering team. Since we started working on 0.7 (aka Fugazi) I moved into a group initially called strategic development which then split and merged with the design and product group.
We've been looking through feedback from our users, primarily through surveys to determine what features we can add that will address most users' feature requests. Doing this outside engineering has been great since they can focus on improving the core product, keeping a clear vision of what the product we want should be, while we're working directly from end-user feedback.
My first project was a new Last.fm addon using our new playback history API. It was installed by default for all Songbird 0.7 users so it's had quite a bit of use, some good feedback, some bug fixes and now some translations:
My next project was taking Georges' Seeqpod addon, updating it and getting it ready for inclusion in Songbird. It wasn't ready for Fugazi, but hopefully it'll be ready for Genesis (our next release). Seeqpod is an MP3 search engine and our addon attempts to integrate it nicely into Songbird. I streamed a lot of random music while developing it. I spent a whole day listening to 80s Metallica.
Now I'm working on better music store integration using Songbird's Web Page API.
Tracking WordPress using Git
Update: I don't do this anymore.
I publish this blog through WordPress, for reasons I've outlined before. I run it with a custom theme and a bunch of plugins though, and I wanted a convenient way to keep my WordPress install up to date without having to reinstall everything all the time. I wanted source control for my blog install.
My first attempt involved mirroring WordPress SVN into a Git repository on github so that I had a Git version of the SVN tree (including branches, tags and every checkin separate) and seperate repository holding the changes I'd made for my web site. This eventually failed for two reasons, first the script I was using to mirror the SVN into Git had a habit of failing in bizarre ways and secondly having two repositories confused me.
Yesterday I decided to update my fairly outdated WordPress install, it had been missing security fixes for some time and was one minor version behind. Since tracking SVN hadn't worked I tried a simpler approach, a single Git repository containing a master branch that tracks releases and an ianloic.com branch to track the state of my site.
I set up master with a fresh download of WordPress 2.5 from wordpress.com, created my ianloic.com branch and applied the differences between my site and the 2.5 SVN tag (for all it's failures my old approach at least let me do this easily). I switched back to the master branch, deleted all the files (leaving my .git directory intact) and unpacked the new WordPress 2.6.1 tarball. I checked that in (to the master branch), tagged it 2.6.1 and then merged that into my ianloic.com branch. I pushed all that to github and then checked it out on my web server (at Dreamhost).
Normally with Git you're tracking just the master branch, but I want both master and ianloic.com branches to be tracked so my .git/config contains:
[remote "origin"] url = git@github.com:ianloic/wordpress.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master [branch "ianloic.com"] remote = origin merge = refs/heads/ianloic.com
Now it's easy to track changes that I'm making to my site and update to the latest WordPress without risking losing anything. The process for updating to a new WordPress release is:
- on my laptop check out the master branch
- rm all the files except for .git from the directory
- unpack the new release into the directory
- git-add . — now git-status will indicate what has changed, been added or removed
- git-commit to check in the new version of wordpress
- git-tag versionnum to tag which version is currently in master
- git-checkout ianloic.com
- git-merge versionnum to merge the latest version into the site's branch
- git-push --all --tags to push all the branches and tags to github
- on my web server, git-pull to update to the latest release
I end up with a tree that looks like this:
OpenID Usability Non-solutions
At work we're building our new centralized authentication solution. Allowing OpenID logins is not part of our first release, but it'll follow at some point in the future, at least if Rob has any say in it. Even though I've had an OpenID identity for as long as anyone, use mine extensively and have even implemented my own provider, I'm not convinced it's a good idea to only support OpenID logins.
The approach taken by Magnolia (who only support OpenID logins these days) and IDSelector (which is supposed to make OpenID usable) is allow users to log in with any of their existing accounts that offer OpenID (Yahoo, Livejournal, AOL, etc). The thinking behind this is that users don't have to remember a new username and password this way. This thinking is backwards. Users already remember their usernames and passwords. Web browsers remember passwords and people use consistent usernames and password patterns across sites. Both software and humans have adapted to this problem. People haven't adapted to remembering which account they used to sign into a site.
If I sign up for Magnolia using one of the accounts I have (of the 7 external account types they offer, I have 5) what happens in 2 weeks when my cookie expires and I need to log in again? Even though I might use the same password across all of those accounts there isn't an easy way for me to remember which account I chose to use to log in. Fundamentally, this approach to OpenID doesn't give users less things to remember, but more.
I think a better approach is for site to allow either local logins or OpenID identities. When offering OpenID logins it's important that sites help educate users about the value of OpenID rather than hiding it.
Source Control for your Operating System
I think that I've realised why I feel so uncomfortable using MacOS X and Windows for "Real Work". They're fine for playing MP3s or browsing the web, but when it comes to developing software I get scared.
For me, developing my own software usually involves installing other software and upgrading existing software on my computer and when you don't have a package manager that's really hard to do reliably and reproducably. I've tried doing this by hand, keeping track of what versions of what I installed where with what build flags, trying to write scripts that can reproduce my build environment and trying to keep track of which dependencies are build-time and which are run-time. I'm bad at that, but that's the kind of thing that computers are really good at.
Now, I know that Cygwin and MacPorts each have their own pseudo-package system, but that only covers the UNIX libraries and utilities that are ported, not native tools, and they don't integrate with the tools you use when producing packages to ship. When you're developing a Mac or Windows application how do you keep track of which libraries need to be included in your installer or disk image? There must be a trick, but I've never come across a tool for the job. The Debian packaging tools do an amazing job of analyzing the dependencies in software that has been built and mapping them to package dependencies. There are even tools for creating VMs that you can use to test that the autodetected dependencies are correct. All automatic, reproducable, testable.
So today, out of the blue, I found a metaphor that I'm satisfied with to explain to my Windows and Mac developer friends the way I feel about developing on their platforms. It's like programming without source control. Developing on Linux and with source control I feel safe - if anything I do has unintended (or worse, unnoticed) side-effects I know that I can get things back to where they were before, or at least work out what happened. On Mac and Windows I'm back to when I was writing Pascal programs in DOS where I'd type a few lines, save and never be able to make my program work again.
Aside 1: At least with Windows I can do everything in VMWare which gives me snapshots and roll-back, Apple's DRM prevents me doing the same for MacOS. Fail.
Aside 2: I feel almost the same about Ruby gems. It's a package system but a terrible one. It's like being forced to use RCS when I've got git sitting right here. I do understand why Mac Ruby developers seem to think it's the best thing since sliced bread - I remember in 1995 when I was first introduced to RCS.
Twitter Translation
My friend Britt mentioned today that he was about to launch twitter.jp. How exciting! But I don't understand Japanese. If only I could easily translate all those tweets in languages I don't understand.
I played around with Google's new AJAX Translation API before and I wondered how hard it would be to use that from a GreaseMonkey script. The answer: hard. I'm not sure what the exact problem was but every way I tried to include Google's APIs into the pages I was manipulating, including creating my own iframe and using document.write failed. In the end I used a static proxy html file (hosted in one of my Amazon S3 buckets for cheap efficiency) with some sneaky cross-site communication (the request goes over in location.hash, the response comes back in window.name).
My script is now up on userscripts.org: twitlator.user.js
To use it simply go to a page listing a bunch of tweets, like the public timeline and find a tweet in a language you don't under stand. For example:

Click the translate! link and several moments later you've got:

Yep. People aren't posting anything interesting in Japanese either.
I'm pretty sure my script will only work on Firefox 3. I'm using getElementsByClassName which I think wasn't introduced until Firefox 3. Why aren't you running it already?
Ten Years
Ten years ago Netscape released the source code to their browser. They called it Mozilla, I downloaded and built it at my work at the time. I didn't manage to build it immediately, but I worked it out in the end.
Somehow I've spent most of the past seven years working with the platform. I touched on it at Eazel where we used Gecko to display HTML, but mostly left the hard work of integrating a barely-ready gtkmozembed to Mike and Ramiro
Then at Danger I ended up as the main engineer working on our licensed fork of the ProxiWeb web proxy (love those innovative names) which used Mozilla (circa M6 or M8 I think) on Solaris x86 to format web pages for display on hiptops and Sidekicks. Later we built our own web proxy based on Mozilla 1.3, following a similar model but with all the lessons we learned maintaining the old code for years.
Eventually I ran away with the circus as one of the first employees at Flock where we were trying to re-imagine the desktop browser experience, based on Firefox. After a couple of years struggling with vision and execution they worked it out - soon after I left. Now it's showing the potential of moving beyond the dominant Mosaic-with-tabs user experience that the main players are following.
Now I'm at Songbird, building another kind of browser - one whose focus is integrating media consumption and management. We're building on XULRunner, the application platform that has been spun out from the Mozilla applications. It's not my favorite platform for building applications, but how else are you going to build a cross-platform web browser.
Somehow this passing interest I had ten years ago has turned into a career.
I told you so
This kind of bundling is often done by the bad guys. If you install Apple’s Quicktime codecs on Windows every update will trigger an iTunes install, even if you haven’t installed iTunes. I’m sure they’ll do the same thing for Safari on Windows. I’m not sure what iTunes’ market share on Windows is but it seems to be significant. If all those users suddenly have Safari installed that could potentially cause a big shake-up in browser market share.
On Friday there was a minor shitstorm on planet.mozilla.org about Apple pushing down Safari to all Windows iTunes and Quicktime users.
If only we had a reusable system-wide XULRunner it would be really easy to do similar but less evil promotion of our growing XUL-based free software suite. Songbird could suggest to users that they might like Firefox - and it would take just a single click and a tiny XPI download to have users running Firefox. We could even get intelligent and suggest Thunderbird to heavy email users or Flock to heavy social networking users.
iTunes' US market share is around 27% (according to the best numbers I can find). If Apple flips the switch and makes Safari the default browser for all those users Firefox will start looking irrelevant fast.



