Screens, Images, and Attention (a thing I'm working on)

Many of us have more than a few screens. Mostly they lay idle. A tablet for plane trips, an old phone, a Chromecast connected LCD TV.

I also have a bunch of images I want to see more of. More than 100,000 personal digital photos. And, lots more incredible images out in the world. Millions.

One of the things I loved about the Obama White House was that Pete Souza and his team's wonderful photos were everywhere and changed relatively frequently. Walking to a meeting you'd see a picture of a co-worker and her kids hugging the President. In a meeting room there would be a beautiful photo of Half Dome in Yosemite and Marine One. It was great.

President Barack Obama visits with Natalie Quillian,
Advisor to the Chief of Staff, and family in the Oval Office,
 Aug. 27, 2014. (Official White House Photo by Pete Souza).
Public Domain.
I'm working on using idle screens to bring more of that into my home with my images and those from incredible online collections. The idea would be that the screens could show a playlist (automatically generated or hand-curated) of images from a wide variety of sources and on a wide variety of devices / screens. Incidentally, I haven't been able to find the equivalent of .m3u for images. I don't think it exists. It would be wonderful if people could trade image playlists.

Automatically generated playlists could show images relevant to the day of the year, or types of images, or ones that will look good on that particular screen, or ones I might like based on what I've liked before. An earlier version of this was surprisingly good if it just showed images from Christmas, New Year's and Thanksgiving.

Solar Flare, August 31, 2012, Nasa Goddard Space Flight
Center. Hosted by Wikipedia. Public Domain.
I don't know of a thing out there that does this across image collections. Do you?

I mostly program to learn things. This project will help me really learn the techniques I've been studying through the Andrew Ng's Coursera on Machine Learning. It will also brush up some of my full-stack web development skills as the database will be Mysql, the backend will be Python 3 and Django 2, the frontend will be HTML and CSS with a lot of Javascript (including ajax, which I haven't used too much). And, I'll get to know both JQuery and Cycle 2 well. It has been fun so far and I will share updates as I go, and, eventually, the code.

I'm not doing this as an "entrepreneur." The idea isn't to make a bunch of money or get a million users. Mostly I'm doing this for myself and to learn. I have found that deeply understanding technology is really helpful to my legal and policy work (not to mention my life). I also really enjoy coding for fun. If you haven't tried that, you should!

I'm writing about it here to further commit to finishing it and so that others can share their good ideas.

153rd New York Infantry, ca. 1861, from Metropolitan Museum
of Art. Hosted by the Internet Archive. Public Domain.
If you are interested in using or working on this, please let me know. I'd be interested in understanding other use cases. I would also love pointers to great image repositories (preferably public domain). And eventually, I'd like people to help me rate the pics from some of the public repositories. My email is "lawyer" @ the popular email service run by Google. Or you can @reply me on twitter @amac.

Recap & Response to a Thread on Speech

Sometimes a Twitter thread is easier to read as a blog post.

The below was originally posted on Twitter.

1) Good thread by @yonatanzunger with a bunch of useful truths. Recap & comments from me below.

2) Speech can be used as a weapon against other speech:
See also @superwuster arguing that the 1st Am is obsolete in an era of attention scarcity.

Fight between Rioters and Militia, from Pen and Pencil Sketches of the Great RiotsImage in the Public Domain.

3) People bear diff costs of bad speech & harassment, disadvantaged often most affected:

4) Understanding & combating speech that reduces engagement can further a speech maximizing policy goal:

5) Having + stating an “editorial voice,” gestures, public perception & examples also can be important:

The Frame, from TypographiaImage in the Public Domain.

6) Also, he gives great pointers to smart folks in the online community field:
And of course there are many more, incl: Heather Champ, @juniperdowns, Victoria Grand, Monika Bickert, Shantal Rands, Micah Schaffer, @delbius, @nicolewong, @zeynep, @zephoria, @StephenBalkam, @unburntwitch, @noUpside, @EthanZ,  @jessamyn, @sarahjeong + many many more incl great non-US folk. And including the folks & orgs on the various advisory councils: (and others)
As @yonatanzunger says, this work is a team sport that advances with help from all around.

