Wednesday 28 March 2007
Facebook StumbleUpon Twitter Google+ Pin It

Interview with Ian Hickson on X/HTML 5



What is more important to the future of the web than the future of HTML, and adoption of technology in the browsers? Our own Ian Hickson has been blazing a trail under the WHATWG umbrella, as he tries to do the right thing, and standardize what is already being down, instead of making a specification in an isolated room.

Back in 2005, Ian conducted a comprehensive, detailed analysis of how markup is used on the Web which gives his real world metrics to go by.

Vlad Alexander from xhtml.com was invited to post a series of questions to the X/HTML 5 team on their public mailing list, and recently published their Q & A session.

If you haven't stayed up to date on what is happening around the standards, take a peek to see how the team answered questions such as:
  • Why do we need X/HTML 5? When did this need become apparent?
  • X/HTML 5 is currently in Working Draft stage. What is the tentative timetable for moving X/HTML 5 through the standards approval process towards Recommendation stage?
  • X/HTML 5 introduces new markup constructs such as sectioning elements, enhancements to the input element, a construct for dialogs, a way to mark up figures, and much more. Can you briefly describe these new constructs and the reason they were added?
  • X/HTML 5 has a construct for adding additional semantics to existing elements using predefined class names. Predefined class names could be the most controversial part of X/HTML 5, because the implementation overloads the class attribute. XHTML 2 provides similar functionality using the role attribute. Which approach is better and why?
  • Is it due to a flaw in HTML that it is difficult to build authoring tools, such as WYSIWYG editors, that generate markup rich in semantics, embody best-practices and that can be easily used by non-technical people?
  • Since much of the content on the Web is created using such authoring tools, can we ever achieve a semantically rich and accessible Web?
  • The XHTML 5 spec says that "generally speaking, authors are discouraged from trying to use XML on the Web". Why write an XML spec like XHTML 5 and then discourage authors from using it? Why not just drop support for XML (XHTML 5)?
The full writeup can be read here.

Tuesday 27 March 2007
Facebook StumbleUpon Twitter Google+ Pin It

Google Summer of Code 2007: Student Applications Are In!



It's shaping up to be another exciting Google Summer of Code this year! As of the deadline, we've received 6,179 student applications from over 3,000 students. The list of accepted student proposals will be published on April 11, 2007 on the Google Summer of Code page.

Best of luck to all of our applicants!

Monday 26 March 2007
Facebook StumbleUpon Twitter Google+ Pin It

Four Google open source tools on Google Code



Over the past two years, Google has released several infrastructure tools as open source software.

Today we're pleased to host them on Google Code project hosting.

These tools have made life easier for us in many ways over the years and are found in many (for some of these, all) Google projects.

gflags: Commandline flags module for C++.

At Google we needed a replacement for getopt() that was both simpler to use and more powerful. The result, gflags, has stood the test of time, being usable for both large projects with many internal libraries, each of which like to have command-line flags; and straightforward enough to be the preferred solution on small projects as well.

This package has implementations in both C++ and Python, allowing you to use a similar API in the different worlds.

Another nice feature is that you can run a program, gflags2man, that creates a man page for any executable written using gflags.

For more information, please read the documentation.

perftools: Fast, mutli-threaded malloc() and nifty performance analysis tools.

The perftools package is a collection of a high-performance multi-threaded malloc() implementation, plus some pretty nifty performance analysis tools. TC Malloc has been out in the wild for quite some time, with many other projects using it to get that little bit extra performance.

Along with TC Malloc, perftools also contains a Heap Checker, Heap Profiler, and a CPU Profiler.

Take a peek at an overview of the Google Performance Tools.

sparsehash: An extremely memory-efficient hash_map implementation.

At Google, we really care about performance. The SparseHash package contains several hash-map implementations, including one implementation that optimizes for space, and another that optimizes for speed. If you are excited about an extremely memory-efficient hash_map implementation -- with only 2 bits/entry overhead! -- replace that hash_map in your code with a sparse_hash_map. Alternately, try a dense_hash_map for a hashtable implementation that uses more memory in exchange for very fast performance.

