Alexis Bauchu - On est pas des machines

Coders are also human beings

vendredi, novembre 20 2009

Google releases the Chromium OS open source project

This had to happen, Google has entered the OS business. Well, they're not in the Desktop OS business, their strategy is to win the market of the eBooks, those really small and cheap computers aiming at connectivity. The main idea behind this product (Chrome OS) is that people are 90% of their time on the internet. And that... ok they tell it very well themselves, just watch this video:

Done? Ok. It seems quite logical to get to this point. With all the services that we use on internet, most of our data is alreay in the cloud, so this all fits. When I saw Chrome on Windows for the first time, with its task manager, its separate processes for each tabs, its workers (similar to threads, they're part of HTML5)... I realized that the browser was really becoming the new OS. No problems of portability (well almost), your data always available all around the world... The advantage of this approach is that you can then build a really cheap and really fast computer just designed to go on the internet. Google also provided a video live demo:

So this is not the OS proper for now, just the open source project, so that devs can already dive into the code and collaborate or experiment with it. It's all there: the Chromium projects.

Note: I thought I remembered that they already had released somehow a desktop OS, called gOS, but they did not. gOS stands for "Good OS" and is a modified version of Ubuntu with an emphasis on web 2.0 apps and "in the cloud" data.

lundi, juin 29 2009

Google surfs on the Wave

Checkout the incredible Google Wave project. This is gonna change everything. If you don't wanna go through the whole video, go visit the Google Wave Preview Page.

I'm really putting a lot of hopes in this, since I think Wave is a solution to so many issues with today's communication tools.

  • You just received an e-mail with no subject. What previous e-mail is it answering? Where's that e-mail?
  • If you start a "conversation" in an e-mail, and have several people join after a while, how can then know about the beginning of the conversation?
  • When you follow a newsgroups, forums, or worse, a mailing list using a web interface, what's the order in which people answered? What exact question are they answering?
  • Forums: which topics have I read, which have I not?
  • Instant messaging: how can store what has been said? How can I access it anywhere in the world? Why can't I see what the other is typing? What protocol should I use?
  • Blogs: why can't I post a comment by "answering" to the RSS feed?
  • What standard tool can you use to organize an event? Simply trying to know who's coming and who's not can be a nightmare unless you use some social network apps, but not everybody is in Facebook
  • Why can' t I follow my e-mail, forums, blogs, newsgroup in a single interface? (actually you can with Thunderbird!) From any computer in the world? (ok that you can't)
  • I've put a lot of efforts to sort my e-mails and my RSS feeds using tags. How can it benefit my friends?
Magically, this is all solved and unified in a Wave conversation. Sharing of files is also maid very easy, everything seems elegant and smooth. I just can't wait!

jeudi, janvier 8 2009

Ubiquity command: share-on-reader and share-on-reader-secure

The share-on-reader command is the first ubiquity command I've ever coded. I made it just to try ubiquity's command editor, but I wouldn't expect people to use it. It's basically a wrapper of Google Reader's bookmarklet that allows you to select (or not) text from a web page, and share it with a note on your Google Reader Shared Stuff Page (providing you've got a Google Account and activated Google Reader). It's that simple. You can subscribe to that command on that page. Here is the code:

CmdUtils.CreateCommand({
  name: "share-on-reader",
  homepage: "http://abauchu.net/",
  icon: "http://www.google.com/reader/ui/favicon.ico",
  author: { name: "Alexis Bauchu", email: "alexis.bauchu@gmail.com"},
  license: "MPL",
  description: "Shares content Google Reader's shared stuff page and allow you to add a note.",
  help: "This uses Google Reader, so you need a Google account to use this command.",
 
  takes: {"your selection": noun_arb_text},
  preview: function( pblock, selection ) {
    pblock.innerHTML = "Shares \"" + selection.html + "\" with Google Reader and allows to add a note";
  },
  execute: function(selection) {
   var cmd = "var b=document.body;var GR________bookmarklet_domain='http://www.google.com';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/link-bookmarklet.js');void(b.appendChild(z));}else{}";
   var doc = Application.activeWindow.activeTab.document;
   var body = doc.body;
   void (cript = doc.createElement('script'));
   void (code = doc.createTextNode(cmd));
   void (cript.appendChild(code));
   void (body.appendChild(cript));
  }
});

