HomeRamblings  ⁄  dry

dry

Bootstrapping my Blogs

Ever notice that blogs that are tutorial in nature spend a lot of time providing instructions on installing things, but a whole lot depends on what the author already has installed that he's forgotten to tell you about? Or perhaps the author simply left out the details necessary for you to fully replicate his environment? For me personally, I get downright tired of writing the same thing over and over. Like my code, I want my blogging efforts to be efficient and DRY. Since I work extensively with virtual machines to maintain an orderly environment in a known state, I figured it makes just as much sense to document by establishing a git repository that contains all my bootstrap scripts and configuration scripts needed to get things installed. Whether you use bare metal or virtual machines, you are now empowered… read more


DRYing your Views

Let me start out by saying that I am finally beginning to understand a bit about that magical Ruby block notion and how implementing methods through block passing can really empower you as a Ruby developer. Thanks to, a most excellent [Ruby tutorial][1], I am definitely feeling a good bit more empowered about getting my Views in Rails all DRY'd up. The problem: I wanted to introduce a property editor metaphor for the website I'm working on where properties could expose edit forms for just about any situation, much like wordpress' widget interface does. That is, there's an area of the current page that shows basic information about the property in a read-only (and preferably compact) form, and user could click an "edit" button and exposed an editable version of the properties. The "edit" link becomes a "cancel" link, which,… read more