Older blog entries for lucasr (starting at number 220)

Micro Commits

Branches by Andrew Storms (CC-BY-SA)

It’s been a few years since I became a full-time git user both at work and in the FLOSS projects I contribute to. I guess there’s no need to argue in favour of git at this point as it has become a sort of given on any sane software project—along with some other DVCS. I can’t really remember anymore how my life with Subversion was. Sad, I guess…

One of my favourite cultural shifts in software development brought by DVCS is the use of micro commits. JP has just blogged about it. Here are what I consider the most useful benefits of micro commits.

Tell a story. When you send one huge patch implementing a feature or fixing a bug, you’re completely hiding the incremental process through which you reached your final solution. On the other hand, a well written series of micro commits tell the reviewers the whole story of your code changes, step by step.

Discipline. If you want to tell a coherent story with your commits, you obviously need to organize them properly. Each commit should be a self-contained step towards the new feature or bug fix. Writing good patch series requires quite a bit of practice. It’s a very good exercise in terms of splitting a complex solution into a well-defined sequence of code changes—leading to more disciplined development practices.

Better code reviews. Because micro commits are, well, small, they are much easier to review because they do only one thing at a time. You get better code reviews as a consequence because the patches tend to contain no unrelated code changes.

Bisect and cherry-pick. Huge commits makes bisect and cherry-pick close to useless. And you don’t want that! Micro commits make it much easier to spot what caused a regression. Plus, they make it very easy to cherry-pick commits from one branch to another.

Git makes it utterly simple to move, split, squash, reorder, and remove commits providing the best ways to write good series of micro commits. It allows you to look like the perfect developer to the outside world by incrementally fixing your commits before submitting your patches for review. If you’re not micro-committing yet, you should.

Syndicated 2011-01-29 02:47:34 from lucasr.at.mundo

Selection in The Board

Selected Elements

Since I started dogfooding The Board on a daily basis, it became clear to me that not having a simple way to arrange multiple elements in the page is quite annoying. If you wanted to arrange multiple elements in a specific area of the page, you’d end up having to move each element separately, one by one. Argh! This is why I decided to focus on an initial set of features targeting this specific issue for the upcoming release.

You can now select, move, align, distribute, and remove multiple elements in a page. Click on the image above to see a video demonstrating the new features. Selection can done in three ways: the usual dragging from background to start selecting a region of the page, Ctrl+clicking on elements, or using Ctrl+A to select all elements in the page.

Once more than one element is selected, a context toolbar slides in presenting all available operations for the selection. I’m following the same obviousness, clarity, and consistency principles I’ve discussed before. The available operations for any app state are always visible and easily accessible. No need to dig around to find out what to do.

As usual, feedback on the design decisions are more than welcome. So, what’s next? I’ll be fixing a few critical bugs and then roll a new release. I’ve been pestering distro guys to create packages for The Board. I’ll hopefully be announcing the next release with links to distro packages.

Syndicated 2011-01-26 02:30:23 from lucasr.at.mundo

Backgrounds in The Board

New Backgrounds

When I started writing The Board, I was quite pragmatic about the appearance of the app. I used my limited Gimp and Inkscape skills to produce the UI theme images and grabbed some free background images from internet.

So, the background images you’ve been seeing on previous The Board demos are just placeholders. Christian Ankert suggested—on the respective bug report— to use some of the free stock images by Kimberly Crick. Great tip! I produced five beautiful backgrounds based on her stock images: cork, cardboard, green, paper, and fabric. The goal with those backgrounds is to reinforce the physical aspect of the UI. Hence the use of textures mimicking real-world materials instead of abstract stuff.

The UI still needs some love from a real graphic designer but I’m quite happy with this initial set of backgrounds. If you want to propose new ones, please submit them to GNOME Bugzilla.

Syndicated 2011-01-14 15:02:07 from lucasr.at.mundo

Sounds in The Board

So, The Board 0.1.0 was released a couple weeks ago with a good set of initial features. The 0.2.0 release will come with a couple of interesting new features. Here’s one of them: sound elements with voice recording capability.

At this point, it should be clear that The Board is all about easily making daily records in form of videos, photos, notes, and labels. The addition of sound elements is natural step. Click on the image above to see a video demonstrating the new feature.

