Creating your first chrome app on a Chromebook

Doing development on Chromebook usually means developing online. There are a lot of sites around for that. But with the APIs getting more mature, its just a matter of time before someone builds a kick-ass Screenshot 2015-05-09 at 2.26.09 PMIDE which runs natively on Chromebooks without network connectivity.

One such tool which I’ve been exploring for a last few weeks is from Google and called “Chrome Dev Editor” If you have never built and run a chrome app or extension, I’ll show you how to do this in 3 easy steps.



Step 1

Launch the app and click on the “+” button to add a new project. Pick a project name and select “JavaScript Chrome App” in the drop down menu.Screenshot 2015-05-09 at 2.33.38 PM




Step 2

Notice how it automatically adds the minimum code required for it to run. This will be the template you are going to work with. You are almost done, but lets review the files in there to understand why they are there.Screenshot 2015-05-09 at 2.36.14 PM


  1. manifest.json – This is the most important file. Modify the app name, version number, capabilities, permissions, scripts using this file. This is the only filename which cannot be modified. Everything else can be controlled using this file.
  2. background.js – Noticed that manifest file mentions this script in it. This is the script which will start up first when the app comes up.
  3. index.html – background.js requests a window to be created using “” and this is the file it points to for the contents of the window.
  4. main.js – This script is called from index.html. It won’t start up until the window is created
  5. style.css – index.html declares this as a stylesheet
  6. assets – The icons for your project are kept in there


Step 3 

Thats it. Click on the play button on the top left corner of your editor to launch the app.Screenshot 2015-05-09 at 2.47.43 PM

Final steps – “Chrome Dev Editor” can upload and publish the app for you with a single click. Since you are on a chromebook, you should know that you can save your code on Google Drive as well, which will just sync across multiple devices automatically. And if you’d like to revision control your code, know that the editor has built in support for syncing code to git as well.

The mobile revolution in numbers..

I’ll be honest. I didn’t know who or what “Mary Meeker” was until last year. The data I saw then and what I saw in her latest post is beyond fascinating. She (and her team) has put a lot of effort in collecting and analyzing interesting trends from all around the world. The end result is a deck like this one. I’m sure different people see different things in the deck… I picked the two slides below as the ones most interesting to me.

The first one is about tablet growth. If you had time to see just one slide, this one would be the one. It shows the trend around what people are buying. Its very clear that notebooks took over desktops in 2009, but what I didn’t know was that tablets are exploding in a way no one anticipated.

It should be noted that average lifetime of the desktop is way longer than notebooks, and tablets/smartphones probably have the shortest lifespan. But even if you take that into account, the growth of tablets/phones is nothing short of a revolution.
Screen Shot 2014-05-31 at 9.01.01 PM

The second slide shows the distribution of time spent on various forms of information consumption devices. Its fascinating to see that in Indonesia people spend 6 hours in front of a computer of some kind. People in US on the other hand spend only 5 hours. Japan has the least.. only about 3.6 hours on some form of computer. But Germany and South Korea shocked me. Do they hate tablets ? Im puzzled as to why tablet use is so low.

Screen Shot 2014-05-31 at 8.59.26 PM



Share Quickly: Taking screenshots of a chrome tab and publishing it online

It has been a while since I got my hands dirty writing code. So here is a tool I cooked up last night.

Share Quickly is a chrome extension which takes a screenshot of the active tab Screen Shot 2014-05-04 at 9.31.41 AMand uploads it to a public website which makes screenshot sharing a one click task. I plan to make these images disappear from cache after some time to save on storage… haven’t figure out how to expose that yet.

The files are hosted on Google’s App engine using cloud storage and the front end for that service is on Google Compute engine. I choose to write this in PHP instead.

Interestingly the backend storage is not limited to images only. You can actually use to save and share arbitrary pieces text. Note that none of this is pretty, so be warned.

Feature requests and general comments are welcome.

Chrome devices for everyone…

I compiled a list below of all the chrome devices which are sold today or were sold in the past. I did this primarily to understand the device trend.

  • Interestingly the average price for a chrome device is around $340 US on Amazon
  • 16 GB Flash is most common, but some devices have 32 GB option
  • There is only one device I know off which comes with a real harddisk, but that’s not listed in this chart.
  • 2GB RAM is still popular, but more of the recent devices come with 4GB
  • Average weight is around 3 pounds
  • Average screen size is just over 12 inches for laptops
  • Average battery duration is around 7.5 hours on single charge

Note: This information was collected from various sources (including wikipedia and and Amazon website) and may have unintentional errors.


The trouble with ubiquitous computing

The idea of “ubiquitous computing” most people dream about doesn’t usually include the troubles of patching them every week. It doesn’t even mention that there would be new bugs found daily and that most of the fixes would be available weeks if not months after they were discovered.

Windows XP

Windows XP has been in news recently because Microsoft has finally pulled support for this aging OS. 30% of all active desktops are still on XP and now we know of a new security bug, which would never get fixed for these users.

XP may eventually become the epitome of unpatched buggy software because of the visibility this issue got, but I feel this may just be the tip of the iceberg. For every XP out there, I bet there is one or more unpatched networking device just waiting for someone to exploit it, and this number is growing very fast. Some of these bugs are just that… bugs, but I suspect most of them are due to less then reputable code/design quality.  Its a wild-wild-west out there and this has to stop.

The other problem with ubiquitous computing is that the number of devices per house hold is growing rapidly and doing manual updates to every single one is getting close to impossible. We need to get to a place where users won’t have to worry about manually updating the devices. The industry as a whole needs to do a better job at promoting a type of automation and testing which requires significantly higher levels of investment in resources (by manufacturer) to make it happen. Apple with its iOS update infrastructure and Google with its Chrome updates has shown that its possible to do it at scale.

So what can we as users do ? For a start we may have an obligation to ask about auto-updates when we buy new devices. For connected devices at least, shipping updates shouldn’t be “optional”. Vote for the right manufacturer with your wallet.