Thursday, April 03, 2014

An Apology to Brendan Eich

Brendan, I’m sorry I did not get this out earlier. I had written much of which follows on April 1st and because of internet tradition of April Fools, I delayed posting this. You are a hero.

I support Brendan Eich. It saddens me to see the Mozilla community so divided. I am disappointed that Brendan stepped down.

This is personal for many. People have spoken of their pain. Many have acted on their feelings and beliefs. I don’t mean to lessen either.

I’m not from California and was not involved in the Prop. 8 campaign. I’m an older, straight, married, white male, so I do not have the perspective of being a minority. But, I have promoted “Diversity for better solutions” in public and private ways. Diversity is important.

Brendan Eich is a hero. He risked his career to fight oppression by co-founding Mozilla. At that time internet jobs were not so plentiful or lucrative as they are today. It was a big risk. Microsoft nearly succeed in monopolizing and stifling the internet. Firefox saved us from a tyranny.

Microsoft also nearly derailed JavaScript, a foundation technology of the internet and the disruption, startup world we currently enjoy. When Microsoft released JScript as part of Internet Explorer, it took nearly 10 years for the JavaScript community to recover. I know this personally.

As the creator of JavaScript, Brendan Eich could have turned his back on Microsoft. Surprisingly, many times over the years he reached out to Microsoft and started a dialog. Microsoft is now a supportive member of the JavaScript community.

Mozilla and JavaScript are primary reasons "software is eating the world”. They are the reason we have these new careers like Front End Developer. They are the reason we have new ways of telling the news with JavaScript Journalism. Mozilla and JavaScript moved the ball. They changed the world.

This is my perspective, perhaps a historical view. I’ve been active with JavaScript since 1995. I started the first software store in the world in 1979. I’ve seen how Microsoft damaged people’s lives. I’ve seen how Mozilla made a better world.

As an active member of the JavaScript community, in my view Brendan Eich has represented Mozilla very well for many, many years. He would have been a great leader of Mozilla.

Brendan is a friend. I first meet him at the Ajax Experience in 2006. We’ve hung out together at JSConfs. He’s offered to help me. It is an honor to know him.

I was surprised when I heard from a friend that Brendan had supported Prop 8. I am glad she talked to him about it. I disagree with Brendan on this as well. This does not mean we are not friends. I have friends that are Republicans. I have friends who don’t believe in climate change. I have a friend who believes man never landed on the moon and some evil conspiracy theories. 

It is ironic that a law meant to protect us from corporate influence has resulted in this outrage against a man who has successfully fought one of the biggest monopolies we’ve ever seen. Unintended consequences.

I am disappointed the Brendan stepped down as CEO of Mozilla. He has done wonderful work and think he had the vision to lead Mozilla into the future.

Best of luck to a good man.

Wednesday, March 26, 2014

Interview on Hoodie Blog

Lena Reinhard from Hoodie interviewed me for their blog to discuss Hoodie and Offline First. I'm very pleased the interview.

"Offline is a fact of phone apps. In a rural area or in a big city, a phone is going to lose connectivity."
"He wrote a great tutorial on how to get started with Hoodie."

Wednesday, March 19, 2014

The Washington Post Gains 10m Members

By offering free digital access to subscribers to other newspapers, The Washington Post just picked up 10m members. Paywalls change the business model of newspapers from subscribing readers to adding members. When Jeff Bezos bought The Washington Post he purchased $175 million in membership. Having the credit card number of each digital reader (i.e., member) is of great value.

Nieman Journalism Lab and others wrote about The Washington Post offering free digital access to other newspapers. There is no such thing as a free lunch. So what does The Post gain by offering free digital access to local newspapers around the United States? Members in Texas, Honolulu, Ohio, Minnesota, Wisconsin and Pennsylvania. According to The Financial Times, 10m members. This expands the audience for offers to members with credit cards on file. Steve Hills, president of The Washington Post suggested that it could be expanded to “any company that sells premium subscriptions.” This is the new membership business model.
As a membership business, The Post will next follow the lead of associations, loyalty programs, unions and others. These organization make substantial money from the “member benefit” offerings. There is a whole industry that sells to these organizations and I’m certain they are calling on newspapers everyday. Expect to see The Post offer more than just a wine club. Credit cards, travel deals, insurance and more. And add staff to support this. “It pays to read The Post."

Thursday, March 13, 2014

