SOPA/PROTECT-IP Blackout Simulator

This is what most of the Internet might look like, if SOPA passes.

Ok, I’ve written a quick little client-side Javascript function that will simulate what a SOPA/PROTECT-IP Internet may look like. Feel free to link it into your website and help spread the word.

Demonstration Page: here
Code: Github Repository

AmericanCensorship.org Infographic
Electronic Frontier Foundation Campaign

Chrome Multiuser / Limited User Account Installation Annoyances

To the Google Chrome installer builders: there are a few things that would be nice to have fixed.

Limited User Account installations: On Windows XP x64 Edition (and probably other versions), trying to install the default Web Install package from here fails with the message “Google Update installation failed with error 0x80070003”. Whatever that means. I have a hunch that on Windows Vista, and Windows 7, the User Account Control stuff might intercept that the installer wants privilege escalation and automatically pop up the right dialog for this.

What you see if you try to install the default Web Install package without running as Administrator.

If I click on the link “Show me help for this issue.”, there’s not much help there. Oddly enough, I was just reading Microsoft’s “Windows User Experience Interaction Guidelines”. The section on “Error Messages / Error Codes” applies here.

That's useful.

I know what you’re trying to say, Google Update is a system service, so it probably wants Administrator rights to my system. It would be nice if it didn’t, maybe if it ran under the Limited User’s profile only. I understand that’s less secure, but ok, I try installing the package with the “Run As” option to escalate privileges to the installer.

Let's try it this way.

The installer completes, as the Administrator account. But wait, where’s the icon in my Limited User Account? Oh no, the default Chrome installer package only installs to the account whose credentials were used to run it! e.g. Only the Administrator account has Chrome now.

Catch-22. So I uninstall you.

Then I see that there is an “Alternate (offline) Google Chrome installer (Windows)”, which allows me to download one version of the installer that installs Chrome “for your own user account only” or a version that installs Chrome “for all user accounts on your computer”.

The first package doesn’t work, for the same reasons the Web Install package doesn’t work.

The second package works, when installed as Administrator, which makes sense. However, when the Installer starts the Chrome Browser for the first time right after installation, it runs the Browser instances as the Administrator account, not as the Limited User Account.

When I go to start it with the Limited User Account, I get two errors. First, “Failed To Create Data Directory, Google Chrome cannot read and write to its data directory.” Second, “Your preferences can not be read. Some features may be unavailable and changes to preferences won’t be saved.”

Profiles missing for accounts not used during the install.

I select a different directory for my preferences, using the directory chooser.

When I close and restart Chrome, I get the same error, because the –user-data-dir in the Google Chrome shortcut in my Limited User Account somehow gets reset.

Adding --user-data-dir=(somewhere) to the shortcut allows Chrome to work in a Limited User Account.

If I add –user-data-dir to the Quick Start shortcut, it somehow/sometimes gets reset to something without the –user-data-dir flag the next time Chrome is started, but after that it doesn’t get reset. (I’m not going to debug why this is so.)

If I add –user-data-dir to the shortcut located on my Desktop, it doesn’t get reset.

I have a hunch here that the multiuser installation will work under Windows Vista and Windows 7 because of that weird profile virtualization stuff Microsoft built into them (and which annoys the heck out of software developers, because we never know where a profile’s files are actually stored).

In any case, after all of that, the browser does work fine, but the taste of a bad install experience does not cast a good first impression.

Vertical Sync and Ubuntu 10.10

Ubuntu 10.10, with the Compiz desktop effects enabled, is a formidable user interface. One minor issue is that the graphics refresh ignores the vertical sync by default, leading to some tearing and visual ugliness.

There are three settings that I used to fix this up, with a marked improvement in visual quality. Note: With vertical sync enabled, the UI might feel just a few milliseconds more sluggish than before, because it will wait slightly until the next sync pulse to refresh. This takes a little getting used to, but the overall improvement in the feel of the UI can be worth it. e.g. No more flickering!

Setting 1 is the “Sync To VBlank” item in the CompizConfig Settings Manager:

Setting 2 is in the “X Server XVideo Settings” panel of the NVIDIA X Server Settings control panel.

Setting 3 is in the “OpenGL Settings” panel of the NVIDIA X Server Settings control panel.

Testing REST API with LearnBoost’s Tobi + Vows.js

I've been looking for a clean, framework-independent way of doing white-box API testing using Node.js. For a long while, the things that popped up when doing a quick scan of the Node Package Manager package lists weren't ticking all of the right boxes: zombie.js is going for a full browser simulation but doesn't provide a simple Browser.post() method (you have to use selectors to find the form.submit button and then fire a click() on it), Node's native http.Client is too low-level and doesn't do cookies, and various other http request wrappers weren't quite cutting it either. I think I've found a solution for this particular version of the problem: LearnBoost's Tobi combined with Vows.js is letting me do clean REST API testing, with a minimum of hassle, and all the built-in sugar-coated goodness of should.js fluent assertions. For example: Future steps then include using the macros to help set up other tests that require a valid user, etc. Overall, this is the most straightforward solution I've yet found for the problem of testing a REST API while also faking a session.