Saturday, February 25, 2012

[Gd] Fridaygram: Esperanto translation, preserved forest, sky alignment

| More

Google Developers Blog: Fridaygram: Esperanto translation, preserved forest, sky alignment

Author Photo
By Scott Knaster, Google Developers Blog Editor

Google Translate is designed to help people understand each other regardless of which human language they use. So it’s appropriate that Google Translate now includes Esperanto, which was created more than 100 years ago to further the goal of a universal language. Esperanto is the 64th language supported by Google Translate, which makes it extra-special to nerds because, of course, 64 is 2^6, or 1000000 binary.

Going back before human language (or humans), a research team in China has discovered a forest that was buried in ash 300 million years ago. The team found intact trees and plants preserved just as they were back then. Now they just have to bring in some very large vacuum cleaners to tidy up the place.

Finally, here’s some astronomy fun for your weekend. On Saturday and Sunday, Jupiter, Venus, and the Moon will converge and shine brightly in the night sky.



Go out and take a look!


Hey, glad to see you made it over to our new home on Google Developers Blog! We like it here and hope you do too. As you might know, on Fridays we take a break and do a Fridaygram post just for fun. Each Fridaygram item must pass only one test: it has to be interesting to us nerds. Ĝuu vian semajnfinon!
URL: http://googledevelopers.blogspot.com/2012/02/fridaygram-esperanto-translation.html

Friday, February 24, 2012

[Gd] Stable Channel Update for Chromebooks

| More

Chrome Releases: Stable Channel Update for Chromebooks

The Stable channel has been updated to 17.0.963.60 (Platform version: 1412.205.0) for Chromebooks (Acer AC700, Samsung Series 5, and Cr-48).


Release highlights:
  • Pepper flash: release 11.1.31.310
  • Stability & security fixes
Known issues:
  • Deleting 802.1x cert might require a restart to restore access to other wifi networks
If you find new issues, please let us know by visiting our help site or filing a bug. Interested in switching to the Beta channel? Find out how. You can submit feedback using ‘Report an issue’ under the wrench menu.

Orit Mazor
Google Chrome
URL: http://googlechromereleases.blogspot.com/2012/02/stable-channel-update-for-chromebooks_24.html

[Gd] Chrome for Android Beta Update

| More

Chrome Releases: Chrome for Android Beta Update

Chrome for Android Beta has been updated to 0.16.4215.215, picking up changes that have gone in through Chrome 16.0.912.77.  Beyond the Chrome changes, this update contains:
  • Android Beam support - now beam URLs from Chrome to other devices with NFC.
  • Support for additional countries
  • Compatibility checks to ensure system prerequisites for Chrome are met
  • Essential bug fixes
Known issues
  • 112923 : No way to toggle between mobile/desktop UA
  • 113140 : Youtube Links Do Not Prompt For Which Application to Use
  • 113132 : Chrome for Android beta doesn't support configured proxy in wi-fi settings
  • Other notable issues listed here
If you find a new issue, please let us know by filing a bug.

Srikanth Rajagopalan
Google Chrome
URL: http://googlechromereleases.blogspot.com/2012/02/chrome-for-android-beta-update.html

[Gd] Dev Channel Update

| More

Chrome Releases: Dev Channel Update

The Dev channel has been updated to 19.0.1049.3 for Windows, Mac, Linux and Chrome Frame.  This build contains following stability and bug fixes:

All

Mac
  • Worked around lockups of mid-2010 MacBook Pros (dual NVIDIA/Intel GPUs) running 10.7. Please stress test Flash, WebGL and other GPU accelerated content on such machines and file bugs referencing Issue 113703 if issue persists.
Full details about what changes are in this build are available in the SVN revision log. Interested in switching release channels?  Find out how.  If you find a new issue, please let us know by filing a bug.

Dharani Govindan
Google Chrome
URL: http://googlechromereleases.blogspot.com/2012/02/dev-channel-update_23.html

[Gd] Type-checking Tips

| More

Closure Tools Blog: Type-checking Tips

Closure Compiler’s type language is a bit complicated. It has unions (“variable x can be A or B”), structural functions (“variable x is a function that returns a number”), and record types (“variable x is any object with properties foo and bar”).

A lot of people have told us that that’s still not expressive enough. There are many ways that you can write JavaScript that do not fit cleanly into our type system. People have suggested that we should add mixins, traits, and post-hoc naming of anonymous objects.

This was not particularly surprising to us. The rules of objects in JavaScript are a little bit like the rules of Calvinball. You can change anything, and make up new rules as you go along. A lot of people think that a good type system gives you a powerful way to describe how your program is structured. But it also gives you a set of rules. The type system ensures that everyone agrees on what a “class” is, and what an “interface” is, and what “is” means. When you’re trying to add type annotations to untyped JS, you’re inevitably going to run into issues where the rules in my head don’t quite match the rules in your head. That’s OK.

But we were surprised that when we gave people this type system, they often found multiple ways to express the same thing. Some ways worked better than others. I thought I’d write this to describe some of the things that people tried, and how they worked out.

Function vs. function()

There are two ways to describe a function. One is to use the {Function} type, which the compiler literally interprets as “any object x where ‘x instanceof Function’ is true”. A {Function} is deliberately mushy. It can accept any arguments, and return anything. You can even use ‘new’ on it. The compiler will let you call it however you want without emitting warnings.