So far, voice recording in GNOME has been an obscure feature because the sound recorder app is not easily accessible and it doesn’t provide a convenient way to organize and access your voice memos. The Board makes it extremely simple to record voice memos. No need to care about saving files or anything. You can easily label your tapes for later reference. Just add a sound element and start recording!

The design still needs a bit more polishing of course—show playback and recording time, improve tape animation, error messages, etc. Feedback is welcome as usual. If you want to try this and other features, just follow the instructions on the hacking page to get The Board built and running on your system.

The next feature I’ll be working on is actions on multiple elements. Operations like removing multiple elements at once, aligning and distributing elements on a page, stacking elements, etc. Some exciting stuff coming soon!

Syndicated 2011-01-10 23:40:31 from lucasr.at.mundo

The Board 0.1.0

The Board 0.1.0

Today I’m officially joining the GNOME Old Farts Club. I thought it would be a good time to make the first release of The Board. Ladies and gentlemen, I give you The Board 0.1.0! I wanted to do this a few weeks ago but with so many moving parts in our platform it was actually a bit hard to reach a point where all dependencies were actually working fine together. So, what is this release about?

Feedback. First of all, this is not a release for users. The Board is buggy, unstable, and lacking features at the moment. But it’s in a dogfoodable state for developers and expert Linux users. Current feature list includes:

  • Add, load, remove pages
  • Photo, video, note and label elements
  • Add, edit, remove, resize elements in a page
  • Basic Firefox and Chrome extensions
  • Basic Nautilus extension

I’m expecting to get some useful feedback from early testers and developers on those features and the general UX. You can get an idea of what’s in the release by having a look at the previous blog posts and respective videos listed in The Board’s wiki page.

Contributors. If you’re a developer interested in setting up a development environment to start hacking on The Board, have a look at the hacking page. I wrote a script—heavily based on what GNOME Shell provides—that automates most of the process of fetching and building dependencies from git. Please report any build problems on GNOME Bugzilla. I filed bug reports for quite a few known bugs and missing features that should be a good source for initial contributions.

Distros. Even though building The Board and its dependencies became much easier with the above-mentioned script, it’s might still be a bit painful to get The Board running on your system. So, here’s a call for distro packagers to create easy-to-install packages to be used by early testers. The idea is to be able to provide the simplest possible way to get The Board running on all major Linux distros.

So, what’s next? I’ll continue to fix bugs and hopefully make a 0.2.0 release soon with a couple of new features: audio elements with voice recording capability and support for actions—align, distribute, remove, etc—on multiple elements in a page. I expect to be doing more frequent releases from now on.

Syndicated 2010-12-23 23:00:51 from lucasr.at.mundo

Adding to The Board

When I first introduced The Board, I generally described how I envisioned things being added to the pages—have a look at the “Add to The Board” and “Integration with other apps” sections in the intro post. I decided to spend some time implementing a few interesting ways of adding content to The Board so that the app concept gets a bit more clear in practical terms. Click on the image above to see a video demonstrating all features described here. Here’s the user story I have in mind:

Henry is a journalist who writes gadgets reviews. He was assigned to write a review of this new Android phone. He needs to do a bit of research before starting to write. He activates The Board and creates a new page called “Android article”.

He opens the web browser to search for reviews, pages, images, and videos about the product. For each relevant page, image, video or piece of text he finds useful for his article, he simply right-clicks on them and adds them directly to The Board.

He also has a few local documents about competing products which might be a good source for his article. He opens some of those documents, copies the related pieces of text, activates The Board, and pastes them as notes.

He then remembers he had already downloaded a few photos of the phone a few days ago. He opens Nautilus to access the folder containing the images, right-clicks on the images and adds them to The Board as well. He activates The Board again, presses ‘t’ to add a new note, a quickly writes down a few ideas on how the article can be structured.

Henry is now ready to start writing his article.

Browser. I’ve implemented extensions for Chrome and Firefox. The Chrome extension can only add links and text selections as I couldn’t find a good way to handle photo and video downloads—I hope to get this implemented soon. The Firefox extension is more complete and allows you add links, text selections, images, and videos (using HTML’s video tag, not flash) from the browser.

