Thursday, March 29, 2018

Simple, really

My new recipe website is definitely falling into the "labor of love" category.  Jekyll, after a few small hiccups, has been extremely easy to navigate through and does a lot to help me minimize the code I need to rewrite.  As of this writing, I've got about 400 lines of code - mostly html and css with a few Ruby directives and filters mixed in - and about 80 lines of configuration in place for a fully functioning website.  I expect, that, given my current strategy of adding recipes and, eventually adding a cooking lessons section to the site, I'll have about 2000 total lines of code and configuration in place for my website.  In addition, Jekyll's ease of use has even allowed me to do a full recipe page redesign and make the page responsive to different sized devices.

Of course, anyone familiar with software engineering will point out that this is just a simple static site.  That's true, but getting to simple is often the most difficult people take to solve a problem.  Simple solutions are often deceptive, because, in hind sight, they seem so obvious, even though the effort to get there could take a lot of effort.

In my case, it literally took years.  I started with the idea of website and thought I'd need to create a CRUD (Create, Read, Update, Delete) app with a database that's so ubiquitous across the web.  And of course, like a lot of developers, I didn't bother to really see if something existed before starting.  This was partly by design - to keep my programming skills fresh - but partly because I didn't do any upfront investigation. 

Eventually, I did look for an existing tool, because I wasn't getting anywhere close to generating a recipe site with my then current course of action.  Once I had an existing tool, I spent time cutting out the cruft that I didn't need for my site and upgrading old portions of the code that was present.  I was still no closer to a recipe website though. 

Then I decided to create a static site, but wanted to create a recipe generator, so, as I mentioned in my last post, I wouldn't wind up with a lot of duplicated code.  Eventually, through a tip of one of my friends, I finally stumbled across Jekyll.  And now, in about 2 weeks, I've been able to crank out more recipes, with a much better design, than I had in the previous 2 years.  It seems so obvious - why didn't I just look for a static site generator in the first place?  But, it took a lot of design-based suffering to come to this conclusion.  I'm grateful for all of the tools and techniques I learned about on my journey, and some are even helpful in my job.  Even though I knew about the difficulty of creating a simple solution before undertaking this project, I'm happy that I was able to prove the theorem to myself by going through all of the iterations to get to where I'm at now.

Oh, and, by the way, the new site is now here.

No comments:

Post a Comment