A structural function is much more specific, and gives you fine-grained control over what the function can do. A {function()} takes no arguments, but we don’t care what it returns. A {function(?): number} returns a number and takes exactly one argument, but we don’t care about the type of that argument. A {function(new:Array)} creates an Array when you call it with “new”. Our type documentation and JavaScript style guide have more examples of how to use structural functions.

A lot of people have asked us if {Function} is discouraged, because it’s less specific. Actually, it’s very useful. For example, consider the definition of Function.prototype.bind. It lets you curry functions: you can give it a function and a list of arguments, and it will give you back a new function with those arguments “pre-filled in”. It’s impossible for our type system to express that the returned function type is a transformation of the type of the first argument. So the JSDoc on Function.prototype.bind says that it returns a {Function}, and the compiler has to have hand-coded logic to figure out the real type.

There are also many cases where you want to pass a callback function to collect results, but the results are context-specific.

rpc.get(‘MyObject’, function(x) {
// process MyObject
});

The “rpc.get” method is a lot more clumsy if the callback argument you pass has to type-cast anything it gets. So it’s often easier just to give the parameter a {Function} type, and trust that the caller type isn’t worth type-checking.

Object vs. Anonymous Objects

Many JS libraries define a single global object with lots of methods. What type annotation should that object have?

var bucket = {};
/** @param {number} stuff */ bucket.fill = function(stuff) {};

If you come from Java, you may be tempted to just give it type {Object}.

/** @type {Object} */ var bucket = {};
/** @param {number} stuff */ bucket.fill = function(stuff) {};

That’s usually not what you want. If you add a “@type {Object}” annotation, you’re not just telling the compiler “bucket is an Object.” You’re telling it “bucket is allowed to be any Object.” So the compiler has to assume that anybody can assign any object to “bucket”, and the program would still be type-safe.

Instead, you’re often better off using @const.

/** @const */ var bucket = {};
/** @param {number} stuff */ bucket.fill = function(stuff) {};

Now we know that bucket can’t be assigned to any other object, and the compiler’s type inference engine can make much stronger checks on bucket and its methods.

Can Everything Just Be a Record Type?

JavaScript’s type system isn’t that complicated. It has 8 types with special syntax: null, undefined, boolean, number, string, Object, Array, and Function. Some people have noticed that record types let you define “an object with properties x, y, and z”, and that typedefs let you give a name to any type expression. So between the two, you should be able to define any user-defined type with record types and typedefs. Is that all we need?

Record types are great when you need a function to accept a large number of optional parameters. So if you have this function:

/**
* @param {boolean=} withKetchup
* @param {boolean=} withLettuce
* @param {boolean=} withOnions
*/
function makeBurger(withKetchup, withLettuce, withOnions) {}

you can make it a bit easier to invoke like this:

/**
* @param {{withKetchup: (boolean|undefined),
withLettuce: (boolean|undefined),
withOnions: (boolean|undefined)}=} options
*/
function makeBurger(options) {}

This works well. But when you use the same record type in many places across a program, things can get a bit hairy. Suppose you create a type for makeBurger’s parameter:

/** @typedef {{withKetchup: (boolean|undefined),
withLettuce: (boolean|undefined),
withOnions: (boolean|undefined)}=} */
var BurgerToppings;

/** @const */
var bobsBurgerToppings = {withKetchup: true};

function makeBurgerForBob() {
return makeBurger(bobsBurgerToppings);
}

Later, Alice builds a restaurant app on top of Bob’s library. In a separate file, she tries to add onions, but screws up the API.

bobsBurgerToppings.withOnions = 3;

Closure Compiler will notice that bobsBurgerToppings no longer matches the BurgerToppings record type. But it won’t complain about Alice’s code. It will complain that Bob’s code is making the type error. For non-trivial programs, it might be very hard for Bob to figure out why the types don’t match anymore.

A good type system doesn’t just express contracts about types. It also gives us a good way to assign blame when code breaks the contract. Because a class is usually defined in one place, the compiler can figure out who’s responsible for breaking the definition of the class. But when you have an anonymous object that’s passed to many different functions, and has properties set from many disparate places, it’s much harder--for both humans and compilers--to figure out who’s breaking the type contracts.

Posted by Nick Santos, Software Engineer
URL: http://closuretools.blogspot.com/2012/02/type-checking-tips.html

[Gd] Join us in London for an OpenID Workshop

| More

Google Developers Blog: Join us in London for an OpenID Workshop

Author Photo
By Eric Sachs, Senior Product Manager, Google Identity Team

The OpenID Foundation is hosting an OpenID workshop on March 28th that will be located at Google’s London office. Google uses OpenID in a number of its services, and is a corporate member of the OpenID Foundation. The OpenID Foundation runs a series of workshops like this one for business decision makers, as well as running other OpenID summits that are more technical.

The event is for the owners of consumer websites and enterprise SaaS services to discuss how to improve login systems by using techniques such as OAuth, OpenID and an Account Chooser.

Please join us in London on Wednesday, March 28th, 2012 from 10:00 until 17:30 GMT. For more details on agenda, speakers, location, and registration, visit the event site.

In addition to the OpenID workshop, there is a similar event the previous day on identity security best practices, hosted by Ping Identity and sponsored by Google.


Eric Sachs has been a product manager at Google since 2003. He is now involved with industry efforts to increase adoption of Internet Identity standards including OAuth and OpenID.

Posted by Scott Knaster, Editor
URL: http://googledevelopers.blogspot.com/2012/02/join-us-in-london-for-openid-workshop.html

[Gd] Create a Spreadsheet User Directory with Apps Script

| More

Google Apps Developer Blog: Create a Spreadsheet User Directory with Apps Script

