Friday, April 22, 2011

[Gd] Fridaygram

| More

The official Google Code blog: Fridaygram


By Scott Knaster, Google Code Blog Editor

Clarke's Third Law states that "any sufficiently advanced technology is indistinguishable from magic". That's exactly how I felt the first time I saw various bits of advanced software: for example, watching a word processor automatically wrap words at the end of a line without having to press Return, seeing the Mac's graphical user interface and learning that I could program it into my apps using ordinary-looking function calls, and watching a search engine take a couple of words and almost instantly find exactly the right web page from among millions.

The Prediction API described in yesterday's post on this blog is a modern piece of software that feels like magic. Using machine learning, the Prediction API examines existing data, determines patterns, and makes educated guesses at answers to questions. For example, if you train a program with phrases in various languages, you can then feed it new phrases and have it determine the language of the new phrases. That's certainly something humans can learn to do; having computers do it sounds remarkable to me, but it's real.

You can use the Prediction API to tell whether user comments are positive or negative, decide which emails are most and least relevant, and identify suspicious activity. If you'd like to add features like these to your apps, please check out yesterday's post.

Turning to a completely different topic, if you're interested at all in making your HTML5 and CSS3 faster, spend half an hour or so watching this talk by Paul Irish from the Google Developer Relations Team. There's a lot in there, including a nifty section about hardware accelerated CSS.



Finally, for nerdy nature fun, please check out this video that shows what happens when a wasp and an ant fight over the same food.
URL: http://googlecode.blogspot.com/2011/04/fridaygram_22.html

[Gd] [Libraries][Update] jQueryUI 1.8.12 and YUI 2.9.0

| More

Google AJAX API Alerts: [Libraries][Update] jQueryUI 1.8.12 and YUI 2.9.0

jQueryUI has been updated to 1.8.12 and YUI has been updated to 2.9.0
URL: http://ajax-api-alerts.blogspot.com/2011/04/librariesupdate-jqueryui-1812-and-yui.html

Thursday, April 21, 2011

[Gd] Chrome Developer Tools: Understanding Stack Traces

| More

Chromium Blog: Chrome Developer Tools: Understanding Stack Traces

One of the biggest challenges in JavaScript development is dealing with script errors. We’ve been working hard to improve and extend the set of tools that lets you better understand how your JavaScript code works. Let’s have a quick look at five features of Google Chrome Developer Tools that can help you work with exceptions and stack traces more efficiently:
  • Exception call stack. When something goes wrong, you can open the developer tools console. There you’ll find a number of uncaught JavaScript exception messages there. Each message has a link to the file name with the line number you can navigate to. However, there might be several execution paths that lead to the error and it’s not always obvious which one of them has happened. Exceptions in the console are now accompanied with the complete JavaScript call stacks after the developer tools window has been opened.
  • Pause on exception. The developer tools’ Scripts panel enables you to pause JavaScript execution each time an exception is thrown and inspect its call stack, scope variables and state of your app. You can choose whether to pause only on uncaught exceptions or on all exceptions.
  • Logging stack traces. Printing log messages to the developer tools console is also very helpful in understanding how your application behaves. Now you can make the log entries even more informative by including associated stack traces. You can instrument your code with console.trace() calls that would print current JavaScript call stack. Moreover, you can check that some invariants are true using console.assert() which prints a full stack trace when its conditional expression passed as first parameter evaluate to false.


  • Error.stack. Each Error object has a property named “stack” that contains the stack trace.
  • Handler function for window.onerror. Recently we’ve added support for setting a handler function to window.onerror. Whenever a JavaScript exception is thrown in the window context and is not caught by any try/catch block, the function will be invoked with the exception’s message, the URL of the file where the exception was thrown and the line number in that file passed as three arguments in that order. You may find it convenient to set an error handler that would collect information about uncaught exceptions and report it back to your server.
For a more complete reference on working with the Google Chrome Developer Tools, check out our home page. We further described improvements to exception handling and stack traces in our recent WebKit blog post.

Posted by Yury Semikhatsky, Software Engineer
URL: http://blog.chromium.org/2011/04/chrome-developer-tools-understanding.html

[Gd] Prediction API: Every app a smart app

| More

The official Google Code blog: Prediction API: Every app a smart app

By Travis Green of the Google Prediction API Team.

If you’re looking to make your app smarter and you think machine learning is more complicated than making three API calls, then you’re reading the right blog post.

Today, we are releasing v1.2 of the Google Prediction API, which makes it even easier for preview users to build smarter apps by accessing Google’s advanced machine learning algorithms through a RESTful web service.