7) I have some Qs re his 47 USC §230 (CDA) points. I don't know a case of something like his “editorial voice” breaking immunity or otherwise causing a “huge legal risk.” Indeed that was the point of §230 originally. So, asking experts: @ericgoldman & @daphnehk what do you think?

8) Also, I don’t think “maximizing speech” is quite the right goal or that every service should have the same goal. I want something different when I go to Facebook v Twitter v YouTube.
Also, I want more than one good service whose arch + policies (and, sure, “editorial voice”) support an extremely wide diversity of views being able to flourish, be expressed well & be easy to find & interact with including from outside social circles. But your mileage may vary.

9) Naturally, I also disagree that Twitter folks (including me) “never took [these issues] seriously,” provided “bullshit” explanations, were naive, and chased traffic over good policy. Was there & think I'd know.
But, taking that sort of beating is kinda part of the job. And, maybe I’m too biased from working & learning these issues at platforms incl many at Google, Twitter & in govt w/ @POTUS44.

10) Anyhow, I’m very glad @yonatanzunger chose to post this thread to Twitter & I hope the suggestions part is read widely.

Printing Press, from Typographia. Image in the Public Domain.

Google Location History to Country Chart

I had some spare time, so I knocked out another rough and ready set of scripts that I've been meaning to code for a while (see also DenseDead). These scripts, written in python with help from the Google Geocoding API, Google Charts, and the GeoPy module will give you a map of the world with countries colored based on how many years it has been since you visited. Mine looks like this (I added some data by hand for before 2012):

It is kind of kludgy, but in case you are curious, the steps and the scripts are below.

One of the reasons I wanted to write these is because the Google information is awesome but both too detailed for what I'd like to keep lying around, and not useful to me as latitude/longitudes. Instead, I'd like to know the countries I've been to over time. With these scripts, I convert the timestamps and latitude/longitudes into timestamps and addresses before fuzzing them down to years and countries, which is immediately useful and about the level that I want to keep. If you no longer find Google's use of its more fine-grained information useful, you can also clear the more detailed information from Google (instructions to delete your location history).
  1. Go to Google Takeout and download a KML of your location history. Allow me one small digression here.
    Google Takeout exists because of a relatively small group of engineers and others at Google who worked hard to make it exist. The team used to go by the name of the Google Data Liberation Front and have a really cool website and logo. The website now redirects to a support article but there are still great people working at Google working on ensuring that users have access to their data. This type of data portability is extremely important and ensuring it is something I worked on in the private and public sector. Thank you to the current and former team members and allies of the Data Liberation Front!
  2. Run to reduce the number of KML entries to a more manageable number. I threw out all entries that are within 10miles of the last entry I counted. The commandline is:
    #python Google_Location.kml > outfile.kml
  3. Split up the resulting file into chunks so that you don't violate the Google Geocoding API's daily limit. I used "#split -l4000 output_from_reduce.kml infile" that will produce 2000 calls to the Google API per file.
  4. Run on each of the split files. Do one per day so as not to get blocked. The commandline is:
    #PYTHONIOENCODING=utf-8 python input_file.kml
    Note that I needed to specify the encoding because although I think I understand encoding well enough, I don't. If someone else wants to teach me how to fix that, I would love to know.
  5. Join the outputfiles ("#join infileaa infileab infileac > infile_join"). 
  6. Optional: Fuzz the joined outputfiles by using
    #python inputfile.csv outputfile.csv
  7. Run to create an HTML file that will include the javascript for the chart. The commandline is:
    #python input_file.csv > Country_Chart.html
You may download the scripts at amac0/google-location-tools and the most interesting are also below.

First Time in Government

“The President of the United States is going to call you in three hours to offer you the job, so I need to know in two whether you will say yes because we do not surprise the President.” That’s what Todd Park, U.S. Chief Technology Officer (CTO), said to me in August of 2014 as our family was about to head back to San Francisco for the new school year.
Todd Park, Assistant to the President and Chief Technology Officer
shows President Obama information on a tablet April 15, 2013.
Official White House Photo by Pete Souz
In those two hours, I tried to figure out if I could really make a significant positive impact in the job the President would offer me as Deputy U.S. CTO. And, if so, whether that was worth moving our family.  The ability to make a positive impact is generally my north star when trying to make job decisions, but time and again, when I am looking back on whether taking a job was the right decision, the quality of the team I got to work with is always most important. Now that I’ve had some time to reflect on my time in government, and the entire Obama team has moved on from team CTO, I know that this time was no different. While I am extremely grateful for the impact of the work I was privileged to do, I am most happy about my time in government because of the the people I got to do it with.