Getting Started with

As a fanboy of couchdb, I’ve kept an eye on the hoodie project. Hoodie is an architecture that helps with offline operation and handles login/registration. So I wanted to write a step-by-step tutorial on Getting Started with Hoodie. This tutorial will modify the demo todo app.

Step One - Installing Hoodie
The website walks you the installation. The steps should be pretty familiar to most developers. For Mac, it uses home-brew and npm

Step Two - Create Hoodie Project
You’ll need a folder for your project. Hoodie command line interface does this and populates it with the required files and folders.

In my case, in my dalyapps folder I typed:
hoodie new hoodietut

You’ll be prompted for an admin password.

Step Three - Start Your App and Test It
From the command line type
hoodie start
and it opened up a browser tab at 6004
You should see a hoodie app in your browser with a subtitle of ‘hoodie playground’. This ‘test’ shows that hoodie is working.

The command line output also shows you this information which you’ll use later:
CouchDB started:

Step Four - Play with the App
The demo todo app shows off what you can do with hoodie. You will probably notice that it looks like a bootstrap app. Though the app uses bootstrap, hoodie has no dependency on bootstrap and any CSS framework can be used.

In the upper right, there is a drop down for Sign Up. Click on it and created an account with username and password. Now you should login because only then will data be saved.

Type in a few todos like “learn hoodie” and “steps 5, 6, 7 and 8”. You should see your todos displayed.

Nice to see a hoodie demo after just three steps!

Step Five - Tabs for CouchDB and Admin
The demo app is already opened in your browser. Start two more tabs for CouchDB and admin. For CouchDB I wanted to see the Futon app, so these where the two urls I used:
While I did not use the admin (:6005) yet, it was good to know it was there. You don’t need Couchdb except for monitoring the hoodie magic.

Part Two: Make Hoodie Your Own: Go Nuts

In the next several steps the todo app will be modified to give todos a priority of 1, 2 or 3. The list of todos will be sorted on priority.

Step Six - Open your text editor
At this point the site tells you to “go nuts”.  There are a few more steps you need to take before you can write your own hoodie app.

In my case, I started sublime text with a new project for /dalyapps/hoodietut. This was the folder created by hoodie in Step Two.

You should see folders of data, node_modules and www. Hoodie command line has set up files for both hoodie and the demo todo app.

We are going to be working in assets folder of www.

Step Seven - Edit your first hoodie files
To start creating you own App there are two files you’ll want to copy. In /hoodietut/www/ copy index.html and name the copy new.html. In /www/assets/assets/ copy main.js and rename the copy to new.js.

In sublime (your text editor) open new.html. On the last line you’ll see

<script src="“assets/main.js”"></script> 
Change that line from main.js to new.js

<script src="“assets/new.js”"></script>

Open a new tab in the browser and go to 
This displays the file you just copied.

In the start of the body you’ll see the line “hoodie playground”. Modify that to read “my first hoodie app”. When you reload the browser you should see your first modification to a a hoodie app.

Step Eight - Button Please
The demo todo app lets you type in a new todo. It saves it when you hit the Return key. This works fine for a single input. But more because priority will be a new input, a submit button would be a more appropriate.

First, add a button to the new.html file. Look for the text input - search for “todoinput”. In the line after that add a button with an id. I used:
<button id=“addBut”>Add</button>

Second, change new.js so the addTodo is triggered when the button is clicked instead of on keypress. Replace the six lines of code after //handle creating a new task with

