{"id":175,"date":"2007-11-14T23:39:09","date_gmt":"2007-11-15T06:39:09","guid":{"rendered":"http:\/\/messofpottage.com\/blog\/?p=175"},"modified":"2007-11-14T23:39:09","modified_gmt":"2007-11-15T06:39:09","slug":"good-book","status":"publish","type":"post","link":"https:\/\/accretiondisc.com\/blog\/2007\/11\/14\/good-book\/","title":{"rendered":"Good book"},"content":{"rendered":"<p>If Amazon didn&#8217;t make it so hard to recommend buying a book from them, I&#8217;d post a link to <cite>Practical Ruby for System Administration<\/cite>. I purchased a copy a couple of weeks ago, and just finished reading it. You can find a <a href=\"http:\/\/www.apress.com\/book\/view\/1590598210\">sample chapter<\/a> at the publisher&#8217;s site.<br \/>\n<!--more--><\/p>\n<p>It&#8217;s a nice manageable-sized book full of ideas about how you can you Ruby to get things done on your system. Obviously it would be most valuable to full-time system admins, but people like me who administer a handful of systems as a sideline or even as a hobby can benefit from it. There are a number of smallish tasks that I&#8217;d like to script but which would be too much effort in bash.<\/p>\n<p>The book begins (page 15) with a ton of one-liners, which is a nice way to see ruby&#8217;s power, but which also makes you think, &#8220;should I be using &#8216;<code>find ... | while read ; do ...<\/code>&#8216; here, or ruby? That&#8217;s a feeling I never had before; I always move from interactive commands to the shell to tiny shell scripts to bigger scripts and finally realize I need to move to ruby. It&#8217;s interesting to see this approach, which I would imagine gets the job done sooner because you quit using the shell sooner.<\/p>\n<p>The chapter on performance measuring doesn&#8217;t really matter to me because if I can write a script to do something at all, it will be a net improvement over me doing it by hand. I can imagine serious admins caring, though.<\/p>\n<p>The place where I first said, &#8220;whoa!&#8221; is the actually fairly late in the book. Hamou has a section on using ruby to automate access to the web-based admin interfaces of the odd bits of hardware on your network. This is the kind of thing that serious network admins get SNMP-enabled hardware to do. I don&#8217;t have any of that, but with a few dozen lines of Ruby I could do the same thing with the DSL modem, a wireless router, and a printer on my home network. There&#8217;s something cool about the idea of connecting up to them in a cron job to check the status on an hourly basis, logging it to a database, and generating reports with pretty charts. I don&#8217;t need to do it, but this book tells me how I could (web-console access, database logging, and graphing) if I wanted.<\/p>\n<p>It doesn&#8217;t have much to do with Rails, but it&#8217;s buzzword-compliant in the other areas: gems, rake, automated testing, embedded documentation, YAML for configuration, etc.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If Amazon didn&#8217;t make it so hard to recommend buying a book from them, I&#8217;d post a link to Practical Ruby for System Administration. I purchased a copy a couple of weeks ago, and just finished reading it. You can find a sample chapter at the publisher&#8217;s site.<\/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-175","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-2P","_links":{"self":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts\/175","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=175"}],"version-history":[{"count":0,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts\/175\/revisions"}],"wp:attachment":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/media?parent=175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/categories?post=175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/tags?post=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}