GNOME

Getting the troops mobilized

Saturday, February 25th, 2006

I gave a talk last Tuesday called “Open Source Development: A Rapid Introduction.”

Here’s the blurb I sent out when I advertised the talk:

Have you wanted to work on open source projects, but just don’t know how to get started? This talk will provide the basics you need to start working on open source software the next time you sit down at your computer.

In particular, this talk will cover:

(1) A brief overview of open source development in the industry and press.

(2) The UNIX development platform. A brief and whimsical overview of the UNIX shell, its surrounding tools, and the power of shell scripting. (Useful to anyone wanting to learn more about UNIX tools.) Learn how to do in a few lines of shell script what you only thought was possible with a big, extravagant hundred- or thousand- line program, and learn why so many of the world’s best hackers hack on a *nix system.

(3) The basics you need in order to hack on open source project: how mailing lists, wikis, bugzillas, source code revision systems all come together to form an organic code management process, and how to get started using those tools and others to learn about a project and what parts need development work done. This will include a brief introduction to CVS.

(4) The last part of the talk will involve actually watching open source development in action. In particular, the speaker will checkout some code from a source repository, make a change to it, create a patchfile from that change, then track down the mailing list or bugzilla related to the project and submit the patch to the maintainer. You will actually get to see open source “in action,” and will want to do it right when you get home!

If you’re a Windows or Mac OS developer who has always wanted to learn more about *nix systems, or if you’re a developer who wants to either take his own project open source or work on existing open source projects, this talk is for you.

Of course, if you’re someone who is just interested in the concept of open source, this talk will give you an inside look at “how things get done” in this community.

This talk was at least partially inspired by Nat Friedman’s blog post, check it out here:

“How to be a Hacker”

The talk was a general success, I think. About 12 people attended. You can see the talk in PDF or ODP formats, and you can also download the patches I wrote specifically for the talk to illustrate “open source development in action.” The patches are pretty stupid, but do illustrate the point, at least. Plus, each of the three patches served one of my own goals (hacking my CPU frequency scaler, fixing a gnome-terminal bug, and hacking galeon “for fun”), so that’s that. I think it’d be cool to give this talk again (maybe a little refined to include less basic UNIX tools and more hacking stuff) at a later date. We’ll see.

Site cross-pollination – check out h2h

Tuesday, December 13th, 2005

I just wanted to mention that earlier today I finally got hand tracking working on my final project for my Motion Capture / Computer Vision class. You can now connect a webcam to your computer, load up my GTK+ program, and watch boxes with crosshairs follow your hands accurately as you move them across the screen.

Pretty awesome, no? Check out the project if you haven’t yet, its MoinMoin wiki is here. I might post up a video of it in action soon.

It uses a clever skintone detection algorithm across the RGB colorspace, along with clever segmentation of the regions of interest to determine the cardinal direction a hand is moving in and retargeting the box to the new area and running the algorithm again. I am quite happy with the results. It can only get better, but it’s already pretty fun to play with.

Instilling Doubt

Monday, November 28th, 2005

A pretty insightful comment coming from an anonymous poster (in the comments section),

I always wonder about these Linux puff articles — what motivates the writers to pimp OSs that any experienced person knows will be nosebleeds for 90%+ of the novices trying to do a real, complete migration from XP?

Linux never has been, nor will it ever be, an effortless turn-key OS for all-purpose desktop (let alone laptop!). Ubuntu is an improvement, but it’s still Linux — which, if you consider the costs of replacing unsupported hardware and your time struggling with setup at about two cents an hour, is the most lavishly expensive OS ever devised.

I’ve been screwing around with Ubuntu 5.04 for about five months, all but living on the official support forum, which provides — at best! — solutions for only about a quarter of the hardware and software problems I’ve encountered, and there are tons of them.

When 5.10 was released, the forum exploded with bug reports from those who had upgraded from 5.04 and found they had major-to-fatal problems.

I’ve tried to install 5.10 on my new laptop, but the VIA video is not supported, nor is the RaLink wireless, nor WPA authentication…etc., etc., etc.

