Facebook Beacon as a reminder of what you’ve already given up
Nov/070
I have been reading the commentary on Facebook’s Beacon feature, which — with your permission, if you can figure out how to give it — allows for your on-line purchases to be tracked in your Facebook profile. (Now the advertiser can channel ads through your profile, and you are, in effect, a passive recommender of the product you purchased.)
Now everyone is right to say that this is a horrible invasion of privacy, and that the “opt-in” opportunity should be much more prominent and so forth. Good screenshots at the Times: http://bits.blogs.nytimes.com/2007/11/29/the-evolution-of-facebooks-beacon/
But, you know, there is an upside to Beacon, which is that you are getting alerted that you are being tracked. Before Beacon, the tracking just happened on the back-end, and you never got an explicit notice that your purchase was getting aggregated in a multi-dimensional database somewhere.
So: I want everyone who has seen Beacon to reflect on the notion that instead of rejecting Beacon in small, you should be rejecting the entire tracking mechanism tout court, at least in its current form. As a consumer, what you need is a way to vet how that data is collected, and you need a way to export all of it, and delete whatever you want. It was your purchase, and the act of purchasing was at least partially yours as well. When a company tracks your click for revelation to others without your obvious permission, they are stealing from you. (Note that what Beacon is doing is radically different from the mere aggregation of clicks: They are tracking your specific click, and are making that specific click known; this is not the “you” as part of a demographic, but you specifically.) The New York Times quotes an ignorant young person who says: “We know we don’t have a right to privacy, but there still should be a certain morality here, a certain level of what is private in our lives.” She is wrong. She does have a right to her privacy, except when First Amendment freedoms, or requirements of the public sphere, overrule. The obvious default is to protect that privacy until it is challenged for good reason. (And if you’re in the EU, member countries are obligated to legislate an explicit right to privacy.)
Calacanis says we need a way to export our Facebook data. True. But that’s just a start. The Facebook we should be worrying about is the hidden one that lies in the databases of Doubleclick and similar companies.
Holiday gift recommendations
Nov/072
Apparently there is a tradition of gift-giving during the cold season in these parts, and friends have asked me if I know of any items suitable for gifts for their technically-inclined relatives and friends.
Here are a few suggestions:
A year ago Julie gave me a Jukemaster 100. This is a CD jukebox made to look like a 1950s-era table juke that you would find in a diner. You can burn your own CD, and make title cards. The over-all effect is very much like a real jukebox. It comes with a CD with 50s and 60s hits. My 5-year-old daughter Caroline loves it, and now knows many of the songs by letter and number (B1 is “Do you Love Me?” by the Contours). Apparently these are being manufactured again, and all of the distributors anticipate a quick sellout: http://www.noveltyandmore.com/jukemaster-jukebox.html
This year for her birthday I gave Julie an eStarling digital photo frame. This thing is great. You have to have a wireless router for the full functionality. Comments at Amazon say it’s hard to get it working with WPA. We just use WEP and an unpublished SSID; getting it set up was easy. Anyway, the best bit is that they give you an e-mail address so that you can mail pictures to the frame. You can also set up a whitelist for the address so that only family members and friends can e-mail to it. It is fantastic to get surprised by a photo from someone who is dear to you. About the only thing I can complain about is that some of the photos don’t take up the entire space available for pics, and the black background isn’t quite as black as the frame, so for smaller pics there is a bit of a gap. Still, it’s a wonderful product. We have it on top of our piano. For people without a wireless router, you can insert various memory cards/sticks, but without the wireless functionality, you might want to get a cheaper frame. [Amazon]
In June I went out to Iowa for my college reunion. I think it was my 75th. In any case, I forgot to bring Julie’s camera. So on the drive through the cornfields I dropped into a Wal-Mart and grabbed what seemed to be the most powerful of the small compact cameras. The one I settled on was a Canon PowerShot SD1000. This has been a great purchase, and I have since discovered that it is routinely called the best new tiny camera out there. It has 7.1 megapixels and a viewfinder, which is apparently nowadays unheard of, but invaluable for bright light and other circumstances. My only issue for this camera has been that the manual is weak; but for most things I’ve been able to figure out what I want through the UI. Below is a picture of Caroline (in the middle) with her second cousins (I’ve done a wee bit of red-eye reduction.) [Amazon]