Some technical details of the Prediction API:
  • Chooses best technique from several available machine learning algorithms.
  • Supported inputs: numeric data and unstructured text.
  • Outputs hundreds of discrete categories, or continuous values.
  • Integrates with many platforms: Google App Engine, web and desktop apps, and command line.
  • v1.2 improvements:
    • Simpler interface: automatic data type detection, and score normalization.
    • Paid usage tier.
    • Improved usage monitoring and faster signup through the APIs Console.
Ideas to make the most of the Prediction API:
  • Recommendation: What products might a user be interested in? (example)
  • Filter RSS feeds, user comments, or feedback: Which posts are most relevant? Should a user comment be featured? Which feedback should we look at first? (example)
  • Customize homepages: Predict what content a user would like to see and populate the page with the user’s anticipated interests.
  • Sentiment analysis: Is this comment positive or negative? Does a commenter support Group A or Group B?
  • Message routing: Route emails to the appropriate person based on analysis of the email contents.
  • See the Prediction API website for many more!
To join the preview group, go to the APIs Console and click the Prediction API slider to “ON,” and then sign up for a Google Storage account.

We would also like to continue to thank our supportive preview users for their help making the API the service it is today. We look forward to seeing many more of you join us in making the web just a little bit smarter, and hearing your thoughts and feedback through our discussion group.

Travis Green's favorite part about his job is designing smart applications. In his spare time, he is in the great outdoors (looking for trouble).

Posted by Scott Knaster, Editor
URL: http://googlecode.blogspot.com/2011/04/prediction-api-every-app-smart-app.html

[Gd] Android for Good at Google I/O 2011

| More

The official Google Code blog: Android for Good at Google I/O 2011

By Zi Wang of the Android Team

Do you have an unlocked Android device that you no longer need? If you’re coming to Google I/O, you can make a world of difference by donating it to Android for Good.

Android for Good evolved from a program at Google started by one passionate engineer with an idea to help the developing world through technology. A small team collected Android devices from Googlers around the world and organized their donation to groups including Grameem’s AppLab Community Knowledge Worker Initiative in Uganda, Save the Elephants in Kenya, V-Day in the Democratic Republic of Congo, VillageReach in Mozambique, VetAid in Tanzania & Kenya, and UNHCR in Central Africa.

This year, we want to make it easy for everyone at Google I/O to get involved as well. We know you like to keep up to speed with the latest and greatest technology, so you may have an older Android device you don’t need anymore. If that device is unlocked (such as the T-Mobile G1, Nexus One, or Nexus S) and in good working condition, bring it along to Google I/O and drop it off at the Android for Good booth, located on the third floor of Moscone Center. Although it might seem old to you, that device could mean a new beginning when placed in the right hands.

Zi Wang is a Product Marketing Manager on the Android Team. In his 20% time, Zi is working on a very cool project called Android in Space.

Posted by Scott Knaster, Editor
URL: http://googlecode.blogspot.com/2011/04/android-for-good-at-google-io-2011.html

[Gd] More powerful collaboration

| More

Google Custom Search: More powerful collaboration

Until now, CSE has had a simple collaboration feature that lets the owner of a custom search engine invite friends or colleagues to contribute sites, and assign labels to these sites. This was useful in expanding the scope of a search engine, but beyond expanding indexing, it limited what collaborators were able to do.

Starting today, we’re replacing the current collaboration options with more powerful shared administration features. Through Admin accounts, a new tab in your control panel, you can now invite collaborators to become shared administrators. Admin accounts have capabilities similar to those of the owner, but they cannot access the Make Money (advertising) tab or create additional admin accounts.
In line with these enhancements, we will be removing the Collaboration tab in a month. In the mean time, as an owner of a custom search engine, you can easily migrate existing sites from the Collaboration tab to your search engine definition and, if you like, upgrade existing collaborators to Admin accounts to give them shared administrator privileges. When we remove the Collaboration tab we will automatically migrate all sites but will not automatically upgrade all collaborators to admin accounts - so if you do want to keep existing collaborators on your site we recommend you migrate them today, or you can add them back manually later.

We hope you’ll find these shared admin capabilities more powerful. Let us know what you think in our discussion forum.

Posted by: Rui Jiang and Abhishek Rajgarhia, Software Engineers.
URL: http://googlecustomsearch.blogspot.com/2011/04/more-powerful-collaboration.html

Wednesday, April 20, 2011

[Gd] Check out the latest from the Developer Sandbox at Google I/O 2011

| More

The official Google Code blog: Check out the latest from the Developer Sandbox at Google I/O 2011

By Dusty Reid and Christine Songco of the Google I/O Team.


With Google I/O 2011 less than a month away, we wanted to give you a preview of the partners who will be present at our Developer Sandbox. Starting today, you can visit the Developer Sandbox page on our website for a preview of who will be exhibiting at Google I/O 2011. Think of the Sandbox as a place where you can get real-life case studies and hands-on time with developers who use Google technologies to build products. We have 128 partners participating across 10 product tracks this year.