The Eisenhower Executive Office Building, home of the
U.S. CTO, pictured c 1907, then the State, War & Navy Building
Gall, George, Washington: The Capital of the Nation (1907).
Digitized by The Internet Archive from the Library of Congress

The impact of government work was amazing. Our purpose was clear: help make life better for and with the American people. Under President Obama, Team CTO had significant impact working together along with many others in our home at the Office of Science and Technology Policy (OSTP), elsewhere in the White House, and across the Federal Government. We supported the work done by previous CTO teams to bring tech capacity to government in the form of the Presidential Innovation Fellows, 18F, U.S. Digital Service, and revamped Office of Digital Strategy. We brought more data science and data scientists into government through the creation of the U.S. Chief Data Scientist team and role, and creating a data science cabinet. We expanded data collaborations for solutions in justice, jobs, housing, education, and more, while continuing to get more government data out to the public. The Open Government Partnership (OGP) continued to thrive and grow and we shepherded the U.S. Open Government National Action Plans while teaming up with the National Security Council and State Department to help lead the U.S. OGP. With support from the Chief of Staff, we created a new tool for tech policy making called the Tech Policy Task Force -- which added “TQ” to many policy tables, formulated a federal source code policy, moved the government forward on artificial intelligence and uncrewed aerial vehicles, accelerated open educational resources, highlighted the opportunities and challenges of big data and algorithmic decision making, and worked with the Departments of Education, Transportation, Commerce, State, Homeland Security, Justice, and others to help regulations get out of the way of innovation while protecting people’s rights and lives. We pushed for greater recognition of all American talent, including women and underrepresented minorities in STEM; catalyzing for improvements in the portrayal of STEM people in media; expanding inclusive opportunity in computer science education; ensuring outreach for jobs in innovative industries in hiring programs, such as TechHire; increasing Internet connectivity in the U.S. and around the world; championing innovative local community solutions; pushing through more diversity and inclusion in the Federal government workforce; and expanding best practices in organizations and companies in diversity, equity, and inclusion, including an implementation action grid, the Tech Inclusion Pledge, and expanded inclusive venture funding.  And, lots more. Even reading the list brings a tired smile to my face.

President Obama writes his first line of code and celebrates
with the middle school student who helped teach him, Dec. 8 2014.
Official White House Photo by Pete Souza
So, while there was no shortage of impact, I still would say that it was the people that were the most important reason why I was so glad that I had the opportunity to work government. The diversity of people in the White House and at agencies was a huge difference from Silicon Valley. That diversity was expressed in terms of the traditional lines of socio-economic, ethnicity, race, color, religion, age, disability status, gender identity, sexual orientation, and far more balanced gender representation, but also in terms of point of view, educational, geographic origin, and career background. Sometimes, I was among others like me but more frequently I was unusual along a number of dimensions such as my lack of long federal service, my lack of military service, my tech background, etc. I came away extremely impressed with the level of experience, intellect, and passion that the Obama White House was able to attract. There were people who you later discovered were Rhodes Scholars, or Supreme Court clerks, or had beaten a Scrabble world champion over the weekend. I had expected both the diversity and excellence, but it is one thing to expect something and quite another to live it for two-plus years.

