Posted:
Originally posted on the Google Research blog. Cross posted on the Google Apps Developers blog

In 1945, future Nobel laureate George Stigler wrote an essay in the Journal of Farm Economics titled The Cost of Subsistence about a seemingly simple problem: how could a soldier be fed for as little money as possible?

The “Stigler Diet” became a classic problem in the then-new field of linear optimization, which is used today in many areas of science and engineering. Any time you have a set of linear constraints such as “at least 50 square meters of solar panels” or “the amount of paint should equal the amount of primer” along with a linear goal (e.g., “minimize cost” or “maximize customers served”), that’s a linear optimization problem.

At Google, our engineers work on plenty of optimization problems. One example is our YouTube video stabilization system, which uses linear optimization to eliminate the shakiness of handheld cameras. A more lighthearted example is in the Google Docs Sudoku add-on, which instantaneously generates and solves Sudoku puzzles inside a Google Sheet, using the SCIP mixed integer programming solver to compute the solution.
Today we’re proud to announce two new ways for everyone to solve linear optimization problems. First, you can now solve linear optimization problems in Google Sheets with the Linear Optimization add-on written by Google Software Engineer Mihai Amarandei-Stavila. The add-on uses Google Apps Script to send optimization problems to Google servers. The solutions are displayed inside the spreadsheet. For developers who want to create their own applications on top of Google Apps, we also provide an API to let you call our linear solver directly.
Second, we’re open-sourcing the linear solver underlying the add-on: Glop (the Google Linear Optimization Package), created by Bruno de Backer with other members of the Google Optimization team. It’s available as part of the or-tools suite and we provide a few examples to get you started. On that page, you’ll find the Glop solution to the Stigler diet problem. (A Google Sheets file that uses Glop and the Linear Optimization add-on to solve the Stigler diet problem is available here. You’ll need to install the add-on first.)

Stigler posed his problem as follows: given nine nutrients (calories, protein, Vitamin C, and so on) and 77 candidate foods, find the foods that could sustain soldiers at minimum cost.

The Simplex algorithm for linear optimization was two years away from being invented, so Stigler had to do his best, arriving at a diet that cost $39.93 per year (in 1939 dollars), or just over ten cents per day. Even that wasn’t the cheapest diet. In 1947, Jack Laderman used Simplex, nine calculator-wielding clerks, and 120 person-days to arrive at the optimal solution.

Glop’s Simplex implementation solves the problem in 300 milliseconds. Unfortunately, Stigler didn’t include taste as a constraint, and so the poor hypothetical soldiers will eat nothing but the following, ever:

  • Enriched wheat flour
  • Liver
  • Cabbage
  • Spinach
  • Navy beans

Is it possible to create an appealing dish out of these five ingredients? Google Chef Anthony Marco took it as a challenge, and we’re calling the result Foie Linéaire à la Stigler:
This optimal meal consists of seared calf liver dredged in flour, atop a navy bean purée with marinated cabbage and a spinach pesto.

Chef Marco reported that the most difficult constraint was making the dish tasty without butter or cream. That said, I had the opportunity to taste our linear optimization solution, and it was delicious.

Posted:
Here at Google, we always put the user first, and for the Developer Platform team, our developers are our users. We want to create the best development platform and provide the support you need to build world-changing apps, but we need to hear from you, our users, on a regular basis so we can see what’s working and what needs to change.

That's why we're launching our developer survey -- we want to hear about how you are using our APIs and platforms, and what your experience is using our developer products and services. We'll use your responses to identify how we can support you better in your development efforts.
Photo Credit: Google I/O 2014

The survey should only take 10 to 15 minutes of your time, and in addition to helping us improve our products, you can also help raise money to educate children around the globe. For every developer who completes the survey, we will donate $10 USD (up to a maximum amount of $20,000USD total) to your choice of one of these six education-focused organizations: Khan Academy, World Fund, Donors Choose, Girl Rising, Raspberry Pi, and Agastya.

The survey is live now and will be live until 11:59PM Pacific Time on October 15, 2014. We are excited to hear what you have to tell us!

Posted by Neel Kshetramade, Program Manager, Developer Platform

Posted:
Back in January, Google Drive launched an activity stream that shows you what actions have been taken on files and folders in your Drive. For example, if someone makes edits on a file you’ve shared with them, you’ll see a notification in your activity stream.

Today, we’re introducing the new Google Apps Activity API designed to give developers programmatic access to this activity stream. This standard Google API will allow apps and extensions to access the activity history for individual Drive files as well as descendents of a folder through a RESTful interface.

The Google Apps Activity API will allow developers to build new tools to help users keep better track of what’s happening to specific files and folders they care about. For example, you might use this new API to help teachers see which students in their class are editing a file or, come tax season, you might want to create a quick script to audit the sharing of items in your financial information folder.

Check out the documentation at https://developers.google.com/google-apps/activity/. We can't wait to see what you build!

Posted by Justin Hicks, Software Engineer, Technical Lead for Google Apps Activity API

