My First Fork: facebook-ios-sdk
Recently, I’ve been making a more concerted effort to contribute to open source software. As someone who recently picked up programming, besides my friends, OSS has been my best teacher. I can’t tell you how many tutorials I’ve gone through, how many hours I’ve spent on StackOverflow or how many libraries I’ve used on my own projects I found on Github.
On to my first fork. My friend Jordan and I were talking about OSS and even though I’ve open sourced some of my own software, I’ve never contributed to a project. I told him I didn’t even know where to start, or even how to do it. So we just searched “iOS” on Github and facebook’s sdk popped up. Jordan suggested contributing to facebook’s iOS sdk. My response was, “How the hell can I contrib…wait.”
I had been playing around with the sdk last week and I had extended one of their samples - Facebook gives you some great examples and very detailed installation instructions on their developer site. I wanted to include a search feature for FriendPickerSample, a way to list all of your Facebook friends and select them to be used for invites, tagging, etc. Interestingly enough, Facebook gives you a tutorial just for that. However, I wanted instant search, I wanted the search to update every time I typed in a letter. So I built it. It was actually very little code, I just had to implement one UISearchBarDelegate method and it worked!
I told Jordan about this and he thought this would be a good feature to add to the FriendPickerSample. I was a little hesitant because I was intimidated by the thought of trying to contribute to Facebook’s sdk. Jordan suggested I email the maintainer and ask if he’d be open to this contribution, “they’re people too.” So I emailed onebit about the feature and asked what his thoughts were - just a shot in the dark. Then, an hour later, I got a reply! It was probably the best email I could have received in that situation. He thought that the feature was “Cool!” and that it “sounds like an improvement.” He was very supportive and of course, he couldn’t promise that the change would be accepted, but encouraged me to fork the repo and submit a pull request.
I had never forked a repo in my life. It’s not hard at all, but I just had never done it and I didn’t know what the etiquette was for submitting a pull request. With Jordan’s help, I forked the repo, added my feature and submitted a pull request. My first fork and pull request!
The combination of contributing to such a widely used sdk, onebits’ response and my first time contributing to another project was a rush. It felt like a blur, but I did learn a few things. Jordan advised me to look at how Facebook’s commit messages were structured so that I could format mine accordingly. This will help the maintainer easily understand what’s going on. But I think the biggest lesson I learned was through a fear that I overcame.
“They’re people too.”
Jordan’s comment resonated with me. I was really intimidated by the thought of trying to add to Facebook’s sdk and emailing onebit. I haven’t even been programming that long, who am I to do even try? My own insecurities about my programming skills were hindering me from even trying. But Jordan’s encouragement and onebit’s friendly response made me realize that I’ve got nothing to lose. Maybe my pull request won’t get accepted, maybe my code really isn’t all that great and maybe I didn’t do something correctly, but I did something I had never done before and took one more step forward in my programming journey. That’s what matters. I know I have areas to work on as programmer, but I’m learning and there’s no reason for my own insecurities to stop me from trying something out of my comfort zone. With respect to my programming skills, I try to remind myself, it’s not where you are now, but where you are going.
Notes:
onebit was gracious enough to suggest that I email him with the pull request so that he’d be able to look at it easily. I emailed him and though I haven’t yet received a response, I’m looking forward to his feedback.
About the pull request, it’s more than just a few lines of code than I mentioned. This is because in FriendPickerSample, the search bar isn’t set up, so I had to include that per the howto I linked above. Also, I made the code iOS 4.x compatible so I couldn’t take advantage of new methods available for iOS 5+, which added to the lines of code.
There are so many great, free resources about programming, there are virtually no barriers if you own a computer and have internet access. It is truly the perfect time to learn how to code - just watch this video from Code.org if you need any more convincing. In my pursuit of programming, I have stood on the shoulders of giants and it motivates me to contribute. I think the computer science community is as close to a real life antithesis of the Tragedy of the Commons as any.



