Posts


Some Lisp Functions

07.06.2019 | 10:16 PST



Example Post for Aimee and Nico

12.01.2017 | 19:47 PDT

The other day I worked with two friends to go over how my static site was put together and what making a change to the site, such as adding a post, would entail. They are both developers; one newly interested, and one who programs for a career. Deciding to jump in a group Discord call and code on a Friday night after coding all week at first seemed like a condemnation of our social lives but quickly proved to be fun, informative, and an activity worth repeating in the future.

Fast forward to pushing the code to Heroku and I could not figure out why the post was not appearing on the live site. We hit our heads against the repo and decided to call it a night. Today I determined the reason and it is a valuable lesson in both version control hygiene and being careful when committing code while tired.

If we take a look at app.rb, we can see exactly what happened:


require 'roda'

class App < Roda
  plugin :render

  route do |r|
    r.root do
      view :about
    end

    r.is 'home' do
      r.redirect '/'
    end

    r.is 'posts' do
      r.get do
        view :posts
      end
    end

    r.is 'contact' do
      r.get do
        view :contact
      end
    end
  end
end
                  

In the above code, the 'posts' route previously resolved to a deprecated file index.erb with identical contents to my current posts.erb (this move from index to posts was done for more logical naming clarity). As it turns out when working with Aimee and Nico, the code for our example post was being placed in index.erb as I had not yet removed it from the repository.

Lessons learned:

  • Spend the time to think through and verify commits, particularly if dealing with deprecating files (even on hobby projects)
  • DON'T try to ship code on a Friday night in most circumstances

In my next post, I'll go over how to spin up a developer AWS EC2 instance running ubuntu server with emacs as a daemon that can be connected to from any of your personal computing devices. This device-agnostic setup works amazingly for many development and operations scenarios and is the setup I've found to be the most productive for my workflow. Thanks for reading!



Getting the site up and running. . .

11.08.2017 | 23:29 PDT

Ideally I would like to get into the habit of posting ramblings and interesting content that I come across on a semi-regular basis. I like the idea of keeping a living index of the things that resonate with my thoughts and feelings through time. Consistency is key in these endeavors so we'll see how I do.


As a parting thought from this introductory post, here is a lovely picture that I recently took of Seattle: