Archive for November, 2013

Fourty Three

Fourty Three


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Canada License.
Permissions beyond the scope of this license may be available at

Deploy a Subdirectory to Heroku as an app

BranchesThis is mainly to share a discovery a coworker and I made while trying to figure out how to deploy a project they were working on after a transition to the single git repo for this project.

Normally when working with heroku you just execute the following and bam, you’re up and serving your code on a dyno.

git push heroku master

But with the way things have been setup now, our git repository now looks like this:

↳ abracadabra-app
↳ fabulous-project
↳ spiderman-project

And we have a problem. Doing the deployment as before would push all these directories and our apps won’t show up the way we want. They might not even deploy nicely, which would be terrible!

Git is a pretty powerful tool and the things you can do with it are pretty much limitless. In the newer versions of git (at least git 1.8.x) has this feature called the git subtrees. They kind of evolved as an alternative way to git submodules, so they can be used for stuff like including project dependencies.

But git is just a tool, and while the regular use case for a subtree might be managing other dependencies, we can “trick” (if you want to call it that) heroku into thinking it’s a git repo. By specifying where the subtree is we can treat that as a repository and push that repository up to heroku.

One advantage of this single repo for the team I’m on is it gives us a single location to look at all our projects in progress, open pull requests and get feedback and using the subtree strategy allows each collaborator to deploy their respective project to heroku as easily as deploying a normal rails app, albeit with a few changes to the deployment incantation.

So, how do I deploy? essentially what you are going to do is deploy that prefixed subtree to heroku as master. This is achieved by composing a few discrete git commands:

git push heroku `git subtree split --prefix fabulous-project master`:master

Aside from the code inside the backticks, deployments look almost the same. All we’ve done is changed where our master branch is coming from, sending that off to our remote (heroku) in this case.

If you’re looking to learn more and perhaps get a stronger understanding of what’s going on when using git subtree you can check out some of the following links, that I semi-butchered:



Dec 12, 2013 – It should be noted that things have gotten a lot better for myself since I wrote this post. I’ve been doing a lot to improve how I’ve been feeling and the feedback from the community has been excellent. I want to thank everyone who reached out to me and shared similar stories

I’m going to preface this with the following: This is an extremely difficult article to write and I’m also pretty sure it’s going to be a bit of a rant. I’m afraid of what people will think of me, the implications it will have on my career and  by simply exposing a vulnerability.

I’ve been living with depression for at least the last five years and I am constantly in fear of being proven a fraud.  I normally don’t talk to people about how I’m really feeling and I believe I’ve been sort of described as having two emotions – ‘angry’ and not ‘angry’.

I don’t come from what I’d call the traditional programming background or ever did anything I’d consider amazing. When I was a teenager I was really into Chemistry, I loved it! I was going to get a degree in Chemical Engineering and do whatever… chemical engineers do. During college things changed a bit, while I still really enjoyed Chemistry I wasn’t as thrilled for it. During my last semester a friend and I were building an educational tool that would help people learn chemistry. It was really just a glorified multiple choice test that was written in Visual Basic. I wrote up the questions, my friend wrote the code. While he was working on it, I was watching and thought that was pretty neat. Building stuff with a computer is kinda cool, and with a tiny bit of convincing I had enrolled to join the Computer Science program at a local university.

I had never programmed before in my life and I never really thought too much of it at the time, but to this day this haunts me. The first year was hard. Recursion was confusing, I wasn’t ever really good at the theoretical mathematics such as proofs and formalized logic, the list goes on. I made it through my first year with decent grades and lost my scholarship, but who doesn’t? Those were really just tools to lure in suckers to the University cash machine, right?

Midway through the beginning of my second year I realized that I needed to get more into the industry and actually building software. Until that point I was doing summer contracts/training as a cook in the military. I was afraid that if I stuck with this path I’d get out of school with no skills and be someone with a degree and useful to show for it. I’m pretty sure that when I started my first work term or perhaps my second that my depression started.

I looked at the work of other interns who were both younger and newer to school than myself and were performing drastically better than I was and this really started to bother me. I sort of started trying to learn new things like reading technical books only to put them down. They weren’t the most interesting things to read and made it really difficult to stay interested. After having been working for a few years, some of the harder books to read I can consume, though at a fairly slow rate. I often question whether I’m applying anything I’ve “learned” from them correctly, and still often doubt myself.