As a consultant helping companies move to the Google cloud, I receive manyfeature requests before, during, and after each migration. Often I’m askedabout re-creating small and specific solutions that support particularbusiness needs not fully covered by Google Apps out of the box. In manycases, a simple Google Apps Script solution satisfies the business requirement.

What is the Google Spreadsheet User Directory?

The “Google Spreadsheet User Directory” is a solution I’m frequently asked about. Google Apps Domain administrators can use a simple Apps Script that can be saved into a Google Spreadsheet and then set to run on a schedule, via a “time-driven” trigger. By using the Google Profiles API (available only for domain administrators), domain administrators can create a Google Spreadsheet which contains Google Apps domain user information.The user profile data can then be consumed and used by other business logic code, either in the spreadsheet itself or elsewhere.
Using Apps Script to provide this kind of solution was an obvious choice forthe following reasons.

  1. Apps Script makes the Google Spreadsheet User Directory a simple, flexible solution that the customer can quickly understand and extend. The JavaScript syntax is easy to learn and program in, and there is no need to compile and deploy code.
  2. The Apps Script code is conveniently integrated into Google Spreadsheets, so there is no need to use any other software. Advancedfunctions can be exposed to end users for data manipulation through the spreadsheet menu, and scheduling an Apps Script to run at a regular interval is trivial via the Spreadsheet “Triggers” mechanism.
  3. Google Apps Script provides services for accessing Google Profiles, Contact Info, and Google Groups plus Google Docs, Google Sites, Google Charts, and more.  The Google Spreadsheet User Directory script makes use of both the new Apps Script Domain Services API and the GData Profiles API, via the “UrlFetch” service.
  4. The Apps Script code can be easily shared through Google Spreadsheet templates and through the Google Script gallery.

Using the Google Spreadsheet User Directory

The Google Spreadsheet User Directory code consists of a primary scanUserProfiles() function and some supporting “utility” functions. The three steps for setting up the code to run are:1. Set up the “Consumer_Key” and “Consumer_Secret” ScriptProperties and run the scanUserProfiles() function in the Apps Script integrated development environment to get the first “Authorization Required” screen. (I’ve included an illustration below... Choose “Authorize.”).
2. Since scanUserProfiles() uses OAuth with UrlFetch to get User Profile information via the GData API, it needs to be run at leastone more time inside of the Apps Script IDE, so that the OAuth “Authorize” prompt can be shown to the programmer and accepted.
3. After authorization, the scanUserProfiles() script is free to make authorized requests to the Google User Profiles feed, as long as thedeveloper who saved it has “domain admin” rights.

Design of the Google Spreadsheet User Directory

The following snippets show the OAuth setup, the user profiles Url setup,and the initial UrlFetch.
var oAuthConfig1 = UrlFetchApp.addOAuthService("googleProfiles");
oAuthConfig1.setRequestTokenUrl("https://www.google.com/accounts/OAuthGetRequestToken?scope=https:// www.google.com/m8/feeds/profiles");
oAuthConfig1.setAccessTokenUrl("https://www.google.com/accounts/OAuthGetAccessToken");
oAuthConfig1.setAuthorizationUrl("https://www.google.com/accounts/OAuthAuthorizeToken?oauth_callback=https:// spreadsheets.google.com/macros");
oAuthConfig1.setConsumerKey(ScriptProperties.getProperty("Consumer_Key"));
oAuthConfig1.setConsumerSecret(ScriptProperties.getProperty("Consumer_Secret"));
var options1 = {
oAuthServiceName : "googleProfiles",
oAuthUseToken : "always",
method : "GET",
headers : {
"GData-Version" : "3.0"
},
contentType : "application/x-www-form-urlencoded"
};
var theUrl = "";
if (nextUrl == "") {
theUrl =
"https://www.google.com/m8/feeds/profiles/domain/" + domain +
"/full?v=3&max-results=" + profilesPerPass + "&alt=json";
} else {
theUrl = nextUrl;
}
if (theUrl != "DONE") {
var largeString = "";
try {
var response = UrlFetchApp.fetch(theUrl, options1);
largeString = response.getContentText();
} catch (problem) {
recordEvent_(problem.message, largeString, ss);
}
}
var provisioningJSONObj = null;
var jsonObj = JSON.parse(largeString);
var entryArray = jsonObj.feed.entry;
The "nextUrl" variable above (line 74) is being pulled from a cell in thespreadsheet, where I'm saving the "next" link from the fetched data. (Ifthere’s no “next” link, I save "DONE" to the same spreadsheet cell.) Tofetch JSON, I’m appending the parameter &;alt=json on lines 75 and 76.After I’ve got my JSON object, I create an array to store the data that Iwill be writing out to the spreadsheet. I set the array default values andmake liberal use of try-catch blocks in this code, since there’s no tellingwhich of these fields will be populated, and which will not.
for (var i=0; i<entryArray.length; i++) {
var rowArray = new Array();
rowArray[0] = "";
rowArray[1] = "";
rowArray[2] = "";
try { rowArray[0] = entryArray[i].gd$name.gd$fullName.$t; } catch (ex) {} //fullname
try { rowArray[1] = entryArray[i].gd$name.gd$givenName.$t; } catch (ex) {} //firstname
try { rowArray[2] = entryArray[i].gd$name.gd$familyName.$t; } catch (ex) {} //lastname
At the end of the data collection process for a single record/row, I add the rowArray to another single-element array called valueArray (line 207), to create a 2-D array that I can use with range.setValues to commit my data to the spreadsheet in one shot (line 209).
var updateRow = getNextRowIndexByUNID_(rowArray[3],4,stageSheet);
var valueArray = new Array();
valueArray.push(rowArray);
var outputRange = stageSheet.getRange(updateRow, 1, 1, 12);
outputRange.setValues(valueArray);

The function getNextRowIndexByUNID (line 205) just finds the next available row on the “staging” sheet of the spreadsheet, so I can write data to it. The code is inside of a “for” loop (starting on line 106) that executes once for each entry in the current JSON object (created lines 96 and 97).
} else {
// COPY CHANGES TO "PRODUCTION" TAB OF SPREADSHEET
var endTime = new Date();
setSettingFromArray_("LastPassEnded",getZeroPaddedDateTime_(endTime),settingsArray,setSheet);
if (parseInt(getSettingFromArray_("StagingCopiedToProduction",settingsArray)) == 0) {
// THIS DOES A TEST-WRITE, THEN A "WIPE," THEN COPIES STAGING TO
// PRODUCTION
var copied = copySheet_(ss,"Staging","Employees");
if (copied == "SUCCESS") {
var sortRange = empSheet.getRange(2,1,empSheet.getLastRow(),empSheet.getLastColumn());
sortRange.sort([3,2]); // SORT BY COLUMN C, THEN B
// RESET SETTINGS
setSettingFromArray_("NextProfileLink","",settingsArray,setSheet);
setSettingFromArray_("LastRowUpdated",0,settingsArray,setSheet);
setSettingFromArray_("StagingCopiedToProduction",1,settingsArray,setSheet);
}
}
} // end if "DONE"