For those of you joining us via I/O Live, you can submit and vote on questions you’d like to ask our partners via Google Moderator. We will be taking the most popular questions and conducting video interviews with Sandbox partners. The videos will be posted to the Sandbox page on the following day.

Also, stay tuned on the Google Code Blog where we’ll be featuring guest bloggers from Sandbox companies in the days leading up to I/O.

For those of you joining us in person, we’ll see you in San Francisco. For everyone around the world, tune in to I/O Live and don’t forget to submit questions for Sandbox companies via Google Moderator!

Dusty Reid plans and manages many events at Google each year, including Google I/O. He works at Google's office in beautiful Boulder, Colorado.

Christine Songco works with developers in Southeast Asia, although before and during Google I/O she wears many additional hats. Christine likes to travel, scuba dive, and snowboard in her spare time, which she hopes to discover again when I/O is over for the year.

Posted by Scott Knaster, Editor
URL: http://googlecode.blogspot.com/2011/04/check-out-latest-from-developer-sandbox.html

[Gd] Happy Tax Day! Now, where did your tax dollars go?

| More

The official Google Code blog: Happy Tax Day! Now, where did your tax dollars go?


This post is by Jenny Ramaswamy of the Google Creative Lab. Jenny is a Marketing Manager on the Creative Lab's Data Arts team. Outside of work, Jenny likes to go on adventures to remote international locations.

(Cross-posted with the Official Google Blog.)

Like it or not, Americans have a date with the IRS today. In a few hours, our tax forms will have been sent in... yet most of us will still be left wondering, “How will the government spend our money?”

In February, we launched the Data Viz Challenge to answer that very question. The challenge was a five-week competition that asked developers to visualize how our federal income tax dollars are spent. We received more than 40 thought-provoking entries that each take a unique approach to making this data more accessible to taxpayers.

Take a look at the variety of visualizations in this short video:



The entries ranged from quirky and fun to serious and academic. Some were as simple as a receipt, others showed us how many minutes or days we work to cover public spending. One even rendered the data as a cityscape and invited people to climb the towers virtually.

In the end, our jury selected Anil Kandangath’s “Where Did My Tax Dollars Go?” as our Grand Prize winner. As the jury noted, his entry is information-rich but elegantly designed, and at no point while interacting with the visualization do you lose the “big picture.” Anil’s entry is a great example of how data visualization can take boring, complicated, but critically important information and make it accessible to everyone. Congratulations, Anil.


Thank you to all of the entrants and our partners Eyebeam and Whatwepayfor.com for making this possible. We hope these submissions help you better understand where your tax dollars are spent—and even inject a little bit of fun into your tax day this year. Happy filing!

Posted by Scott Knaster
URL: http://googlecode.blogspot.com/2011/04/happy-tax-day-now-where-did-your-tax.html

[Gd] Use reports to download large data sets

| More

AdWords API Blog: Use reports to download large data sets

In this post, we will share best practices for downloading large data sets. Specifically, we will outline how to accomplish this using reports and why this is more efficient than paging with selectors.

When you request a large amount of data using generic selectors (for example, keywords), you may find that the responses are slow for very large data sets. First, we advise you not to page past 10,000 records due to the increased amount of time it takes to skip the first 10,000 records. Second, as a rule of thumb, once you exceed 100,000 keywords, it is a good idea to use a report to obtain your data rather than generic selectors.

Reports are designed to handle large quantities of data. In addition, you will also use fewer API units if you request data via reports than if you request the same data via the AdGroupCriterionService. For example, say you would like to obtain all the keywords across all ad groups using paging of 1000 for 100,000 total keywords. This would require 100,000 API units, one per AdGroupCriterion. Defining a report and downloading the data that way will cost significantly less units in the long run. If you define the report with a sliding date range such as TODAY or LAST_WEEK, you can reuse the report each time you need to download your data set. Please see this page for more information about reports.

If you need fields that are not available in reports, you still have some options to increase performance. With generic selectors you can specify only the fields you need; the fewer the number of requested fields, the faster the results will be returned. You can also use predicates to filter and limit the amount of data in each result set. By requesting keywords on a per-campaign or per-ad group basis instead of all at once, you may actually get your results faster.

If you have any questions about using reports with the API, you can ask us on the forum.

- Kevin Winter, AdWords API Team
URL: http://adwordsapi.blogspot.com/2011/04/use-reports-to-download-large-data-sets.html

Sunday, April 17, 2011

[Gd] Sharing advice from our London site clinic

| More

Official Google Webmaster Central Blog: Sharing advice from our London site clinic

Webmaster level: Beginner - Intermediate