President Obama talks with U.S. CTO Megan Smith, and
OSTP Director Dr. John Holdren, Oct. 8, 2014.
Official White House Photo by Pete Souza
Team CTO under U.S. CTO Megan Smith was also outstanding. I had the privilege of working with a number of people that I have admired and wanted to work for for years. I also got to meet and work with a bunch of folks that I might never have otherwise met. Over my time there, the U.S. CTO team while I was there included at different times: Puneet Ahira, Seth Andrew, Rob Bacchus, Jake Brewer, Marvin Carr, Jimmy Catania, Colleen Chien, Evan Cooke, R. David Edelman, Ed Felten, Anjali Fernandes, Brian Forde, Brianna Fugate, Dipayan Ghosh, Vivian Graubard, Renee Gregory, Dan Hammer, Natalie Evans Harris, Read Holman, Kristen Honey, Mina Hsiang, Kelly Jin, Terah Lyons, Matthew McAllister, Dawn Mielke, Lynn Overmann, Ryan Panchadsaram, DJ Patil, Tom Power, Laura Weidman Powers, Jason Schultz, Nick Sinai, Lauren Smith, Ashkan Soltani, Suhas Subramanyam, Emily Tavoulareas, Maya Uppaluru, Aden Van Noppen, Nancy Weiss, Claudia Williams, Charles Worthington, Cori Zarek, and, of course, the wonderful Megan Smith herself.

Some of the wonderful folks that made up team CTO,
Jan. 14, 2017.

That combination of a top-notch team amid a diverse broader group of excellent folks from top to bottom at OSTP, the broader White House and across the Government, made going into work both a joy and a challenging learning experience every day. I felt like I grew a ton, learned a lot about how the U.S. government functions, and picked up some really interesting management and leadership lessons from the people I got to work with. I came home mentally worn out but almost always smiling. I also made a bunch of new friends.

President Obama talks with Girl Scout White House Science
Fair participants who had designed a Lego page turner to help
people read books who may not otherwise be able, Mar. 23 2015.
Official White House Photo by Pete Souza

Now that I have been out of work for a few months, I am thankful for the opportunity to make a positive impact but I am certain that I made the right choice that August because of the amazing people I got to work with. I am still fired up that I had the privilege to serve with each and every one of them, and ready to go and work with them again!

President Obama, listens during a technology 
strategy discussion, Oct. 8, 2014.

Dense Dead

If there is some interest, I'll publish something longer on this. In the meantime, I threw together a quick script that takes a link to one of the wonderful Grateful Dead shows available to stream from the Internet Archive and edits out the least dense of Dead songs, Drums and Space, so that when I am listening to the Dead and working, I don't need to skip them.

The result is and a chrome extension that will rewrite Grateful Dead Internet Archive pages to push the m3u files through Dense Dead.

For example, to hear a slightly denser version of The Grateful Dead's last show, the Internet Archive URL would be:
the streaming URL on that page is:
and the DenseDead URL would be:
If you visit the Internet Archive URL for the show with the Dense Dead chrome extension installed, clicking on the VBR Stream Playlist link will automagically give you the denser m3u file even though the page itself still shows the full show.

If you find shows where Dense Dead doesn't work, hit me up on Twitter @amac and I'll see if I can fix it. If you want to know more about how I did this, also shoot me an @reply over on Twitter and I'll consider writing more.

Public domain image of skull from An Illustrated System of Human Anatomy: Special, General and Microscopic,
Samuel George Morton (1849) scanned by Google Books from Oxford University Library


Samuel George Morton (1849) scanned by Google Books from Oxford University Library

Chiefs of Staff: We need more in the private sector

A bunch of friends in Silicon Valley have asked some version of “what was surprising to you in govt?” or “what did you learn about govt?” This is part of a series of posts answering those questions.

One of the MANY things I learned while serving as Deputy U.S. Chief Technology Officer was just how amazing the folks are that have the title “Chief of Staff.” They are some of the unsung heroes of the White House and government as a whole. There is no true equivalent to the Chief of Staff job and it is pretty rare in the corporate world, particularly in Silicon Valley (but see Kris Cordle at Slack). Chief Operating Officer (COO) may be the closest analogy, and it is no coincidence that Sheryl Sandberg, Facebook’s extremely effective COO was Chief of Staff at the Treasury Department before moving to Google and Facebook. Read on for a bit more about what a Chief of Staff does, with some examples from President Obama’s administration.

Letterhead of the Chief of Staff to the President

First and foremost, a Chief of Staff (COS) is a manager.