If the script finds “DONE” in the “NextProfileLink” cell of the spreadsheet, it will skip doing another UrlFetch to the next feed link (line 81). Instead, it will copy all records from the “staging” sheet of the spreadsheet to the “production” one, via a utility function called “copySheet” (line 273). Then it will sort the range, reset the copy settings, and it will mark another designated cell, “StagingCopiedToProduction” as “1” in the spreadsheet, to stop any further runs that day.

Scheduling the Google Spreadsheet User Directory Script to Run

Below are the triggers I typically set up for the Spreadsheet User Directory. I recommend setting scanUserProfiles() to run on an interval of less than 30 minutes, since the Google-provided token in each “NextProfileLink” url lasts about that long. I also recommend running the WipeEventLog() utility function at the end of each day, just to clear data from prior runs from the EventLog tab of the spreadsheet.

Conclusion

Above I’ve outlined how to create a basic User Directory out of a Google Spreadsheet and Apps Script that will always keep itself current. Since Google Spreadsheets support the Google Visualization API and a query language for sorting and filtering data, all kinds of possibilities open up for creating corporate “directory” gadgets for Google Sites (see the image at right) and for enabling business processes that require workflows, role lookups, or the manipulation of permissions on content in the various Google Apps.
Using Apps Script made this solution quick and easy to produce and flexible enough to be extended and used in many different ways. The code is easy to share as well. If you’d like to give the Google Spreadsheet User Directory a try, then please copy this spreadsheet template, and modify and re-authorize it to run in your own domain. Enjoy!

Shel Davis

Guest author Shel Davis is a senior consultant with Cloud Sherpas, a company recently named the Google Enterprise 2011 Partner of the Year. When Shel is not working on solutions for customers, he’s either teaching classes on Google Apps and Apps Script (Google Apps Script Training), or he’s at home, playing with his kids.

URL: http://googleappsdeveloper.blogspot.com/2012/02/create-spreadsheet-user-directory-with.html

Thursday, February 23, 2012

[Gd] Beta Channel Update for Chromebooks

| More

Chrome Releases: Beta Channel Update for Chromebooks


The Beta channel has been updated to 18.0.1025.39 (Platform versions: 1660.44.0) for Chromebooks (Acer AC700, Samsung Series 5, and Cr-48).

This build contains a number of stability and performance improvements. Some highlights of these changes are:
  • 23036 - Caps lock is now triggered via the Shift + Search key combination (instead of the double Shift key combination).
  • 20187 - Fix to reduce machine login time
  • Two finger click when resting/hovering thumb present fixed (users would see 3 finger clicks instead); Faulty 3 finger click turned off to correct this issue.
  • 25133 - Fix to keyboard tab focus moving too far on login screen.
  • 26201 - Fix to brightness filter in Chrome OS Photo Editor
Known issues:

  • 26278 - Modal dialogs not always rendered properly.
If you find new issues, please let us know by visiting our help site or filing a bug. Interested in switching channels? Find out how. You can submit feedback using ‘Report an issue’ under the wrench menu.

Danielle Drew
Google Chrome
URL: http://googlechromereleases.blogspot.com/2012/02/beta-channel-update-for-chromebooks_22.html

[Gd] Google Developers

| More

Google Developers Blog: Google Developers

Author Photo
By Mike Winton, Director of Developer Relations

Last September we announced the Google+ API and introduced our Google Developers site as our planned new home for developer information. Since then, we’ve made steady progress in building developers.google.com - by migrating existing content from code.google.com, and by adding new pages and features to the new site. Our goal with the Google Developers site is to bring together all developer resources, programs, events, tools, and community into one place.

code.google.com wasn’t built in a day (it’s been around for almost 7 years), and it will take some time to make the new Google Developers site at developers.google.com your single destination for all the resources we offer. But we’re working toward that goal every day. Soon, all our information will be on this new Google Developers site, and Google Code will return to its roots as an open source project hosting service.

