Tuesday, January 31, 2012

Gmail's Shortcut for Inserting Hyperlinks

Less than 2% of the Gmail users have enabled keyboard shortcuts and actually use them, but that doesn't mean Google shouldn't improve them. Many people complained that Gmail's rich text editor doesn't have a shortcut for inserting hyperlinks and now it's available: Ctrl+K (or Cmd-K if you use a Mac).


The same shortcut is also used in Outlook, Microsoft Word, Google Docs and other apps. "Just select any text, and then press the Ctrl and K keys at the same time. A dialogue box opens where you can type a link," informs the Microsoft Word blog.

I wonder why Google doesn't offer the option to use the top search result for the text you've selected or at least pick one of the top results from the "edit link" box.

{ Thanks, Cougar. }

Country-Specific Blogger URLs

Google found an interesting trick to defend Blogger blogs against local laws: redirect readers to country-specific domains and only remove those URLs if required.

"Over the coming weeks you might notice that the URL of a blog you're reading has been redirected to a country-code top level domain, or 'ccTLD.' For example, if you're in Australia and viewing [blogname].blogspot.com, you might be redirected [blogname].blogspot.com.au. A ccTLD, when it appears, corresponds with the country of the reader's current location," explains Google.

"Migrating to localized domains will allow us to continue promoting free expression and responsible publishing while providing greater flexibility in complying with valid removal requests pursuant to local law. By utilizing ccTLDs, content removals can be managed on a per country basis, which will limit their impact to the smallest number of readers. Content removed due to a specific country's law will only be removed from the relevant ccTLD." That means [blogname].blogspot.com will continue to exist, but it's not clear if the users from that specific country will still be able to access it.

Blogger will start to use country-specific domains, just like many other Google services. If you're in Australia and visit google.com, you'll be redirected to google.com.au, but you can opt-out by clicking "Go to Google.com" or visiting google.com/ncr. The same option is available for Blogger: "Blog readers may request a specific country version of the blogspot content by entering a specially formatted NCR URL. NCR stands for 'No Country Redirect' and will always display [blogname].blogger.com in English, whether you're in India, Brazil, Honduras, Germany, or anywhere. For example: http://[blogname].blogspot.com/ncr – always goes to the U.S. English blog."

Google doesn't mention the list of countries that are affected by this change, but Techdows.com reports that India is one of them. Obviously, blog owners can use custom domains if they don't like the new feature. Even if Google made sure that the duplicate URLs are properly handled by search engines, it could be annoying to see so many URLs that send people to the same page.

{ Thanks, Venkat and Herin. }

Monday, January 30, 2012

Android Developers on Google+

[This post is by Reto Meier, Android Developer Relations Tech Lead. — Tim Bray]

I’ve been fortunate enough to be involved with Android since the 0.9 preview SDK was released to developers back in 2007. A lot has changed since then, but one thing that hasn’t is the rapid pace at which new tools, resources, and information have become available for us Android developers. Just look at the last few months.

In December Android Training launched, with its first set of classes designed to demonstrate the best practices behind building great Android Apps.

Earlier this month, the Android design site went live — offering a place to learn about the principles, building blocks, and patterns you need to make good design decisions when creating your Android app interfaces.

We’ve got a lot more planned in the coming year, so to help you keep abreast of all the latest Android developer news we’re launching the +Android Developers page on Google+!

One of my favourite things about Google+ is the quality of conversation around posts, so +Android Developers will focus on being a place for the people behind the Android developer experience, and Android developers all around the world, to meet and discuss the latest in Android app development.

We’ll be posting development tips, discussing updates to the SDK and developer tools, highlighting new Android training classes, and posting video and pics from Android developer events around the world.

We’ll also be using Google+ Hangouts to help us all interact even more closely. Starting with weekly broadcast office-hours on Hangouts On Air to answer Android development questions. These will happen every Wednesday at 2pm Pacific Time (10pm UTS) in Mountain View—expect to see these hangouts in more time zones as our teams in London, Sydney, and Tokyo get involved. Each hangout will be recorded for YouTube, so if you can’t join us live you won’t miss out.

It turns out that hangouts are a lot of fun, so we’ll be doing more of these that feature interviews with Google engineers and 3rd party Android app developers willing to share their tips and experiences.

We’re looking forward to interacting with you even more closely, so add us to your circles, join the conversation by commenting on posts, and join the hangouts. We can't wait to hear what you have to say.

Friday, January 27, 2012

Google+ and the Post-Web Google

I've noticed an increasing number of ads that no longer send people to the company's sites. Instead, the ads only include a link to the official Facebook page. Sites suddenly look outdated, no longer include the latest information and people stop visiting them.


There are still people that visit those outdated sites and many are coming from search engines like Google. Despite Google's efforts to have a comprehensive index, there's a growing subset of the Web it can't properly index and that's Facebook. Sure, Google indexes a lot of Facebook pages, but that's like trying to find your keys in a dark room. Google needs Facebook's map to index all the pages and find the connections between pages and between users, but Facebook is not willing to license this valuable data to the most important competitor. Google tried to make the web social and failed, so now the only option to stay relevant is to build an alternative to Facebook's walled garden and that's Google+.

+1s are the new links, authors have profiles, companies have social pages and this new universe will try to coexist with the old Web in Google's search results. Google tried to focus on the users and find ways to make the social Web more open, but now it has to focus on itself and do everything it can to stay alive and maybe even save the Web. "Google's mission is to organize the world's information and make it universally accessible and useful," but that's impossible if it can't access, understand and rank that information.

