Thursday, March 27, 2008

Developer, Teacher, Musician.... Author?!

It looks like I'm going to be adding another title to my list of accomplishments in the not-so-far-flung future. I'm working on a book, of all things, on OpenOffice.org. It's not the first time I've worked on documentation, but it is the first time I've tackled something this big. If you recall, I wrote the first draft of Haiku's User Interface Guidelines. I started hacking away at the initial manuscript last Friday and I'm just about finished with Chapter 4 of the part on Writer. I don't know how long it will be, but I highly doubt it will end up being one of those 500-page coffee table books like the "Learn Something in 21 Days" books that Sams Publishing does. I haven't come up with a title yet, but that's OK -- it's not like I'm on short notice or anything. It'll be published through Lulu.com for the print version and released online as a PDF with a Creative Commons license.

I thought I knew a lot about Writer, but I've learned so much in just the 6 days that I've been working on it. I never thought it would be as much fun as it has been. The upshot of the whole thing is that it requires *so* much less mental energy than writing code. I've put code on the back burner for now -- this is just as fun and has the potential to make me some money. With me moving late this year (tentatively), it's not like I don't have need for it.

Sunday, March 16, 2008

wxWidgets Ain't So Bad, or How to Eat Crow

Well, after fighting with it for a while, I ultimately gave up on writing code with Ultimate++. The learning curve is too steep and the support is bad enough to not be worth the time. Don't get me wrong, it's probably a good toolkit overall, but it parts of it which seem like basic system services are nonexistent or require work to get right. If it had a bunch of people behind it working on patching the missing bits and/or had more complete documentation, it could be really nice. When I was contemplating ditching the toolkit, I gave wxWidgets another go, and, to my surprise, it installed and worked right out of the gate. I'm not sure what gave me such a hard time getting things to build last time around. *shrug*

Anyway, I started work on what I consider my first app when learning a new toolkit: a program to randomly generate bingo cards from a word list. It's a helper app for some teachers that I work with, and it's a good first project because it familiarizes me with basic UI programming, file I/O, and printing. After a few hours, I've got everything working except the actual printing implementation, which should come soon enough. As soon as I have something worth downloading, I'll probably post it on my website. Not BeOS, but if the port of wxWidgets to Haiku takes off in a reasonable amount of time, it will be also for BeOS.

Saturday, March 8, 2008

Code + Blizzard

And I'm not talking World of Warcraft, either. Central Ohio was hit with the worst snowstorm since 1978. We received a foot and a half of snow in 36 hours time. While mine was not one of them, there were counties around where you could be arrested for driving on the road at all. I made the best of it and spent a number of hours working on some around-the-house projects that I've been neglecting and hacking a project based on the Ultimate++ toolkit.

Ultimate++ is quite an interesting toolkit. The driving goal behind it is increased developer productivity. The method? To quote the project's pages, "aggressive use of C++ features." It's quite an intriguing API, too, and definitely utilizes concepts foreign to the BeOS way of thinking. I'll probably post more in-depth on it later. It makes cross-platform programming easy to set up, unlike wxWidgets, but it does have its warts. For example, it lacks its own calls to show the Windows common Page Setup dialog and there isn't an included sound or movie API. Documentation is spotty -- some sections are very good, some are incomplete, and some are completely missing. Anyway, I'm working on a couple of projects. We'll see how far they get, but I'm learning.... slowly.

Sunday, March 2, 2008

Well, here goes nothing

I've been off the BeOS / Haiku radar for some months now. I still am not officially active in it anymore, but that doesn't mean that I don't keep thinking about Haiku or coming up with ideas that could make it better. Computers are still quite an active part of my life, but finding time to do anything that I used to classify as "productive" is a difficult proposition right now -- mostly limited to the weekends. I've decided to start a blog which is still Haiku-oriented, but not limited to Haiku or even necessarily computers in general. Yep, this is my own little, relatively-insignificant corner of the Web.

To start things off with some actually useful content, I'll start with a project I've been twiddling with for the last couple of weeks that has actually increased my productivity under Linux somewhat. You might have heard of a person who made Xubuntu look like Windows Vista and then later, OS X Leopard. Well, that got me to thinking about how it could possibly help something that I'd done: work on designing the 3D-accelerated desktop experience for Haiku R2. The experimenting led somewhere, and I can't say that I didn't learn anything, either.

Xfce 4 is Really Tweakable

I've heard it mentioned that the Xfce desktop environment that Xubuntu is based on is quite configurable. I'll agree with that. I could have done most of this stuff in GNOME, but if you asked me, Xfce is like a good compromise between GNOME and KDE after going on a diet. The big thing was the panel. Originally, I thought that completely getting rid of the Deskbar was the way to go. I was wrong. Instead, what really needs to happen is expand its capabilities to enhance the desktop's needs. The panel concept common to Xfce, GNOME, and KDE fits the bill: small, useful widgets which are useful, but not visually distracting.