Data from the Office of Personnel Management
The U.S. Federal Government is extremely large. The President of the United States is a CEO of sorts for approximately 2.6 million civilian executive branch employees engaged in a mind-bendingly diverse set of jobs (including the military, that number is over 4 million). In addition, the President’s relationship to the country makes him also responsible to the more than 300 million people that make up the United States. As a result, the President’s time, and that of other leaders in government (called “principals” in government), is precious and spent on external events, relationship calls, decision making, or getting information, and, in each case, only if the principal is not replaceable with others. An example of part of that schedule for President Obama is archived here but the schedules of other principals, from the Director of the Office of Science and Technology Policy (OSTP) to the Secretary of Commerce, are similar.

A COS's first job is making sure their principal’s vision is implemented effectively and that requires, in the first instance, managing their principal. They need to make sure that their principal is using their time effectively, for example that any issue that can be resolved at a lower level is resolved, and that they have the information necessary to make informed decisions. This part of the COS job requires an extraordinarily good relationship with the principal and almost supernatural ability to predict what the principal wants. A COS may have their own views but a significant amount of the COS power and effectiveness comes from being, in Game of Thrones vocabulary, the “Hand of the King.” This relationship balances a COS's management of their principal with their relatively egoless role as their principal’s direct report and executer. They are also truth-tellers who aren’t shy about bringing bad news to their principals. In my experience, the best COSes are both supremely loyal and trusted by their principal to make significant decisions without them. This gives them a dual role “staffing” their principal but also being principals in their own rights. Denis McDonough, who was President Obama’s COS during my time in the Executive Office of the President, is a great example. Denis was in sync with the President and his guidance could be relied upon to reflect the President’s. As much as anyone at the White House, he seemed to embody being in service to the President. At the same time, the buck frequently stopped with Denis, and, in those situations, he was a principal himself.

Chief of Staff to the President, Denis McDonough,
walking with President Obama, Sept 22, 2014.
Official White House Photo by Pete Souza
The COS is also likely to be the manager of the department. Hiring, firing, tasking, internal dispute resolution, and other managerial duties are often functions that are delegated to the COS. The principals oversee these but a ton of day-to-day management is done by the COS. For example, within OSTP where I worked, Cristin Dorgelo was the COS and would do weekly one on one meetings with each of the Director of OSTP’s reports. Cristin constantly was touching base with people across the department. She interviewed every person brought into OSTP, and she had an exit interview with everyone who left.

OSTP Chief of Staff, Cristin Dorgelo,
leading brainstorming at an NIH event, June 24, 2015
Photo by @NIH3DPrint
Similarly, Natalie Quillian, part of Denis’s COS team and a Deputy Assistant to the President, established new internal communication avenues for the White House to help spread internal communication and to create a sense that all of the employees in the Executive Office of the President were part of one team. Natalie also gave me and other White House staff regular guidance and mentoring in how to approach different processes and people within the White House.

Deputy Assistant to the President, Natalie Quillian, 
introducing her child to President Obama, Aug 27, 2014.
Process Wranglers

The Federal Government has a significant amount of process designed to improve decision making and ensure that the diverse viewpoints of departments are represented. For example, Presidential Policy Directive 1 laid out the National Security Council system for national security decision making under President Obama. A well run process can produce a good decision but, equally importantly, it will produce a decision with buy-in from the components and agencies that will need to implement the decision. While laudable, these processes are a lot of work to run and to exist within. The various COSes are the masters of them and are responsible for “shipping” a decision just as in Silicon Valley we rely on product managers to ship products.

Natalie was an expert at driving a process to completion. Understanding the type of decision that was required, she effectively figured out the right forum, the right questions, and the right type of information to get in front of the right set of principals to ensure an informed and constructive discussion that could produce a decision that would then have the buy-in to be implemented. She did everything from scrutinize an attendee list in order to add a person or two that needed to be included (or remove someone that was unnecessary to the decision); force lower level folks to more finely hone their disagreements or come to agreement on items that didn’t need higher level participation; push the conversation in the meeting towards an argument that was left unaddressed; and follow up to crisply articulate the meeting’s outcome and the mandate of each participant going forward. Each is an active task requiring a very high degree of understanding of the subject matter and emotional intelligence about people across government. I saw Natalie and many of the other COSes take this on across an incredible range of substantive areas from national security to communication to legal issues.  