Back in 1996, Larry Page and Sergey Brin used links to determine the importance of a Web page. Now links and pages are no longer that important and the old rule of trying to send people to other sites as quickly as possible is difficult to apply. Showing personalized results requires understanding users better, encouraging them to share more content and create connections. In many ways, Google+ is the anti-Google and that's why it's difficult to understand some of the new features.

Thursday, January 26, 2012

Google+ Now Open for Teens

Google+ changed the age requirements so that any Google Account user can join Google+. In most countries you need to be at least 13 years old to create a Google Account and join Google+, but there are 3 exceptions: Spain, South Korea and Netherlands. Until now, Google+ required to be at least 18 years old to "upgrade" your account.

Google's VP Bradley Horowitz mentioned that there are a few tweaks and new default settings for teens. By default, only the people from teens' circles can trigger notifications and comment on their public posts. If someone outside a teen's circles joins a hangout, Google+ temporarily removes the teen from the hangout and gives him a chance to rejoin.


Teens and young adults are the most active Internet users on the planet. And surprise, surprise: they're also human beings who enjoy spending time with friends and family. Put these two things together and it's clear that teens will increasingly connect online. Unfortunately, online sharing is still second-rate for this age group.

In life, for instance, teens can share the right things with just the right people (like classmates, parents or close ties). Over time, the nuance and richness of selective sharing even promotes authenticity and accountability. Sadly, today's most popular online tools are rigid and brittle by comparison, so teens end up over-sharing with all of their so-called "friends."

With Google+, we want to help teens build meaningful connections online. We also want to provide features that foster safety alongside self-expression. Today we're doing both, for everyone who's old enough for a Google Account.

It's interesting that the updated form for creating a Google Account doesn't automatically create a profile and doesn't add the user to Google+ if he's not at least 18 years old.

{ Thanks, Oskar. }

Say Goodbye to the Menu Button

[This post is by Scott Main, lead tech writer for developer.android.com. — Tim Bray]

Before Android 3.0 (Honeycomb), all Android-powered devices included a dedicated Menu button. As a developer, you could use the Menu button to display whatever options were relevant to the user, often using the activity’s built-in options menu. Honeycomb removed the reliance on physical buttons, and introduced the ActionBar class as the standard solution to make actions from the user options immediately visible and quick to invoke. In order to provide the most intuitive and consistent user experience in your apps, you should migrate your designs away from using the Menu button and toward using the action bar. This isn’t a new concept — the action bar pattern has been around on Android even before Honeycomb. As Ice Cream Sandwich rolls out to more devices, it’s important that you begin to migrate your designs to the action bar in order to promote a consistent Android user experience.

You might worry that it’s too much work to begin using the action bar, because you need to support versions of Android older than Honeycomb. However, it’s quite simple for most apps because you can continue to support the Menu button on pre-Honeycomb devices, but also provide the action bar on newer devices with only a few lines of code changes.

If I had to put this whole post into one sentence, it’d be: Set targetSdkVersion to 14 and, if you use the options menu, surface a few actions in the action bar with showAsAction="ifRoom".

Don’t call it a menu

Not only should your apps stop relying on the hardware Menu button, but you should stop thinking about your activities using a “menu button” at all. Your activities should provide buttons for important user actions directly in the action bar (or elsewhere on screen). Those that can’t fit in the action bar end up in the action overflow.

In the screenshot here, you can see an action button for Search and the action overflow on the right side of the action bar.

Even if your app is built to support versions of Android older than 3.0 (in which apps traditionally use the options menu panel to display user options/actions), when it runs on Android 3.0 and beyond, there’s no Menu button. The button that appears in the system/navigation bar represents the action overflow for legacy apps, which reveals actions and user options that have “overflowed off the screen.”

This might seem like splitting hairs over terminology, but the name action overflow promotes a different way of thinking. Instead of thinking about a menu that serves as a catch-all for various user options, you should think more about which user options you want to display on the screen as actions. Those that don't need to be on the screen can overflow off the screen. Users can reveal the overflow and other options by touching an overflow button that appears alongside the on-screen action buttons.

Action overflow button for legacy apps

If you’ve already developed an app to support Android 2.3 and lower, then you might have noticed that when it runs on a device without a hardware Menu button (such as a Honeycomb tablet or Galaxy Nexus), the system adds the action overflow button beside the system navigation.

This is a compatibility behavior for legacy apps designed to ensure that apps built to expect a Menu button remain functional. However, this button doesn’t provide an ideal user experience. In fact, in apps that don’t use an options menu anyway, this action overflow button does nothing and creates user confusion. So you should update your legacy apps to remove the action overflow from the navigation bar when running on Android 3.0+ and begin using the action bar if necessary. You can do so all while remaining backward compatible with the devices your apps currently support.

If your app runs on a device without a dedicated Menu button, the system decides whether to add the action overflow to the navigation bar based on which API levels you declare to support in the <uses-sdk> manifest element. The logic boils down to:

  • If you set either minSdkVersion or targetSdkVersion to 11 or higher, the system will not add the legacy overflow button.


  • Otherwise, the system will add the legacy overflow button when running on Android 3.0 or higher.


  • The only exception is that if you set minSdkVersion to 10 or lower, set targetSdkVersion to 11, 12, or 13, and you do not use ActionBar, the system will add the legacy overflow button when running your app on a handset with Android 4.0 or higher.