Google Developers logo

As part of this project, today we’re introducing a new identity, complete with a new look, to unify all of our developer offerings. Our new logo says Google Developers, and that's intentional: it reflects our focus on you, not just the tools we provide.



Another part of this update is the new blog you’re reading right now: Google Developers Blog. We’re going to use this blog to continue to provide you with useful news and updates about new developer tools and technologies, ways to speed up your apps and sites, upcoming events, and of course, fun stuff on Fridays. In addition to the blog, we’ll continue to share and converse on our +Google Developers page.

Thanks for all your support over the years, and welcome to the new Google Developers community!


Mike Winton founded and leads Google's global Developer Relations organization. He also enjoys spending time with his family and DJing electronic music.

Posted by Scott Knaster, Editor

URL: http://googledevelopers.blogspot.com/2012/02/google-developers.html

[Gd] Fridaygram: Google Public DNS, lonely black hole, tiny chameleons

| More

Google Developers Blog: Fridaygram: Google Public DNS, lonely black hole, tiny chameleons

Author Photo
By Scott Knaster, Google Code Blog Editor

Google Public DNS is a fast, free DNS service that we introduced a little more than 2 years ago. As the Official Google Blog post aptly puts it, “DNS acts like the phone book of the Internet”, translating from human-readable URLs to all-numeric IP addresses. Google Public DNS started as an experimental service and has now become the most-used public DNS service in the world with over 70 billion requests per day, mostly from outside the U.S. Will the next step be support for users in more distant places? (Probably not there.)

Speaking of faraway places, astronomers using images from the Hubble space telescope have found black hole HLX-1, which appears to be all that’s left of a dwarf galaxy that once contained other stars. The theory is that this late galaxy was torn apart by a nearby spiral galaxy, leaving only HLX-1. The other stars became part of the larger galaxy.

While you’re musing on this supermassive black hole, consider some much tinier creatures: little chameleons, just about one inch long, recently discovered in Madagascar. Scientists think this miniaturization might be an evolutionary response to limited resources.


tiny tiny tiny tiny tiny chameleon
Tiny chameleon: he comes and goes, he comes and goes

Finally, we can’t help but jump on the Linsanity bandwagon. Of course, we’re doing it in a nerdy way by pointing you to this article (interesting even for non-sports fans) about why talent evaluation is so tricky.


On Fridays we take a break and do a Fridaygram post just for fun. Each Fridaygram item must pass only one test: it has to be interesting to us nerds. Special thanks to Wired Science for having many excellent posts this week.

Images: Glaw, F., et al., PLoS ONE

URL: http://googledevelopers.blogspot.com/2012/02/fridaygram-google-public-dns-lonely.html

[Gd] Come learn about Apps Script in Washington, DC

| More

Google Developers Blog: Come learn about Apps Script in Washington, DC

Author Photo
By Jan Kleinert, Developer Relations Team

Google Apps Script is a JavaScript cloud scripting language that provides easy ways to automate tasks across Google products and third party services. If you want to learn more about Google Apps Script, collaborate with other developers, and meet the Apps Script team, here’s your chance! We will be holding an Apps Script hackathon in Washington, DC on Wednesday, March 7 from 2pm - 8pm.

After we cover the basics of Apps Script, you can code along with us as we build a complete script, or you can bring your own ideas and get some help and guidance from the team. There will be food, power, and Apps Script experts available to help throughout the day. Just bring your laptop, ideas, enthusiasm, and basic knowledge of JavaScript. Check out out the details of the event and be sure to RSVP to let us know you’re coming.


Jan Kleinert is a Developer Programs Engineer based in NYC, focusing on helping developers get the most out of Google Apps Script. Prior to Apps Script, she worked on Commerce, helping merchants integrate with Google Checkout and on Chrome, helping developers build great web apps.

Posted by Scott Knaster, Editor
URL: http://googledevelopers.blogspot.com/2012/02/come-learn-about-apps-script-in.html

[Gd] Tech preview of Chromium with Dart engine now available

| More

Google Developers Blog: Tech preview of Chromium with Dart engine now available

author photo
Pavel
author photo
Vijay
author photo
Anton

By Anton Muhin, Vijay Menon, and Pavel Podivilov, Software Engineers

Cross-posted with the Chromium Blog

An attractive feature of Web programming is a rapid development cycle. Reloading the application after the source code has changed takes a fraction of a second. We want to offer you that same experience when using Dart, and today we’re making Mac and Linux binaries available that integrate the Dart VM into Chromium.

This technology preview allows you to run your Dart programs directly on the Dart VM in Chromium and avoid a separate compilation step. Over time, these programs will take advantage of the VM’s faster performance and lower startup latency.

Dart has been designed from the start to work with the entire modern web, and we’re simultaneously continuing to improve our fast Dart-to-JavaScript compiler. Both the Dart VM and modern JavaScript engines are first-class targets for Dart.

This release of Chromium with Dart VM integration is a technology preview, and should not be used for day-to-day browsing. After more testing and developer feedback, we plan to eventually include the Dart VM in Chrome.

Today’s release of the Chromium + Dart VM integration is another step forward for the open source "batteries included" Dart platform. Our goal is to help you build complex, high performance apps for the modern web, and we encourage you to try Dart and let us know what you think.


Anton Muhin is an engineer at Google Saint Petersburg who recently worked on making V8 VM and DOM bindings faster and now is working on integrating the Dart VM into Chromium. Before that he worked on the Google Calendar backend.

