Posts from July 2009
Google Summer of Code Flocks Together
Tuesday, July 28, 2009
Last month, Leslie Hawthorn, Cat Allman, and I attended the Google Summer of Code Birds of a Feather session at Open Source Bridge, organized by Jonathan Leto. We had the pleasure of meeting with Google Summer of Code students, mentors, admins, and potential participants to discuss what works, what doesn't work, and ways the program could be improved. We got some great feedback, and best of all, we had the opportunity to interact face to face with participants instead of solely via email, mailing lists, or IRC! You can see a photo and read more about the meetup on Jonathan's blog post about the event.
Last week, the Open Source Programs Office outreach team met with more Google Summer of Code participants at our BoF session at OSCON. Our session extended late into the night with some really interesting discussions about how to help students succeed in computer science.
If you would like to know about upcoming Google Summer of Code meetups, please join our meetups mailing list - we'd love to meet you!
Programming made Simple!
Monday, July 27, 2009
Bringing an easy to learn and use language to the mobile world and the Android platform is the goal of the Simple project. Simple is a BASIC dialect for developing Android applications. It is particularly well suited for non-professional programmers (but not limited to). Simple allows programmers to quickly write Android applications by using the components supplied by its runtime system.
Similar to its 90s relative, Simple programs are form definitions (which contain components) and code (which contains the program logic). The interaction between the components and the program logic happens through events triggered by the components. The program logic consists of event handlers which contain code reacting to the events. In reality it is even simpler than this description.
Let's see how simple it really is. We will quickly write a program simulating the famous Etch-A-Sketch on an Android device. Tilting the device will move the pen, shaking the device will clear the screen. The Simple runtime system gives us three components to provide most of the needed functionality:
- the Canvas component - for drawing
- the OrientationSensor component - to detect tilting
- the Accelerometer component to detect shaking
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | Dim x As Integer Dim y As Integer Event OrientationSensor1.OrientationChanged(yaw As Single, _ pitch As Single, roll As Single) If roll < -20 Then x = Math.Min(Canvas1.Width, x + 1) ElseIf roll > 20 Then x = Math.Max(0, x - 1) End If If pitch < -20 Then y = Math.Min(Canvas1.Height, y + 1) ElseIf pitch > 20 Then y = Math.Max(0, y - 1) End If Canvas1.DrawPoint(x, y) End Event Event AccelerometerSensor1.Shaking() Canvas1.Clear() End Event |
The code defines two global variables (lines 1 and 2) and two event handlers, one to handle changes in the device's tilt (lines 4 to 17) and another to handle shaking of the device (lines 19 to 21). The code in the first event handler makes sure to only react to tilting above a certain degree (lines 6, 8, 11 and 13), and if that is the case then it further ensures that the pen does not run off the drawing surface (lines 7, 9, 12 and 14). And finally a point is drawn at the pen position (line 16). As for the other event handler, the only thing it does is clearing the drawing surface in case of shaking (line 20).
Last part missing is the form definition. It defines the form and its properties (lines 24 to 27), followed by the components it contains (lines 28 to 33).
22 23 24 25 26 27 28 29 30 31 32 33 34 35 | $Properties $Source $Form $Define EtchSketch $As Form Layout = 3 BackgroundColor = &HFFFFFFFF Title = "EtchSketch: Tilt to draw - Shake to clear" $Define Canvas1 $As Canvas $End $Define $Define OrientationSensor1 $As OrientationSensor $End $Define $Define AccelerometerSensor1 $As AccelerometerSensor $End $Define $End $Define $End $Properties |
That's it. The only thing left to do is to compile and deploy the application to an Android device. And voila, here is a screenshot of the application running:
For a definition of the Simple language see the Simple Language Definition (download, 199 KB PDF). For more information on writing Simple applications see the open source project page at code.google.com/p/simple. You can also find information there on contributing to the project, and we encourage you to join our discussion list to provide us feedback.
Programming made Simple!
By Herbert Czymontek, Software Engineering Team
Midterm Report on Google Summer of Code
Saturday, July 25, 2009
For the rest of the students, the summer is not over yet and there is still lots of coding left to do. I hope that this year will be our most successful to date! Read the statistics about previous years here.
By Ellen Ko, Open Source Team
Congratulations to the Winners of the Google O'Reilly Open Source Awards
Wednesday, July 22, 2009
- Brian Aker, Best Open Source Database Hacker for his work on Drizzle and MySQL
- Bruce Momjian, Database Jedi Master for his work on PostgreSQL
- Clay Johnson, Best Community Builder for his work with Sunlight Labs
- Evan Prodromou, Best Social Networking Hacker for his work on identi.ca and Laconica
- Penny Leach, Best Education Hacker for her work on Mahara and Moodle
Our Award Winners & Presenters (listed from left to right):
Brian Aker, Leslie Hawthorn, Evan Prodromou, Bruce Momjian, Allison Randal, Nat Torkington
Photo Credit: Pinar Ozyger
By Leslie Hawthorn, Open Source Team
Where to Find Us at OSCON 2009
Monday, July 20, 2009
And, of course, there will be several talks and tutorials delivered by Googlers, including:
- Introduction to Google App Engine by Joe Gregorio, 8:30 AM on July 20th (tutorial)
- Zen and the Art of Abstraction Maintenance by Alex Martelli, 10:45 AM on July 22nd
- Even Faster Websites by Steve Souders, 11:35 AM on July 22nd
- Getting Started in Free and Open Source, by Cat Allman and Leslie Hawthorn, 11:35 AM on July 22nd
- Programmer Insecurity and the Genius Myth, by Ben Collins-Sussman and Brian Fitzpatrick, 1:45 PM on July 22nd
- Green Computing for the Little Guys with Bill Weihl, 1:45 PM on July 22nd (panel)
- Your Work in Open Source, the Numbers, by Chris DiBona, 9:15 AM on July 23rd
- JRuby on Google App Engine by John Woodell and Max Ross, joined by Ted Han, 10:45 AM on July 23rd
- The Google Open Source Update, by Chris DiBona and Leslie Hawthorn, 11:35 AM on July 23rd
If you're around Silicon Valley and can't make the entire conference, keep in mind that the Birds of a Feather sessions, OSCamp and a host of other events at OSCON are free of charge to attend with your expo hall registration. We hope to see you there!
By Leslie Hawthorn, Open Source Team
Crossing the Desktops in Gran Canaria
The series of keynotes that opened the event was particularly interesting with, among others, Robert Lefkowitz sailing between computers and philosophy and, of course, Richard Stallman dressed up as St. IGNUcius.
We were given the chance to darken our hacker-pale skin a tiny bit thanks to the green towel that was offered to each participant. GNOME and KDE hackers alike delivered many keynotes and talks, especially cross-desktop talks to help explore and overcome problems encountered in both projects). Hacking and chatting on the beach was another popular conference activity.
All in all, one always comes back from such an event with starry eyes and a dreamy mind about the exciting (very near) future of the two desktops, and their tightened collaboration. Stay tuned for a lot of hot things happening soon in a desktop near you, and let's hope that next year's event will bring us the same amount of excitement and sunshine!
By Manu Cornet, Software Engineering Team
Releasing Debug Panel for GWT
Wednesday, July 15, 2009
By Jeff Bailey, Software Engineering Team
Making Beautiful Music Together
Tuesday, July 14, 2009
Last year, Google's generous donation paid for a much needed server and it allowed us to hire our Google Summer of Code™ student (Oliver Charles) part time after the program wrapped up. The donation also helped pay for mundane things like keeping the lights on, backup disks and paying for insurance. But the most fun part that we spent money on last year was our phenomenal MusicBrainz Summit in London. Our summit allowed the community to come together and to bond face to face at the Last.fm offices. MusicBrainz paid for its Summer of Code students to come to London from Sweden, Germany and Lancaster. MusicBrainz arranged for the summit space, subsidized accommodations and provided food. But, most important was our gathering at a pub near the last.fm offices — we had fun and bonded for many hours that evening.
Holding yearly summits has been a long tradition for MusicBrainz. We're planning on having another one this year and this year's donation will certainly help make this one memorable as well!
Thanks for your continued support Google!
By Robert Kaye, Executive Director, Metabrainz Foundation
Brazil Open Source Jam 2
Monday, July 13, 2009
Scott Kirkwood presented his Convertsy Wave Robot and gave a short introduction on how to write robots for Google Wave. Ricardo Bittencourt spoke about implementing an MC-1000 emulator on FPGAs. Rafael Sachetto Oliveira talked about his Ubuntu Simple Package Crawler project and demonstrated Web USPC. Fabrício Ceolin reported on integrating government software, CACIC, with Intel vPro technology. Licio Fonseca introduced the audience to GNOME Love, a project to help new contributors to the GNOME project, and Germano Teixeira de Miranda talked about speeding up cloning computers with Recuperao de Imagem de SO.
After the talks we had almost two hours to talk to one another and get some more snacks, including ice cream. The Brazilians are known for being quite sociable, and this quality was made very clear in the strength of its Open Source community; developers, enthusiasts and Google engineers shared their projects and ideas, and some even found new projects to work on together. The evening came to an end at about 22:00 when most people left.
Google Open Source Jam events are getting increasingly popular. It took less than 12 hours for the 50 attendees to sign up for this second Open Source Jam in Brazil, so join the Open Source Jam Brazil Google Group to stay updated on future events as soon as they are scheduled. Open Source Jams are hosted by the Google Open Source Team.
By Rodrigo Damazio, Software Engineering Team and Michael Hanselmann, Systems Administration Team
Ed. Note: Post updated with new photos.
Releasing Neatx, an Open Source NX Server
Tuesday, July 7, 2009
We at Google have been looking at remote desktop technologies for quite a while. The good old X Window system can be used over the network, but it has issues with network latency and bandwidth. Neatx remedies some of these issues.
In 2003, NoMachine released a large portion of the source code of their NX product under the GPL licence. NX is a protocol compressing X requests and reducing round-trips. Although mostly Open Source, NoMachine's NX product contains one closed component, the NX server. It's the part connecting clients with the Open Source libraries doing the work.
A free implementation of an NX server based on NoMachine's libraries named FreeNX was published in 2004 by Fabian Franz. FreeNX's primary target is to replace the one closed component and is written in a mix of several thousand lines of BASH, Expect and C, making FreeNX difficult to maintain.
Last week, we released the source code of our own proof-of-concept implementation of an NX server, Neatx. Designed from scratch with flexibility and maintainability in mind, Neatx minimizes the number of involved processes and all code is split into several libraries. It is written in Python, with the exception of very few wrapper scripts in BASH and one program written in C for performance reasons. Neatx was also able to reuse some code from another Google Open Source project, Ganeti. The code still has some issues, but we're confident interested developers will be able to fix them.
Also, Neatx implements features not found in FreeNX, such as the drop-down menu for session control in rootless sessions. At the same time, not all of FreeNX's features are implemented in Neatx.
Michael Hanselmann gave a presentation at FISL 10 in Porto Alegre, Brazil describing our implementation and use of virtual workstations (slides: PDF, 200 KB).
More information and the code can be found at the Neatx code.google.com project. You can also send us questions and feedback on the Neatx discussion list. Happy hacking!
London Open Source Jam 13
Thursday, July 2, 2009
Kai Hendry talked about Webconverger, a teeny weeny Linux Live CD designed for web kiosks, and his experience commercialising an open source project by offering services to go with it.
Frederik Dohr and Mike Mahemoff spoke about TiddlyWeb, a generic RESTful store for structured data, and Scrumptious, a jQuery-based web app that allows people to annotate and comment on web pages, which uses TiddlyWeb for storage.
- Simon Stewart - Testing Google Wave with WebDriver
- Jon Skeet - The Dynamic Language Runtime and C# 4.0
- Zaheda Bhorat - Open Standards
- Ambikesh Jayal - Open source e-Learning middleware
- Paul Walmsley - Bayesian data modelling
- David Sheldon - Where's Java's CPAN?
- Robert Rees - Bazaar Wiki
- Rob McKinnon - Politics and representation
- Ivan De Marino - Caching templated CSS
- Matt Godbolt - Testing+Mobile
- Nicolas Roard - Seaside and Smalltalk
- Phil Dawes - New approaches to database server design
Google Update, regularly scheduled
Wednesday, July 1, 2009
by S. Ganesh, Google Update Team
Introducing Apache Commons Math SimplexSolver
While numerous other libraries are available that run linear optimization problems, SimplexSolver is the first written in Java with a commercially-friendly license.
Let's say we have the following LP:
S.T.
x + 2y <= 6
3x + 2y <= 12
y >= 0
We could solve the problem in Java using the SimplexSolver:
LinearObjectiveFunction f = new LinearObjectiveFunction(new double[] { -2, 1 }, -5);
Collection
constraints.add(new LinearConstraint(new double[] { 1, 2 }, Relationship.LEQ, 6));
constraints.add(new LinearConstraint(new double[] { 3, 2 }, Relationship.LEQ, 12));
constraints.add(new LinearConstraint(new double[] { 0, 1 }, Relationship.GEQ, 0));
// create and run the solver
RealPointValuePair solution = new SimplexSolver().optimize(f, constraints, GoalType.MINIMIZE, false);
// get the solution
double x = solution.getPoint()[0];
double y = solution.getPoint()[1];
double min = solution.getValue();
Looking at the LP problem and Java code side-by-side, we can see how easy it is to describe the problem in the Apache Commons Math API. More examples can be viewed in the SimplexSolverTest source code. Apache Commons Math 2.0 is not quite released yet, so for the time being if you want to use the SimplexSolver, you'll need to compile it from source.
So that's SimplexSolver: a clean, fast method of solving LP problems. We hope you like it as much as we do! Thanks to Luc Maisonobe and the rest of the Apache Team who helped integrate the SimplexSolver into the Apache codebase.
by Ben McCann, Software Engineering Team