If you want to spend the rest of your life talking with geeks (and in the process learn that OS advocacy is best understood as a psychiatric symptom above all else) and trying out an infinite number of kludges, you can get a lot of these problems worked out (more or less), but what you normally wind up doing is succumbing to what I call “Linux disfunction drift,” eliminating tasks that you used to do in Windows because your Linux distro won’t do them, or support the hardware you needed to do them.

The MDI Plague and Window Management Woes

Saturday, November 19th, 2005

There is a nice article on Wikipedia that discusses the multiple document interface, a horrible hack that took hold in the Windows world to deal with the fact that Microsoft’s default window manager was inadequate to handle multiple windows existing under the same application.

I think Mac OS/OS X handles the MDI plague best by simply grouping all application windows under a single application class, with a single menubar. But usability experts have debated whether that makes the most sense, since the menubar can change, for example, depending on what window is in focus. I think users get used to that, and it also allows the menubar to be as long as necessary while the window can remain as small as necessary. That’s a nice win.

However, given our current model on *nix/Windows of menubars for every reasonably complex window, and given the lack of the MDI hack in GTK+, we do have a mess for applications that need more than one window to operate properly, i.e. Glade and The Gimp.

What I’ve been doing is giving these programs their own workspace as a workaround. That seems quite greedy of them, and indeed it is. What’s more, however, is that it’s unusable. Even when I switch to my Glade workspace, I see 4 windows in my taskbar, each with the same icon and with the following names: “Glade: h2h”, “Properties: image95”, “Widget Tree”, “h2h”. The first three are actually part of the Glade window class, and if I enable Metacity’s taskbar grouping, I see them as part of the same group. The last one, however, is just my actual window, and so is separate.

This is good–but I only get some form of usability when I actually enable window grouping. The thing is, in Metacity you can’t enable window grouping on a per-application basis. It’s all, sometimes, or nothing. Sometimes means metacity only groups windows when I’m running out of space. Otherwise it’s either on or off.

The thing is, grouping isn’t just about space saving. It’s about being able to perform window manager operations on a group of windows, i.e minimize all and maximize all.

This doesn’t even solve all problems: alt+tab still shows me all 4 glade windows, which can be quite confusing since only one comes into focus at a time. But that’s a separate issue, separate debate.

Wouldn’t it be nice if instead of Metacity just “figuring out” when to group my windows together, it let me just press a hotkey “Group all X windows on this workspace”, where X is the application I’m currently in?

I’ve decided this feature is so valuable, I may just hack metacity to add it. It will at least provide a path for solving the MDI nonsense.

Update: check out these screenies of a “different” approach to MDI written in GTK. It’s called GTK ADI.

User interfaces with GTK+ and Glade

Friday, November 11th, 2005

I’ve been hacking up a user interface for my motion capture/computer vision project called “Hand2Hand,” found here.

At first I was gonna do the user interface in Python and have the image processing done in C, but then I decided that the user interface was simple enough that I should just give GTK+ in “pure C” form a try. Of course, I used Glade, which drastically reduces the amount of annoying code for things like Vboxes and Hboxes and Containers you have to write. In fact, using Glade, interface design becomes somewhat straightforward in C. Which is weird, because C seems like it was never built for user interface design, but the g_signal system makes it easy to catch events that occur in your program, and GTK+ is high enough abstracted that you can do pretty well. I don’t know how well GTK+ scales for large programs (i.e. many dialogs, many lists, etc.)–in that case, I think I’d definitely pick a higher level language.

Looking forward to how this application may turn out. OpenCV looks like a pretty awesome library.

I can’t wait till Ubuntu breezy

Wednesday, October 5th, 2005

If for nothing else, for Mac OS 9-style file browsing in Nautilus, a la this screenshot:

clicky clicky

New Years Resolution

Friday, December 31st, 2004

To upgrade this website to Movable Type, among other things.

Last-minute hacking with my version of Metacity, and I finally got what I wanted. Basically, I was using xfwm4 for window management, and since it is NETWM compliant, I was supposed to notice no difference at all in GNOME. Except that’s not true, since xfwm4 doesn’t know about gnome-panel, and since a lot of useful hotkeys I want to use in gnome-panel are generally bound in metacity. Plus, the gnome theme manager doesn’t work without metacity. So, shame on GNOME developers, basically. You claim you are compliant, but you aren’t.