Learn how to use the hash_map implementations.

ctemplate: A simple but powerful template language for C++.

Last, but not least, we have CTemplate; a simple but powerful template language for C++ that emphasizes separating logic from presentation.

Look at some examples of using the template language.

Friday 23 March 2007
Facebook StumbleUpon Twitter Google+ Pin It

Class projects and science on Google Code



I'm always tickled when someone finds a creative use for one of our products that never even occurred to me. So when George K. Thiruvathukal told me that he is having his Open Source Practicum students use Google Code to host their projects for his class this semester, I had one of those "Why of course!" moments.

George is a Computer Science professor at Loyola University of Chicago (my alma mater!) and he felt that using Google Code would be an ideal way to introduce his students to open source best practices, software development tools, and collaborative software development at the same time--a perfect match for a class on writing open source software. He also had his students label their projects with comp412.cs.luc.edu, so he just has to search for label:comp412.cs.luc.edu on Google Code and he can quickly find out what his students have been up to (although maybe that's not so good if anyone has been procrastinating!).

But George had some other ideas--he also wrote an article for Computing in Science & Engineering (CiSE) magazine called Project Hosting: Expanding the Scientific Programmer's Toolbox (pdf). His article encourages scientists to consider sharing software in the manner that open source communities do, and he uses Project Hosting at Google Code as an example of how to do it.

I think that these are both great ideas and we'd love to see more classes and scientists using Google Code for their open source work. If you're using Google Code for something interesting or unusual (and open source!), be sure to let us know.

Thursday 22 March 2007
Facebook StumbleUpon Twitter Google+ Pin It

Joining the OpenAjax Alliance



We're excited to announce that Google recently joined the OpenAjax Alliance, an organization formed to promote open standards and interoperability for AJAX applications. AJAX plays an essential role in products like Gmail, Google Maps, and Google Calendar. Through AJAX APIs like the Maps API and AJAX Search API, we're trying to reduce the barriers for creating innovative web applications. Similarly, the goal of the Google Web Toolkit is to make it easier to write large-scale web applications in the Java environment of your choice, and then compile those applications to compact JavaScript that runs in any browser.

Joining the alliance is a way for us to continue promoting AJAX and innovative web programming, and we look forward to working with our industry colleagues.

Findings from research on release management



As part of our ongoing efforts to support the open source and academic communities, Google provides funding to researchers investigating open source software development. Over the last 3.5 years, Martin Michlmayr, a former leader of the Debian project, has investigated aspects of release management in volunteer open source projects. Martin is studying for a PhD degree and his work is in part supported by Google. His particular interest is in quality improvement and he's therefore investigating problems that occur with release management and ways to solve them.

As he's nearing the completion of this PhD, Martin has started writing about the findings from his research. He has published a series of seven postings in his blog in which he presents the open source projects he studied. For each project, he briefly summarizes what problems the project faced in the past, what changes they have implemented to address these problems, and what outstanding problems they still have.

Check out Martin's findings - food for thought!

Open Source Developers @ Google Speaker Series: Jeremy Allison



Next Tuesday, March 27, the Open Source Developers at Google Speakers will welcome Jeremy Allison, one of Samba's maintainers and a recent addition to the Google Open Source team. Jeremy will discuss "The Current State of Samba," including why the Common Internet File System protocol is about to become a lot more important to everyone, even those of us who only use Linux.

Doors open at 6:30 PM at our Mountain View campus; guests should plan to sign in at Building 43 reception upon arrival. Refreshments will be served and anyone is most welcome to attend! Jeremy's presentation will also be taped and published on Google Video.

For those of you who were not able to attend Ian Lance Taylor's recent talk "GCC: Current Topics and Future Directions," you can check out the video.

Wednesday 21 March 2007
Facebook StumbleUpon Twitter Google+ Pin It

GData for Picasa Web Albums



The Picasa Web Albums team is pleased to announce the release of the newest member of the GData family, the Picasa Web Albums data API.

Now you can access your albums, photos, comments and tags through a common GData API. Have a great idea for integrating your photos and tags into a semantic network? Want to add a slide show of your favorite photos to your homepage and include user comments? How about autotagging your photos based on image analysis or photo description or title? Or allowing users to pick a Picasa Web Albums photo from inside your application? The possibilities are endless.

We're excited to see what great ideas the developer community comes up with for the Picasa Web Albums data API. We hope this newest installment gives you the freedom to make the killer application you always wanted, and as always we encourage comments, questions and criticisms. Tell us what you think.

Tuesday 20 March 2007
Facebook StumbleUpon Twitter Google+ Pin It

Ode to Hibernate



At each of my first two jobs I wrote an object-relational mapping framework in Java. The first was an abomination, the second merely rotten. I'm not the only engineer to have traveled this road. You write some code to generate SQL for your simple CRUD operations, you get one-to-many relationships working, and then you (and probably the rest of your team) spend a couple of months piling on hacks to support outer joins, many-to-many relationships, and all the other "extras" that are of course not "extras" at all. So imagine my mood the day a coworker introduced me to Hibernate (thanks Toby!). Just a few days of prototyping made it clear that Hibernate was an elegant solution to a hard problem, and that I would never again feel compelled to build an OR Mapping framework in Java. Joy.

As a fan of Hibernate it gives me great pleasure to announce the open-source availability of Hibernate Shards, a framework that adds support for horizontal partitioning (or in Google parlance, "sharding") to Hibernate Core. There are a number of reasons you might not keep all your data in a single relational database. Maybe you have too much data. Maybe a potential customer won't sign up for your service unless her company's data lives in its own database. Whatever your reasons, dealing with a sharded dataset adds complexity to the development and management of your application. Hibernate Shards is designed to encapsulate and reduce the complexity of building applications that work with sharded datasets.

I worked with Tomislav Nad and Maulik Shah (fellow Googlers who share my enthusiasm for Hibernate and Java infrastructure) to build Hibernate Shards as a 20 percent project. We think what we have now will be useful to the Java community, but this is most certainly not a polished release. There are functionality gaps to be filled, design warts to be smoothed, and bugs to be shaken out. We look forward to working with you as we address these issues and make Hibernate Shards even more powerful in the months to come. If you'd like to read more please visit the official Hibernate Shards website.

Happy Sharding!

Monday 19 March 2007
Facebook StumbleUpon Twitter Google+ Pin It

Using AJAX Search to integrate search results into your site



We are very fortunate at Google to have amazing people come in to speak to us on many interesting topics. We record these talks and make them available on Google Video.

We recently added a feature on the Google Code website that displays recent videos from our tech talk series.

You could do this directly using the Video Bar or the Video Search Control which have wizards to make implementation trivial.

In our case, we wanted to make the bottom right portlet fit in with the look and feel of the rest of the site, so we decided to go a little more low level.

The the AJAX Search API the actually act of searching happens in the Searchers set of JavaScript classes. We used the GvideoSearch class which extends the base GSearch functionality to work with Google Video.

The resulting code was simple. At its heart we:
  • Told the searcher to give us the most recent searches via videoSearch.setResultOrder(GSearch.ORDER_BY_DATE) (as opposed to the default 'most relevant' setting)
  • Told the searcher that we would handle generating the HTML ourselves via videoSearch.setNoHtmlGeneration()
  • Do the work of creating the HTML from the results after the results come back. We track this with videoSearch.setSearchCompleteCallback()
When the search returns the results are put into a results[] array. These results are GvideoResult JavaScript objects with properties that we can then query, such as the published date, content snippet, title, duration, video URL, and the thumbnail image.

We used this to dynamically create the HTML and then inserted it into the DOM with innerHTML.

var result = videoSearch.results[x];
var nicerDate = new Date();
nicerDate.setTime(Date.parse(result.published ));

var dateFormatted = (nicerDate.getMonth()+1) + '/' + nicerDate.getDate()
+ '/' + nicerDate.getFullYear();

output += '<div class="featured"><div class="project"><div '
+ 'class="screenshot"><a href="' + result.url
+ '" rel="nofollow"><img src="' + result.tbUrl + '" alt="'
+ result.titleNoFormatting + ' Screenshot" width="129" height="110" '
+ '/></a></div><div class="info"><div '
+ 'class="name"><a href="' + result.url + '" rel="nofollow">'
+ result.titleNoFormatting + '</a></div><div '
+ 'class="author videodateformat">Recorded on ' + dateFormatted
+ '</div><div class="duration">Duration: '
+ parseInt( result.duration / 60) + ' mins</div></div><p '
+ 'class="videosnippet">' + result.content
+ '</p></div></div>';

A bit ugly, I know. If we wanted a cleaner approach, we could have used DOM methods directly, or we could have created this using a JavaScript Template package.

What is important to know, is that the AJAX Search API is a powerful beast. On the one hand you can run a wizard and get results that you can copy and paste onto your web pages. On the other hand you can get low level and query the backend which returns simple JSON for you to manipulate.

The AJAX Search team seems to release something new on just about a weekly basis, so subscribe to the Google AJAX Search API Blog to follow along.

Thursday 15 March 2007
Facebook StumbleUpon Twitter Google+ Pin It

Now Accepting Student Applications for Google Summer of Code 2007



The results are in! After receiving applications from more than 300 open source organizations, we've narrowed the list down to just over 130 and published the list of accepted organizations. Now that we've selected the mentoring organizations for this year, we're accepting student applications for the program. Students should plan to submit their applications by March 24, 2007. We're also pleased to let you know that we'll be taking 800 students into the program, up from 630 last year.

For more information about the Google Summer of Code program, you can visit the program page. Better yet, read Chris DiBona's write up on the Official Google Blog.

Thanks to all of the organizations who applied to take part this year, and best of luck to all of our student applicants!

Tuesday 13 March 2007
Facebook StumbleUpon Twitter Google+ Pin It

World Cup Cricket 2007: Don't pray for rain





If ever cricket lovers needed an excuse to take a trip to the Caribbean, now they have one. The Cricket World Cup 2007 has started today, and it should be a great party. (I myself am a Brit who will hopefully not be praying for rain.)



Once again, the developer community has outdone itself creating useful mashups. The Radioactive Yak has detailed a few of the resources available which include:
Google India has also made a site available at http://www.google.co.in/cricket with useful tools of its own:

Google Hosts C++ Standards Meeting


Two weeks ago, Google hosted a two-day informal meeting to discuss Concepts, a major new language feature for the next version of C++. Concepts are the foundation of generic programming, but until now they haven't been part of the actual C++ language. Last week's meeting was part of a multi-year effort to improve C++ by adding explicit support for Concepts. Papers have already been given at the Principles for Programming Language Symposium (pdf) and the Object Oriented Programming, Systems, Languages & Applications Conference (pdf).

Attendees at last week's meeting made significant progress: the group finalized many details of Concepts and resolved concerns about implementation issues. Keep an eye on the C++ Standards Committee Website, as the final version of the concepts proposal will be available in just a few weeks.


[Photo caption: Attendees at the C++ Concepts meeting came from both industry and academia. Left to right: Martin Sebor (Rogue Wave), Chris Lattner (Apple), John Spicer (EDG), Herb Sutter (Microsoft), Andrew Lumsdaine (Indiana University), Michael Wong (IBM), Bjarne Stroustrup (Texas A&M), Gabriel Dos Reis (Texas A&M), Thomas Witt (Zephyr Associates), Mat Marcus (Adobe), Steve Clamage (Sun), Sean Parent (Adobe), Lawrence Crowl (Google), Nathan Myers (Aspera Software), Doug Gregor (Indiana University), Jaakko Jaarvi (Texas A&M), Matt Austern (Google).]

Monday 12 March 2007
Facebook StumbleUpon Twitter Google+ Pin It

Guice, Google's internal Java dependency injection framework, released as open source



Google has been using a blazingly fast, innovative, Java 5-based dependency injection framework in mission critical applications for quite some time.

The project is lead by Bob Lee, and we are pleased to say that we have released it to the community as open source software.

Guice wholly embraces annotations and generics, thereby enabling you to wire together and test objects with less effort than ever before. Annotations finally free you from error-prone, refactoring-adverse string identifiers.

Guice injects constructors, fields and methods (any methods with any number of arguments, not just setters). Guice includes advanced features such as custom scopes, circular dependencies, static member injection, Spring integration, and AOP Alliance method interception, most of which you can ignore until you need it.

Guice already has a community around it, and already powers Struts 2's plugin architecture.

We asked Bob Lee a few questions about the project:

Why was Guice created?

We created Guice hoping to write less code and break up a multi-million line app. We looked at existing solutions, but we saw a lot of doors opened by the new Java 5 features. When I started from scratch I followed a use case driven approach and built a real application. As I wrote I was constantly asking myself "how do I really want to be writing this?".

I value pragmatism and followed Josh Bloch's API design advice, especially, "when in doubt, leave it out."

Finally, we strove most of all for maintainability. Can a new programmer sit down at a million line code base and maintain it? We think type safety is a huge factor here.

Who should use Guice?

Anyone writing Java code. We see Guice as a lighter weight alternative to the factory pattern.

More information:

Tuesday 6 March 2007
Facebook StumbleUpon Twitter Google+ Pin It

Google Summer of Code: Mentors apply now!



Ready to find the best and brightest students to contribute to your open source software project this summer? The Google Summer of Code™ 2007 program funds students from all over the world to work with mentors from the FLOSS community. We're now accepting applications from mentoring organizations, and the deadline is Monday, March 12, 2007. We'll post a list of approved organizations on the Google Summer of Code page on Wednesday, March 14, 2007. Students can start applying immediately thereafter.

See our FAQ for a preview of the application. And remember, if you have any questions, you can always find us in the Google Summer of Code Discuss group. Best of luck to all of our applicants!

Scalability counts



One of the thrills of releasing software at Google is knowing that a successful product launch might test the limits of application scalability. The web's unparalleled growth is fueled by the efforts of millions, and with that diversity comes a richness of perspective and insight. That's why I'm excited to see that Google is planning its first-ever conference on scalable systems, taking place on June 23rd at the Seattle office.

Would you like to learn more about scaling to million of people and billions of transactions? Maybe you would want to share your experience? To hear more about the event, please visit the Google Research Blog and read the announcement on the Seattle conference on scalability.

Friday 2 March 2007
Facebook StumbleUpon Twitter Google+ Pin It

Google APIS at SPA 2007



On Monday, March 26th, I will present a 75 minutes tutorial about Google APIs: Search, Advertising and Commerce at SPA 2007 in Cambridge, UK. I will talk about many APIs: AJAX Search, Maps, Google Data, AdWords, Checkout and Google Web Toolkit, and show some cool demos of what you can do with them. I'll post the slides on this blog after the conference.

Google gtags version 1.0



Last year, we released the first public beta of gtags, a tool used at Google to improve developer productivity.

Gtags, an extension of the GNU Emacs TAGS functionality, consists of a server that stores an index of a project's source code in memory, and client libraries that allow applications (such as Emacs, Vim or shell scripts) to perform fast queries for function names, class names and other language features. Gtags can currently index code written in C++, Java and Python.

This release improves the infrastructure, replaces the network protocol and introduces a new, more extensible file format for storing the index.

Additionally, we are now hosting the project on Google Code. Please visit us at the new gtags project page.

Enjoy!

Mark Lucovsky interview on the AJAX Search API and more



Eric Enge of Stone Temple Consulting interviewed our own Mark Lucovsky about the AJAX Search API that Mark and his team created.

The interview provides detailed answers to questions such as:
  • What we learned from the Maps API
  • How the AJAX Search API came about, and why we built it
  • How the API aims at a broad spectrum of users, from lifelong programmers to the casual blogger
  • How the API can be used to perform searches, get back JSON
  • results, and display them however you like
  • What the terms of use actually mean
  • Why the team used JSON output.
The interview also includes interesting examples of real-world users, such as VisualDxHealth, and dispels a few common myths about the AJAX Search API.

Is there anything else that you would like to know about the APIs? Join us on the AJAX Search forums.