{"id":6351,"date":"2024-06-19T09:22:36","date_gmt":"2024-06-19T15:22:36","guid":{"rendered":"https:\/\/augerhandle.net\/blogs\/jumpingfish\/?p=6351"},"modified":"2024-06-19T15:17:39","modified_gmt":"2024-06-19T21:17:39","slug":"tools","status":"publish","type":"post","link":"https:\/\/augerhandle.net\/blogs\/jumpingfish\/2024\/06\/19\/tools\/","title":{"rendered":"Tools"},"content":{"rendered":"<h3>1. Small is Beautiful!<\/h3>\n<p>There&rsquo;s a strong preference in the Unix community for small, simple tools. It&rsquo;s a philosophy that emerged roughly at the same time as E.F.Schumacher&rsquo;s classic reflection on economics.<\/p>\n<p><center><\/p>\n<p><a href=\"https:\/\/jumpingfish.smugmug.com\/Blogpix\/2024\/06\/i-5C39M2T\/A\"><img decoding=\"async\" title=\"Small is Beautiful\" src=\"https:\/\/photos.smugmug.com\/Blogpix\/2024\/06\/i-5C39M2T\/0\/6nzmpFnVZwvfCRLxCW68t2XrKGHkG3QMkrqpNgLk\/S\/small-is-beautiful-S.jpg\" alt=\"cover of Schumacher's Small is Beautiful, Economics as if People Mattered\" width=\"125\" \/><\/a><\/p>\n<p><\/center><\/p>\n<p>The <a href=\"https:\/\/en.wikipedia.org\/wiki\/Unix_philosophy\"><em>Unix Way<\/em><\/a> was a philosophy spread informally but also in books, some of which are on the shelves in the other room.<\/p>\n<p><center><\/p>\n<p><a href=\"https:\/\/jumpingfish.smugmug.com\/Blogpix\/2024\/06\/i-dhc5ZCQ\/A\"><img decoding=\"async\" title=\"Programming on Purpose\" src=\"https:\/\/photos.smugmug.com\/Blogpix\/2024\/06\/i-dhc5ZCQ\/0\/Cc7Pmg8QCQPFHPwDG7gBQpDLsCjNtBjz8TfT8tL5Z\/S\/programming-on-purpose-S.jpg\" alt=\"cover of P.J. Plauger's book, Programming on Purpose\" width=\"125\" \/><\/a> <a href=\"https:\/\/jumpingfish.smugmug.com\/Blogpix\/2024\/06\/i-6xNm6mw\/A\"><img decoding=\"async\" title=\"Software Tools in Pascal\" src=\"https:\/\/photos.smugmug.com\/Blogpix\/2024\/06\/i-6xNm6mw\/0\/N36vk7Tq7J6s3g7LQPQc4c74jpSFHLdKd38th5Rd\/S\/software-tools-in-pascal-S.jpg\" alt=\"cover of Kernighan and Plauger's book, Software Tools in Pascal\" width=\"125\" \/><\/a> <a href=\"https:\/\/jumpingfish.smugmug.com\/Blogpix\/2024\/06\/i-Rz8z74r\/A\"><img decoding=\"async\" title=\"The Practice of Programming\" src=\"https:\/\/photos.smugmug.com\/Blogpix\/2024\/06\/i-Rz8z74r\/0\/CZJbsHNS4ngX4bnmRSwNBhTV5mpFDtnPx6nhFG5Gd\/S\/the-practice-of-programming-S.jpg\" alt=\"cover of Kernighan and Pike's book, The Practice of Programming\" width=\"125\" \/><\/a><\/p>\n<p><\/center><\/p>\n<p>Bookshelves that line the walls floor to ceiling, interior designer recommendations to ditch them notwithstanding.<\/p>\n<h3>2. Simplicity In Practice?<\/h3>\n<p>Simple software tools glued together in simple ways.<\/p>\n<p>For example, to remove all the PDF files in a directory except those ending in <span style=\"font-family: Andale Mono;\">&#8211;<\/span><span style=\"font-family: Arial;\">STUDENT<\/span> , you might assemble <em><strong><span style=\"font-family: Arial;\"><span style=\"color: #ff2600;\">rm<\/span><\/span><\/strong><\/em>, <em><strong><span style=\"font-family: Arial;\"><span style=\"color: #ff2600;\">ls<\/span><\/span><\/strong><\/em>, and <em><strong><span style=\"font-family: Arial;\"><span style=\"color: #ff2600;\">grep<\/span><\/span><\/strong><\/em>&nbsp;thusly<\/p>\n<p><span style=\"font-family: Arial;\"><em><strong><span style=\"color: #ff2600;\">rm<\/span><\/strong><\/em> -f `<em><strong><span style=\"color: #ff2600;\">ls<\/span><\/strong><\/em> *.pdf | <em><strong><span style=\"color: #ff2600;\">grep<\/span><\/strong><\/em> -v -STUDENT`<\/span><\/p>\n<p>And as I wrote the underlying automation for the next generation of my Algebra 2 guided notes, I embedded just such a snippet into a <span style=\"font-family: Andale Mono;\">bash<\/span> script. Except that a non-fatal error message consistently showed when there were no PDF files to begin with.<\/p>\n<p>Bad juju. Can&rsquo;t have error messages, fatal or not, lurking in the soul of the machine. But where was it coming from? Finding out was a drag, because it required disassembling the tools and individually checking them out.<\/p>\n<p>In the end, the solution was (as it often is) to use <em><strong><span style=\"color: #ff2600;\"> <span style=\"font-family: Arial;\">find<\/span><\/span><\/strong><\/em>, a Swiss Army knife of complexity. No one remembers how to use it, ever. It is the antithesis of the <em>Unix Way. <\/em>But with that single (complex) tool, the job was so much easier.<\/p>\n<p><span style=\"font-family: Arial;\"><em><strong><span style=\"color: #ff2600;\">find<\/span><\/strong><\/em> . -name &#8220;*.pdf&#8221; ! -name &#8220;*-STUDENT.pdf&#8221; -type f -delete<\/span><\/p>\n<p>And it reads better, doesn&rsquo;t it? Bonus: no more error messages.<\/p>\n<p>Now, on to the math&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Small is Beautiful! There&rsquo;s a strong preference in the Unix community for small, simple tools. It&rsquo;s a philosophy that emerged roughly at the same time as E.F.Schumacher&rsquo;s classic reflection on economics. The Unix Way was a philosophy spread informally but also in books, some of which are on the shelves in the other room. [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/augerhandle.net\/blogs\/jumpingfish\/wp-json\/wp\/v2\/posts\/6351"}],"collection":[{"href":"https:\/\/augerhandle.net\/blogs\/jumpingfish\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/augerhandle.net\/blogs\/jumpingfish\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/augerhandle.net\/blogs\/jumpingfish\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/augerhandle.net\/blogs\/jumpingfish\/wp-json\/wp\/v2\/comments?post=6351"}],"version-history":[{"count":6,"href":"https:\/\/augerhandle.net\/blogs\/jumpingfish\/wp-json\/wp\/v2\/posts\/6351\/revisions"}],"predecessor-version":[{"id":6357,"href":"https:\/\/augerhandle.net\/blogs\/jumpingfish\/wp-json\/wp\/v2\/posts\/6351\/revisions\/6357"}],"wp:attachment":[{"href":"https:\/\/augerhandle.net\/blogs\/jumpingfish\/wp-json\/wp\/v2\/media?parent=6351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/augerhandle.net\/blogs\/jumpingfish\/wp-json\/wp\/v2\/categories?post=6351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/augerhandle.net\/blogs\/jumpingfish\/wp-json\/wp\/v2\/tags?post=6351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}