Believe it or not, the panel was quite carefully thought-out. First of all, it is in the bottom left corner to allow people to keep a habit from Windows: throw the mouse to the bottom left corner and click to open the main menu. It also allows the user to develop habits for other items in the panel because it only grows in one direction.

Beside the main menu is a visual separation between it and the next section... Places. One thing that this feature is missing is Tracker's filesystem menu. A proper Places item for Haiku would utilize Tracker's filesystem navigation menus or an appropriate replacement. It should be divided into two sections and the bottom section is dedicated to the Recent [Documents / Applications / Folders] menus, user bookmarks, and for a menu item to allow the user to edit the bookmarks.

The fast launcher sits beside Places. In the screenshot, there is just FireFox, but obviously, there could easily be others. The weather applet is just there for fun, and the timer is for helping me maintain good computing habits and stave off RSI issues. The CPU graph is good feedback for the user in knowing how hard the computer is working, and the clock.... well, no one likes to have to look down at their watch. ;-)

One other tweak that only the more perceptive readers would notice is the bigger icon sizes. By default, Xfce uses some tiny icon size for its menus. I think it's 16 pixels, but it might be 20. My computer is runs at a resolution of 1280 x 1024. At that resolution, it's hard to navigate the menu because of the small size. While I have experimented with as large as 32 pixels, 24 seems to be much easier for higher resolutions. Even the largest menu (Settings) doesn't take up more than about 75% of the vertical screen size. Perhaps there should be something about a possible method for computing menu item size based on screen resolution, so that people with smaller screens don't have massive menu items, but better equipped computers don't require users to have the coordination of a 3D-shooter tournament champion in order to run a program.

Compiz Fusion...Meh

The main driving force behind the 3D desktop on Linux is the whole Compiz / Beryl thing. I have a hard time following the different soap opera that go on, but Fusion is the result of the reuniting of the efforts of the Beryl and Compiz teams. Their efforts are promising, but at the moment, buggy enough to not be useful on the desktop at the moment.

Some of the desktop effects, such as painting on the screen with fire, are just novelties, but some have the capacity to be really helpful. They're not overly complicated, either. Here's a list of the desktop effects that I put into place:

Desktop Wall: This adds a slide transition when switching workspaces and additionally shows the location in the workspace grid along with the direction travelled. This is really helpful for keeping context for power users.

Expo: A keypress zooms out to see a live overview of all workspaces. If a movie is playing -- you guessed it -- you could theoretically watch it from this overview. You can select a new workspace just by clicking on one or using the arrow keys and Enter. This would make a good workspace switcher for more novice users.

Show Desktop: This plugin is a direct copy of the same feature in OS X. Quite helpful, especially when you have applications minimized to the desktop.

Animations: A multi-effect plugin. Even though there are some neat ones, most of them are more distracting than helpful. A few were nice to have to provide additional feedback on the actions of a particular window -- a curved fold on close (window folds in on itself and disappears), a fade effect when a window is brought to the front of the stack, and some zooming effects for minimizing and opening windows.

Window Snapping: This is also called Edge Resistance, originally named "Snap and Go" and mentioned in my 3D Desktop RFC.

Application Switcher / Ring Switcher / Shift Switcher: These were plugins for different methods of changing between open applications. Application Switcher was the easiest for me to use, but the others could be valid alternatives.

The only feature that I couldn't properly test was Minimize in Place because the Shelf plugin is not currently stable. However, Xfce's window manager has a mode where all minimized apps show up as icons on the desktop. Almost as good.

Just for fun I changed the background, icons, main menu icon, and splash to be Haiku-themed. I only wish that I could've had all the 3D-Accelerated goodness with a BeOS-related window decorator. KDE does have a BeOS-like one, but it's ugly and no amount of tweaking that I did made it look decent... only less ugly. Xfce has a very good one, but, sadly, it can't be converted to a metacity theme and there isn't a decorator plugin for compiz that works with xfwm's themes, though I wish there were.

Was it Worth It?

I'd say yes. While Windows XP is my primary OS out of necessity and being the path of least resistance, after all that tweaking, I found that I preferred to work in Linux because of all the extra niceness. It's difficult to describe in words, but the extra effects impart a feel-good kind of quality that makes working somewhat more enjoyable -- kind of like the difference between a regular just-for-going-to-work beater of a car and the same car with a Bose sound system and leather seats: not absolutely necessary, but it makes the experience nicer. If anyone would be interested in trying this out, too, I probably could post the config files or at least the "recipe" for proper tweaking and the media files.