{"id":414,"date":"2009-06-09T06:03:24","date_gmt":"2009-06-09T14:03:24","guid":{"rendered":"http:\/\/messofpottage.com\/blog\/?p=414"},"modified":"2009-06-09T06:03:24","modified_gmt":"2009-06-09T14:03:24","slug":"programming-day","status":"publish","type":"post","link":"https:\/\/accretiondisc.com\/blog\/2009\/06\/09\/programming-day\/","title":{"rendered":"Programming Day"},"content":{"rendered":"<p>Since we finished <a href=\"http:\/\/livelylatin.com\/site\/index.php\">Latin<\/a>, my Mondays are pretty much free time for me. I spent yesterday writing some <a href=\"http:\/\/ruby-doc.org\/\">code<\/a>. (I even wrote <a href=\"http:\/\/www.ruby-doc.org\/core\/classes\/Test\/Unit.html\">unit tests<\/a> and put my changes under <a href=\"http:\/\/git-scm.com\/\">source control<\/a>.)<\/p>\n<p><!--more-->The overall project is to come up with a workflow to manage and make use of digital images. There are two sources: cameras on the one hand, and scanners on the other. The challenges are:<\/p>\n<ol>\n<li>to review images and junk the ones not worth keeping. This isn&#8217;t really a programming job. If it was, I&#8217;d be doing a better job of it. Over the last decade I&#8217;ve accumulated about 20 GB of photographs and scans. I don&#8217;t have a clue how I&#8217;m going to crack this nut.<\/li>\n<li>to rotate and crop images appropriately. It might be necessary to enhance them, although I tend to think of that as something you do with an original, not something you do before you file it away as an original.<\/li>\n<li>to name them and apply other meta-data.<\/li>\n<\/ol>\n<p>Now, <a href=\"http:\/\/www.apple.com\/ilife\/iphoto\/\">iPhoto<\/a> could do all this and do it very well. Indeed, the only problem with <em>iPhoto<\/em> is that it requires you to maintain your collection on a single machine. (You can make a backup elsewhere, but there is only one iPhoto library. This is a weakness iPhoto shares with <a href=\"http:\/\/www.apple.com\/itunes\/\">iTunes<\/a>, and in the case of iPhoto, there&#8217;s not even a recording industry to blame it on.) (Another problem with iPhoto is that it uses a bizarre filing system designed, I think, to sell external hard drives for backups. But those are cheap.)<\/p>\n<p>Anyway, there are a million problems, and I&#8217;m checking them off, about one a month. Lately what I&#8217;m working on is getting the files off the camera\/scanner and onto a computer with an appropriate name. That&#8217;s a simple <em>cp<\/em> command, with a few extra twists. For example, cameras and scanners use the <a href=\"http:\/\/en.wikipedia.org\/wiki\/File_Allocation_Table\">FAT filing system<\/a>, so images come with their permissions set to <code>0777<\/code>, when they should probably be <code>0644<\/code>. A <a href=\"http:\/\/en.wikipedia.org\/wiki\/Chmod\">chmod<\/a> fixes that.<\/p>\n<p>Scans, in particular, represent a challenge, because they don&#8217;t have anyplace to store metadata except the <a href=\"http:\/\/www.obrador.com\/essentialjpeg\/headerinfo.htm\">JPEG comment field<\/a>. A few months ago, however, I hit on the idea of grafting an <a href=\"http:\/\/en.wikipedia.org\/wiki\/Exif\">EXIF header<\/a> into the scan&#8217;s image file. I went looking for sample images and found one from a camera I don&#8217;t own and never will. Then I modify the EXIF data appropriately, and bob&#8217;s your uncle. I should patent it. (Probably someone already has.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since we finished Latin, my Mondays are pretty much free time for me. I spent yesterday writing some code. (I even wrote unit tests and put my changes under source control.)<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[23,52],"tags":[],"class_list":["post-414","post","type-post","status-publish","format-standard","hentry","category-life","category-technology"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paRqpr-6G","_links":{"self":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts\/414","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/comments?post=414"}],"version-history":[{"count":0,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts\/414\/revisions"}],"wp:attachment":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/media?parent=414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/categories?post=414"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/tags?post=414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}