Pro Active Record (Book Review)
Nov/071
Kevin Marshall, Chad Pytel, and Jon Yurek, Pro Active Record: Databases with Ruby and Rails (2007). $39.99. [Amazon]
Pro Active Record is all about ActiveRecord, the object-relational mapping layer that comes with Rails. In this review I’ll call ActiveRecord AR. The book has chapters on SQL, setting up your database, the core features of AR, extra AR goodies, testing and debugging, working with legacy schema, AR and the real world, and, finally, a summary of the AR API (interestingly, the API summary is not a copy of the official docs, but has additional comments from the authors, so there is some real added value in this “back of the book” reference material).
Before I begin I want to note that these kinds of framework books and chapters are really hard to write (I know: I contributed to the O’Reilly JavaEE book). The reason is that a lot of readers come to a subject such as AR without understanding the problem for which AR is the solution. I.e., if you don’t already have some understanding of relational databases and SQL, and maybe have some experience with different RDBMS from more than one vendor, some of what’s going on in AR and in this book can be lost.
Generally I would say that if you do any non-vanilla work with AR, you should own this book as a supplement to the account of AR in Agile Web Development with Rails. There is genuinely useful information throughout the text. Here are a few examples that got a check or exclamation point in the margin while I was reading: executing migrations outside of Rails (p. 49); dealing with migrations in source control (p. 53); a nice discussion of writing good tests (pp. 127ff); more detail on the more obscure test assertions than I’ve seen elsewhere (pp. 129-139); a discussion of transactions and fixtures (p. 141); how to do .csv fixtures (pp. 142-143 — annoying, by the way; this could be a lot better in AR); good stuff on AR exceptions (pp. 144ff); random notes on legacy schema integration (chapter 7), internationalization (p. 204), use of UUIDs for PKs (p. 205), and some canned associations for typical use cases (pp. 208-209).
The book also handles well the true core of AR, setting up associations between models, and validating models (chapter 4, “Core Features of ActiveRecord”). The example “domain” is about managing Farmers, Cows, and Milk, which I found just weird and kinky enough that I learned something. A peculiarity of this chapter is that it kicks off with Callbacks rather than Associations and Validations, so a beginning reader is going to have to wait before getting to the core of the core. But I digress.
A brief tour de force is a detailed example of extending AR with Ruby meta-programming (pp. 109-123). This is one of the longer discussions I’ve seen anywhere regarding AR that provides insight into how it actually works, and how you create your own convenience apparatus for easy-to-write queries.
Now some less good news. The book’s title makes it sound as though it is going to be complete and exhaustive, but it is not. There are lots of little things that are missing. Just for example, I couldn’t find a discussion of :source for the has_many :through association, which is necessary in some cases and has vexed my students. In fact, the chapter that gives the API doesn’t even document ActiveRecord::Associations, which is a major gap (to be sure, there is much information here on associations, but if you’re going to detail the API for ActiveRecord::Base, why leave out stuff as important as ::Associations?). Another aspect that is missing is dealing with some of the cases where you need to have multiple belongs_to foreign keys: AR can get confused, and it would be helpful if someone played this out at some length; this book doesn’t do that. Elsewhere, mention is made of a discussion of SQL injection (p. 150), but that discussion never appears.
Had the title been something like “ActiveRecord Techniques” I’d be less concerned about these gaps. I hope they’ll be addressed in a second edition that is larger and more capacious: We need a single-volume “big book” on AR, and this could be it with some additional work.
In sum: Good book! Great bits! 2nd edition has potential to be awesome.
Sigh: Converting from HABTM to has_many :through is easier than I thought . . .
Nov/070
So the Ministry of Truth has had to intervene on my earlier post.
