Liquid Fun

What I worked on

This week was mostly internal support for various projects, nothing too exciting. Most of my energy was spent outside of work looking for houses. Becoming a homeowner is something I never really thought I would be able to do, but its moving very quickly. We've already toured 9 houses and found a few gems but couldn't move quick enough to make a purchase. I'm sure I'll have quite a few posts about home ownership soon...

What I learned

I started pushing the Liquid template language used in Jekyll a bit harder than I thought possible. Since this is a static website I can't do a lot of fancy things, I can still have some fun. One of my new years resolutions was to practice guitar every day, and a great way (for me) to keep with it is to log my progress. I started to keep track with a simple yml file which was fine for the first week or so. Then I realized I wanted to get a running total of minutes of practice. I could do it manually, but I knew there had to be a better way.

I setup a page to display my notes, and using a simple for loop ran through each entry. That was easy enough. But how could I total up the minutes. Turns out using the assign function I could keep a running total during my for loop.

For each day, add the current day's time to the total_minutes variable.

The other benefit of doing it this way is I used a quick logic check to color code my days - red if less than 10 minutes of practice, yellow if between 10 and 30, and green if I practiced for more than 30 minutes. Displaying it all out as a calendar gives me a really nice overview of my progress so far. I'll share the progress page once I tidy up the styling a bit.


Just trying to stick with my resolutions, work hard, and get over the finish line for buying my first house. Lots to come!

Previous PostIn the groove Next PostWorking