Posted:
By Muzammil Esmail, Product Manager, Google for Work

The Admin SDK provides a comprehensive directory experience for Google for Work customers to help them meet specific business needs around data storage for customers. Here are some important updates to this SDK.

Custom attributes in the user’s profile
Now available is a new feature in the Directory API which allows you to add custom attributes for your users. For instance, you could store the projects your users work on, their desk number, job level, hiring date — whatever makes sense for your business.

Once the custom attributes for your domain have been defined, they behave just like regular fields in the user profile. You can get and set them for your users and also perform searches on custom fields (e.g. “all employees that work on the shinyNewApp in Hyderabad”).

Custom attributes can be of different data types; they can be single- or multi-valued. You can configure whether they are “public” i.e. visible to everyone on the domain, or “private” i.e. visible only to admins and the users themselves.

Read access to all domain users
Historically, only admins have been able to access the data in the Admin SDK. Beginning today, any user (not just admins) will now be able to call the Directory API to read the profile of any user on the domain (of course, we will respect ACLing settings and profile sharing settings).

We hope that you will be able to use this new feature to build business applications (e.g. corporate yellow pages, expense approval, vacation management, workflow applications, etc.) that can be used by all your users.

Please feel free to go through our documentation to go learn more about the Admin SDK, and specifically the Directory API. Happy hacking!

Posted:
Last October we worked with a small number of developers to launch App Indexing, the ability for Google to index apps just like websites. In June, we opened App Indexing to all Android developers, giving you the ability to add app deep links to search results, helping users find your content and re-engage with your app after they’ve installed it.

Today, we’d like to highlight two videos to help you set up App Indexing. Check them out below. You’re only a few steps away from driving re-engagement and unlocking new avenues of discovery for your app.

1998 all over again

In 1998, Google set out to index the web and make content easily accessible and discoverable.

Today mobile app adoption is growing rapidly. Similar to the early days of the internet, it can be frustrating for users to search through their device to find what they need, since the content within apps typically exists in silos. By implementing App Indexing, you can re-engage your users from search results.

Consider the scenario of users looking for details about a great place for some Spanish food. Users might already have a great mobile app for restaurant details installed, but they typically still rely on a search engine to pull up information about local places to eat. Wouldn’t it be great if they could jump straight into your app from those search results?
App Indexing is all about connecting users with the best content, whether it’s in-app or on the web. You can add it to your app very quickly -- simply add deep linking to your app, and then verify your website with Google. To enable re-engagement with your users, you can generate query autocompletions in the Google app using the App Indexing API.

Learn More

To learn more about App Indexing, and how you can use the API for your apps, check out this DevByte from Lawrence Chang, Senior Product Manager for App Indexing at Google.
For an in-depth look at App Indexing, demonstrating the technology, and the opportunities available with it, watch this session from Google I/O 2014: “The Future of Apps and Search.”
We’re at the beginning of a new wave of how people find and interact with content, and it often starts with search. Is your app in the index? If not, follow the steps in this post, and get ready for the future of Apps and Search!

Posted by Laurence Moroney

Laurence is a Developer Advocate at Google, working on Google Play services for Android. When not having fun with this, he's also a best-selling author of several Young Adult novels and dozens of books on computer programming.

Posted:
This post originally appeared on the Google Cloud Platform blog 

Today we are announcing a new category of client libraries that has been built specifically for Google Cloud Platform. The very first library, gcloud-node, is idiomatic and intuitive for Node.js developers. With today’s release, you can begin integrating Cloud Datastore and Cloud Storage into your Node.js applications, with more Cloud Platform APIs and programming languages planned. The easiest way to get started is by installing the gcloud package using npm:
$ npm install gcloud
With gcloud installed, your Node.js code is simpler to write, easier to read, and cleaner to integrate with your existing Node.js codebase. Take a look at the code required to retrieve entities from Datastore:
var gcloud = require('gcloud');

var dataset = new gcloud.datastore.Dataset({
projectId: 'my-project',
keyFilename: '/path/to/keyfile.json' // Details at 
//https://github.com/googlecloudplatform/gcloud-node#README
});

dataset.get(dataset.key('Product', 123), function(err, entity) {
console.log(err, entity);
});
gcloud is open-sourced on Github; check out the code, file issues and contribute a PR - contributors are welcome. Got questions? Post them on StackOverflow with the [gcloud-node] tag. Learn more about the Client Library for Node.js at http://googlecloudplatform.github.io/gcloud-node/ and try gcloud-node today.

Posted by JJ Geewax, Software Engineer

Node.js is a trademark of Joyent, Inc. and npm is a trademark of npm, Inc.

Posted:
by Chris Han, Product Manager Google Apps Marketplace