The code is rather long, because at the time there wasn't any command like CmdUtils.makeBookmarkletCommant(). I could have updated it, but I like it like that. You know, it's my first one.

But this command doesn't work with the https version of Google Reader (I should say the bookmarklet doesn't work, because I virtually didn't code anything). Someone commented about it in this blog: he uses the customizegoogle extension which automatically redirects the normal url to the secured one (https). And it breaks the command. So I tried some stuff, and came with a solution: in fact, on the https version of the website, Google provides ANOTHER bookmarklet, working this time. Simple! You can subscribe here. Here's the code:

CmdUtils.makeBookmarkletCommand({
  name: "share-on-reader-secure",
  url: "javascript:var%20b=document.body;var%20GR________bookmarklet_domain='https://www.google.com';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='https://www.google.com/reader/ui/link-bookmarklet.js');void(b.appendChild(z));}else{}"
});

Reminder: makeBookmarkletCommand

This is just a reminder: how to make a command out of a bookmarklet. For example, a command that embed a Flickr photo (the example is taken from Aza Raskin's blog).

CmdUtils.makeBookmarkletCommand({
name: "Embed Flickr Photo",
url: "javascript:(function(){if(window.page_p)window.open('http://www.elsewhere.org/mbedr/?p='+window.page_p.id);%20else%20alert('No%20Flickr%20photo%20found.');})()"
});

Replace the url by your bookmarklet code.

mercredi, décembre 31 2008

Ubiquity: makeSearchCommand template

This is just a reminder of the search command template. It allows you to create in no time what must be the most used feature of Ubiquity at the moment.

Use the command-editor command, and type the following code in the editor:

CmdUtils.makeSearchCommand({
  name: "your-function-name",
  url: "http://url-to-my-search-engine/?q={QUERY}",
  icon: "http://url-to-my-search-engine/favicon.ico",
  description: "Searches 'my-search-engine' for your words."
});

And just replace your-function-name and url-to-my-search-engine by your own new values. You may have to adapt the query url though.

An example, which searches cplusplus.com:

CmdUtils.makeSearchCommand({
  name: "c++",
  url: "http://www.cplusplus.com/query/search.cgi?q={QUERY}",
  icon: "http://www.cplusplus.com/favicon.ico",
  description: "Searches cplusplus.com for your words."
});

Ubiquity for Firefox

Ubiquity is a prototype extension for Firefox developed by guys of the Mozilla labs. It proposes to use a command line using human language in Firefox to create mashups, uses web services, do searchs, etc. But if you don't know that awesome extension yet, the following video will explain everything:

Lire la suite...

dimanche, décembre 28 2008

Handling 'mailto' urls and attachments with Gmail from the desktop

Just so you know: you cannot make Gmail handle your attachments from the desktop. That's not possible. Why am I writing about this? Because I spent quite some time looking for an answer about this problem, and people in the forums weren't sure if it was even possible or not. Finally, in a Google help group, I read "No, you can't". So now you know.

It is indeed possible to set Gmail to be your default email client. On Windows and Mac OS, you can use gmail notifier, I don't know about all GNU/Linux distributions, but I know some ways to do it on Ubuntu. Here's one:

  • First set firefox to use gmail as the mailto handler. Just follow the procedure found on the official Gmail blog
  • Then on your desktop, go to System->Preferences->Preferred Applications, and set your email client to firefox %s (or whatever browser you prefer).

That's it! Firefox will then process the mailto query and redirect you to a Gmail compose window, with the fields filled. Except the attachment field, unfortunately.

Note that there's a glitch though. With the command bzr send -mail-to email-adress from Bazaar, the query looks like mailto:///robert.smith@gmail.com which sets a wrong recipient in Gmail. I work around this by setting my preferred app to /path/to/myscript.sh %s with myscript.sh containing:

#!/bin/sh
 
query=$(echo $1 | sed s,///,,) 

firefox "$query"

It is a bit surprising to see that Gmail can't handle attachments, since any desktop client do that perfectly. They read the attach or attachment field of the mailto query as a file path, and load that file. It appears that it's not a standard behavior, as the The mailto URL scheme [RFC 2368] never refers to anything such as a attach or attachment parameter.