Vijay Menon is a software engineer at Google Seattle working on integrating the Dart language and runtime into the browser. His background is in compilers, runtime systems, and parallel programming.

Pavel Podivilov is a software engineer at Google Saint Petersburg who worked on Chrome Developer Tools prior to joining the Dartium team.


Posted by Scott Knaster, Editor
URL: http://googledevelopers.blogspot.com/2012/02/tech-preview-of-chromium-with-dart.html

[Gd] Falling in love with the Google+ API

| More

Google Developers Blog: Falling in love with the Google+ API


By Melina Mattos, Program Manager for Google Africa and Bob Aman, Program Manager for Developer Relations

Cross-posted from the Google Africa Blog

Attention developers! Of the 90+ Google APIs, which is your favorite? We know that we fell in love with the Google+ API after we saw the amazing applications built from the Hackathons in South Africa and Kenya. We want to continue spreading the love!

This Valentine’s Day we’re thrilled to announce that we are holding three more Google+ Hackathons with the support of the Google Technology User Groups (GTUGs) in Accra, Kampala, and Lagos.

If you are ready to wow us with your application, please apply for the event using these forms: Kampala on March 10 at the 4th floor of Solis House, Lagos on March 17 at the CCHub Nigeria, and Accra on March 21 at the Meltwater Entrepreneurial School of Technology.

Remember to start today on getting those creative juices flowing! Familiarize yourself with the API and review these resources. Begin gathering ideas and coding a little. Take advantage of the Google+ Platform Office Hours on the 15th of February. If you have any questions, please address them to us in our Google+ Hangout on February 23. Use the Hackathon to perfect your application and win one of the multiple prizes we will be awarding - including a ticket for the overall winning application to Google’s premiere developer event, Google I/O!

Any updates relating to these Hackathons and the Hangout will be posted on Google+ (of course!) using the hashtag #hackgplus. Stay tuned!


Posted by Scott Knaster, Editor
URL: http://googledevelopers.blogspot.com/2012/02/falling-in-love-with-google-api.html

[Gd] Building Web Apps? Check out our Field Guide

| More

Google Developers Blog: Building Web Apps? Check out our Field Guide

Author Photo
By Pete LePage, Developer Advocate

Yesterday, the Chrome Developer Relations team launched several new resources, including the Field Guide to Web Applications. It’s a new resource that is designed to help web developers create great web apps. We’ve heard loud and clear from users that they want more and better web apps, and we hope this new field guide will enable you to create those web apps. Our fictitious author Bert Appward guides you through topics like the properties of web applications, design fundamentals, tips for creating great experiences, and a few case studies that put best practices to use. Whether you're building your first web app or are just looking for ways to improve your existing apps, I hope you'll find the field guide useful.




We built the field guide to embody the principles and best practices that it preaches. We stepped away from the normal webpage look, and instead designed the experience around a field guide. We used many CSS3 features like box-shadow, opacity, multiple backgrounds and more to provide a rich, visual experience. To make sure that it worked offline, we used AppCache and other than some URL rewriting techniques, didn't use any server-side code. We used the HTML5 History API to maintain page state even though everything is served from a single HTML page. We've started working on a new case study about the field guide, so check back soon for that!


Pete LePage is a Developer Advocate on the Google Chrome team and works with developers to create great web applications for the Chrome Web Store. He recently helped launch the +Chrome Developers page on Google+.

Posted by Scott Knaster, Editor
URL: http://googledevelopers.blogspot.com/2012/02/building-web-apps-check-out-our-field.html

[Gd] Image results now available from the Custom Search API

| More

Google Developers Blog: Image results now available from the Custom Search API

Author Photo
By Nam Nguyen, Software Engineer

Last year we added image results to Google Custom Search Engines to enable sites to offer image-only results that showcase photos and other digital images. For site owners who want more flexibility in presentation, they are also now available from the Custom Search API.

Read more about accessing Image Results from the Custom Search API or try it out in the Custom Search API Explorer. For billing purposes, image queries will be treated the same as web queries. If you are still using the deprecated Google Image Search API, now’s a great time to switch!

Below is an example of an image search to find small jpeg images of flowers:

https://www.googleapis.com/customsearch/v1?key=YOUR_API_KEY&cx=YOUR_CSE_ID&q=flower&searchType=image&fileType=jpg&imgSize=small&alt=json

With a valid key and cse id, here is a possible json result returned for an image item:
{
"kind": "customsearch#result",
"title": "flower-photo",
"htmlTitle": "\u003cb\u003eflower\u003c/b\u003e-photo",
"link": "http://images.example.com/flowerphoto.jpg",
"displayLink": "images.example.com",
"snippet": "photo of flower",
"htmlSnippet": "photo of \u003cb\u003eflower\u003c/b\u003e",
"mime": "image/jpeg",
"image": {
"contextLink": "http://images.example.com/flowergallery.html",
"height": 100,
"width": 100,
"byteSize": 6104,
"thumbnailLink": "https://encrypted-tbn2.google.com/images?q=tbn:3x4MPL3",
"thumbnailHeight": 82,
"thumbnailWidth": 82
}
}

which you can use to render the image in your own site.

Note that you need to enable image search in your custom search engine control panel for the custom image search to work.


Nam Nguyen works on the JSON/Atom Custom Search API, which lets developers retrieve and display results from Google Custom Search programmatically. He is dedicated to making developers' lives a little easier by providing a simple API.

Posted by Scott Knaster, Editor
URL: http://googledevelopers.blogspot.com/2012/02/image-results-now-available-from-custom.html

