Cover photo
Chris Broadfoot
Works at Google
Attended University of New South Wales
Lived in Sydney
15,056 followers|1,109,369 views


Chris Broadfoot

Shared publicly  - 
Pumped to talk at Google I/O this year with +Ankur Kotwal.

It's basically a tech talk on how we built Santa Tracker using a lot of the Google developer platform.

There's some great (technical) anecdotes in it, so please come along if you're attending I/O, or watch the recording afterwards on YouTube.

#santatracker #io14
Built on Google’s developer platform, Santa Tracker lets millions of children and adults track Santa in 34 languages as he delivers presents across the world. The project’s technical leads go behind the scenes to provide insight into the challenges of building a cohesive Google developer platform experience across mobile/desktop web, Android, Chromecast, Maps and Search\u003B all powered by a Go AppEngine backend.
Mark Undecided's profile photoChris Broadfoot's profile photoCarter Horsley's profile photoTeresa Lam's profile photo
+Chris Broadfoot OK I let u know next year. Thank you.
Add a comment...

Chris Broadfoot

Shared publicly  - 
Aperol spritz by Sydney Harbour
narayan pokharel's profile photo
like this
Add a comment...

Chris Broadfoot

Shared publicly  - 
Fans of lipids and cutlery rejoice, Butter Knife v5.0 has been released! Read on and learn about what's new:

Views are frequently operated on in groups as a result of some event. Text views animate in on new screens, input fields are enabled and disabled for network calls, etc. Group multiple views together using the @InjectViews annotation into a List or array for easy operation.

  @InjectViews({, })
  List<TextView> nameViews;

Coupled with the aforementioned annotation to aggregate views, apply provides a concise way to operate on those groups of views at once.

  ButterKnife.apply(nameViews, DISABLE);
  ButterKnife.apply(nameViews, ENABLED, false)