These extensions add a context menu item when right-clicking on the cited web content. In case of images and videos, they automatically download the file to a proper user directory before adding a respective element on The Board’s current page. The extensions communicate with The Board via HTTP. A notification is shown when content is successfully added.

One big missing feature is a toolbar button which intelligently adds the current page to The Board. This means that if you’re in, say, Google Maps, if you hit this toolbar button, it adds the map to The Board. If you hit this button while viewing a photo on Flickr, the photo itself is added to The Board. You got the idea.

File Manager. The Board’s integration with Nautilus is done through an extension. The extension adds a context menu item every time the files can be added to The Board. For now, it only allows adding images. Videos should be coming soon. A notification is also shown when content is successfully added from Nautilus. This was the first time I wrote code based on the new GDBus API. Pretty simple to use.

Clipboard. I added some initial code to handle paste command on The Board’s window. In practice, this means that if you copy text from somewhere, you can just use the usual Ctrl+V keyboard shortcut on The Board to paste it as a label or note. Still need to implement URI and image pasting.

Keyboard shortcuts. It should be simple and fast to add things to The Board while using it directly. The current keyboard shortcuts are ‘l’ for label, ‘t’ for note, ‘p’ for photo, and ‘v’ for video. When something is added to the current page, the new element is activated straight away and you can start typing even before it reaches its final position.

This is all very initial code. It’s definitely a bit buggy and missing features. But it’s in a dogfoodable state—for developers at least. In fact, I’ve been dogfooding The Board full time for a few weeks now. I added this temporary status icon that shows and hides The Board’s main window—you can see it in the video. Works well enough for daily usage.

I still haven’t decided how to integrate The Board with GNOME Shell yet. That means figuring out how the “activate The Board” part of the user story above would actually happen. I’ve been playing with some mockups but nothing solid came up so far. Ideas—especially from GNOME Shell guys—are welcome. Patches for all the missing stuff I mentioned above—or for anything else really—are more than welcome too.

Syndicated 2010-12-06 01:40:48 from lucasr.at.mundo

Running Uninstalled

Back in 2008, when we started writing the initial infrastructure for the litl OS UI, Havoc added a way to run the whole thing using uninstalled files in the source tree. Back then, I was so blindly used to the “make → make install → run” cycles that I didn’t think this would be especially useful. I was obviously wrong.

litl’s UI shell is a relatively big component comprising our window and compositing manager, UI shell, plugin framework, a few highly integrated apps—online photos, video chat, settings, friends, etc—among other things. Having to install all that for every change in the code would be time consuming and utterly distracting.

I added support for uninstalled run in The Board a few weeks ago. It’s an separate executable that allows you to run the app using fonts, images, icons, plugins residing in the source tree. The only missing part is being able to use uninstalled translations from the source tree—any good ideas on how to do it? GNOME Shell also allows you to run it from source tree inside Xephyr using a wrapper script.

The bottom line is: any step between a code change and running the software is a distraction. If you can make your app run using only uninstalled files from source tree, do it! This is especially important in complex code bases using lots of different assets—icons, images, UI definition files, translations, fonts, etc. This allows you to test your code changes without much hassle. And it saves you precious time.

Syndicated 2010-12-02 22:47:37 from lucasr.at.mundo

litl in the Event Boxes

webbook by litl (CC-BY-NC-ND)

The GNOME event boxes have been flying all around Europe and North America helping our community to promote the project, demonstrate the beloved desktop, and show off all the cools things that can be done with the GNOME platform in gadgets like the OLPC XO and Nokia N810.

litl is now donating two webbooks, one for each GNOME event box. We’ve already shipped one for the North American box. I’m still waiting for the European box to be found before sending the other one. The litl OS is fully based on the GNOME platform using GObject, GLib, Clutter, GTK+, Gjs, GStreamer, and others. The webbook is a good example of the strength of GNOME’s platform. We hope this is a useful addition to the event boxes. Enjoy!

Syndicated 2010-11-18 17:22:34 from lucasr.at.mundo

Context Toolbars in The Board

Context Toolbar