But then I did some reading and figured out metacity is actually a bit better than xfwm4 anyway, just that some of its features are hidden in gconf and other places. Also, someone has coded a neat app called devil’s pie which lets you manager your windows at a very fine-grained level, which I like… though it is a bit buggy right now, it shows promise.

So, the main thing I was annoyed by is vertical/horizontal maximize. xfwm4 has this working fine, and I’m quite used to it. Metacity doesn’t treat it as a “toggle,” so if you hit maximize vertical button twice, you just sit there with a maximized window… it doesn’t switch back and forth. I find this annoying since when I have vim windows open, sometimes to see more I just quickly maximize vertical rather than scrolling down, and then toggle it back afterwards.

Someone coded a patch to this. You can find it on bugzilla here at Bug #113601. Unfortunately, no one has written a “proper patch” that also works with session management and such, but I don’t really care, I wanted this patch to get back to work. So, in order to jive with my Ubuntu system, I created some debs with the patched version of metacity.

Havoc Pennington’s essay on UI design

Saturday, November 13th, 2004

I just found this essay on UI design and am surprised I never read it before. Some of the stuff Havoc says rings particularly true, and also confirms the need for some of the ideas I have for Glade-3 (ideas which, I think, will push UI design into the user’s hands, and exploit the end-to-end principal in the world of graphical software development; this is only one of the key points–my ideas also have other implications that, I think, are good for Linux applications in general).

In my spare time, lately, I’ve been drafting out these ideas, and I think soon I’ll have them clear enough to send a “brainstorm announcement” to the glade-devel mailing list. God I wish I had more time for this stuff!

gob2: Building GObjects easily in C

Monday, November 8th, 2004

I’ve been playing with a preprocessor called gob2, which I only recently discovered. I found it because I actually had the same exact idea as the author. I was reading the Gnome 2 Developer’s Guide, and realized that although GObjects are nice and handy when they are already coded (as in all the widgets in GTK), they are actually a pain in the ass to write from scratch. Tons of boilerplate code, tons of macros you need to code to keep yourself sane.

So, I thought, what if some code produced all this boilerplate code for me? Someone already had the idea. It’s called GOB (or gob2), the GObject builder. Check it out.

What’s so nice about it is that it tries to have the feel of Java or C#. So, check out this definition of a new GtkWidget which counts the number of clicks it receives. If you run gob2 gtk-button.gob, it will produce gtk-button.{c,h} with all the proper GObject boilerplate code you’ve come to expect coding by hand.

Much nicer than doing that from scratch.

What’s strange is that more GTK+ developers aren’t using this. On the gob2 mailing list, the author claims it is used in gnome-vfs, but doesn’t it seem like it should be used by a lot of developers? (Granted, it’s not as nice as using gtkmm/C++ I guess, but there are still people declaring objects in C out there).

Spike in the geekiness curve

Thursday, July 1st, 2004

Just got back from Northampton today. Was able to do some work remotely but not as much as I wanted, so I’ve been working late into the night. Still much to do, but at least I got JavaMail working properly and am finally, finally, finally finalizing my form design with JSP/Servlets on the UAC project. In the meanwhile, in Noho I was able to use my notebook to put together new form designs to be plugged in later.

But in more interesting news (not much more interesting)…. Wow! Lots happened while I stayed out of touch with the major news websites. Eclipse 3.0 (including new native builds) is well-received. Mono 1.0 was released. Java 1.5 (or, ahem, 5) Beta was released. Looking Glass was open sourced. Apple’s OS X Tiger was previewed and is now being scrutinized by Mac lovers. Wow, wow, wow, wish I had more time to explore all this good stuff.

Man, Dashboard is what gdesklets should be. sad Once we have a solid X system that is actually 3D accelerated in Linux, then we’ll be able to have more fun on the desktop.

Spotlight seems very cool, but I think Gnome Storage will be better. This may be an armchair code pundit speaking, but I think Linux geeks know how to do searching better than Apple geeks. Spotlight’s integration with Finder will look nicer, but Gnome Storage will actually find me my files. wink

Argh, gonna lay off this blog for a few days ’till I can say work isn’t bogging me down.