The Action[1] and Setter[2] interfaces provide easy ways to define operations.

  static final Action<View> DISABLE = new Action<>() {
    @Override public void apply(View view, int index) {
  static final Setter<View, Boolean> ENABLED = new Setter<>() {
    @Override public void set(View view, Boolean value, int index) {

You can use Android's Property[3] with apply as well.

  ButterKnife.apply(nameViews, View.ALPHA, 0);

New multi-callback listeners
* @OnItemSelected for AdapterView.OnItemSelectedListener's onItemSelected callback.
* @OnPageChange for ViewPager.OnPageChangeListener's onPageChange callback.
* @OnTextChange for TextWatcher's onTextChange callback.

Each of these new listeners have multiple callback methods. Change which callback your method is being bound to by supplying a callback argument.

  void onItemSelected(long id) {
    // ...

  @OnItemSelected(value=, callback = NOTHING_SELECTED)
  void onNothingSelected() {
    // ...

Enjoy! And #DeathToBoilerplate !

* Website:
* Changelog:
* Javadoc:

Devi Maharani's profile photoEric Cochran's profile photoIan Douglas's profile photo
Add a comment...

Chris Broadfoot

Shared publicly  - 
Next time you're in India, find your way around popular malls and shopping centres more easily with indoor #GoogleMaps

See where indoor maps are available:

iPhone users: Get the app at
Nichoy Scott's profile photok.c.prashanth Chandra's profile photoAugustine Correa's profile photoVishnu Prabhu Ramachandran's profile photo
Hi Chris,

Here's a gist of what we are trying to do.

We have some co-ordinate information (latitude and longitudes), and a bunch of annotations for these co-ordinates on the server. We want to embed a Google Map (or Google Earth) inside our web page, which shows these co-ordinates as balloons (or some icon) and annotate them with relevant information.

We have seen videos where this is done manually (copying the embed URL into our HTML page, or open a kml/kmz file in Google Earth etc), but we cannot have any manual step in between, as this is used by end users (clients) who cannot do this. We need to do this programmatically.

We want to what is the best way to go about doing this? Also, in the future we want to update the map dynamically with live data.

Thanks in advance.
Add a comment...

Chris Broadfoot

Shared publicly  - 
What is the best code review tool for GitHub projects?

The ideal tool would:
* have code reviews should happen on the pull-request level, not on an individual git commit level.
* provide diffs between subsequent commits added to the pull request.
* have a way to "resolve" comments added by reviewers, and show the reviewers a diff that illustrates that a fix was applied.
* auto-merge when a "LGTM" or approval is given by a project owner
Mark Derricutt's profile photoAlex Wei's profile photoOmer Younus's profile photoGabor Orosz's profile photo
Add a comment...

Chris Broadfoot

Shared publicly  - 
Sarah wrote a great blog post on writing sample code for the Android Maps Utility Library
While creating some sample code this week, it struck me that it's an interesting process. So I've blogged about it. I'd love your additions to my jottings!
Rob G's profile photoDamian Flannery's profile photo
Add a comment...

Chris Broadfoot

Shared publicly  - 
My dad, on Google driverless cars:
"They should study Thailand: most of the cars here already operate without drivers!!"
Emmanuel Mulenga's profile photoTim Bondy's profile photo
Cool man dats great
Add a comment...

Chris Broadfoot

Shared publicly  - 
Add a comment...

Chris Broadfoot

Shared publicly  - 
Writing correct concurrent Java code is hard

See if you can spot what's wrong with this code I came across today, simplified here*:

class Foo {
Boolean myFlag = Boolean.valueOf(false);

void foo() {
  synchronized(myFlag) {
    myFlag = Boolean.valueOf(true);

void bar() {
  synchronized(myFlag) {
    myFlag = Boolean.valueOf(false);

Let me first provide a brief explanation of how the synchronized statement works in Java. Every Object has an intrinsic lock associated with it. The synchronized statement obtains the lock associated with the object, runs the code inside the block, then releases the lock.

In this case, the synchronized statement obtains the lock associated with the object in the "myFlag" field. The programmer has recognized that you can't lock over a primitive type (boolean), so has opted to use Boolean (which is a subclass of Object).

There are two things wrong in this example:
1) the value of the "myFlag" field is reassigned. In this case, it has one of two values: Boolean.TRUE and Boolean.FALSE.
2) if any code running in any thread also locks over either of these easily accessible values, the code running from this class is affected.

Three rules to prevent this mistake in your own Java code:
1) If possible, use synchronized methods instead of synchronized statements (they're simpler)
2) Only lock over fields marked as final, or the "this" object.
3) Create separate lock objects for fields that need this block, and in your source file, write a comment stating that as a contract. For example:
private final Object myFlagLock = new Object();
private boolean myFlag = false; // must synchronize on "myFlagLock".

In this case, an AtomicBoolean would work quitenicely, too:
private final AtomicBoolean myFlag = new AtomicBoolean(false);
synchronized(myFlag) {

I've noticed that IntelliJ provides an inspection for this simple mistake. I can't recommend IntelliJ enough.

Read more about the synchronized statement/block here:

Get the fantastic "Java Concurrency in Practice" book by +Joshua Bloch and others:

* Full code was from the Pebble SDK examples, found here:

#java   #concurrency  
Salvador Gómez's profile photoMarcos Placona's profile photoLuong Bui's profile photoGregory Meiste's profile photo
+Chris Broadfoot It was +Boyd Smith's idea!
Add a comment...

Chris Broadfoot

Shared publicly  - 
Sydney sunrise #pano
Dylan Floyd's profile photoLiline Duperval's profile photojean enoc's profile photoSheryl Beldenesa's profile photo
Owe some!!!
Add a comment...

Chris Broadfoot

Shared publicly  - 
I hosted two interns this summer with +Anthony Morris  - check out their awesome work :-)
Marker clustering and heatmaps on Android
Check out new ways to visualize large amounts of geo data in your Android app. Read through the blog post for more info!
Josh Livni's profile photoAndres Ferrate's profile photoInderjit Gill's profile photoMaryam Sanieian's profile photo
Yap...... thts good..... big up 4 u
Add a comment...

Chris Broadfoot

Shared publicly  - 
Hansel. So hot right now
ojo greatsamuel's profile photo
Add a comment...
In his circles
889 people
Have him in circles
15,056 people
Nettpro Pty Ltd.'s profile photo
Penniel Mercy's profile photo
Hamid ElGharrabi's profile photo
David André Duarte's profile photo
‫ابو السعيد المقدسي‬‎'s profile photo
Luke Waldon's profile photo
WOBtoner - die Toner und Tinten Experten GbR's profile photo
Gae BongBakDu (개봉박두)'s profile photo
katarina prazdnik's profile photo
Developer Relations, Google
  • Google
    Developer Programs Engineer, 2010 - present
  • Atlassian
    Developer, 2008 - 2009
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Google Developer Relations (Android Maps)

Developer Relations, Google Maps APIs

Currently focused on Google Maps Android API.

  • University of New South Wales
Basic Information
We waited 45 minutes for the wrong pizza, service was very slow because all the staff were talking amongst themselves.
Public - 3 years ago
reviewed 3 years ago
Absolutely terrible service. Decent food. Would not recommend.
Public - 4 years ago
reviewed 4 years ago
2 reviews