// handle creating a new vendor
$('#addBut').on('click', function() {'todo', {title: $("#todoinput").val()});

The first line here looks for a click on our button. When the button is clicked second line adds a new task into hoodie using the method. This method takes two parameters: type and a data object where the task is defined. The third line clears the input.

Save these files and run your modified app at:
Enter a new task. You should see it displayed when clicking on the “Add” button.

Step Nine - Understanding Type
Type is an important convention to understand when working with Hoodie or Couchdb. Type is a convention to deal with the lack of schemas in Couchdb.

In Couchdb the same database can contain a wide variety of different records. For example, you might have records on people and records on location. Type is used to distinguish one record from another. So the people records would have fields like fist name, last name, etc and a record called “type” with a value of “people”. The location record would have fields like street, country, etc and a record called “type” with a value of “location”

Hoodie uses type the same way. It is a way to store different ‘types’ of records in the same database. In this demo only the “todo” type is used.

So while type is not critical for this application, more complex application will have several types.

Step Ten - Adding Priority
Adding a priority requires an new input field, adding it to the display and modifying the add method we just worked with.

In new.html add a select input before the button we added above:

<select id="priorityinput" class="form-control">
  <option selected="selected">2</option>
<button id="addBut">Add</button>

Then in new.js modify the addBut handle to store the priority.

// handle creating a new vendor
$('#addBut').on('click', function() {'todo', {
  title: $("#todoinput").val(),
  priority: $("#priorityinput").val()
Also in new js modify the addTodo function to show the priority.

function addTodo( todo ) {
  $('#todolist').append('<li>'+todo.priority+' '+todo.title+'</li>');

At this point you should start seeing each task listed prefaced by a priority. Hoodie makes it pretty simple to add new fields to a store.

Step Eleven - Sort By Priority
Out todo list would look a lot nicer if they were listed by priority. So lets change the sort in new.js.

function sortByCreatedAt(a, b) {
  return a.priority > b.priority;

Now your number one priorities show first.

Conclusion: Give It a Try

Hoodie is very easy framework to start using. It builds on a developer’s knowledge of jQuery. It can use Bootstrap, Foundation, Enyo or any other front end framework. With very little JavaScript code you get authentication (login) and data storage. It’s offline ability is hard to beat.

Hoodie is a work in progress. There are more features to come. But don’t let that deter you from trying Hoodie. I think you’ll be please by what you find.

Tuesday, December 31, 2013

My 18 months working at The Washington Post

December 19, 2013.

Yesterday was my last day as an employee of The Washington Post. I completely enjoyed working for a great institution. I've dedicated nearly the last 20 years to two foundations of democracy: newspapers and public education. The last 18 months at The Washington Post were great.

I’m very proud of the work I did on the mobile web version of The Washington Post. You can see it when you go to on your phone. On a desktop browser you can see it by going to and setting mobile version. I came in late to the project and the initial development work was done by David Young and Thad Cox. I learned a lot from both of them. We were part of a great team. No other paper’s mobile web application supports offline reading as well as The Washington Post and has the performance this feature provides.

Live sports scores and other content like Post Pulse and Topicly are displayed in this version using wpwidgets. This is a technology that I developed and expect it will be used as long as the current platform is supported. It was one of my better accomplishments.

I am very proud of the implementation of comments on mobile web. I love the performance and the clean display using Joey Marburger’s design and Sean Soper’s excellent Argus platform. I came away believing adopting graph database technology to comments will revolutionize web comments especially with paywalls. That is for the future.

Another accomplishment was the 2012 Election Night coverage that was designed specifically for mobile. I had the privilege of working with the very talented Katie Park on this project. Nodejs was used on the backend to convert the Associated Press election results API into SVG maps. These were then converted into PNG maps on Amazon Web Services for mobile. Various techniques were used to take advantage of cache but still provide the latest results. One take away was that no news organization can report on elections without JavaScript.

Duncan Graham became a good friend at The Post. We worked together to host The Washington Post JavaScript Users Group. It was out of these meetings that I developed the concept of JavaScript Journalism and hoped that it could be a common vision for the newsroom and IT.

The final item I want to mention is the concept app called PostDeck. I’ll write up more details in a separate post. I completely enjoyed developing this design and tablet vision of a large newspaper. The feedback from my fellow developers was appreciated.

The Washington Post is very innovative and the entire industry has huge opportunities ahead. I wish my former colleagues the best. Thanks to all the staff, not just the ones mentioned above, for a great 18 months. I’ll miss working with you and look forward to seeing your great work for years to come.

I will be moving on to develop my own apps at I'll post more about these web apps separately. 

Tuesday, August 06, 2013

Bezos Getting $175 Million Membership Value in The Washington Post

With the purchase of The Washington Post by Jeff Bezos, he is acquiring a 'membership' alone that has a value of $175 million. He is also purchasing many other assets for his $250 million.

For the last year at The Washington Post, I've argued internally that paywalls turn readers into members of The Washington Post. Paywalls turn newspapers into membership organizations. In other words, the subscriber database transforms into a very valuable digital membership database. For many internet companies this is their primary value. The membership profile of a Washington Post reader is richer and thus much more valuable than most internet memberships.

While paywall revenue is certainly valuable, the real value in a paywall is acquiring a credit card number for each member. Having a credit card on file for readers completely transforms the newspaper business model.

Paywalls turn newspapers into e-commerce operations. 

This is easily understood in looking at how digital ads will change. Any ad can now have a 'buy me now' button with a credit card on file. This substantially reduces the 'friction' in converting an ad viewer into a customer. The staff selling ads now has a much different job selling a product into a 'news app store'.

In a print newspaper you read the same ads as everyone else. When reading a newspaper online the ads (or products) are targeted based on your profile. The better the profile, the better the targeting and the value of the ad. With a credit are on file the profile is even richer. The depth of a newspaper membership is a marketer's dream.

The online profile also allows The Washington Post to be competitive in some markets again. For example, many believe that newspapers have lost the classified ad business to Craigslist. The Post's membership profile is stronger that Craigslist leading to several opportunities.

The value of a credit card on file can be approximated. In the tablet marketplace revenue comes not only from the hardware sale but from app store sales. When HP launched their ill-fated tablet, having a credit card on file was so valuable that they gave away $50 in merchandise just for putting a credit card on file in their app store. When Android was launched, Google received a lot of criticism because of the low number of customers with credit cards on file for their app store. Amazon was able to instantly create an app store because they had credit cards on file. This is ample evidence of the value of having a online profile with a credit card on file.

How did the $175 million figure come from? I believe that The Washington Post can easily get credit cards on file for one million members. This is based completely on extrapolating publicly available circulation numbers and online traffic. This is not based on any internal numbers. (In fact I have very limited access to any numbers at all in my job.) The number of subscribers and revenue from Apple's app store are available. These rough numbers suggest an estimated contribution of $175 per member to Apple's valuation. So I used this figure to value The Washington Post membership. While the $175 figure may be high, the member estimate is probably low. 

I think Bezos purchase of The Washington Post will accelerate the transformation of the newspaper business model that I think was inevitable. The biggest personnel impact will be in expanding IT department because of the importance to build the online profile. Next, as I explained above, will be a change in advertising sales.

My work at The Washington Post is coding primarily for mobile web. You see my work when you visit with your phone's browser. I've took this job just over a year ago. The views here are my own.

Personally, I'm excited to see the newspaper transformation from the inside. The Washington Post is known to foster innovation. Many people will now be interested in working here and I'm already here.

Wednesday, June 05, 2013

JSConf 2013 in Review

JSConf, as several others agree, is a great and important conference. It keeps getting better each of the last five years. This post focuses on this year's presentations and the cumulative effect of the talks. When possible, I'll link to the slide deck. (Videos will come in a few months.) There were too many to review them all.

First, the Web is the platform. JavaScript is the VM. Brendan Eich in his talk, JavaScript Is 18, showed the game "Unreal Tournament" running in the browser without a plugin. Written in C++, the target was ASM.js. Everything will be either written in JavaScript or compiled (built) to JavaScript. Yes, everything! His slides do a nice job of showing how the web stack has grown.

This is not saying that JavaScript replaces C++. As Brendan pointed out, ASM.js is not meant to be hand coded but a target. So if I was writing in another language, I'd want to make sure it could be "compiled" to JavaScript or I'd write it in JavaScript. Note, two days prior he gave the same talk at Fluent which is available on video. "Always bet on JS."

Second, because a build phase is now fairly common JavaScript and CSS are intertwined. For example, you can tweak you JS for performance, but you still have to be concerned with the performance of your CSS. Nicole Sullivan's Creating Living Style Guide reinforced this. She provided hard numbers (60% faster to first byte and 11% increase in page views) for refactoring an existing site's CSS. She suggested using Grep, CSSLint or CSSCSS to look for duplicates. Other talks like Adobe's TopCoat  and Rebecca Murphey's Optimizing for Developer Delight (in her "Build Everything" section) also emphasized this.

Third, there is math. College level stuff like linear algebra and matrix manipulations. Raquel Velez @rockbot rocked the house with her talk AI.js: Robots with Brains. She is now a contributor to the Johnny-Five library for Arduinos and was a leader for the NodeBots day. One of the talks that generated the most buzz during JSConf was Making WebGL Dance by Steven Wittens. I'm just starting to go through the slides because I was in track B during this talk. (jdalton's performance talk also got buzz.)

Fourth, responsive design took some serious hits. For most people it means one code base using media queries to use different parts of the css or js to produce different layouts. Brian Leroux who is working on Topcoat at Adobe emphasized we may never be at the point that serving one set of files provides the best experience. Adobe open sourced their research.  Topcoat has desktop and mobile versions. In DOMkata: The Dark Art of Mobile Web during CSSConf Mike Stamm, WSJ mobile web lead, showed the difficulties determining just browser width.

Angelina Fabbro presented JavaScript Masterclass: How you you go from being a good developer, to a great one? This was one of my favorite talks. I've recently started considering myself a below average JavaScript coder because about 50% of us are. It provides a new perspective. One of the reason's I attend hackaton's is to see how I am doing. She created nice checklists that are useful to figure out how you want to grow as a coder.

Boom! Promises/A+ Was Born: The story of Promises/A+ told by Domenic Denicola was inspiring (liveblog). It was an interesting analysis of the JavaScript community because it shows how to get things done starting as one person. His checklist on "What made the Promises/A+ effort work so well" is a step by step guide for anyone. I especially like how the testing was such a key part.

Angus Croll added seven more authors to his previous literary figures writing JavaScript. Hilarious presentation that forces you to examine one's own writing style.

yayQuery's appearance at JSConf was LOL for nearly a full 30 minutes. Showed Best of Video. Hilarious. In 2010 I had at the pleasure  to sit at the same table as them along with Brendan Eich. As I said then, "Clearly the next generation of javascript and funny." Rebecca Murphy, Paul Irish, Adam Sontag and Alex Sexton all continue to make significant contributions to the JavaScript community.

The day between the talks harkened back to the first JSConfs where the same people sat together all day. This year I was at a table was in the NodeBot event. Every participant (attendee) at JSConf receive an Arduino. Our team built a robot arm that typed "helloworld.js" (second video). My teammates deserve most of the credit: Bryan Hughes, Mike Surowiec and Rahul Ravikumar. Every reason to believe that they will have as much success as my yayQuery tablemates have had. Revived memories of my electrical engineering and breadboarding days. Thanks to Rick Waldron, Raquel Velez, Sarah Chipps and other for leading this.

Other talks were also significant. I missed most of the Track B talks. Also missed several of the CSSConf talks. And a few of the talks were so code heavy that I'll have to sit with the presentations to really understand them like Master the CLI with Node and schema liberation with json and plv8. Thanks to all the presenters who took great efforts to make a presentation.

Finally, thanks to all the people with kind words for my talk on JavaScript Journalism, The New ProfessionSimeon Willbanks, Kevin Old, Kevin Lamping, Mark Gayler, Trevor Landau, Francesco Rizzi, Roger Raymond and many, many others including my Dad. I apologize for not mentioning others by name.  It was an honor be in Track A and thrilling to present a unique perspective on JavaScript.

I am seriously considering leading a JS Journalism Conf in fall 2013. Let me know if you are interested.

Other diaries and comments:
James Long
JSConf Storify by Azat
EndPoints Blog
Bryan Hughes Day 1 (with nice comment on my talk), Day 2 (about our robot), Day 3

You Should Speak At JSConf

My other JSConf posts since 2010.

Monday, June 03, 2013

ToDo After JSConf 2013

After every JSConf I have created a list of things I want to learn. For example, in 2010 nodejs topped the list. Once again this year the list is public:

  1. three.js
  2. BEM naming convention
  3. WebRTC - see Remy Sharp
  4. Casper.js, spooky.js and schoolbus.js for node - if good enough for jeb
  5. vektor.js - for robots
  6. asm.js - actual docs, not articles
  8. csscss
  9. creative.js
  10. more grunt

Friday, May 31, 2013

JSConf Differences Since 2009

JSConf 2013 is the fifth annual event. Here are 5 differences that I've noticed since then.

  1. Less need for power strips. Everyone has Macs with good batteries.
  2. More diversity. Keeps improving.
  3. JS Everywhere continues. Almost only JS on browser 5 years ago. No robots, etc.
  4. Track B room is bigger than the entire room for 2009.
  5. More people have JS jobs. 
What has not changed is the humor of yayQuery, quality of the speakers or excellence of the Williams and volunteers.

Wednesday, May 29, 2013

JavaScript Journalism Examples

Examples of JavaScript Journalism from my presentation at JSConf 2013  are now on These examples are from around the United States and one from France. The presentation will be there later today (5/29).