{"id":18111,"date":"2012-12-24T07:17:10","date_gmt":"2012-12-24T12:17:10","guid":{"rendered":"http:\/\/www.shamusyoung.com\/twentysidedtale\/?p=18111"},"modified":"2012-12-24T08:21:11","modified_gmt":"2012-12-24T13:21:11","slug":"postcards-from-linux-part-3","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=18111","title":{"rendered":"Postcards From Linux Part 3:<br\/>Mouse vs. Keyboard"},"content":{"rendered":"<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/splash_linux.jpg' class='insetimage'   alt='splash_linux.jpg' title='splash_linux.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>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&#8217;s too many steps to reach certain options.<\/p>\n<p>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&#8217;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&#8217;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&#8217;s a lot of value in this hybrid approach. <\/p>\n<p>An interesting problem I like to think about: <em>How can you use the GUI to teach the user to use the command line?<\/em> 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&#8217;re doing. You can use the menu or the shortcut, and it&#8217;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&#8217;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. <\/p>\n<p>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&#8217;t remember the commands. I have to look up every command, every time. One example of a dozen: <\/p>\n<p><!--more--><tt>select database_foo<\/tt> <\/p>\n<p><em>Hey, why didn&#8217;t that work? <\/em><\/p>\n<p><tt>select database_foo;<\/tt> <\/p>\n<p><em>Nope. Damnit. uhhh&#8230;<\/em><\/p>\n<p><tt>SELECT database_foo<\/tt> <\/p>\n<p><em>No. Fine. Google search. Oh right!<\/em><\/p>\n<p><tt>use database_foo<\/tt> <\/p>\n<p><em>Okay, got it. I&#8217;m sure I&#8217;ll remember that next time. Now lets see&#8230;<\/em><\/p>\n<p><tt>delete table foo;<\/tt> <\/p>\n<p><em>What? Why didn&#8217;t that work?<\/em><\/p>\n<p>You get the idea. I can&#8217;t learn this stuff because I use it so rarely. This is a situation where you&#8217;d want to use a menu.  Yes, it&#8217;s way slower to click-click-click your way through a GUI, but it&#8217;s faster and less frustrating than doing a search for every command. <\/p>\n<p>When it comes to a GUI \/ terminal hybrid interface, I&#8217;m not sure how you could present this information. I&#8217;m not even sure it&#8217;s possible. But it&#8217;s still an interesting problem I like to think about. <\/p>\n<p>Anyway, the stuff I&#8217;ve been working on&#8230;<\/p>\n<h3>IDE<\/h3>\n<p><table width='600'  cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/linux_code_blocks.jpg' class='insetimage' width='600' alt='Code::Blocks IDE for Linux Mint' title='Code::Blocks IDE for Linux Mint'\/><\/td><\/tr><\/table><\/p>\n<p>You might remember from <a href=\"?p=18128\" title=\"Postcards From Linux Part 2: How Do I Work This?\">last time<\/a> 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:<\/p>\n<ol>\n<li>As I&#8217;d already discovered: <strong>Don&#8217;t<\/strong> download libraries and source from the web unless you&#8217;re doing something really unusual or exotic, which should not be your first steps in programming on Linux. Also don&#8217;t use the Software Manager.  While better, it still won&#8217;t give you all the parts you need.  Instead&#8230;\n<\/li>\n<li>Use the Synaptic Package Manager. This should be your go-to place for getting libraries.\n<\/li>\n<li>When you&#8217;re looking for <tt>foo<\/tt>, it will probably be listed in the manager as <tt>libfoo<\/tt>. That&#8217;s the binaries so that you can use <tt>foo<\/tt>. However, if you want to write code with foo then you need <tt>libfoo-dev<\/tt>.  These rules are not written in stone and there are exceptions, but this should help you narrow that initial search.\n<\/li>\n<li>Those long dependency chains we see in Windows? You know, where you need to install library <tt>B<\/tt>, which depends on <tt>C<\/tt>, which depends on <tt>D<\/tt>. The synaptic package manager mostly untangles this for you. However, it might be good to go <strong>up<\/strong> the chain a bit. Instead of installing <tt>B<\/tt>, maybe look and see if there is library <tt>A<\/tt> and install that instead.  You&#8217;ll get <tt>B<\/tt> 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.\n<\/li>\n<\/ol>\n<p>Disclaimer: The above is very rudimentary and probably factually correct in places. I said I got advice. I didn&#8217;t magically learn the entire system in a couple of days.<\/p>\n<p>At any rate, I can code now. I&#8217;m not doing anything serious. I&#8217;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&#8217;s either trivial or impossible. So that&#8217;s kind of interesting. <\/p>\n<h3>Keyboard Shortcuts<\/h3>\n<p><table width='300'  cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/linux_keyboard.jpg' class='insetimage' width='300' alt='CHECK8 THIS BOX TO STOP7 TYING SEVENS 1AND ONES ALL THE TIME.' title='CHECK8 THIS BOX TO STOP7 TYING SEVENS 1AND ONES ALL THE TIME.'\/><\/td><\/tr><\/table><\/p>\n<p>On Windows, if you have NumLock off (so the keypad is in navigation mode) then pressing shift doesn&#8217;t alter the behavior of the keys.  If you&#8217;re on a line of text, then pressing <tt>shift+num7<\/tt> home (num 7) should select everything from the current cursor position to the beginning of the line. <\/p>\n<p>On Linux, this will just type a seven. <\/p>\n<p>This has been driving me crazy.  It&#8217;s a small thing, but it&#8217;s deeply ingrained into my typing habits.  I can see the merits of both systems and I don&#8217;t think either one is &#8220;wrong&#8221;.  But I&#8217;ve got a quarter century of muscle memory behind using <tt>shift-num7<\/tt>  to select to the beginning of a line, and it&#8217;s proving difficult to overcome. The worst part is, I&#8217;m most likely to make this mistake when I&#8217;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&#8217;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. <\/p>\n<p>I figured this was just the cost of making the switch. I mean, this is a pretty rare typing habit and it&#8217;s not like Linux coders are falling over themselves to accommodate every tiny little whim of Windows refugees.<\/p>\n<p>But as it turns out, there is a solution. It&#8217;s easy. (Just slightly hard to find.) Under System Tools&raquo;System Settings&raquo;Keyboard Layout&raquo;Layouts tab, there&#8217;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. <\/p>\n<h3>Wine<\/h3>\n<p><table width='600'  cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/linux_psp8.jpg' class='insetimage' width='600' alt='Paint Shop Pro 8 on Linux Mint' title='Paint Shop Pro 8 on Linux Mint'\/><\/td><\/tr><\/table><\/p>\n<p>Paint Shop Pro is an off-brand image editing software. It doesn&#8217;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:<\/p>\n<ol>\n<li>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.\n<\/li>\n<li>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.\n<\/li>\n<\/ol>\n<p>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&#8217;t really tell what they&#8217;re doing with it these days. The <a href=\"http:\/\/www.corel.com\/corel\/product\/index.jsp?pid=prod4900067&#038;cid=catalog20038&#038;segid=8100002&#038;storeKey=us&#038;languageCode=en\" title=\"Creative Photo Editor\">feature list<\/a> makes it sound like they gutted it, but maybe they&#8217;re just playing up with &#8220;simple tool for home photos&#8221; angle because that&#8217;s a bigger market than &#8220;bloggers who need to fiddle with things a bit&#8221;.  <\/p>\n<p>In any case, I&#8217;ve been using PSP8 for the better part of a decade now. That&#8217;s a long time to stick with a single version of something, and even now I&#8217;m not feeling any urge to upgrade. The software does everything I need it to do, I know how to use it, it&#8217;s stable, and it&#8217;s paid for. It is not possible to improve on this situation. <\/p>\n<p>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&#8217;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.<\/p>\n<p>I tried <a href=\"http:\/\/en.wikipedia.org\/wiki\/Wine_(software)\" title=\"Wine (software) - Wikipedia\">Wine<\/a>, the program that lets old Windows programs run on Linux. It worked flawlessly here.  PSP8 might be a little slower now, but it&#8217;s otherwise the same tool I&#8217;ve been using for years. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[273],"class_list":["post-18111","post","type-post","status-publish","format-standard","hentry","category-personal","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/18111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18111"}],"version-history":[{"count":0,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/18111\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}