Often I find myself with the following logic looping through my mind:

My coworkers are working on cooler things than I am and they are definitely more interested in the things they are working on than I am. The things I’m interested in have no inherent value, so what’s the point of working on this stuff? Am I even interested in the kind of problems the company I’m at is trying to solve? I’m not a top performer and a fraud… why am I still even on the payroll? I can’t consistently find a project I want to work on, I have no commitment.

Those thoughts really get to me and extremely bother me and got to a point where I had to see a doctor about it. I was prescribed anti-depressants and I’m pretty sure they worked. There was a “noticeable change in my performance” and I’m confident it was just because of the medication. With the move to a new city and my laziness when it comes to seeing health care professionals, I simply stopped taking the medication. The withdrawal was interesting, but after it was over things seemed pretty good. I was confident I didn’t need them, or would be able to cope without them. Besides, they felt like a crutch and I’d need to face these problems for real and can’t hide behind induced chemical reactions. Considering how it feels like I’m thinking of how I’m shitty at my job and should probably just leave almost monthly, I’m starting to think otherwise.

A couple months ago I had a bad break down. It was after a tightly crunched project and things were pretty rough I knew that something had to be done. That week I started seeing a therapist and things have been going alright. We don’t meet frequently enough, but I’ve been getting something out of them. It was nice to find out suicidal thoughts are a pretty normal thing. While we’ve only covered a few things, it’s been nice to have an unbiased third part to talk to about what’s been going on and even still I find this difficult.

I’ve been spending a lot of time asking myself what I want out of my life and career. I’ve also been trying to figure out what I truly enjoy and love doing. It’s been difficult because I’ve always had a hard time on self-reflection and personal goal setting. Goals feel so far away and the path there feels like it’s a smooth vertical rock face. I’ve tried breaking them down and figuring out how I’d get there. If things are going good, it’s not too bad but a trigger will happen and I’m back to dwelling and depression.

From my reflections I’ve been able to figure out the following things:

As such I chose a few and tried to do more of them.

I’ve been lurking in IRC channels and trying to help out wherever I can. I can usually only answer the simple questions though I look at is as taking the burden off common questions of the smarter peoples shoulders. I do know that in the past I’ve always like when some random guy even tried to help me.

I’ve done some volunteering for a local exposition and have started learning how to make games. I’ve been looking into virtual and physical game jams to participate in to test myself and see what kind of game I can get done in 48 hours.

Finally, to I’ve been trying to get involved in pairing more and sort of teaching. I’ve been inviting people to do remote pairing with me, though I’d love it more if I could pair with someone far smarter than I am on something that’s actually cool. I’ve also been paring with some co-workers on things to fix bugs in various systems.

All that being said, I’m hoping that things get better in the future and that I’m able to either not have depression anymore or have it under control such that I’m actually able to enjoy my work, my life and everything else that encompasses those.

If you’re curious what depression is like, check out Zoe Quinn’s game Depression Quest which gives a pretty good example of what it’s like. I didn’t play all of it, but after a few minutes in the game it really resonated with me.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Canada License.
Permissions beyond the scope of this license may be available at

So I’ve been wanting to make games


I’ve always thought about making games, and technically my first job out of school was making games; though they weren’t necessarily the craziest. Maybe a year or two ago I built a Tapper clone using libGDX which is a Java library for making games. It was pretty cool, though I found myself always getting hung up on the code part of it and that always frustrated me. Other tools such as Unity had this professional feel that made it really overwhelming when I tried using it. I wanted to find a tool that was easy enough to use and didn’t require much or writing code.

I wanted to focus on the other parts of making games: making assets, finding music (maybe making it eventually), putting the game together and playing with the mechanics. If I could do all of this without having to write code, that would be pretty awesome! A tool I’ve heard about in the past, but didn’t really look into perhaps because of pricing reasons was Game Maker. This is a pretty popular tool in the game community and some pretty neat games have been built using it as well.

