I stumbled across the video above late last night — it’s a talk from Infinite Ammo‘s Alec Holowka. The whole talk is worth listening to, however there’s a relevant bit I want to share with you below:
“You can actually solve a simpler problem that gets you the same result.
So whenever somebody comes to me with a programming problem, they’re like, “I can’t figure out how to make this function do this really weird thing!” I’m always like, “What are you actually trying to do? What’s your objective?” And usually there’s a simpler way to do that.
Whenever people encounter a structure that’s been put in place, they’re less willing to do their own thing.”
I bring this up because I wanted to set up my personal website heymrbass.com to run on GitHub Pages. We used it last week to host our game jam game Baby Tanks and it was really simple — just push a copy of your static site to the
gh-pages branch. Voilà! So I installed my favorite static site generator Middleman and got to work.
But it didn’t work. GitHub may look for the
gh-pages branch on most project repos, but mine was a special user repo. Thus, it only listened to the
master branch. End of story.
After that I didn’t put two and two together and figure out that I could just deploy my static site on the
master branch instead. No, I thought it would be best to listen to GitHub and use their own static site generator, Jekyll, even though it’s very blog centric and we haven’t been the best of friends in the past. After switching, the site design started to come along and I was ready to deploy the site.
But it wouldn’t deploy correctly.
Jekyll supports Plugins — pieces of Ruby code that run at compilation time to help you add styles or format your text. Of course, there are no restrictions on the code — and that’s why GitHub doesn’t run plugins before it deploys your site. So currently my site looks like someone ripped the CSS right out of it.
At this point in the development process I shouted vehemently into the air, making it known in my empty house how much I wanted to strangle this piece of software. When things died down a bit, I came to my senses and started looking for alternate solutions. I found several sites pointing towards the deployment branch strategy, which we now know retrospectively was the easiest, most straightforward solution.
The point I’m trying to make is to keep an eye on what your objective is. It’s easy to assemble a bunch of “rules” piecemeal and then wind up somewhere completely different than where you intended to be. Believe me, my gut reaction right now is, “Tear down ALL the things!” and replace it with Middleman. But that’s not the right approach, since I’ve already finished my design in Jekyll, it’s just not deployed correctly. What I need to do now is write some Rake tasks and deploy the site on
Eventually I’ll probably switch to Middleman, but it’s not important to do that now. My goal was to get a static site up, after all. So that’s what I’m going to do.