Showing posts with label opinion. Show all posts
Showing posts with label opinion. Show all posts

26 November 2009

GUI vs. CLI: Apples vs. oranges


I have never managed to wrap my mind around the tired old GUI (graphical user interface) vs. CLI (command line interface) debate and which is "better", and why you should try to avoid or strictly stick to the one or the other.

It is like comparing a brush and a hammer. Both are tools, but for different purposes, and if you want to be prepared for a wide variety of home improvement tasks, you better have both in your tool chest and a basic understanding of how to use them.

If you are good at building furniture but suck at painting, you call a friend who glazes your table for you, or you practice on a piece of leftover wood. Your friend may be a good painter with a steady hand and a great sense for color but completely clueless on how to fix a broken door hinge. But with only a little bit of learning and practice, he could become proficient enough to do small repairs himself.

Along the same lines, life can be easier if you have a basic understanding of both the GUI and CLI environments available on your computing platform, because each is included for the purpose of helping you with specific tasks.

GUIs shine when it comes to interactive workflow, especially editing on-screen data, like an image or a spreadsheet. Essentially, complex spreadsheets and desktop publishing were the applications that made graphical interfaces necessary in the first place. Navigation within the environment is highly interactive too; you activate menus or buttons, working your way to the target. A lot of information can be presented on the screen at once, which is great for working with multiple applications or pieces of data at the same time.

CLIs allow calling commands or starting applications with a few keystrokes and also have built-in scripting mechanisms which allow for building heavily customized command pipes and conditional/repeated execution. The vast majority of processing is done non-interactively (you only have the "upfront cost" of constructing a suitable textual expression). Navigating the environment is a minor matter; you change directly into a directory if you really need to be there, but commands are callable regardless of your location within the directory tree. Sophisticated means of auto completion and history search are available via simple key combinations, so you don't have to type any more than absolutely necessary.

It can be said that CLIs are designed to spare you time with generic tasks that do not need to be interactive, while GUIs are designed as an efficient way to do interactive document centric tasks. You should use a CLI for: Capitalizing text that has to fit some specific pattern, in some files scattered randomly over several partitions, and the filenames and file modification times have to fit a specific pattern too. That's a sed one-liner in a Unix shell and will waste hours when done in a GUI. You should use a GUI for: Adding some nice gradient borders to an object group in a SVG graphic, and make a text element run along it. Requires high-level wizardry in a CLI, better done in five minutes in Inkscape.

You should be able to see now that both user interfaces are highly efficient and mature solutions for getting different sets of tasks done. What you will end up using depends on what you want to accomplish, and use of an unsuitable interface will likely cause frustration and an "it can't be done" feeling. Call a knowledgeable friend then, or better, spend some time getting accustomed to the more suitable tool.

18 November 2009

Can we have more Qt apps please?


Managing software has been sort of a hassle for me lately, as I like to keep my package base free of cross-desktop dependencies. More precisely, it has become harder to find GUI software outside of the KDE application suite that doesn't depend on Gtk.

I suspect a number of reasons is responsible for this. Ubuntu, the most popular starter distribution, uses Gnome as its default desktop, and its KDE variant permanently lags two releases behind. Gnome is also backed by GNU and Red Hat. That doesn't change the fact that Gtk is rarely updated and still lacks in functionality for me as much as it did years ago.

