Thursday, November 21, 2013

Chrome's new New Tab Page

Edit: apparently this is just news to me. There was a blog post about the OS X Chrome App Launcher back in September. It is still interesting that the launcher promo was in a hidden div tag on the now defunct newtab page.

So the only way I could get Chrome to allow me to access the old "new tab page" was through an internal extension call. Typing chrome-internal://newtab into the address bar simply triggers a search for that term. But on that page I was looking at the source to get the internal sources for some image files to customize the iOS 7 New Tab Page extension when I noticed a hidden div that looked interesting...

<div id="app-launcher-promo" hidden>

Remove that hidden attribute and you get this little gem.


Following the "Learn more" link quietly (really no downloads or installs etc.) adds an application drawer to the OS X dock. This is all you see in the browser, and note that there are no links to download or install anything.



I am using Chrome Canary which explains why the icon is all yellow.




I still don't like that they removed the ability to disable the to disable the Instant Extended API or as I like to call it the wasted clicks page, but having the app drawer will mitigate the issues on my laptop for a while. I am not sure that this will work on my Ubuntu desktop. This does not work on Linux, and you just get redirected to the chrome web store. This is a shame since I spend a lot of time working on my Linux desktop.

On a side note the iOS 7 New Tab Page is interesting, but I am not a fan of iOS, there are some extensions that it fails to open and the bookmarks bar is missing. Also it is a little cheesy at points - the fake wifi signal and battery indicators...

Monday, October 28, 2013

Making an OS X Mavericks USB Installer

I have put off updating my OS X install since Snow Leopard. All the applications I have wanted to use were supported on Snow Leopard, and even people I know who worked for Apple were unable to give a compelling reason to upgrade. Very recently (within the last two weeks) I have found just two applications that I was interested in, but unable to install on my vintage OS X. So I began looking to upgrade, and to my surprise the most recent version of OS X (10.9 Mavericks) was a free upgrade.

There were some things that I had done to my existing installation that I wanted purged, and it had collected clutter since Snow Leopard was first released - yeah it has been a very stable OS.  The solution was to make a bootable USB drive.  There are no shortage of tutorials on various pages for doing this, and a number of developers have even created applications to take care of the dirty work for you. The problem was that none of those methods were working for me.

It seems that they were all running into problems formatting the drive I was using, and I am still not sure what the problem was.  After running the following command

$ sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction

And entering the necessary credentials I got the following error (complete with an grammatical error).

Failed to start erase of disk due to error (-9999, 0).
A error occurred erasing the disk.

Several Google searches for an explanation or workaround yielded little help. Luckily I stumbled onto a macworld tutorial that offered a more manual way to create a Mavericks USB drive.  The section of interest is the one labeled "Option 2: Use Disk Utility."  I was able to use these instructions when nothing else would work.  Here is a simplified set of instructions:

  1. Mount InstallESD.dmg - once you have downloaded Mavericks to your main Applications folder, right-click the installer, and choose Show Package Contents from the resulting contextual menu.  In the folder that appears, open Contents, then open Shared Support; you'll see a disk image file called InstallESD.dmg.  Double-click InstallESD.dmg in the Finder to mount its volume.
  2. Mount BaseSystem.dmg - using Terminal with the command
    $ /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg
  3. Restore BaseSystem.dmg to the destination partition - launch Disk Utility and Select BaseSystem.dmg in Disk Utility’s sidebar, and then click the Restore button.  Drag the BaseSystem.dmg icon into the source field on the right, and the properly formatted destination partition into the destination field.  Click Restore, and wait for the restore procedure to finish.
  4. Replace the Packages alias with the real thing - open the destination drive, open the System folder and then open the Installation folder. Delete the alias called Packages.  Open the mounted OS X Install ESD volume, and drag the Packages folder into the Installation folder on your destination drive (you are replacing the deleted Packages alias with this Packages folder). 

I now have a clean installation of OS X, and so far it is OK.  I have had some issues with Google Chrome's Flash process keeping my MBP awake and draining the battery, but so far nothing earth shaking. That's how it should be; operating systems should be boring. To quote Linus Torvalds:

Guess what? Wheels have been round for a really long time, and anybody who "reinvents" the new wheel is generally considered a crackpot. It turns out that "round" is simply a good form for a wheel to have. It may be boring, but it just tends to roll better than a square, and "hipness" has nothing what-so-ever to do with it.

This isn't to say that performance and security updates are not necessary and welcome improvements, but who cares about the latest iOS/OS X blah feature that will change your life.  For me a good terminal and a decent browser have been almost all I have needed for the last three years...especially on a laptop. On a side note I did upgrade to an SSD at the same time, and that was an amazing performance upgrade.

Tuesday, April 02, 2013

Designing tests that scale - or what I do all day

It has been a long time since I have posted anything here, but I feel like sharing a bit of what we have been up to.  We have been working on improving the quality of our tests, and increasing what we can measure while reducing the amount of data that we need to transfer to do the measurements.  Part of this work has been developing a custom web server written in Go that uses a highly efficient packet capture mechanism (golibpcap).  All this is wrapped up in something we call the net-score diagnostic test server (nsdt-server).

Without the nsdt-server we are limited to only looking at timings exposed at the application level (HTTP) as this is all the browser gives us.  This data is great for looking at end-to-end performance that applications can expect, because it is performance at the application.  It encompases everything between the server and the client giving a complete measurement - how long did an object take to get from server to client.  Simple and useful.  But what it does not tell us is why?

A lot can happen in the 30 ms between when the server sends the data and when it actually is received by the client.  The browser tells us that an object has finished downloading only after it has arrived in full - every last bit.  Before that last bit arrives there could have been packets that were lost, sent out of order, malformed and retransmitted.  This can mean that instead of one round trip to the server to get our object we may have had to make many smaller requests to make up for mishaps along the way.  Lucky for us TCP takes care of all the messy work but knowing what lengths TCP had to go through to get a complete copy of the data can tell us a lot about possible inefficiencies in the connection.

To learn about how TCP works hard so that applications don't have to you can use tools that capture streams of packets like wireshark.  This is great if you want to see one connection (your own), but we needed something that was going to scale to global proportions.

Part of our nsdt-server is a RESTful interface for starting packet traces.  Without going into too much detail here our server can manage many traces at once and when a trace completes it sends the results to a central control server to be processed.  Even with a highly efficient server we are going to need hundreds of these spread all over the world so we also developed a decentralized load balancer to send clients to a server that has a light load.  This decentralized load balancing server also keeps track of what servers are online and allows new servers to join without any human interaction.

I keep using the word global because even in our very quiet beginning we have data coming in from six continents!  Which is great because we are trying to build a globally representative picture of broadband access, but we still need more data.  Here is an interactive sample of some of the data we have collected so far.  You can see that western Europe and the eastern United States have the best coverage, but with more reach we hope to illuminate some of the darker corners of the global broadband market (like our tests from Fiji and Bermuda).  Here is a bigger interactive view of the map below.

net-score test locations

The hope at this point is that you are interested in getting involved.  If you have a blog or website no matter how small or obscure (actually the more obscure the better) you can help by putting a small snippet of our code in your website/blog.  We have widgets that can be installed into Google sites and Blogger, and JavaScript that can be pasted into other sites.  We would love for you to install a visible version of the tool (like in the top right corner of this page), but if you want something low-key we have a version that runs completely in the background too.  Detailed instructions can be found here, and if they are not clear or you need help we are glad to help.

Cross posted on the net-score blog.