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.

Wednesday, August 22, 2012

Why you old phone is slow


I was recently asked by a great friend, "So do you know why Droid's go to shit when they are old?  Is the hardware breaking down?"  I did not work for Android, and this is my personal (if somewhat educated) view on the subject.

A desktop and a laptop to an extent can be over provisioned in terms of hardware with no adverse consequences.  Mobile devices don't have the same luxury - they have to balance performance with the available battery technology at the time of production.  So to give people the best battery life (something they complain about a lot) they have to build the phone with just enough horse power to run the OS at time of design with 1+ years of design time...  They try to anticipate needs when the device will actually be built, but that's hard.  you are trying to design a product that will use a CPU that may not even physically exist yet, with a battery you hope will exist, and an operating system that is being built by a separate team (maybe even a different company) that you can estimate will need more resources that the state of the art.

So with all that in mind it becomes more clear why it is easier for companies that control the hardware and software to build a device that works for a long time.  This is why I have come to appreciate the Nexus Android devices, because the software is designed with the hardware.  Think about the team that was building ICS, they were developing and testing it on Nexus S devices - hence even though it premiered on the Galaxy Nexus it runs very well on the Nexus S.  This is why even though these devices may not have the fastest processor or bells and whistles they will operate better for longer than other devices.

That said, the fact that Android is open source allows the community of developers to make up for the shortcomings of the companies that originality produced the Driod Something.  Custom ROMs can be tweaked and fit to run well on legacy devices, but locked boot-loaders (not the case on Nexus devices) and grumpy wireless carriers hinder this process.

So how about not installing any updates and keeping the exact same software that was on the phone when it was purchased?  First realize that the phone that was on the phone when it was purchased is not the software that was used to design the device (software updates for pre-production code come rapidly and they are generally non-trivial changes).  second you cannot get away with not installing software updates both for your own safety/privacy/happiness, but also as a responsible user of the network that we call the Internet (I don't want SMS spam from your phone).

So if you want to have a good long term relationship with your phone get a Nexus device, iPhone, or look for phones with unlocked boot-loaders and be prepared to tinker with it yourself.

Friday, March 16, 2012

Partitioning a 2TB disk with 4K sectors with Linux

How I got the logical and physical sectors to align properly on a new 2TB disk with 4K sectors.  Posting for posterity.

Wednesday, February 29, 2012

Cloud Storage Solutions

My belabored attempt to break down the practicality of using cloud based backup solutions.  There are probably services out there that I have not mentioned but this is just a few that come to mind.


Edited 3/7/2011 to reflect Google Storage for Developers lower prices.

Friday, January 13, 2012

A Google/Facebook blackout might not kill SOPA

Abstract: At least one person (a must read post) in Washington explicitly wants to censor the Internet and our attempts to stop it may just be giving them more motivation to do it. 



This is the kind of thing that I could do without knowing, but it kind of confirms my thoughts on the subject.  SOPA and PIPA may have started out with big money from the entertainment industry as a way to protect an aging business model, but soon Washington realized what an opportunity this was.  The first step down a slippery slope where a central body has control over what gets published on the Internet, and they get to do it under the guise of protecting an industry's "intellectual" property.  The technically literate community is irate...

Let's think about that for a minute.  Does everybody have their tinfoil hats on?  Great, let's begin.



The Internets are pissed 
(how we see things)


Who are the Internets for the purpose of this discussion?  They are the people that are active participants in the web of information exchange.  That is they use message boards, social media sites, and other means of exchanging ideas with others like them.  For examples see postings on Slashdot, reddit, Hacker News, and the list could go on and on...

Somehow (it does not really matter how at this point) the Internets got wind of these really bad pieces of legislation that were trying to get pushed through.  It was shared among us and the shared response was like something out of a scene in Braveheart.  In my mind reddit is as close to a William Wallace as we've come, but our reaction has been in general to attempt to stir up as much dissent among the Internets and hopefully the average American as possible.  Why not?  After all it has worked pretty well in the past.  

We have done a good job about voicing to the technical among us that SOPA and PIPA is bad and there is none that I know of that are in support of it (or at least that dare to mention it).  Something strange was happening though, none of the major news outlets (read - things my parents would see) were covering it at all.  It wasn't that we were not being loud enough about it; they don't want to cover it.  They want to bring as little attention to it as possible, and that means not trying to spin it as positive (a hard feat indeed) but not talking about it at all.  Recognizing this issue reddit is leading the charge with a way to make sure that we are getting everyone's attention - make people mad.  The claim is that by blacking out popular Internet services that you can illustrate to people what a censored Internet would feel like and prod them to action.  As Forbes pointed out blocking reddit wouldn't be enough and is in a sense preaching to the choir.  They claimed that Google and/or Facebook needed to join in to make this truly effective.  I thought this just might work.  

Imagine if everyone in the US got a message to call or visit their representatives when they visited Google or Facebook.  The response would be unprecedented.  It would show for the first time how powerful the Internet could be - the "nuclear option."  How could it not work right?  If most of the country is calling you really irate and threatening to throw you out of office if you vote for SOPA, are you going to take that chance?


The Internets are causing trouble again
(how they see things)


There is a certain amount of smug pride in being a member of the old guard in Washington and some representatives use the fact that they don't use the Internet and don't care to know how it works as something of a bragging right.  For most of them the Internet is something of a toy or an annoyance.  Then comes the Arab Spring.  All of a sudden the Internet becomes a force for leveling the playing field not only in business, but also in the struggle and dissemination of governing power.

Imagine that you are a representative and people are calling you left and right telling you that they don't want you to support SOPA/PIPA.  On one hand the entertainment industry has a lot of power in the US and they are stuffing your pockets with wads of cash if you are willing to play ball, but on the other hand if people are angry enough you might loose your job.  The tension really starts to heat up when you start hearing about the "nuclear option," and you realize that larger portions of your votes are at risk.  

If you vote against SOPA/PIPA then you are going to lose the support of the massive entertainment industry, and make your constituents really happy (until the next thing that comes along they don't like).  But doing this confirms for those pesky Internet folks that they have a lot of power, and sets a precedence that threatens your future income from lobbyists and their clients.  

If you vote for SOPA/PIPA then you are assuring long term support from the entertainment industry, and the framework will be in place to silence whatever critics might arise in the future.  Since the majority of your voters will move on to whatever reality TV bullshit is trending or the latest shiny toy in a few days anyways, what's to risk?  Possible short-term lost, but a very substantial long term gain.


This is just crazy talk!


By doing what we thought was best at the time - raising awareness about an important issue - I fear that we may have given the politicians more incentive to implement a framework for shutting us up.  

Think about it - the more the Internet flexes its muscles the more the politicians see it as a threat and the harder they will fight to cripple it.  They are getting closer to the point where they risk losing everything and may result to extreme measures to protect their position of power.

The truth is at this point that at least one of our leaders see this as a golden opportunity to silence a very vocal minority.  Civil liberties are rarely lost over night, but it is a gradual descent.  We will not be North Korea over night, but as Benjamin Franklin put it, "those who would give up essential liberty, to purchase a little temporary safety, deserve neither liberty nor safety."  I can't help but think about that now every time I have to fly.




I hear myself and know how crazy all of this sounds.  Hopefully this will all disappear soon, but this one didn't.