When I blogged about the new toolbar in The Board, I mentioned that it was part of wider interaction model I would be implementing soon. So, here’s the very initial implementation of what I call context toolbars in The Board. When I started thinking about how I would offer ways to customize the things you add to The Board, I had a few simple goals in mind in terms of UI.

Obvious activation. First, it should be simple and obvious to trigger context actions. I didn’t want to use right clicking or context menus as there is no nice way to make it obvious that they are available. I wanted something that would be triggered by a simple click, nothing else, as this is pretty much the first thing anyone would try.

Clarity. The UI should make it obvious what is active on screen and what are the available actions. It should make interaction context super obvious at any time. This is why when you activate, say, a label element, all other UI elements get dimmed and the only things that are highlighted in the UI are the context toolbar and the active label.

Consistency. The way the available actions are presented should be consistent among different types of elements. I thought showing an options overlay inside the elements would be a nice idea—see the “File” button shown on photos in a previous video. However, this approach has the serious limitation of not being scalable for things with different sizes—how would you show an options overlay inside a tiny text note? Context menus again are not a good choice because I wouldn’t be able to add richer UI controls to it. So, I decided that context actions would always appear in the context toolbars, always on the top corner of the window.

Click on the image above to see a video demonstrating the general behaviour of The Board with the context toolbars. The actual actions are not fully implement at the moment. I added just a few basic actions to be able to show off the new feature. This video also shows the use of labels, the small one-liner text elements that can be used for quick reminders.

I’d appreciate some feedback from UI people, as usual. This is of course just an initial implementation of the design. I’m open for suggestions on how the design can be improved. I’ve been hanging out in #the-board channel on irc.gnome.org. Feel free to join! First 0.1.0 release coming real soon now!

Syndicated 2010-11-17 01:33:02 from lucasr.at.mundo

Unbox, Connect, Enjoy

Unboxing a Partner by Stéfan Le Dû (CC-BY-NC-SA)

Being the (mild) technophile that I am, getting a new gadget is a special moment. I usually do quite a lot of research, compare loads of competing products, and read a bunch of reviews from different sources before reaching the point of actually purchasing a new gadget. At the moment I receive the shiny new package, I expect an ideal first boot experience comprising no more than 3 steps:

  1. Unbox
  2. Connect
  3. Enjoy

The “Connect” step might be either cable connection and/or network connection. Unfortunately, the first boot experience of many gadgets don’t follow this simple 3-step process. Some add more steps, others simply offer a lame first time experience. Here are some of the common mistakes.

Battery. Your new gadget has just arrived. You want to start playing with it as soon as possible, of course. You try to switch it on but nothing happens. You realize that you first need to charge your gadget. Epic. Fail. If your product runs on battery, it should be at least partially charged to be ready to use just after unboxing. Apparently, this a common mistake on mobile phones.

Connection. You unbox your new gadget, plugs it to power source, but then you realize you don’t have the cable to connect the gadget to your TV, or your laptop, or whatever. Uh-oh. Products should come with all necessary equipment for optimal experience. My current printer didn’t come with the necessary USB cable and my PlayStation 3 came with no HDMI cable. Very frustrating. Oh, and I’ve heard that the iPhone 4 doesn’t come with the bumper for optimal signal performance… Ok, never mind.

Defaults. The default layout, settings, and content on the gadget should give a strong clue on how cool the features are. Default settings should feel right. For example, if there’s a weather feature, it should show the weather for the user’s current location by default. You should be able to play with all features with default content or through a minimum setup. RSS reader should have a few in interesting feeds by default. A microblogging widget should have an über simple way to get started.

The underlying message from the defaults should be something like “Here’s how cool this device is, now it’s your turn, make it yours”. Galaxy S gets defaults totally wrong. It comes with 7 home screens (!?), either empty or with widgets using lame default content.

I’m pretty sure this list is much longer than that. Those mistakes might seem obvious but they still happen very often. The goal of any first boot experience should be to reduce the process between unboxing and enjoying the product to a minimum and engaging users from very first second they start using the device—with sane and compelling defaults.

The more the product requires just to get started, the more reasons you’re giving users to get frustrated. First impressions matter. A lot.

Syndicated 2010-11-11 10:32:51 from lucasr.at.mundo

211 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!