I plainly hate the file dialog. Sorry, there is no way I could say it politely. It is the antithesis of "having useful features". It lets me double click on folders and files (I'm used to single click), it has a vanilla file name input box, a non-obvious "select-as-you-type" feature and a half-baked location sidebar. I can't do any file operations in the dialog, or fine-tune the view. It doesn't remember its size and position. That dialog nearly makes me understand why fanboys from other platforms like to compare Linux desktops to early releases of their preferred operating system.

That doesn't mean I dislike Gnome as a desktop. It is trying hard to be an easy to understand environment without excess complexity, which isn't a bad idea when coping with non-geek users. What bugs me is the ancient GUI toolkit sitting on it. I could go and explain that to the Gnome developers like others did, but they will just flame me for not following their ideals.

If you use Gnome, it doesn't mean you can't use Qt for software development. Despite the fact that it is used by KDE as part of its application framework, it is an independent product and tries to integrate into any desktop environment as seamlessly as possible. That cannot be said of Gtk. It misbehaves (not adhering to desktop settings) and looks non-native in both KDE and Windows.

You also get not only a GUI toolkit with Qt, but a complete cross-platform application development framework plus a powerful IDE. If you don't feel comfortable with your current framework or IDE, you might want to have a look.

For the sake of fairness, my next opinion post will be critical of KDE. It is my preferred desktop and has its share of problems too.

16 November 2009

ARM netbooks still not hitting store shelves



If you knew me quite well (but you don't, as I started this blog ... well, yesterday), you knew I would sell my soul for one of these. I have been desktop free for ca. two years now because upgrading the box resulted in a 23% increase of power bill with me basically doing the same internet, programming and graphics editing work as before, at exactly the same speed.

My current primary workstation is an Asus EEE 701, upgraded to 2 GB of RAM, hooked up to a 19" widescreen monitor and a bunch of peripherals attached via a 13-port active USB hub. As I found out by measurements, the netbook draws about 12-16 watts under normal interactive workload and about 22 watts when the integrated Intel graphics have to do 3D. I verified the battery runtime to be about 3½ hours, including some gaming and some WLAN use. Arch + KDE 4 + desktop effects are really speedy on it.

Thus, I learned to love netbooks as reliable universal gadgets at an irresistible price point. Then Windows was dumped upon the market for free, and netbooks became slightly shrunken laptops at a price point that would make you rather choose the full-size laptop. VoĆ­la, more Vista sales for Microsoft, Linux killed off, netbooks killed off, mission accomplished.

Today I realize netbooks were not just a random trend out of nowhere. Linux had been taking off large scale in embedded years before as a means of keeping microprocessor costs low. Software license costs are obviously an issue if your electronic goods sell for somewhere between 0.10€ and 10€ per unit. Also, smartphones had become more powerful and full-featured but still suffered from small screens and limited methods of user input. Netbooks basically emerged as the missing link between high-end embedded and low-end non-embedded.

When they came out, I immediately bought one because it was the first time I saw preinstalled Linux on a store shelf, but foremost because I knew they wouldn't be available forever, being vulnerable because of them being x86 based. They were (sort of) capable of running desktop Windows; more precisely I heard reports that it felt like wading through tar on the first-generation netbooks which had been designed with Linux + simple everyday tasks in mind. Which was nothing a good portion of lobbying and vendor strong-arming couldn't fix. After everybody was convinced that a netbook's primary purpose consists of playing egoshooters, running Photoshop on a 7" screen and spending 600€ for an additional Microsoft Office license, Vista laptops finally started selling.

Various more or lesser known OEMs have since tried to fill the gap from the other side using ARM based netbooks. Linux runs as fine on ARM as it does on x86. Microsoft can only counter on this architecture using their unpopular Windows CE offering. They can't exert pressure via the software platform, as CE is a completely different kernel from desktop Windows and doesn't have the amount of software or extended hardware support Linux offers.

On the hardware side you can expect 8 hours of runtime when not plugged in, and ARM licensees can sell CPUs cheaply because they produce approximately 1 billion of them a quarter. You get a 150€ netbook that is on par with a 349€ Atom netbook, with half the power consumption.

Yet we see ARM netbooks being announced all the time, showcased, everybody is excited, then they disappear before hitting sales channels. Something nasty might be going on behind the scenes, I suspect. I'm very sorry that my money can't find its way into an ARM OEM's pocket; a quadcore Cortex-A8 as a mobile workstation would surely make me nerdgasm.