Xfce

Subdomains
 

Tablettage

  • November 11, 2005
  • Brian Tarricone

So I finally ordered my Nokia 770 Internet Tablet, with the sweet developer discount. I was a bit afraid I'd been left out when I saw a bunch of other people ordering and receiving theirs. I guess they were just giving out the coupon codes in batches or something.

Anyway, it looks like a really cool device, and I'm looking forward to hacking on it. I was poking around the API documentation for the platform, and it seems like there's a lot to mess around with. The little guy has quite a bit of potential. I've been looking for the chance to cut my teeth on programming for an embedded device, and this looks like the perfect opportunity.

Annoyingly, the only shipping methods were fedex 2nd day, and overnight, and the 2nd day is $15. Lame. And of course that means it'll arrive nice and quickly... and then sit at my rental office for 5 days until I get back from Germany. Figures.

Wizards

  • November 11, 2005
  • Brian Tarricone

Hmm, according to this, I'm a "wizard" at programming. Somehow methinks this dude overestimates the skill required to work with multithreaded apps. I think I'm pretty damned good, but I don't think I'd call myself a wizard. (Not to mention that that'd be pretty presumptuous.)

I also disagree with several of the statements in those slides as to why events are easier to handle than threads. For starters, I'll say that I do agree that locking isn't easy. In more complex cases, it's easy to forget a lock somewhere and get corrupted data, or to mis-design a situation where you can get deadlocks.

However, the statement "with threads, even the simplest application faces the full complexity" is a bit disingenuous. There are several tools available for communication between threads (such as locking queues) that allow a programmer to avoid nasty locking situations. Are they suitable for all situations? No, of course not. But sometimes, with a simpler multithreaded application, you can get away with ignoring mutexes, semaphores, condition variables, etc., depending on how the application works with its data -- or rather, how the application needs to share its data between different threads. Sometimes all that is necessary is to have a single data structure that holds "aggregate" data provided by multiple threads, and in that case all you need is a single mutex to protect that data structure. Sure, there are more complicated examples, but that's just my point: there are varying levels of complexity in multithreaded applications.

I'm also not seeing how the event-driven model is all that easy. It usually requires thinking about your program flow in a completely different manner than if you're using threads. Event-driven apps require asynchronous callbacks, and often a complicated state machine.

A great example of this stems from my work on my mail watcher plugin for the Xfce panel. The original mail checker had a terrible flaw: all network I/O was done synchronously, so any network delays would cause the whole panel to become unresponsive. I considered both solutions to this problem:

  1. Using an event-driven model, single-threaded, with non-blocking network sockets

  2. Using a multithreaded design, one thread per connection, with blocking sockets

Ultimately, I chose the second option. This way, I could have this program flow on checking for new messages:

  1. Convert the server's hostname into an IP address.

  2. Connect to the server.

  3. Do the initial handshaking with the server and authenticate.

  4. Check for new messages.

  5. Log off from the server and disconnect.

With a multithreaded system, I could do all of these in succession, without worrying about blocking. Either each step could complete in the blink of an eye, or it could take 30 seconds for each step. It doesn't matter.

With an event driven system, I'd have to have a state machine with a state for every single time I try to receive data from the network. That means one state each for steps #1 and #2, two to four states for #3, one or two states for each message folder in #4, and at least once state for #5.

I suppose that isn't so terrible, but consider that because of how the C library works, there's no way to make #1 non-blocking. Also, for secure SSL connections, I would probably have to use a more complex interface into the security library I was using to avoid blocking within the library.

So eventually I decided to use threads. In the end, I had a couple small locking problems, which were immediately apparent and not difficult to fix. I don't recall encountering any deadlock situations.

I guess it just really depends on how your mind works best...

Search Strings

  • November 10, 2005
  • Brian Tarricone

So, according to my website stats, these fine search engine strings have been used (among others) in the month of October to find my site:

  • everything is gay

  • bastard

  • academia sucks

Not much terribly interesting for November, except maybe "xray apendicitis" [sic], which is rather odd.

I am amused.

Upcoming Travel

  • November 10, 2005
  • Brian Tarricone

I'm doing a bit more travelling before the year ends.

This Saturday (12 Nov), I'm leaving for Berlin for an Intel thing. I'll be there until the next Saturday morning. I should hopefully have a fair amount of time to do some sightseeing, and I'll be able to see Jens and Moritz while I'm there. Awesome. Malte, from our Munich office should be joining me for a couple days, which will be cool.

In December, I'm going back to the east coast for Christmas and New Year's. Amazingly, I managed to get a free flight with all the miles I've racked up with United this past year. I really thought that entire time period would be blacked out, but I managed to get a flight out on the 24th, and one back on the 4th. Not ideal, but it's free, so I'll take it. I'll probably be up in NYC for a day or two around the 28th or 29th, so if you're in the area, drop me a line. Otherwise I'll be in MD.

Joe Blow can, well, blow me

  • November 8, 2005
  • Brian Tarricone

Well said. This is basically what I want to tell people when they say "Linux needs this", or "OSS needs this", or "your application needs this" if I want more people/average users/my grandmother to be able to use it. The bottom line is: I don't care if these people use Linux. And I certainly don't want them using Linux if getting them to do so means being forced to make stability and security compromises (among other things).

Some Press…

  • November 7, 2005
  • Brian Tarricone

Aww, so we're GNOME's "beloved little brother"? That's so cute.

Sulu

  • November 3, 2005
  • Brian Tarricone

Huh, it seems that George Takei (aka Star Trek's Hikaru Sulu), is gay. Never woulda guessed.

I feel like something of a jackass blogging about this, but hey, why not.

Beta release, Bugzilla

  • September 27, 2004
  • Brian Tarricone

Hi everyone… As you might have heard on the xfce4-dev list, we’re very close to releasing Xfce 4.1.90, which will be the first beta release of the next version of Xfce, 4.2.0. I’ll take this opportunity to re-introduce our new release manager, Biju Chacko. He’s been working this past weekend to get his system into a state to churn out release tarballs. After the release, I hope you’ll all be able to give it a try and give us your feedback so we can move quickly toward a final 4.2.0 release.

Also, many of you have probably noticed that http://bugs.xfce.org/ now points to our new install of the Bugzilla bug tracking system. I finished setting that up about a week ago, and it should help us to more easily track and fix bugs. If you had an account on the old bug tracker, it’s been migrated to the new one. Your username is now the email address you used to register, and you’ll have to ask it to reset your password, as I was unable to migrate the encrypted passwords from the old tracker. If you’re unfamiliar with Bugzilla, I’ve written up a “cheatsheet“, which is linked from the main page. You might also want to try the “guided format” to reporting a bug, which will guide you, step-by-step, in gathering the info you need to submit a useful bug report.

New Features?

  • September 14, 2004
  • Brian Tarricone

I realise often that I tend to be very reluctant when anyone asks about a new feature in anything I work on. Generally, if it didn’t occur to me as a feature, my immediate reaction will be to not want to include it. I know that seems a bit silly, and perhaps mean. I’ve never really been able to explain before (in anything but general “this is just how I feel” terms) why I ususally react like this, but after reading Havoc Pennington’s Free Software Maintenance: Adding Features, I realise that this pretty much sums up my reasons. I think it also enumerates some really good rules of thumb that everyone should try to follow when submitting a feature request (even if you’re submitting the patch, too) to any kind of open source project.

So this is why I sometimes seem like to act like an ass when people are bugging me on IRC about adding features to xfdesktop or xfmusic4. It’s nothing personal, but I need to see some compelling justification before adding a feature when I’m not sure it’s worthwhile.

xfmusic4, goneme

  • July 26, 2004
  • Brian Tarricone

those of you following the xfce4-dev mailing list know that i’ve been working on a lightweight music player, which i’m calling xfmusic4. i’ve made a couple alpha releases, and put up a public CVS repository. more info can be found on the project page.

apparently a critic of gnome has decided to put his money (or the OSS equivalent) where his mouth is, and has formed the goneme project. i think it’s nice to see someone stop complaining and actually do some work, but, after reading his arguments about what’s wrong with gnome, it sounds to me that he’s just mostly ignorant and uninformed, and, in some places, blatantly incorrect. my prediction: he gets a lot of support initially, but mostly from a crowd that doesn’t have much development ability to speak of. the project produces little code beyond the simple patch that’s already up there, and fizzles out relatively quickly.

on an unrelated note, planets gnome and freedesktop are linking to us now. i wonder if they did that before or after i put up links to them here. probably before… i’m not that special ^_~. anyway, if anyone gets here from there, hi guys!

ok, i’ll stop editing this post after this one, i promise. i came upon this, some usability info on .desktop files. we should probably start doing something like this for xfce. i’m kinda against the “GenericName” concept – i think it really dumbs down the user experience. there are many many windows users that honeslty believe that microsoft internet explorer is “The Internet”, and i don’t want to see similar things happening in our world. at the same time, i feel for new linux users that fire up their desktop and have no idea what any of the apps do. i wish menu items would display tooltips when you assign them…