The one problem I’ve had with making games is what feels like a lack of ideas. I’d say the closest thing I came to this was back when I was a teen and ran as Dungeon Master for a bunch of friends, and that’s been practically forever since I’ve done that. Thankfully there’s some pretty good resources online to come up with ideas that I was introduced to years ago by my friend Robert Ziehl. There’s this site called the Experimental Gameplay Project that used to run monthly challenges which would revolve around a theme. Sometimes the theme is a restriction, such as a game that only uses one button to be played. I’m thinking I’ll be diving through their archives to come up with some challenges for myself to build games. Another big thing with EGP is that they informally restrict you to building the game in 7 days which is a restriction I kind of appreciate since it helps keep the scope quite small.

After talking to a bunch of the volunteers at Gamercamp, they said another great way is to just get involved in game jams. I’ve enjoyed participating in Rails Rumble and figure I’ll definitely get involved in the Toronto game jam next year. And of course there’s the global game jam Ludum Dare which seems to happen pretty frequently. While looking around I noticed that there’s one coming up in December that I’ll probably participate in. I don’t know how good of a game I’ll make, but it should fun anyway.

For now, I’ll just be making clones so I can learn the tools and get practice on things like creating assets. And without further ado, here’s the game I built today that I’ve boringly named “splosion”. It’s a simple asteroids clone where your goal is to shoot the asteroids and score as many points as you can before you lose all your lives. It’s not very hard, so don’t expect too much from it :)

Download Splosion — Windows

Download Splosion — GameMaker Project Files



Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Canada License.
Permissions beyond the scope of this license may be available at

Rails Rumble Recap: Remote Pair Programming


Rails rumble finished a little over two weeks ago, though one aspect of the competition I still wanted to cover was how I was able to stay present with the team in more than just a “being there on screen kind of way”.

One thing I really wanted to be sure we could do was pair when needed. I looked into a few tools which would cover what we needed and was pretty happy with the results. A major aspect of the pairing tools is they needed to have a low barrier to get setup. We were on a tight schedule and wouldn’t have time to futz around with server configurations and such. Another thing I wanted to ensure is we weren’t forcing another’s system configuration on the other.

We were able to achieve this by using a tool that ties into the editor itself. That tool is called Floobits and did an excellent job at helping us pair on code. I looked into the tool a few months ago but had no real project to work on it with, so being 500km away from my team for Rails Rumble was a perfect opportunity to try it out. After a tiny bit of configuration, which mainly consisted of installing the plugin and getting an account we were up and programming. It was great because we were working on some unfamiliar tools and also wanted to talk about a few parts of the systems design. There was little to no lag, which I’ve found to be a problem with some of the tools in the past.

One disadvantage of Floobits is that it only works for showing off the code and not the tests or interface. We got around this by combining another pairing tool called Screenhero. This takes an approach somewhat similar to Screen Sharing, except you can lock it to a single app if you want. Aside from just sharing your screen, the pair is also able to interact with it as if it was on their own computer. A really cool part about Screenhero is that instead of suffering that mouse-hijacking you sometimes experience while pairing, they actually get a dedicated pointer. I believe the tool can also be used with several people in a session, and the tool pops a kind of tooltip underneath their cursor to inform you who is moving around.

I found Screenhero to be a little less than preferable when doing remote pairing due to the amount of latency, but when it came to pairing on Ember side of our Rails Rumble app, it was perfect for sharing the Chrome window that we were using to see the results!

Screenhero does come with a voice chat component, though we opted to stick with Google Hangouts because it allowed the other members of our team to quickly get in touch with us while my pair and I were working. So while each tool does have a number of neat features, I found the experience to be the best while using all of them to solve slightly different problems. Bringing together Floobits for the actual coding, Screenhero for watching our tests or interacting with the brower, and hangouts for audio/video worked out quite well!

I’ve been trying to find more people who are interested in remote pairing, and this will be the setup I’ll be using for all my remote pairing sessions. Of course you can always get in contact with me on twitter if you are interested or check out one of my projects on Floobits to see the remote programming in action. When I get a chance, I’m normally working on some refactoring/modularization of the Shopify Theme gem.

If you are interested in learning about some other remote pairing tools, the Ruby Rogues recently covered it in a podcast.

photo by: I am Fry