The Google Apps Marketplace brings together hundreds of third-party applications that integrate and enhance Google Apps for Work. Previously, only administrators were able to install these applications directly for people at work. Now, any Google Apps user can install these applications by logging into Google Apps, clicking the app launcher icon , clicking More, and then clicking More from Apps Marketplace. By default, any Google Apps user can install apps from the Google Apps Marketplace—excluding K-12 EDU domains that are defaulted off. For more information, please see our Help Center
If you have an app in the Google Apps Marketplace utilizing oAuth 2.0, you can follow the simple steps below to enable individual end users to install your app. If you’re not yet using oAuth 2.0, instructions to migrate are here.

1. Navigate to your Google Developer Console.

2. Select your Google Apps Marketplace project.
3. Click APIs under the APIs & auth section.
4. Click the gear icon next to Google Apps Marketplace SDK.
5. Check Allow Individual Install.

6. Click Save changes.

Posted:
Last week, Apple updated their app submission policy requiring that resource bundles not include binaries. In order for your apps to meet these new requirements, you must either replace your existing Google+ iOS SDK with the updated 1.7.1 Google+ iOS SDK that has the files removed or remove the following files from the GooglePlus bundle:

  • GooglePlus.bundle/GPPSignIn3PResources
  • GooglePlus.bundle/GPPCommonSharedResources.bundle/GPPCommonSharedResources
  • GooglePlus.bundle/GPPShareboxSharedResources.bundle/GPPShareboxSharedResources 

Please update your app immediately, or your app will be rejected by Apple. Because the files were only used for versioning, the change will have no impact on your app's functionality.

Posted by Mohamed Zoweil, Software Engineer, Google

Posted:
By Søren Gjesse, Software Engineer on Dart

Developers increasingly want to use the same language and business logic on the client and the server to reduce risk and complexity. To help developers easily build and deploy end-to-end Dart apps, we are happy to announce ready-to-use Docker images for Dart. This expands our Docker usage further beyond the recently announced Docker support in Google App Engine. There are now three Dart-related images on hub.docker.com for you to use: dart, dart-runtime and dart-hello, which uses the same naming scheme as the corresponding Node, Python and Go images already offered.

The image google/dart adds the Dart SDK to google/debian Debian wheezy image. Running Dart in a container is now as simple as this:

  $ docker run -i -t google/dart /usr/bin/dart --version

The image google/dart-runtime inherits from google/dart, and provides a convenient way to run a Dart server application using a one line Dockerfile. To inherit from google/dart-runtime, your server application requires the following layout:

  • has a the pubspec.yaml and pubspec.lock files listing its dependencies.
  • has a file bin/server.dart as the entrypoint script.
  • listens on port 8080

With this layout and a Dockerfile with the following content:

FROM google/dart-runtime

You can run your app in a container as simple as this:

  $ docker build -t my-app .
  $ docker run -d -p 8080:8080 my-app

The last image google/dart-hello is a sample Dart server application, that inherits from dart/runtime. Here is an example of how to run the sample:

  $ docker run -d -p 8080:8080 google/dart-hello

Depending on your local Docker installation the address of the server differs. If you are using boot2docker with the default configuration you can talk to the Dart server in the docker container on http://192.168.59.103:8080:

  $ curl http://192.168.59.103:8080/version

You can choose specific version tags, such as 1.6.0 (recommended), or choose the ‘latest’ tag for the latest stable version. Here is an example of running Dart 1.6 with Docker:

  $ docker run -i -t google/dart:1.6.0 /usr/bin/dart --version

If you haven't already, go and install boot2docker and start building you Dart server application using Docker images. Pushing these images to you server will simplify deployment and ensure you are running the same code on your server as you have been testing locally.

Posted by Mano Marks, Google Developer Platform Team

Posted:
This post originally appeared on the Google Cloud Platform blog 
by Julie Pearl, Director, Developer Relations

Today at the Google for Entrepreneurs Global Partner Summit, Urs Hölzle, Senior Vice President, Technical Infrastructure & Google Fellow announced Google Cloud Platform for Startups. This new program will help eligible early-stage startups take advantage of the cloud and get resources to quickly launch and scale their idea by receiving $100,000 in Cloud Platform credit, 24/7 support, and access to our technical solutions team.

This offer is available to startups around the world through top incubators, accelerators and investors. We are currently working with over 50 global partners to provide this offer to startups who have less than $5 million dollars in funding and have less than $500,000 in annual revenue. In addition, we will continue to add more partners over time.

This offer supports our core Google Cloud Platform philosophy: we want developers to focus on code; not worry about managing infrastructure. Starting today, startups can take advantage of this offer and begin using the same infrastructure platform we use at Google.

Thousands of startups have built successful applications on Google Cloud Platform and those applications have grown to serve tens of millions of users. It has been amazing to watch Snapchat send over 700 million photos and videos a day and Khan Academy teach millions of students. Another example, Headspace, is helping millions of people keep their minds healthier and happier using Cloud Platform for Startups. We look forward to helping the next generation of startups launch great products.

For more information on Google Cloud Platform for Startups, visit http://cloud.google.com/startups.

Posted by Katie Miller, Google Developer Platform Team