[Gd] A fresh new look for HTML5Rocks.com

| More

Google Developers Blog: A fresh new look for HTML5Rocks.com

Author Photo
By Eric Bidelman, Senior Developer Programs Engineer, Google Chrome Team

Over the past year, HTML5Rocks.com has become a top destination for developers craving to learn more about HTML5. Today, we have over 60 articles and tutorials covering the latest HTML5 tech, published by 30 contributors from around the world! We've worked hard to bring great content to the site as quickly as possible, but it's been challenging to consolidate so much information as HTML5 continues to push the web forward and evolve at an accelerated pace.


HTML5 Rocks logo

Today, we're launching an updated HTML5Rocks with better tools for finding content, including an edgy new look and "rocking" logo. As our content expands, finding things becomes more important. To address this, we've created "persona pages" with catered content in 3 different verticals (Games, Business, Mobile). If you're one of those developers, finding content relevant to you should now be a snap. We've also consolidated many of the different components (Updates, Studio, Playground) into the main site and have deeply integrated the HTML5 technology classes to bring a better identity to the content.

All in all, it's a little bit Punk and a little bit Rock and Roll.

Lastly, if you're interested in contributing to the site, it's an open source project and we'd love to have your expertise. See our contributors guide.


Eric Bidelman is a Senior Developer Programs Engineer on the Google Chrome Team and a core contributor to html5rocks.com. He is the author of the book Using the HTML5 Filesystem API.

Posted by Scott Knaster, Editor
URL: http://googledevelopers.blogspot.com/2012/02/fresh-new-look-for-html5rockscom.html

[Gd] See you at the Game Developers Conference

| More

Google Developers Blog: See you at the Game Developers Conference

Author Photo
By Amy Walgenbach, Developer Marketing Team

We’re returning to the Game Developers Conference (GDC) in San Francisco this year with 2 Developer Days and a booth on the Expo floor. At the conference we'll be giving a peek at the latest technologies we're developing for games.

Our Developer Days will take place in Room 2020 at Moscone Center. Day 1 (March 5) will focus on web games and Day 2 (March 6) will feature mobile games. From scalable servers, to high-performance code and graphics in web browsers, to porting console games to the web, come learn about how our technologies can help you better create, distribute, promote, and monetize games. We also have several Googlers speaking at other sessions during the conference. In addition, we'll have booth 1901 on the show floor March 7th-9th where you can meet Googlers working on games, demo what's new, meet partners, and get answers to your questions.

For more information on our presence at GDC, including a full list of our talks and speaker details, please visit http://www.google.com/events/gdc. If you stop by, you might even be able to score a pass to Google’s invitation-only GDC party. We look forward to meeting you in person!


Amy Walgenbach leads marketing for the Google+ Platform and developer marketing for games at Google.

Posted by Scott Knaster, Editor

URL: http://googledevelopers.blogspot.com/2012/02/see-you-at-game-developers-conference.html

[Gd] Fridaygram: Unicode, ancient lake, very ancient sound

| More

Google Developers Blog: Fridaygram: Unicode, ancient lake, very ancient sound

Author Photo
By Scott Knaster, Google Code Blog Editor

Unicode was created with the ambitious goal of representing every human language, with room left over for a whole bunch of symbols, too. More than 20 years after Unicode was started, over 60% of the pages on the web are now encoded in Unicode. That’s pretty good growth when you consider that Unicode’s coverage was less than 5% of the web in 2005. Having a standard like Unicode is important because, as Mark Davis writes, "The more documents that are in Unicode, the less likely you will see mangled characters (what Japanese call mojibake) when you're surfing the web."


In news of older stuff, a Russian expedition that has been working for 10 years has finally drilled through Antarctic ice and reached Lake Vostok, a huge freshwater lake more than 12,000 feet below the surface. The ice has covered this lake for at least 15 million years, which is well before the work on Unicode began. Eventually the team will take samples of the lake water, looking for signs of life and other ancient treasures.

Finally, you can go back even further in time and listen to the song of a cricket that was around during the Jurassic period, 165 million years ago. That cricket really sounds great for its age.


On Fridays we take a break and do a Fridaygram post just for fun. Each Fridaygram item must pass only one test: it has to be interesting to us nerds.

URL: http://googledevelopers.blogspot.com/2012/02/fridaygram-unicode-ancient-lake-very.html

[Gd] Google Summer of Code 2012 is on!

| More

Google Developers Blog: Google Summer of Code 2012 is on!


By Carol Smith, Open Source Team

Cross-posted with the Google Open Source Blog


Today at FOSDEM I was proud to announce Google Summer of Code 2012.

This will be the 8th year for Google Summer of Code, an innovative program dedicated to introducing students from colleges and universities around the world to open source software development. The program offers student developers stipends to write code for various open source projects with the help of mentoring organizations from all around the globe. Over the past seven years Google Summer of Code has had 6,000 students from over 90 countries complete the program. Our goal is to help these students pursue academic challenges over the summer break while they create and release open source code for the benefit of all.

Spread the word to your friends! If you know of a university student that would be interested in working on open source projects this summer, or if you know of an organization that might want to mentor students to work on their open source projects, please direct them to our Google Summer of Code 2012 website where they can find our timeline along with the FAQs. And stay tuned for more details coming soon!


Posted by Scott Knaster, Editor
URL: http://googledevelopers.blogspot.com/2012/02/google-summer-of-code-2012-is-on.html

[Gd] Fridaygram: science education, simulating galaxies, spider webs

| More