That exception might be a bit confusing, but it’s based on the belief that if you designed your app to support pre-Honeycomb handsets and Honeycomb tablets, it probably expects handset devices to include a Menu button (but it supports tablets that don’t have one).

So, to ensure that the overflow action button never appears beside the system navigation, you should set the targetSdkVersion to 14. (You can leave minSdkVersion at something much lower to continue supporting older devices.)

Migrating to the action bar

If you have activities that use the options menu (they implement onCreateOptionsMenu()), then once the legacy overflow button disappears from the system/navigation bar (because you’ve set targetSdkVersion to 14), you need to provide an alternative means for the user to access the activity’s actions and other options. Fortunately, the system provides such a means by default: the action bar.

Add showAsAction="ifRoom" to the <item> elements representing the activity’s most important actions to show them in the action bar when space is available. For help deciding how to prioritize which actions should appear in the action bar, see Android Design’s Action Bar guide.

To further provide a consistent user experience in the action bar, we suggest that you use action icons designed by the Android UX Team where appropriate. The available icons support common user actions such as Refresh, Delete, Attach, Star, Share and more, and are designed for the light and dark Holo themes; they’re available on the Android Design downloads page.

If these icons don’t accommodate your needs and you need to create your own, you should follow the Iconography design guide.

Removing the action bar

If you don’t need the action bar, you can remove it from your entire app or from individual activities. This is appropriate for apps that never used the options menu or for apps in which the action bar doesn’t meet design needs (such as games). You can remove the action bar using a theme such as Theme.Holo.NoActionBar or Theme.DeviceDefault.NoActionBar.

In order to use such a theme and remain backward compatible, you can use Android’s resource system to define different themes for different platform versions, as described by Adam Powell’s post, Holo Everywhere. All you need is your own theme, which you define to inherit different platform themes depending on the current platform version.

For example, here’s how you can declare a custom theme for your application:

<application android:theme="@style/NoActionBar">

Or you can instead declare the theme for individual <activity> elements.

For pre-Honeycomb devices, include the following theme in res/values/themes.xml that inherits the standard platform theme:

<resources>
<style name="NoActionBar" parent="@android:style/Theme">
<!-- Inherits the default theme for pre-HC (no action bar) -->
</style>
</resources>

For Honeycomb and beyond, include the following theme in res/values-v11/themes.xml that inherits a NoActionBar theme:

<resources>
<style name="NoActionBar" parent="@android:style/Theme.Holo.NoActionBar">
<!-- Inherits the Holo theme with no action bar; no other styles needed. -->
</style>
</resources>

At runtime, the system applies the appropriate version of the NoActionBar theme based on the system’s API version.

Summary

  • Android no longer requires a dedicated Menu button, some devices don’t have one, and you should migrate away from using it.


  • Set targetSdkVersion to 14, then test your app on Android 4.0.


  • Add showAsAction="ifRoom" to menu items you’d like to surface in the action bar.



  • If the ActionBar doesn’t work for your app, you can remove it with Theme.Holo.NoActionBar or Theme.DeviceDefault.NoActionBar.

For information about how you should design your action bar, see Android Design’s Action Bar guide. More information about implementing the action bar is also available in the Action Bar developer guide.

Wednesday, January 25, 2012

Two Ways to Export Your Google Docs

Google Takeout supports a new service: Google Docs. Now you can use the same interface to batch export your documents.


I tried both Google Takeout and the built-in feature from Google Docs that lets you download your documents. Even if they have the same purpose, they're quite different. The Google Docs feature is more flexible: you can choose to download only spreadsheets or presentations and skip all the other documents. You can also skip the files uploaded to Google Docs and not converted to a Google Docs format (for example: PDF files, archives and video files). Google Takeout has a "configure" feature, but you can't skip one or more document types. Another subtle difference is that Google Takeout lets you export only the files that you own, while Google Docs exports all the files from your account.


How to export all your files from Google Docs? Just go to the Google Docs homepage, select one or more documents, click "More" and then "Download", click the "All items" tab, pick your favorite formats and click "Download". The process is not that intuitive and you shouldn't have to select a file to see the download option.

{ via Data Liberation Blog }

Tuesday, January 24, 2012

The Self-Serving Google+ Results

Google has been often accused of promoting its own services in Google Search. Whether it was Google News, Image Search, Product Search or Video Search, the specialized search engine showed results from all over the web and not just from Google's own services. Image Search wasn't restricted to Picasa Web Albums, Video Search wasn't restricted to YouTube, Blog Search wasn't restricted to Blogger. Even for services like Google Dictionary and Google Finance that have their OneBox at the top of the Google search results, Google shows a list of other relevant services.

Google's special section that shows people and pages from Google+ doesn't look like a regular Google OneBox. It's placed in the right sidebar, where Google used to display ads. It shows up for general queries like [music], [sports], [math], that aren't typically associated with social search results. It only shows results from Google+, not from other social services like Twitter or Facebook. It's there even if you're not logged in using your Google account or you're not using Google+.

If Google+ wasn't a Google product, would it make sense to show a similar OneBox with profiles from social sites? Normally, Google would have created a profile search engine and showed a group of relevant results somewhere in the list of search results. Like this:


Google already indexes profiles from different sites and even shows special snippets with structured data. Why not create a special search engine for profiles like the one that lets you search recipes or the search engine for applications?

When Google released Knol, many people wondered if Google could boost the rankings for Knol articles or create a special OneBox with Knol results. "Google Knol does not receive any sort of boost or advantage in Google's rankings," replied Matt Cutts and he was right. Now what if Google displayed a Knol OneBox at the top of the search results for queries that returned relevant Knol articles? Maybe Knol would've become more popular and it wouldn't have been discontinued.

Is it fair to promote results from a single service, especially when you own that service? Even if those results are comprehensive, relevant and useful, it's always a good idea to also show results from other services.

Some engineers at Facebook, Twitter and MySpace developed a site called Focus on the User that lets you replace the Google+ results with other social profiles from the web. From:


... to:



The results are better simply because you can check the accounts from other social services. Maybe an artist shares more information on Twitter or maybe the Facebook account is more important. "When you search for 'cooking' today, Google decides that renowned chef Jamie Oliver is a relevant social result. That makes sense. But rather than linking to Jamie's Twitter profile, which is updated daily, Google links to his Google+ profile, which was last updated nearly two months ago," noticed the authors of the Focus on the User site. I still don't think that the social search box should be placed next to the results, but at least the tweak made it more useful.

"Focus on the user and all else will follow. Since the beginning, we've focused on providing the best user experience possible. Whether we're designing a new Internet browser or a new tweak to the look of the homepage, we take great care to ensure that they will ultimately serve you, rather than our own internal goal or bottom line." (Google's philosophy)

{ via waxy.org. Thanks, Michel. }

The Story Behind Gmail's Logo

If you've ever wondered who designed Gmail's logo, Kevin Fox has the answer:
Dennis Hwang designed the Gmail logo. At the time, Dennis designed virtually all of the Google doodles and he did a lot of the new logo work as well.

The logo was designed literally the night before the product launched. We were up very late and Sergey and I went down to his cube to watch him make it.

The initial version used the same font as the Google logo (Catull), but Catull has a very awkward 'a', so Dennis decided to use Catull for the 'G' to tie the brand to Google, then cast the others in a cleaner sans-serif (Myriad Pro, if I recall correctly).

Another ex-Googler, Douglas Edwards, confirms the story in his book "I'm Feeling Lucky: The Confessions of Google Employee Number 59":

Dennis Hwang spent the day before the launch coming up with ideas for a logo and trying to make it work in conjunction with the clown-colored Google brand. (...) Even after four years at Google, I found it astounding that one twenty-something guy was sitting alone at his desk, sipping tea and developing the main branding element for a product to be used by millions of people - the night before it was scheduled to launch.

Belgian Fries in Google Street View

Nikolaas, a reader of this blog, noticed that Pegman - the Google Street View icon - looks different for Belgium. When you try to move the icon, you'll notice that Pegman got some French fries.


"Occasionally Pegman dresses up for special events and occasions, or is even joined by peg friends in Google Maps. Some of these icons stay in Google Maps for specific locations, such as the skiing Pegman at Whistler Blackcomb Mountain and the penguin for Street View imagery of Half Moon Island, Antarctica," explains Google.

Street View was launched two months ago in Belgium, but it's not clear why Pegman looks different. Maybe because French fries originate from Belgium.

{ Thanks, Nikolaas. }

Saturday, January 21, 2012

Google Search, Punctuation Marks and Other Symbols

Google usually ignores punctuation and mathematical symbols from a query because it doesn't index them. They rarely change the meaning of a query and Google's index would have to grow a lot bigger, without improving the results too much. Some punctuation marks and mathematical symbols are used to provide advanced features (for example: colon, quotes, minus sign, plus sign).

I've recently noticed that Google started to show results for queries like [.], [,], [:], [;], [#], [%], [@], [^], [)], [~], [|], ["], [<], [$]. When you search for [%], Google shows the results for [percent sign] and that happens irrespective of the interface language, so it's not a synonym generated by Google's algorithms.


Search for [:] and you'll get the results for [colon]. Most results are about the colon from the human anatomy and they're not relevant.

Friday, January 20, 2012

A New iGoogle Interface

Google tests a new interface for iGoogle, the personalized homepage that lets you add gadgets and themes. The updated interface uses the design patterns that should be familiar by now from other Google services. Tabs are now available in a dropdown that's displayed below the search box, while the left sidebar is only used for the chat widget. There are two buttons for adding gadgets and changing the theme next to the options menu.





{ Thanks, Brinke. }

Picnik and Other Discontinued Google Services

If you thought that Google will no longer close other projects this year, you were wrong. Picnik, one of the best online photo editing service, will no longer be available starting from April 20. Until then, you can use all the features from the paid version of Picnik for free. Google will focus on adding more Picnik features to Google+ and that's the reason why Picnik is discontinued.


Social Graph API, a great way to find public profiles and connections between people, will no longer be available. The service was used by Google to find your social connections and show social search results. Unfortunately, "the API isn't experiencing the kind of adoption we'd like, and is being deprecated as of today. It will be fully retired on April 20, 2012."

Google will also discontinue Urchin (the installable version of Google Analytics), Google Message Continuity (an enterprise service that allowed Microsoft Exchange customers to back up emails to Google's servers), Needlebase (a data management platform acquired from ITA Software) and Sky Map (an Android app developed "to show off the amazing capabilities of the sensors in the first-generation Android phones and offer a window into the sky"). Sky Map was open sourced and will be developed by Carnegie Mellon University students.

Google promises to take "a hard look at products that replicate other features, haven't achieved the promise we had hoped for or can't be properly integrated into the overall Google experience," so I'm sure we'll see other discontinued projects. From Orkut to Google Talk (the Windows software), from Patent Search to Google Bookmarks and Translator Toolkit, from iGoogle to Picasa, there are many projects that might be discontinued. Moving from standalone applications to platforms, Google gets rid of many tools that solved only one problem and tries to convince users to join all-encompassing services like Google+ or Google Apps.

If Google Results Aren't Helpful, Ask on Google+

Sometimes Google's results aren't that useful and they don't answer your question. Maybe the query is imprecise or obscure, the results are outdated or you don't have the patience to check the first 100 results to find something helpful. Asking your Twitter followers or your Facebook friends could be a great idea. Google doesn't integrate with Twitter or Facebook, but it experiments with a new feature that shows a message below the list of results: "Want to ask your friends about [your query]? Ask on Google+".


Clicking the link opens a Google+ box that already includes a message: "Hi there! I have a question about [my query]..." Edit your message, click "Ask" and the first results could show up in a few seconds in Google's notification widget.


Maybe Google+ also will include a revamped version of Aardvark and you'll be able to send your question to the right people.

New Google Accounts Require Gmail and Google+

If you try to create a Google account from Google's homepage, you'll notice that Google redesigned the page, but that's not all. You'll now have to create a Gmail account, a Google Profile and you'll automatically join Google+.

Until now, creating a Google account was quite simple. You could either use an existing email address or create a Gmail account. The redesigned form includes new fields: name, gender (required for Google+) and mobile phone number (not required).



"Your Google Account is more than just Search. Talk, chat, share, schedule, store, organize, collaborate, discover and create. Use Google products from Gmail to Google+ to YouTube, view your search history, all with one username and password, all backed up all the time and easy to find at (you guessed it) Google.com," informs the page.

You can still delete your Google profile, the Google+ content and also your Gmail account.

New users no longer have to manually create a profile and join Google+, while Google found another way to increase the number of Google+ users (currently at 90 million) and the number of Gmail users (currently at 350 million). I've always wondered why Google never offered the option to create a Gmail account when you sign up for a Google account and now that's the only way to create a Google account.

Update: You can still use the old form if you know the URL or if you click "Sign up for a new Google Account" in Google Calendar, Blogger and probably a few other Google products.



Google Docs, Google Sites and Google Groups use a different page that lets you sign up using a Gmail address or a different email account. Just click "use a different email" and you'll see the old form.


Update 2. A Google spokesperson sent the following statement: "We're working to develop a consistent sign-up flow across our different products as part of our efforts to create an intuitive, beautifully simple, Google-wide user experience. Making it quick and easy to create a Google Account and a Google profile enables new users to take advantage of everything Google can offer."

{ Thanks, Herin. }

Thursday, January 19, 2012

Highlight Areas in Google Maps

Rodney G., a reader of this blog noticed a new feature in Google Maps. "When you search for a city or a county or a ZIP Code, Google Maps now highlights the boundaries of what you searched for. If you are zoomed out, the whole area is shaded pink. If you zoom in a bit, it has just a big pink border with grey shading. Zoom in even more and it's a dashed boundary with grey shading."




It's a really useful feature and the nice thing is that's enabled by default. Just search for a country, a city, a state or a ZIP code and Google Maps will automatically highlight it.

{ Thanks, Rodney. }

Google Code Search, Still Available

Google closed a lot of useful services to focus on Google+ and other core offerings. One of the best services that was recently shut down is Code Search, a search engine for open source code. If you go to google.com/codesearch, you'll see the following message:

"Sorry! Sadly, this service has been shut down. Much of Code Search's functionality is available at Google Code Hosting including search for Chromium. We're very sorry for the inconvenience."


Even though Google says that the service has been shut down, it hasn't. Just go to http://code.google.com/codesearch and you'll see the old homepage. All of the old features are still available and the results aren't restricted to Google Code Hosting projects.


Wednesday, January 18, 2012

Google's Censored Logo

Google censored its homepage logo in the US to protest against two bills that could damage the Internet and destroy its core values. "Two bills before Congress, known as the Protect IP Act (PIPA) in the Senate and the Stop Online Piracy Act (SOPA) in the House, would censor the Web and impose harmful regulations on American business. Millions of Internet users and entrepreneurs already oppose SOPA and PIPA," explains Google.

Google's homepage also includes a link that asks users to "tell Congress: please don't censor the Internet." The censored logo is only available in the US, but the link is also displayed outside US.


While the new bills may seem to be well-intended, they're easy to abuse and they'll not stop piracy. "These bills would grant new powers to law enforcement to filter the Internet and block access to tools to get around those filters. We know from experience that these powers are on the wish list of oppressive regimes throughout the world. SOPA and PIPA also eliminate due process. They provide incentives for American companies to shut down, block access to and stop servicing U.S. and foreign websites that copyright and trademark owners allege are illegal without any due process or ability of a wrongfully targeted website to seek restitution," mentions a Google blog post.

Google's suggestion is to cut the funding for pirate sites. For example, ad services would be required to stop providing ads for sites created to infringe copyright and payment services would no longer be allowed to intermediate transactions between US residents and the company that owns the pirate site. I'm not sure that's a great idea because this law could also be abused.

Wikipedia and WordPress were a lot braver: they decided to make it more difficult to access their content. "For over a decade, we have spent millions of hours building the largest encyclopedia in human history. Right now, the U.S. Congress is considering legislation that could fatally damage the free and open Internet. For 24 hours, to raise awareness, we are blacking out Wikipedia." That's the message you'll see today when you visit a page from the English Wikipedia (unless you press Escape before the page loads, you disable JavaScript, you visit Google's cached pages or use a plugin like Readability). Probably Google didn't want to divert all its search traffic to Bing and other search engines, but many top search results are Wikipedia pages, so Wikipedia's blackout will affect Google users.

Monday, January 16, 2012

Google Account Authentication Using Your Phone

How do you login to your Google account on a computer you don't trust? When you type your username and password, a keylogger could capture them and save them. If you have a phone or a tablet with you, there's a better way:

1. Just go to accounts.google.com/sesame on your computer (Open Sesame helps you remember the address) and you'll see a QR code for a special URL generated by Google.

2. Use a QR reader app like QR Reader for iPhone, Barcode Scanner for Android, Google Goggles, Google Shopper or Google Search for iOS. Scan the QR code on your phone or tablet and type the username and password of your Google account.

3. Now you can click "Start with Gmail" or "Start with iGoogle" and the corresponding service will automatically load in the desktop browser. Obviously, you can use any other Google service.



Update: Apparently, it was just an experiment and it no longer works. "Thanks for your interest in our phone-based login experiment. While we have concluded this particular experiment, we constantly experiment with new and more secure authentication mechanisms. Stay tuned for something even better," says Dirk Balfanz from the Google Security Team.

{ Thanks, Petros. }

Southern-hemisphere Developer Labs

We’ve just scheduled Android Developer Labs for Melbourne (January 31), Sydney (February 3), and Auckland (February 8). The material is not introductory; it’s aimed at people with existing apps who want to make them better in the era of Ice Cream Sandwich and tablets. You’ll want to show up with the SDK installed, and a couple of devices.

If this describes you, drop by the ADL page and sign up. You should hurry, because these are not large-scale events and there are more qualified people than there are seats.

Thursday, January 12, 2012

Blocked Sites, No Longer Available in Google Search?

Last year, Google released a feature that allowed you to block sites from appearing in your search results. After clicking a result and going back to the search results page, Google displayed a special link next to the result for blocking the entire domain.

The feature no longer seems to work: the "block" link is no longer displayed, the preferences page doesn't mention the feature and the blocked domains still appear in Google's results. The page that allows you to manage blocked sites is still available.

"When you're signed in to Google, you can block a specific website from appearing in your future search results. This is a helpful option when you encounter a site that you don't like and whose pages you want to remove from your future results. If you change your mind, you can unblock the site at any point," explains a help center page.


Update: Google's Matt Cutts says that this could be a temporary issue. "The right people are looking at what needs to happen to re-enable this, but it might take some time."

Introducing the Android Design site

[This post is by Christian Robertson, who leads the Android visual design group. He is also the designer of the Roboto font family. —Tim Bray]

Ice Cream Sandwich (Android 4.0) is our biggest redesign yet — both for users and developers. We’ve enhanced the UI framework with new interactions and styles that will let you create Android apps that are simpler and more beautiful than ever before.



To help you use great UI in your apps, we’re introducing Android Design: the place to learn about principles, building blocks, and patterns for creating world-class Android user interfaces.
Whether you’re a UI professional or a developer playing that role, these docs show you how to make good design decisions, big and small.

The Android User Experience Team is committed to helping you design amazing apps that people love, and this is just the beginning. In the coming months, we’ll expand Android Design with more in-depth content. And watch this blog for a series of posts about design, and invitations to Google+ hangouts on the topics you care about most.

So head on over to Android Design, and make something amazing!

Blogger Adds Threaded Comments

Blogger's comment system has been updated and it now supports threading. You can now reply to a comment and read the entire conversation. "It is now much easier to differentiate between whether someone is making a general comment on the thread, or responding to another comment on the thread," informs Google.

The threaded view is only available for embedded comments and it requires to enable full-text blog feeds.


If you've manually customized your blog's template, you may not see the new feature. One way to solve this issue is to reset widgets. In the new Blogger interface, go to the Template tab, click "Backup/Restore" and download your template, then click "Edit HTML", "Proceed" and "Revert widget templates to default". If something doesn't look right, you can always go back to the old template by clicking "Backup / Restore" and uploading the template you've saved.

Google's Black Navigation Bar Is Back

Google's attempt to simplify the navigation bar wasn't very successful. The menu released six weeks ago is no longer available and it has been replaced with the old black navigation bar.


I tried to see if it was just a temporary bug, but almost all the browsers I tested displayed the black navigation bar. The only browser that still displayed the menu was Chrome, but that was no longer case after clearing the cookies.

Google indirectly confirmed this change two days ago, when the screenshots from a Google blog post included the old bar.

Sometimes, when you try to simplify things, you end up making them more complicated. Navigation elements should be obvious and hiding them in a menu doesn't make them easy to find. The huge menu took more space than the navigation bar and made the homepage less attractive. Hopefully, Google will fix the navigation interface and release a better version.

Tuesday, January 10, 2012

Levels in Renderscript

[This post is by R. Jason Sams, an Android Framework engineer who specializes in graphics, performance tuning, and software architecture. —Tim Bray]

For ICS, Renderscript (RS) has been updated with several new features to simplify adding compute acceleration to your application. RS is interesting for compute acceleration when you have large buffers of data on which you need to do significant processing. In this example we will look at applying a levels/saturation operation on a bitmap.

In this case, saturation is implemented by multiplying every pixel by a color matrix Levels are typically implemented with several operations.

  1. Input levels are adjusted.

  2. Gamma correction.

  3. Output levels are adjusted.

  4. Clamp to the valid range.

A simple implementation of this might look like:

for (int i=0; i < mInPixels.length; i++) {
float r = (float)(mInPixels[i] & 0xff);
float g = (float)((mInPixels[i] >> 8) & 0xff);
float b = (float)((mInPixels[i] >> 16) & 0xff);

float tr = r * m[0] + g * m[3] + b * m[6];
float tg = r * m[1] + g * m[4] + b * m[7];
float tb = r * m[2] + g * m[5] + b * m[8];
r = tr;
g = tg;
b = tb;

if (r < 0.f) r = 0.f;
if (r > 255.f) r = 255.f;
if (g < 0.f) g = 0.f;
if (g > 255.f) g = 255.f;
if (b < 0.f) b = 0.f;
if (b > 255.f) b = 255.f;

r = (r - mInBlack) * mOverInWMinInB;
g = (g - mInBlack) * mOverInWMinInB;
b = (b - mInBlack) * mOverInWMinInB;

if (mGamma != 1.0f) {
r = (float)java.lang.Math.pow(r, mGamma);
g = (float)java.lang.Math.pow(g, mGamma);
b = (float)java.lang.Math.pow(b, mGamma);
}

r = (r * mOutWMinOutB) + mOutBlack;
g = (g * mOutWMinOutB) + mOutBlack;
b = (b * mOutWMinOutB) + mOutBlack;

if (r < 0.f) r = 0.f;
if (r > 255.f) r = 255.f;
if (g < 0.f) g = 0.f;
if (g > 255.f) g = 255.f;
if (b < 0.f) b = 0.f;
if (b > 255.f) b = 255.f;

mOutPixels[i] = ((int)r) + (((int)g) << 8) + (((int)b) << 16)
+ (mInPixels[i] & 0xff000000);
}

This code assumes a bitmap has been loaded and transferred to an integer array for processing. Assuming the bitmaps are already loaded, this is simple.

        mInPixels = new int[mBitmapIn.getHeight() * mBitmapIn.getWidth()];
mOutPixels = new int[mBitmapOut.getHeight() * mBitmapOut.getWidth()];
mBitmapIn.getPixels(mInPixels, 0, mBitmapIn.getWidth(), 0, 0,
mBitmapIn.getWidth(), mBitmapIn.getHeight());

Once the data is processed with the loop, putting it back into the bitmap to draw is simple.

        mBitmapOut.setPixels(mOutPixels, 0, mBitmapOut.getWidth(), 0, 0,
mBitmapOut.getWidth(), mBitmapOut.getHeight());

The full code of the application is around 232 lines when you include code to compute the constants for the filter kernel, manage the controls, and display the image. On the devices I have laying around this takes about 140-180ms to process an 800x423 image.

What if that is not fast enough?

Porting the kernel of this image processing to RS (available at android-renderscript-samples) is quite simple. The pixel processing kernel above, reimplemented for RS looks like:

void root(const uchar4 *in, uchar4 *out, uint32_t x, uint32_t y) {
float3 pixel = convert_float4(in[0]).rgb;
pixel = rsMatrixMultiply(&colorMat, pixel);
pixel = clamp(pixel, 0.f, 255.f);
pixel = (pixel - inBlack) * overInWMinInB;
if (gamma != 1.0f)
pixel = pow(pixel, (float3)gamma);
pixel = pixel * outWMinOutB + outBlack;
pixel = clamp(pixel, 0.f, 255.f);
out->xyz = convert_uchar3(pixel);
}

It takes far fewer lines of code because of the built-in support for vectors of floats, matrix operations, and format conversions. Also note that there is no loop present.

The setup code is slightly more complex because you also need to load the script.

        mRS = RenderScript.create(this);
mInPixelsAllocation = Allocation.createFromBitmap(mRS, mBitmapIn,
Allocation.MipmapControl.MIPMAP_NONE,
Allocation.USAGE_SCRIPT);
mOutPixelsAllocation = Allocation.createFromBitmap(mRS, mBitmapOut,
Allocation.MipmapControl.MIPMAP_NONE,
Allocation.USAGE_SCRIPT);
mScript = new ScriptC_levels(mRS, getResources(), R.raw.levels);

This code creates the RS context. It then uses this context to create two memory allocations to hold the RS copy of the bitmap data. Last, it loads the script to process the data.

Also in the source there are a few small blocks of code to copy the computed constants to the script when they change. Because we reflect the globals from the script this is easy.

        mScript.set_inBlack(mInBlack);
mScript.set_outBlack(mOutBlack);
mScript.set_inWMinInB(mInWMinInB);
mScript.set_outWMinOutB(mOutWMinOutB);
mScript.set_overInWMinInB(mOverInWMinInB);

Earlier we noted that there was no loop to process all the pixels. The RS code that processes the bitmap data and copies the result back looks like this:

        mScript.forEach_root(mInPixelsAllocation, mOutPixelsAllocation);
mOutPixelsAllocation.copyTo(mBitmapOut);

The first line takes the script and processes the input allocation and places the result in the output allocation. It does this by calling the natively compiled version of the script above once for each pixel in the allocation. However, unlike the dalvik implementation, the primitives will automatically launch extra threads to do the work. This, combined with the performance of native code can produce large performance gains. I’ll show the results with and without the gamma function working because it adds a lot of cost.

800x423 image

DeviceDalvikRSGain
Xoom174ms39ms4.5x
Galaxy Nexus139ms30ms4.6x
Tegra 30 device136ms19ms7.2x

800x423 image with gamma correction

DeviceDalvikRSGain
Xoom994ms259ms3.8x
Galaxy Nexus787ms213ms3.7x
Tegra 30 device783ms104ms7.5x

These large gains represent a large return on the simple coding investment shown above.

Google Search Shows More Results From Google+

Google's search results are personalized even if you don't log in to a Google account. Google uses your location and your previous searches to customize the results. When you log in to your account, Google has more information: your search/browsing history, your social connections, the pages you've bookmarked or +1'd. Everyone is different and Google has the opportunity to use information about you to disambiguate queries, to show more results from the sites you trust and pages you're already visited.

Google+ can change Google results more than any other Google service because social data is an important signal for personalizing results, Google owns the end-to-end experience and it's in Google's best interest to show that Google+ helps sites get better rankings. After all, the reason why many sites added Google+ buttons is that Google+ data is used by Google's search algorithms.

The latest initiative that integrates Google+ with Google Search is called "Search, plus Your World." It's an upgrade of the social search feature that integrates the rich content from Google+.

Google Search now has access to non-public posts and photos from Google+ and you'll be able to search all the posts and photos shared with you or from your circles. "You can find relevant Google+ posts from friends talking about an amazing trip they just took, whether they've shared privately with you or publicly. You'll find links shared by your friends, such as activities, restaurants and other things they enjoyed on their trip," mentions Google. Personal results have a special icon next to the snippet, Google shows the number of personal results at the top of the page and you can also restrict the results to these pages.


Google Instant suggestions now include the people from your Google+ circles. "Now, typing just the first few letters of your friend's name brings up a personalized profile prediction in autocomplete. Selecting a predicted profile takes you to a results page for your friend, which includes information from their Google+ profile and relevant web results that may be related to them." Google shows similar suggestions for "prominent people from Google+, such as high-quality authors."


Another change is that Google includes a special box with Google+ pages related to your query. "Starting today, if you search for a topic like [music] or [baseball], you might see prominent people who frequently discuss this topic on Google+ appearing on the right-hand side of the results page. You can connect with them on Google+, strike up meaningful conversations and discover entire communities in a way that simply wasn't possible before," informs Google. I think it's a mistake to show Google+ pages that are vaguely related to a general query like [music]. The box looks more like a thinly disguised ad than a genuinely useful feature (an ad both for Google+ and the celebrity pages).


To balance the increasing number of social features, Google also added two new buttons at the top of the search results pages that help you toggle between the personalized results and the non-personalized results. This works for an entire session and you can also remove personal results from the preferences page.


Right now, "Search, plus Your World" is gradually rolled out over the next few days, but it only be available when you use Google.com in English and you sign in.

While Google+ data can certainly improve search results, I feel like there's too much information that's not really useful and too much Google+ bias. When Google developed the OneBoxes for maps and stocks, it linked to its own services, but also to competing services. Today Google no longer tries to be fair. Showing the number of people that added the author of a news articles to their circles is not more useful than showing the PageRank of the page or the number of Twitter followers. Showing the latest Google+ posts below the homepage of a business is not more useful than showing the latest Twitter posts. Google profiles are not necessarily better than Facebook profiles and the number of +1's is not more useful than the number of likes. To make Google+ more powerful, to attract more celebrities and businesses, Google might end up making Google results less useful. It's a tricky balancing act to use Google search's popularity to increase Google+ adoption, while also improving Google results using Google+ data and there are many mistakes to be made along the way.



Google Body Browser Is Now Zygote Body

Body Browser is one of the many products that was discontinued when Google closed Google Labs. The good news is that the service is now back online and it's hosted by Zygote, the company that provided the imagery for Google Body Browser. Zygote Body looks almost the same, still requires a browser that supports WebGL (Chrome or Firefox), but the site is very slow.


Body Browser started as a project built by Google engineers in their "20 percent time" and it was a great way to promote Chrome's support for WebGL, an API that allows Web apps to generate interactive 3D graphics without using additional plugins. The app also worked in Firefox and it was ported to Android Honeycomb. There's no Android app for Zygote Body right now, but the company promises to release one in the future.

Zygote Body uses an open source 3D viewer developed by Google. "This viewer provides a standard way to create and view 3D models in a Web browser, with multiple layers and instant search," explains Google.

Saturday, January 7, 2012

YouTube Tests Google+ Integration

Now that YouTube uses Google Accounts, Google can easily integrate YouTube with other Google services. The latest YouTube redesign made the integration with social networks more prominent and the videos from Google+ are just one click away.

YouTube now tests the header that's already displayed in Google Search, Gmail, Google Docs and many other Google services. The header shows your Google+ notifications, a box that lets you share videos with other Google+ users and links related to your Google profile.



Right now, the Google+ header is only displayed if you haven't created a YouTube account and you log in using your Google account (so you don't have a YouTube username and channel). Obviously, you need to join Google+ to see the new features.

{ Thanks, Michael. }