The White House under President Obama was also a place that effectively used memos. As Jeff Bezos reportedly does at Amazon, the White House used memos to force the cogent development of argument and to allow components and agencies to resolve disagreements and to make decisions in a way that others across government and outside of government can see and understand. Working a document, with hundreds of other potential editors can be a recipe for committee-written prose and a huge time waster. The only thing worse would have been the potential for future disagreement if the various players didn’t have to come to agreement on paper. This paper process would have been impossible without the COSes. For example, on any given day, Cristin could be involved in a handful or more memos. Over her time at the White House, that meant that she was likely involved in thousands. She developed an expert sense of what was an important edit for OSTP and what might be better to let go. As importantly, the set of COSes within the Executive Office of the President and at the agencies were repeat players with strong relationships and a good deal of trust between them. Irreconcilable substantive policy differences that might otherwise disrupt the decision making process could often be resolved to the satisfaction of all through Cristin’s relationships and the creativity of the COSes.

Implementation Gurus

Federal government implementation of policy is almost always the responsibility of agencies. For example, while the President may determine that Federal data should be open, it is up to the Department of Transportation to release Traffic Fatality data to the public. This can leave execution of policy initiatives, particularly ones needing interagency cooperation without a central driver. Since few policies are successful without successful implementation, President Obama focused White House staff on continuing to track policy decisions through implementation and helping where needed. No-one did that better and across more important policy priorities than Kristie Canegallo, whose title was Deputy COS for Implementation. During her time in the position I saw Kristie ensure appropriate implementation across a wide range of topics including the Affordable Care Act, Precision Medicine Initiative, Cybersecurity National Action Plan, and the technology transformation of government more generally. And those were just a small percentage of her workload.

Deputy Chief of Staff for Implementation, Kristie Canegallo (center), 
with other members of the Affordable Care Act team
giving an update to President Obama, April 1, 2014.
As with any good operator, Kristie delegated effectively but sometimes got into the weeds to better understand and debug problems. She removed obstacles for the teams. She elicited and measured teams against metrics. She kept the cross-agency and cross-functional teams focused on the bigger picture and brought her own mastery of all of the tools available to our government to get the job done. Kristie is one of the better executing leaders I have ever worked with and her focus on and skill in implementation was shared by many of the COSes.

Calm, Solution Oriented, and Without Ego

A great COS is also calm, solution oriented and without ego. Yohannes Abraham, Valerie Jarrett’s COS at the Office of Public Engagement, is a great example of this COS attitude. Like part of a startup founding team, Yo has seen it all, so nothing phases him. He does not dwell on blame but moves quickly towards finding solutions. For example, I once brought him an issue that I was working on that some said might threaten one of his core implementation projects. Yo’s project was a higher Presidential priority than what I was working on. He talked through the issue calmly and saw the tensions between the two policy objectives. Together we weighed the good that would come of each and then talked through an approach to try to ensure the thing I was working on could get done in a way that would not threaten the higher priority policy project. Then he used his relationships to broaden that understanding and ensure that others could come to the same conclusion. Yo, like the other COSes, worked on thousands of individual policies and launches. His experience showed in his calmness and in the creative solutions he was able to make happen and often he was working to push someone else’s work over the finish line. Yo is exactly the kind of person you want to be working with you on the hardest problems. No ego, all drive to make a positive impact.

Chief of Staff of the Office of Public Engagement, Yohannes Abraham
Undated Government Photo

We Need More Chiefs of Staff!

While not every business is as large or complex as the Federal Government, the Chief of Staff position is underutilized in the private sector. The skills of Chief of Staffs in managing their bosses and staff, pushing through processes, and driving implementation, all with a reassuring calmness, solution orientation, and lack of ego, are very much in need in Silicon Valley.

I focused this post on the COSes that I worked with closely over the last few years but there were many others, and all were world class. And, they also ALL tendered their resignations as part of the peaceful transition of power at the White House. They would each be well suited to be CEOs or COOs in the private sector. I can’t wait to see what they do, and I would work with any of them again.