on Dec 24, 2012
My adventure into the world of Linux-using continues. With regard to the holy war of GUI interfaces vs. the POWER OF THE COMMAND LINE, I have to say that I see this as a false dichotomy. A menu lets you know what can be done, where stuff is, and what the options are. Once you know these things, a command line is [sometimes] the fastest way to do them. In the terminal I feel blind. In a windowed situation I feel like it’s too many steps to reach certain options.
You know what interface paradigm I always loved? Games made with id Tech 4 and Source engines. (Doom 3 and Half-Life 2, respectively.) You’ve got your menus and sliders and checkboxes and whatnots, but if you need to get into the crazy stuff you tap tilde and you’ve got sleek command line interface with text coloring, command history, script execution, and autocomplete. Yes, I know operating systems are more complex than videogames, but there’s a lot of value in this hybrid approach.
An interesting problem I like to think about: How can you use the GUI to teach the user to use the command line? I know this is heresy to the purists, but I see a lot of value in it. However it worked, it would have to be like keyboard shortcuts: When you look at a menu it usually lists the keyboard shortcuts for the stuff you’re doing. You can use the menu or the shortcut, and it’s up to the user when they want to make the mental investment of learning to do things the optimal way. If you select the same thing again and again, you’ll get irritated enough to memorize the shortcut. However, you never have to memorize anything and are free to do almost everything with the mouse. Repetition will create a desire for optimization which will create willingness to learn.
For me, a great example of this is MySQL. I use it once every six months or so. These intervals are so far apart that I don’t remember the commands. I have to look up every command, every time. One example of a dozen:
Hey, why didn’t that work?
Nope. Damnit. uhhh…
No. Fine. Google search. Oh right!
Okay, got it. I’m sure I’ll remember that next time. Now lets see…
delete table foo;
What? Why didn’t that work?
You get the idea. I can’t learn this stuff because I use it so rarely. This is a situation where you’d want to use a menu. Yes, it’s way slower to click-click-click your way through a GUI, but it’s faster and less frustrating than doing a search for every command.
When it comes to a GUI / terminal hybrid interface, I’m not sure how you could present this information. I’m not even sure it’s possible. But it’s still an interesting problem I like to think about.
Anyway, the stuff I’ve been working on…
You might remember from last time that I was completely baffled at trying to get a simple thing working. I got this sorted out with some help from a Linux-savvy friend. Here was his advice, which worked for me:
- As I’d already discovered: Don’t download libraries and source from the web unless you’re doing something really unusual or exotic, which should not be your first steps in programming on Linux. Also don’t use the Software Manager. While better, it still won’t give you all the parts you need. Instead…
- Use the Synaptic Package Manager. This should be your go-to place for getting libraries.
- When you’re looking for foo, it will probably be listed in the manager as libfoo. That’s the binaries so that you can use foo. However, if you want to write code with foo then you need libfoo-dev. These rules are not written in stone and there are exceptions, but this should help you narrow that initial search.
- Those long dependency chains we see in Windows? You know, where you need to install library B, which depends on C, which depends on D. The synaptic package manager mostly untangles this for you. However, it might be good to go up the chain a bit. Instead of installing B, maybe look and see if there is library A and install that instead. You’ll get B as part of the deal, and a whole lot of inter-dependence and path-sorting should get sorted out in the process. For example, I wanted the GTK library. By downloading the gnome-common package I got GTK, all the stuff that GTK needs, and all of the stuff to use GTK in various IDEs.
Disclaimer: The above is very rudimentary and probably factually correct in places. I said I got advice. I didn’t magically learn the entire system in a couple of days.
At any rate, I can code now. I’m not doing anything serious. I’m just making bits of things compile and getting a sense of how it all works. My sense at this point is that using libraries in Windows is always a pain in the ass. By contrast, on Linux it’s either trivial or impossible. So that’s kind of interesting.
On Windows, if you have NumLock off (so the keypad is in navigation mode) then pressing shift doesn’t alter the behavior of the keys. If you’re on a line of text, then pressing shift+num7 home (num 7) should select everything from the current cursor position to the beginning of the line.
On Linux, this will just type a seven.
This has been driving me crazy. It’s a small thing, but it’s deeply ingrained into my typing habits. I can see the merits of both systems and I don’t think either one is “wrong”. But I’ve got a quarter century of muscle memory behind using shift-num7 to select to the beginning of a line, and it’s proving difficult to overcome. The worst part is, I’m most likely to make this mistake when I’m already agitated and fighting with some other problem. As I hammer away, looking for a solution to an unrelated problem I end up typing more and more random numbers or accidentally clearing things I’ve typed. Ease-of-use issues like this form little negative feedback loops for me where frustrations compound and proliferate mistakes, leading to more frustrations.
I figured this was just the cost of making the switch. I mean, this is a pretty rare typing habit and it’s not like Linux coders are falling over themselves to accommodate every tiny little whim of Windows refugees.
But as it turns out, there is a solution. It’s easy. (Just slightly hard to find.) Under System Tools»System Settings»Keyboard Layout»Layouts tab, there’s an options button at the bottom of the dialog that takes you to a massive list that must encompass every conceivable keyboard configuration option, no matter how trivial, obscure, esoteric, novel, or odd. In that list is an option to make the shift-numpad relationship work like in Windows.
Paint Shop Pro is an off-brand image editing software. It doesn’t just stand in the shadow of Adobe Photoshop, it is eclipsed by it. Version 8 came out in 2003, and was one of the last entries into the now-extinct mid-market image editing software. Since then, the market has fragmented into two distinct camps:
- Simple software for touching up photographs: Brightness, contrast, color, cropping, borders. This stuff is either cheap or free, and is designed to be used by the proverbial grandpa trying to digitize his yellowing photo albums before he drops dead.
- Professional image manipulation software which can do anything and everything. You can photoshop things, paint digital pictures, create logos, restore old photographs, or whatever other kind of pixel-pushing you need to do. These things typically cost hundreds of dollars.
The extinct(?) mid-market stuff had 90% of the features of the top-tier stuff for 25% of the price. I bought Paint Shop Pro 8 sometime around 2004 or so. I think I paid $40, marked down from $70. This was a sweet spot for me with regards to price and features. A few years later Corel bought the developer and I can’t really tell what they’re doing with it these days. The feature list makes it sound like they gutted it, but maybe they’re just playing up with “simple tool for home photos” angle because that’s a bigger market than “bloggers who need to fiddle with things a bit”.
In any case, I’ve been using PSP8 for the better part of a decade now. That’s a long time to stick with a single version of something, and even now I’m not feeling any urge to upgrade. The software does everything I need it to do, I know how to use it, it’s stable, and it’s paid for. It is not possible to improve on this situation.
I was really worried about this when moving to Linux. The open source alternative on Linux is called GIMP, which is notorious for its interface. I’ve used it in the past and thought it felt like someone had taken all the tools in the toolbox and tied them together like Christmas lights. This might seem like a good idea until you actually try to use them this way.
I tried Wine, the program that lets old Windows programs run on Linux. It worked flawlessly here. PSP8 might be a little slower now, but it’s otherwise the same tool I’ve been using for years.
Shamus Young is an old-school OpenGL programmer, author, and composer. He runs this site and if anything is broken you should probably blame him.