Google Developers Blog: Fridaygram: science education, simulating galaxies, spider webs

Author Photo
By Scott Knaster, Google Code Blog Editor

Most software developers started getting interested in technology at an early age. With that in mind, Google Roots in Science and Engineering (RISE) is a program that annually awards grants to groups that come up with great new ways to teach students in Computer Science (CS) and science, technology, engineering, and math (STEM). This year’s awards were just announced. The winners included a program that helps primary school students in Dublin, girls in the San Francisco Bay Area, and kids in Uganda who want to learn about technology.

Scientists love to have reproducible results so they can test theories and ideas. What if you’d like to reproduce the creation of a galaxy? That task is still out of scale for humans, but scientists at the Laboratoire pour l'Utilisation de Lasers Intenses (LULI) have figured out a lab procedure that simulates the magnetic fields in newly formed galaxies. The experimental version uses lasers and carbon rods in place of clouds of gas and dark matter, but the results are useful, and you don’t need a galaxy-sized lab to work in.

Narrowing our view from giant galaxies to little spiders, a new study says spider webs are not just strong, but also have the ability to become either stiff or soft, as necessary. Spider webs are also designed to stay as strong as possible when strands are damaged. So spiders are good engineers.

Finally, you might use some of your weekend time to ponder this Vi Hart video about SpongeBob SquarePants and Fibonacci sequences.


Fridaygram posts are just for fun. Fridaygrams are designed for your Friday afternoon and weekend enjoyment. Each Fridaygram item must pass only one test: it has to be interesting to us nerds, and we certainly love our lasers.

URL: http://googledevelopers.blogspot.com/2012/02/fridaygram-science-education-simulating.html

[Gd] Angry Birds Chrome now uses the Web Audio API

| More

Google Developers Blog: Angry Birds Chrome now uses the Web Audio API

Author Photo
By Fred Sauer, Developer Advocate

Cross-posted with the Google Web Toolkit Blog

Last week Angry Birds for Chrome was updated to use the Web Audio API for all its in-game audio for Chrome users, which means Chrome users get the full Angry Birds experience, without any plugins. The Web Audio API supports a wide variety of use cases, including the high fidelity and low latency requirements of games. Users of other supported browsers will still get sound via Flash or HTML5 audio.



How does this cross-browser audio magic work? As you may have seen or heard, Angry Birds was in no small part made possible by the cross-platform open source PlayN library. When building for the HTML platform, PlayN in turn relies heavily on Google Web Toolkit (GWT) to delivery a highly optimized web experience for users, and on gwt-voices to easily deliver a cross-browser audio experience.

The responsibility of choosing the appropriate audio API for the game's sound is (mostly) left up to gwt-voices, which chooses the audio API that will give the best experience. If you'd like to hear how other audio APIs perform, you can ask gwt-voices to try to use the Web Audio API, Flash, HTML5 Audio, or even native audio. Your mileage will vary by browser and platform and which plugins you have installed. Also, gwt-voices will select the best available fallback, if the desired audio API is not going to work at all in your environment.

Want to learn more? Check out the Web Audio API tutorial and don't let those pigs grunt too much.


Fred Sauer is a Developer Advocate at Google where most of his time is devoted to Google App Engine and Google Web Toolkit. He is the author of various GWT related open source projects including gwt-dnd (providing in browser Drag and Drop capabilities), gwt-log (an advanced logging framework) and gwt-voices (for cross browser sound support). Fred has dedicated much of his career to Java related development, with an increasing focus on HTML5.

Posted by Scott Knaster, Editor
URL: http://googledevelopers.blogspot.com/2012/01/angry-birds-chrome-now-uses-web-audio.html

[Gd] Translating JavaScript to Dart

| More

Google Developers Blog: Translating JavaScript to Dart

Marcin
Aaron

By Aaron Wheeler, Senior User Experience Prototyper, and Marcin Wichary, Senior User Experience Designer

Cross-posted with the Chromium Blog

It took approximately 2000 years for the original Rosetta Stone to be discovered, which helped translate the Egyptian Hieroglyphs. We couldn’t wait that long to bridge the Dart and JavaScript worlds, so today we are releasing the JavaScript to Dart Synonym app.

Like most web developers, we are familiar, comfortable, and productive with JavaScript. We were curious about Dart, and thanks to a recent Dart hackathon, we had the chance to play with the language and libraries. The problem was, as JavaScript developers, we didn’t know how to map common JavaScript idioms to Dart. Hence the idea for this synonym app was born.

We started with the basics that every JavaScript and jQuery developer knows: variables, arrays, functions, classes, DOM manipulation, and many more. Then, with the help of the Dart team, we recorded the corresponding Dart versions of each idiom. To practice what we learned, we wrote this app with Dart.



We hope our app that maps between JavaScript and Dart eases your introduction to Dart and gives you a sense of where the project is going. We know the team is eager to hear your feedback. Don’t hesitate to join the conversation or file a new issue for either Dart or the Synonym app. And remember, Dart isn’t set in stone, so your feedback counts.


Aaron Wheeler is a user experience prototyper working on special projects that go beyond the Web. He balances design and engineering outside of work as well, splitting time between artistic pursuits and bicycle maintenance.

Marcin Wichary is a user experience designer, currently working on the Chrome browser and thinking of the future of the Web platform. He also occasionally codes interactive homepage doodles, such as Pac-Man and Stanislaw Lem.

Posted by Scott Knaster, Editor
URL: http://googledevelopers.blogspot.com/2012/01/translating-javascript-to-dart.html