We recently hosted our second site clinic, this time at TechHub in London, UK. Like last year, here’s our summary of the topics that came up.




  • Title tags and meta description tags are easy ways to improve your site's visibility in Google search results, yet we still see webmasters not fully utilizing their potential. We have a bit of help available about writing good page titles and descriptions which you can read to brush up on the subject. That said, you can ignore the meta keywords, at least as far as Google is concerned.


  • One way Google's algorithms determine the context of content on a page is by looking at the page’s headings. The way semantic markup is used throughout a site, including h1, h2, and h3 tags, helps us to understand the priorities of a site’s content. One should not fret, though, about every single H tag. Using common sense is the way to go.


  • Just as we recommend you structuring pages logically, it is similarly important to structure the whole website, particularly by linking to related documents within your site as necessary. This helps both users and search engine bots explore all the content you provide. To augment this, be sure to provide a regularly updated Sitemap, which can be conveniently linked to from your site’s robots.txt file for automatic discovery by Google and other search engines.


  • Duplicate content and canonicalization issues were discussed for many websites reviewed at the site clinic. Duplicate content within a website is generally not a problem, but can make it more difficult for search engines to properly index your content and serve the right version to users. There are two common ways to signal what your preferred versions of your content are: By using 301 redirects to point to your preferred versions, or by using the rel="canonical" link element. If you’re concerned about setting your preferred domain in terms of whether to use www or non-www, we recommend you check out the related feature for setting the preferred domain feature in Webmaster Tools.


  • Another commonly seen issue is that some sites have error pages which do not return an error HTTP result code, but instead return the HTTP success code 200. Only documents that are actually available should reply with the HTTP success result code 200. When a page no longer exists, it should return a 404 (Not found) response. Header responses of any URL can be checked using Fetch as Googlebot in Webmaster Tools or using third party tools such as the Live HTTP Headers Firefox addon or web-sniffer.net.


  • Ranking for misspelled queries, e.g. local business names including typos, seems to be an area of concern. In some cases, Google’s automatic spelling correction gets the job done for users by suggesting the correct spelling. It isn’t a wise idea to stuff a site's content with every typo imaginable. It’s also not advisable to hide this or any other type of content using JavaScript, CSS or similar techniques. These methods are in violation of Google’s Webmaster Guidelines and we may take appropriate action against a site that employs them. If you’re not sure how Googlebot “sees” your pages, e.g. when using lots of JavaScript, you can get a better idea by looking at the text-only version of the cached copy in Google web search results.


  • Users love fast websites. That’s why webpage loading speed is an important consideration for your users. We offer a wide range of tools and recommendations to help webmasters understand the performance of their websites and how to improve them. The easiest way to get started is to use Page Speed Online, which is the web-based version of our popular Page Speed Chrome extension. Our Let's make the web faster page has great list of resources from Google and elsewhere for improving website speed, which we recommend you to read.



We’d like to thank the TechHub team, who helped us facilitate the event, and give a big thank you to all participants. We hope you found the presentation and Q&A session interesting. We've embedded the presentation below.



And as we mentioned in the site clinic, sign up at the Google Webmaster Help Forum to discuss any further questions you might have and keep an eye on our Webmaster Central Blog.





Written by Kaspar Szymanski, Pierre Far, Sven Naumann
URL: http://googlewebmastercentral.blogspot.com/2011/04/sharing-advice-from-our-london-site.html

[Gd] High-quality sites algorithm goes global, incorporates user feedback

| More

Official Google Webmaster Central Blog: High-quality sites algorithm goes global, incorporates user feedback

Over a month ago we introduced an algorithmic improvement designed to help people
find more high-quality sites in search. Since then we’ve gotten a lot of positive responses about the change: searchers are finding better results, and many great publishers are getting more traffic.

Today we’ve rolled out this improvement globally to all English-language Google users, and we’ve also incorporated new user feedback signals to help people find better search results. In some high-confidence situations, we are beginning to incorporate data about the sites that users block into our algorithms. In addition, this change also goes deeper into the “long tail” of low-quality websites to return higher-quality results where the algorithm might not have been able to make an assessment before. The impact of these new signals is smaller in scope than the original change: about 2% of U.S. queries are affected by a reasonable amount, compared with almost 12% of U.S. queries for the original change.

Based on our testing, we’ve found the algorithm is very accurate at detecting site quality. If you believe your site is high-quality and has been impacted by this change, we encourage you to evaluate the different aspects of your site extensively. Google's quality guidelines provide helpful information about how to improve your site. As sites change, our algorithmic rankings will update to reflect that. In addition, you’re welcome to post in our Webmaster Help Forums. While we aren’t making any manual exceptions, we will consider this feedback as we continue to refine our algorithms.

We will continue testing and refining the change before expanding to additional languages, and we’ll be sure to post an update when we have more to share.

Posted by Amit Singhal, Google Fellow
URL: http://googlewebmastercentral.blogspot.com/2011/04/high-quality-sites-algorithm-goes.html