Welcome back to the pond! Last week we touched on the importance of mentoring juniors and Github best practices. In this week's episode, we'll be following up on the junior workflow from last week by discussing two tools you should definitely have and how to install them, exploring new ground by touching on some entry level SCSS techniques, sharing my AHA! and FAIL moments of the week, and lastly, our weekly query for you good people out there to ponder. So lets jump right into it shall we?
Entering the pond
As part of the services we provide for some of our clients, we monitor web page load times. The Munin plugin we were using at the time was this outdated shell script. It worked fine up until we were monitoring lots of urls. If one of those urls took too long to load, it caused the entire plugin to timeout. This sort of timeout would lead to a slew of warning/critical emails from Munin. Oh, and it also only loaded just the html, none of the additional resources a normal browser would grab.
To address this I rewrote most of this script in Ruby to handle checking many different virtual hosts/urls on a single server. This was a fun exercise in threading, daemons, and a nice refresher on Ruby development.
Last week, this error brought many of our deployments to a screeching halt. "upload via sftp failed on metaltoad.com: Net::SFTP::StatusException (Net::SFTP::StatusException open ...releases/20130408223054/drupal/ sites/all/themes/boilerplate/css/compiled/default.css (2, "no such file"))".
One interesting thing that has evolved from our use of Capistrano is the configuration files have become the de-facto documentation hub for a project's server connection details. (We do maintain inventory data elsewhere, but for the developer in the trenches,
config/deploy/prod.rb is the first place to look). A question arose: How to parse the settings out of these files?
Of all the powerful words in any language assertion is in my opinion the absolute most powerful. With affermative language we are able to create trust, enact people's will, and begin processes. Silly of course, to take one word to mean so much but I believe everyone can agree that when a client asks for something 'yes' should be the thing that jumps to your lips immediately, hopefully without qualification but at times you have to add on things like 'and it will cost x' or ', now lets look at the plan and see how we can make this a reality'.
Having only left Rubyville a couple weeks ago there are still a lot of Ruby-based utilities that I still find incredibly handy. One such utility that I've recently fallen hopelessly in love with is stakeout.rb from: http://pragmaticautomation.com/cgi-bin/pragauto.cgi/Monitor/StakingOutF…