Archive for June, 2011
How I ended my trial of Gnome 3
tl;dr version: I like XFCE better than Gnome 3.
I wrote previously about trying out Gnome 3. I’ve been using it for about a month now, and it’s time for me to make a decision about whether to keep using it or revert to Gnome 2. I’m actually on vacation, which ends soon. I need to do this before vacation ends, so I can be fully productive at work.
My ultimate impression of Gnome 3 is that it’s very slick, and makes significant improvements in some ways, but it’s not very usable for my purposes, and has too many self-contradictions. I still have the complaints I listed in my earlier blog post, such as the identity crisis between keyboard and mouse use. It is geared to keyboard control in some ways, but not enough to really work, and at the same time it’s hard to use it with the mouse. For example, it wastes space on items such as huge thick titlebars (what is that for, if not for the mouse to grab?). Yet window borders are only 1 pixel thick, which is very hard to grab with the mouse when I want to resize, and there are no minimize buttons by default. And there is a big black bar across the top of my screen, which contains a lot of useless items I normally hide. At the same time, this bar isn’t configurable and I can’t put the things I actually want onto it, so it simply sits there making part of my screen unusable.
After using Gnome 3 for a while, and trying to customize it to my liking, I gave up a couple of days ago. There are simply too many things that were either designed in a way I don’t like, or don’t work as designed (bugs). At this point, I revisited my reasons for using Gnome. I used to use XFCE, and Fluxbox before that, but I ultimately decided to use Gnome because it was the default, and I want to avoid customizing my environment as much as possible. Gnome had gotten to the point where it was about as good as anything else, for my purposes.
So instead of reverting to Gnome 2, since I’m going to customize my environment anyway, I decided to go back to XFCE instead. And now I’m happy again. It’s simple, usable, functional, attractive, and fast. It’s easy to customize slightly to my taste (e.g. moving the taskbar to the bottom of the screen, Windows style). And Alt-TAB works sanely. And, I get back some of the things I always missed, such as one-click ways to maximize windows vertically or horizontally.
When Fedora 16 comes out I’ll revisit Gnome 3 and see if it has improved, but for now I’m done with my evaluation. I also just set up a new computer for my dad, who’s a Windows user, and installed Fedora 14 with Gnome 2, instead of Fedora 15. I hope the Gnome developers are able to collect and integrate enough feedback to make a groundbreaking Gnome 3 interface that still does what people expect and works the way they work, because that is the key to getting more adoption.
A review of SQL Antipatterns by Bill Karwin
SQL Antipatterns, by Bill Karwin, Pragmatic Bookshelf, 2010. About 300 pages. Here’s a link to the publisher’s site.
I loved this book. (Disclosure: Bill is a colleague of mine.) This is the first book I’ve read from the Pragmatic Bookshelf, and if the rest are like this one, I want to read them. The quality of the writing is way above the average technical book. Techniques that feel gimmicky and forced in other books, such as fake stories to introduce each chapter, actually work here (because they’re real stories, not fake ones). Each topic is named in a memorable way and introduced very cleverly. Little quotes and excerpts are tastefully used to illustrate and reinforce the topics. The end result is that it’s a lot of fun to read. If you do nothing more than read the first and last page of each chapter, you’ll enjoy it and learn a lot at the same time.
The target audience here is developers who must work with databases, not database administrators per se. But if you’re a DBA and you’re having a hard time explaining something to a developer, you could do a lot worse than referring to this book. The content is database-agnostic, with specific mention of a broad variety of databases such as MySQL, Oracle, SQL Server, and more when appropriate.
There are four major categories of mistakes: logical database design, physical database design, queries, and development practices. These cover 25 “anti-patterns” showing how not to do things, and explaining why they’re wrong, when it might be a good idea to do it that way anyhow, and what your alternatives are.
For example, the first pattern is titled Jaywalking. The name is a reference to avoiding intersections, i.e. storing comma-delimited lists in a single column. The chapter explains what’s hard to do in a database that’s designed in this manner, and how to sniff out the use of this antipattern. Then it explains how to create an intersection table, and ends with a pithy recommendation to “store each value in its own column and row.” Pretty straightforward, and much more effective than a lecture on all the different varieties of normal forms.
Sometimes I thought of some other alternatives. For example, in avoiding FLOAT data types to prevent rounding errors for currency values, the book suggests using DECIMAL. But another option is storing an integer number of the smallest currency unit (pennies, in the US dollar currency). And I thought of lots more antipatterns, such as using a table as a queue, which often happens sneakily, without anyone realizing it. I am sure we could all suggest more antipatterns and alternatives. Anything can be taken to extremes; I think this book wisely stops before the point of burn-out.
Like Bill Karwin, I see developers make these mistakes constantly, so I recommend this book to every developer who interacts with a database. It might be a good book to buy for new team members, if you’re the team leader.
Vim, the ultimate command-line password manager
Thanks to a comment on a recent blog post where I lamented the lack of an easy-to-use password manager, I’ve switched from Revelation to… Vim.
I already use Vim for my note-keeping system. I simply add a modeline to the top of the file,
# vim: set ic hlsearch:
This makes searches case-insensitive, so I can just open the file and start typing a search, and it highlights it and moves to the first match as I type. It’s a great way to find something in a file. I have used this simple technique for many years to build a topical index over thousands of interesting email threads, code snippets, posts from bloggers, and customer issues. To use a buzzword, it scales as large as I need it to, and I can quickly find just about anything on any topic I’ve cared about in the past.
The remaining question is how to encrypt the file full of passwords. That’s what Sergio showed me in his comment. There’s a GPG plugin for Vim that detects that I’m opening a GPG-encrypted file and decrypts the buffer for me. This makes it incredibly easy to open, search, edit, and save the file. Much easier than Revelation. I found that the plugin didn’t properly encrypt the file (or I’m doing something wrong), so I first created the file as plain-text and manually encrypted it with GPG, and subsequently the plugin seems to work great.
I still might follow up on Sergio’s suggestions for building something on top of this. I’d really like integration with the desktop: press a key, start typing and seeing matches auto-complete, press TAB when I have the one I want, and copy the password. Maybe I will actually do this. Or maybe a hot-key to simply open Vim with the password file in a terminal is all I need.





